[jboss-user] [JBoss Web Services] - Annotate WebService methodwith optional Header

samhain do-not-reply at jboss.com
Mon Mar 18 09:16:18 EDT 2013

samhain [https://community.jboss.org/people/samhain] created the discussion

"Annotate WebService methodwith optional Header"

To view the discussion, visit: https://community.jboss.org/message/803252#803252

I have a Web Service that needs an optional soap header on its methods, but I don't want to have it required(i.e. nullable ).  The reason for this is because my service will be deployed to multiple environments, some of which will require the header while others will not.

Is it possible to use Java annotations to mark a soap method's header parameter as optional?  If not, can it be accomplished via WSDL modification?

Or is the "correct" way to accomplish this by not defining the header in the WSDL, but instead to tell the clients to send the header with mustUnderstand="0".

Reply to this message by going to Community

Start a new discussion in JBoss Web Services at Community

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.jboss.org/pipermail/jboss-user/attachments/20130318/6c3c57bb/attachment.html 

More information about the jboss-user mailing list