As a side note, the documentation, http://ws.apache.org/axis2/1_0/userguide3.html#Engaging_Addressing_in_Client_Side, to needs to be updated. In the section, "Engaging Addressing in Client Side" it only instructs the user to add the addressing-<version>.mar file to your classpath or create tthe ConfigurationContext from the filesystem. The documentation should include an instruction to call the engage module method as shown below.
 
serviceClient.engageModule(new QName("addressing"));
or
 
serviceClient.engageModule(new QName(Constants.MODULE_ADDRESSING));
Joe
 


From: Brian De Pradine [mailto:[EMAIL PROTECTED]
Sent: Thursday, August 31, 2006 12:10 PM
To: axis-dev@ws.apache.org
Subject: Re: FW: Creating or setting header options


Hello Joe,

Have you  engaged the addressing module in your client? If you haven't then follow the details here,

http://ws.apache.org/axis2/1_0/userguide3.html#EchoNonBlockingDualClient

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?


"Joe Wyrembelski" <[EMAIL PROTECTED]> wrote on 30/08/2006 20:18:58:

>
> Basic Question:
> What do I need to do in order to get header options to show up in my
> envelope?
>
> Environment:
> Using Axis2 to generate my client (with XMLBeans as my binding
> technology). Generated the code using the "-s -t -p com.mypackage -d
> xmlbeans" options.
>
> When I create my stub using the defaults, I get a good set of HTML
> headers
>
> DEBUG header:69 - >> "POST /service.asmx HTTP/1.1[\r][\n]"
> DEBUG header:69 - >> "User-Agent: Axis/2.0[\r][\n]"
> DEBUG header:69 - >> "SOAPAction: Create[\r][\n]"
> DEBUG header:69 - >> "Host: ****************[\r][\n]"
> DEBUG header:69 - >> "Transfer-Encoding: chunked[\r][\n]"
> DEBUG header:69 - >> "Content-Type: text/xml; charset=UTF-8[\r][\n]"
>
>
> But the headers in the soap envelope aren't correct. In fact, they are
> empty.
>
>
> <soapenv:Envelope
> xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/">
>    <soapenv:Header/>
>    <soapenv:Body>
>
>
> Ultimately, I think I need my envelope to look liks:
>
>
> <soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/"
> xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
> xmlns:xsd="http://www.w3.org/2001/XMLSchema"
> xmlns:wsa="http://schemas.xmlsoap.org/ws/2004/08/addressing"
> xmlns:wsse="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wsse
> curity-secext-1.0.xsd"
> xmlns:wsu="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssec
> urity-utility-1.0.xsd">
>    <soap:Header>
>       <wsa:Action>Create</wsa:Action>
>    
> <wsa:MessageID>urn:uuid:867a6c22-d0f5-43ff-95cc-89a1d6d43068</wsa:Messag
> eID>
>       <wsa:ReplyTo>
>          <wsa:Address>
>    
> http://schemas.xmlsoap.org/ws/2004/08/addressing/role/anonymous
>          </wsa:Address>
>       </wsa:ReplyTo>
>       <wsa:To>**********</wsa:To>
>       <wsse:Security soap:mustUnderstand="1">
>          <wsu:Timestamp
> wsu:Id="Timestamp-66232358-fd32-4332-9555-3e55153854dd">
>             <wsu:Created>**********</wsu:Created>
>             <wsu:Expires>**********</wsu:Expires>
>          </wsu:Timestamp>
>          <wsse:UsernameToken
> xmlns:wsu="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssec
> urity-utility-1.0.xsd"
> wsu:Id="SecurityToken-2ce8562a-6bdd-45a1-9fb6-99f5011fa97e">
>    
> <wsse:Username>**********</wsse:Username>
>             <wsse:Password
> Type="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-username-t
> oken-profile-1.0#PasswordText">**********</wsse:Password>
>             <wsse:Nonce>**********</wsse:Nonce>
>             <wsu:Created>**********</wsu:Created>
>          </wsse:UsernameToken>
>       </wsse:Security>
>    </soap:Header>
>
>
> I've tried:
>
>
> Attempt #1: Get the ServiceClient from my Stub and set it's options
>
> ServiceClient sc = stub._getServiceClient(); Options sco =
> serviceClient.getOptions(); sco.setAction("Create");
> sco.setMessageId(UUID.randomUUID().toString());
>
> Attempt #2: Get the ServiceClient from my Stub and set it's options's
> properties
>
> sco.setProperty(AddressingConstants.WSA_ACTION, "Create");
> sco.setProperty(AddressingConstants.WSA_MESSAGE_ID,
> UUID.randomUUID().toString());
>
> Attempt #3: Both
> Attempt #4: Setting the service client back into the Stub Attempt #5:
> Setting the options back into the service client Attempt #5: Creating a
> new options and setting those into the service client Attempt #6:
> Creating a new endpoint according to the post
> "http://marc.theaimsgroup.com/?l=axis-user&m=115435987605651&w=4"
>
> Etc.
>
> So what do I have to do? And where in the documentation should I have
> found this?
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>

Reply via email to