I found the solution for the other one also..
When set the addresses as below it worked fine
gc._getServiceClient().getOptions().setTo(epTo); //Sets the WSA:TO
value
gc._getServiceClient().getOptions().setProperty(org.apache.axis2.Constants.Configuration.TRANSPORT_URL,"http://172.28.69.39:3457/NGX/Router");
//Sets the actual URL
Thanks
From: Soyer, Muhammed A. [mailto:[EMAIL PROTECTED]
Sent: Wednesday, September 10, 2008 9:43 AM
To: [email protected]
Subject: RE: How to add ws-addressing and ws-security headers to call a .Net
Service
Importance: Low
Hi again,
I could figure out the namespace issue by setting the WSA version as below
gc._getServiceClient().getOptions().setProperty(AddressingConstants.WS_ADDRESSING_VERSION,"http://schemas.xmlsoap.org/ws/2004/08/addressing");
But I still have trouble in setting the WSA:TO element correctly. My messages
are being posted to a router and that router is distributing the messages
depending on the WSA:TO value. So the values for WSA:TO and the endpoint should
be different.
WSA:TO is taking the endpoint's value and ignores my statements as below
gc._getServiceClient().getOptions().setProperty(AddressingConstants.WSA_TO,"http://schemas.ZZZ.com/NGX/1/0/XAuthentication/1/0/");
Could some shed a light to this?
Is there any good API documentation for axis2 ? I am using the latest version
1.4.1..Is this OK?
Thanks
From: Soyer, Muhammed A.
Sent: Wednesday, September 10, 2008 6:55 AM
To: '[email protected]'
Subject: How to add ws-addressing and ws-security headers to call a .Net Service
Hi I am new to axis and I am a little lost ...
I want to add ws-addressing and ws-security headers to my soap calls in able to
conform to my service requirements.
I tried a lot of things and I couldn't progress much.
I need to build a soap request as below.
----
<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-wssecurity-secext-1.0.xsd"
xmlns:wsu="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd">
<soap:Header>
<wsa:Action>http://schemas.ZZZ.com/NGX/1/0/XAuthentication/1/0/AuthenticationPortType/AuthenticateUserRequest</wsa:Action>
<wsa:MessageID>urn:uuid:1978176b-3ce0-4876-bc19-ba172ce40a7e</wsa:MessageID>
<wsa:ReplyTo>
<wsa:Address>http://schemas.xmlsoap.org/ws/2004/08/addressing/role/anonymous</wsa:Address>
</wsa:ReplyTo>
<wsa:To>http://schemas.ZZZ.com/NGX/1/0/XAuthentication/1/0/</wsa:To>
<wsse:Security>
<wsu:Timestamp wsu:Id="Timestamp-3ac1dee5-fd8b-4f98-97ec-92374a714cd2">
<wsu:Created>2008-09-05T16:05:44Z</wsu:Created>
<wsu:Expires>2008-09-05T16:10:44Z</wsu:Expires>
</wsu:Timestamp>
</wsse:Security>
</soap:Header>
<soap:Body>
<AuthenticateUserRequest
xmlns="http://schemas.ZZZ.com/NGX/1/0/XAuthentication/1/0/">
<domainName>local</domainName>
<userLogin>Administrator</userLogin>
<password type="PasswordText">ABCD</password>
<workstation>MSOYERXP999</workstation>
</AuthenticateUserRequest>
</soap:Body>
</soap:Envelope>
But the message that I can create is as below
<?xml version = '1.0' encoding = 'UTF-8'?>
<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/">
<soapenv:Header xmlns:wsa="http://www.w3.org/2005/08/addressing">
<wsa:To>http://172.28.69.39:3457/NGX/Router</wsa:To>
<wsa:ReplyTo>
<wsa:Address>http://www.w3.org/2005/08/addressing/anonymous</wsa:Address>
</wsa:ReplyTo>
<wsa:MessageID>urn:uuid:8CCEB06E38921578361221043202900</wsa:MessageID>
<wsa:Action>http://schemas.ZZZ.com/NGX/1/0/XAuthentication/1/0/AuthenticationPortType/AuthenticateUserRequest</wsa:Action>
</soapenv:Header>
<soapenv:Body>
<ns1:AuthenticateUserRequest
xmlns:ns1="http://schemas.ZZZ.com/NGX/1/0/XAuthentication/1/0/">
<ns1:domainName>YYY</ns1:domainName>
<ns1:userLogin>msoyer</ns1:userLogin>
<ns1:password type="PasswordText">secret</ns1:password>
<ns1:workstation>msoyerxp</ns1:workstation>
</ns1:AuthenticateUserRequest>
</soapenv:Body>
</soapenv:Envelope>
I realized that the wsa namespace declarations are different. How can I make
them same ? And I couldn't set the WSA:TO element correctly either. It is
always taking my endpoint address which is not the case with the .Net client.
Any help would be great...
Thanks