-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Hi Andreas,

I looked at the code and in AddressingOutHandler.java:425 it checks
includeOptionalHeaders property together with the addressing version.
Basically what it means is that includeOptionalProperty param will only
work for WS-A final version.
When I looked at svn history that line was committed by David Illsley,
so I assume he must have a good reason to do it only for the final version.
Let's wait and see why he did that.

I cc'ed this to David also so I hope he will chime in.

Chinthaka

Andreas Bobek wrote:
> Hello,
> 
> how can I omit the ReplyTo header in outgoing one way messages? I use
> submission version of WS-Addressing and a fire-and-forget client. I
> inspected the addressing code a little bit and found a
> INCLUDE_OPTIONAL_HEADERS option, but setting it to false was not successful.
> 
> Here is the call:
> 
> public static final void main(String[] s) {
> try {
>       String repository = s[0];
>       ConfigurationContext confCtxt = ConfigurationContextFactory
>               .createConfigurationContextFromFileSystem(repository,
>                       (new File(repository + "/conf/axis2.xml"))
>                               .getAbsolutePath());
>       ListenerManager listenerManager = new ListenerManager();
>       listenerManager.init(confCtxt);
>       listenerManager.start();
>       Options options = new Options();
>       
> options.setSoapVersionURI(SOAP12Constants.SOAP_ENVELOPE_NAMESPACE_URI);
>       options.setProperty(AddressingConstants.WS_ADDRESSING_VERSION,
>               AddressingConstants.Submission.WSA_NAMESPACE);
>       options.setAction("anyAction");
>       
> options.setProperty(AddressingConstants.INCLUDE_OPTIONAL_HEADERS,false);
>       // transport settings...
>       ServiceClient client = new ServiceClient(confCtxt, null);
>       client.setOptions(options);
>       OMFactory factory = OMAbstractFactory.getOMFactory();
>       OMElement el = factory.createOMElement("Test", null);
>       client.fireAndForget(el);
> }
> catch (Exception e) {
>       e.printStackTrace();
> }
> 
> 
> This is what is sent:
> 
> <?xml version='1.0' encoding='UTF-8'?>
> <soapenv:Envelope
> xmlns:wsa="http://schemas.xmlsoap.org/ws/2004/08/addressing";
> xmlns:soapenv="http://www.w3.org/2003/05/soap-envelope";>
>     <soapenv:Header>
>         <wsa:ReplyTo>
>             <wsa:Address>
>  
> http://schemas.xmlsoap.org/ws/2004/08/addressing/role/anonymous
>             </wsa:Address>
>         </wsa:ReplyTo>
>         <wsa:MessageID>
>             urn:uuid:01673833EEDE7612381182964039233
>         </wsa:MessageID>
>         <wsa:Action>
>             anyAction
>         </wsa:Action>
>     </soapenv:Header>
>     <soapenv:Body>
>         <Test>
>         </Test>
>     </soapenv:Body>
> </soapenv:Envelope>
> 
> 
> ReplyTo is optional in Submission version. So why it is set? And how can I
> omit it?
> I think this was not the case in earlier versions.
> 
> 
> Thanks,
> Andreas Bobek.
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> 
> 

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.3 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iD8DBQFGgyR4jON2uBzUhh8RAribAJ4qln44dANo4OaBhZsLaeJOkj+VuACeJuva
MFm7sKU4TAU0e3owAkOEd6k=
=/vWq
-----END PGP SIGNATURE-----

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to