You are viewing a plain text version of this content. The canonical link for it is here.
Posted to java-user@axis.apache.org by Andreas Bobek <an...@uni-rostock.de> on 2007/06/27 21:27:02 UTC

[Axis2-1.2] how to omit ReplyTo header in outgoing one-way messages

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: axis-user-unsubscribe@ws.apache.org
For additional commands, e-mail: axis-user-help@ws.apache.org


Re: [Axis2-1.2] how to omit ReplyTo header in outgoing one-way messages

Posted by Brian De Pradine <PR...@uk.ibm.com>.
Hi Eran,

Actually, I meant exactly the opposite that INCLUDE_OPTIONAL_HEADERS has 
nothing to do with fixing this particular problem. It may be that 
INCLUDE_OPTIONAL_HEADERS may be a bit of a misnomer which may have led to 
some of the confusion. I have now checked in the fix for this so let me 
know if there are any other issues.

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 <ch...@opensource.lk> wrote on 28/06/2007 22:51:54:

> -----BEGIN PGP SIGNED MESSAGE-----
> Hash: SHA1
> 
> Brian,
> 
> Did you mean to say we should enable this for both addressing versions?
> Just wanted to clarify. If yes +1 from me.
> 
> Thanks,
> Chinthaka
> 
> Brian De Pradine wrote:
> > 
> > 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 <ch...@opensource.lk> wrote on 28/06/2007 04:01:13:
> > 
> > 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: axis-user-unsubscribe@ws.apache.org
> >> For additional commands, e-mail: axis-user-help@ws.apache.org
> > 
> > 
> > 
> >>
> - ---------------------------------------------------------------------
> To unsubscribe, e-mail: axis-user-unsubscribe@ws.apache.org
> For additional commands, e-mail: axis-user-help@ws.apache.org
> >>
> 
> > 
------------------------------------------------------------------------
> 
> > /
> > /
> 
> > /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/
> 
> 
> 
> 
> 
> 
> 
> -----BEGIN PGP SIGNATURE-----
> Version: GnuPG v1.4.3 (GNU/Linux)
> Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org
> 
> iD8DBQFGhC16jON2uBzUhh8RAn5OAJ9aurouRdUlPxYx2i8otwoVT7GKqgCfRQOO
> Tc1DtsxP5k30pQ+30AsVBYY=
> =gpAc
> -----END PGP SIGNATURE-----
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: axis-user-unsubscribe@ws.apache.org
> For additional commands, e-mail: axis-user-help@ws.apache.org
> 






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






Re: [Axis2-1.2] how to omit ReplyTo header in outgoing one-way messages

Posted by Eran Chinthaka <ch...@opensource.lk>.
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Brian,

Did you mean to say we should enable this for both addressing versions?
Just wanted to clarify. If yes +1 from me.

Thanks,
Chinthaka

Brian De Pradine wrote:
> 
> 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 <ch...@opensource.lk> wrote on 28/06/2007 04:01:13:
> 
> 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: axis-user-unsubscribe@ws.apache.org
>> For additional commands, e-mail: axis-user-help@ws.apache.org
> 
> 
> 
>>
- ---------------------------------------------------------------------
To unsubscribe, e-mail: axis-user-unsubscribe@ws.apache.org
For additional commands, e-mail: axis-user-help@ws.apache.org
>>

> ------------------------------------------------------------------------

> /
> /

> /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/







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

iD8DBQFGhC16jON2uBzUhh8RAn5OAJ9aurouRdUlPxYx2i8otwoVT7GKqgCfRQOO
Tc1DtsxP5k30pQ+30AsVBYY=
=gpAc
-----END PGP SIGNATURE-----

---------------------------------------------------------------------
To unsubscribe, e-mail: axis-user-unsubscribe@ws.apache.org
For additional commands, e-mail: axis-user-help@ws.apache.org


AW: [Axis2-1.2] how to omit ReplyTo header in outgoing one-way messages

Posted by Andreas Bobek <an...@uni-rostock.de>.
Hello Brian and Chinthaka,

thanks for replying.
I just created the JIRA issue.

Andreas.


________________________________

	Von: Brian De Pradine [mailto:PRADINE@uk.ibm.com] 
	Gesendet: Donnerstag, 28. Juni 2007 12:30
	An: axis-user@ws.apache.org
	Betreff: Re: [Axis2-1.2] how to omit ReplyTo header in outgoing
one-way messages
	
	

	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 <ch...@opensource.lk> 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: axis-user-unsubscribe@ws.apache.org
	> > For additional commands, e-mail: axis-user-help@ws.apache.org
	> > 
	> > 
	> 
	> -----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: axis-user-unsubscribe@ws.apache.org
	> For additional commands, e-mail: axis-user-help@ws.apache.org
	> 
	
	
	
	
________________________________

	
	
	

	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 

	
	
	
	
	
	



---------------------------------------------------------------------
To unsubscribe, e-mail: axis-user-unsubscribe@ws.apache.org
For additional commands, e-mail: axis-user-help@ws.apache.org


Re: [Axis2-1.2] how to omit ReplyTo header in outgoing one-way messages

Posted by Brian De Pradine <PR...@uk.ibm.com>.
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 <ch...@opensource.lk> 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: axis-user-unsubscribe@ws.apache.org
> > For additional commands, e-mail: axis-user-help@ws.apache.org
> > 
> > 
> 
> -----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: axis-user-unsubscribe@ws.apache.org
> For additional commands, e-mail: axis-user-help@ws.apache.org
> 






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






Re: [Axis2-1.2] how to omit ReplyTo header in outgoing one-way messages

Posted by Eran Chinthaka <ch...@opensource.lk>.
-----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: axis-user-unsubscribe@ws.apache.org
> For additional commands, e-mail: axis-user-help@ws.apache.org
> 
> 

-----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: axis-user-unsubscribe@ws.apache.org
For additional commands, e-mail: axis-user-help@ws.apache.org