Thanks so much. I have actually done that and my addressing headers are working just fine. For those following the thread and searching for a similar problem, I put the addressing-1.0.mar into the classpath and the following lines of code into my client where I was getting the Stub.
 
stub = new ServiceStub();
ServiceClient serviceClient = stub._getServiceClient();
serviceClient.engageModule(new QName("addressing"));
serviceClient.getOptions().setProperty(AddressingConstants.WS_ADDRESSING_VERSION,
                                       AddressingConstants.Submission.WSA_NAMESPACE);
I've now moved on to trying to figure out how to engage the rampart module to get the security headers (pulled here to the top of the message for carity) to appear.
 
  <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-wssecurity-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-token-profile-1.0#PasswordText">**********</wsse:Password>
      <wsse:Nonce>**********</wsse:Nonce>
      <wsu:Created>**********</wsu:Created>
    </wsse:UsernameToken>
  </wsse:Security>

I have followed the trail to the rampart presentation by Ruchith Fernando (http://www.wso2.net/presentations/rampart/java/2006/08/04/secure-ws), but am having classpath problems. The Jar files that are included with the presentation samples aren't the same as the Axis2 1.0 release jars or the current snapshot jars. I'm doing a lot of trial and error testing to figure out which jars are correct.
 
If anyone out there knows of a jar set that will work for me, please, by all means, send me an email.  If there is another/better description out there for how to engage rampart (in a client) in order to get a set of headers as detailed here, please let me know.
 
Thanks,
 
Joe
 
 


From: Brian De Pradine [mailto:[EMAIL PROTECTED]
Sent: Thursday, August 31, 2006 12:10 PM
To: [email protected]
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