Hello Andreas and Chinthaka, You are correct that the INCLUDE_OPTIONAL_HEADERS property is only used for 2005/08 addressing. It is used to turn on/off the spec defined defaulting behaviour with regard to the addressing headers sent in a message. As the 2004/08 spec does not define similar defaulting behaviour this property is not used when that spec is engaged.
All that being said, the current behaviour is not correct, so please raise a JIRA to cover this issue [1]. [1] http://issues.apache.org/jira/browse/AXIS2 Cheers Brian DePradine Web Services Development IBM Hursley External +44 (0) 1962 816319 Internal 246319 If you can't find the time to do it right the first time, where will you find the time to do it again? Eran Chinthaka <[EMAIL PROTECTED]> wrote on 28/06/2007 04:01:13: > -----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] > Unless stated otherwise above: IBM United Kingdom Limited - Registered in England and Wales with number 741598. Registered office: PO Box 41, North Harbour, Portsmouth, Hampshire PO6 3AU
