Hi Chinthka , I think you are the best person to answer this question :)
Sricharan Anand wrote: > Thanks Deepal for your reply. I tried what you said below and still > couldn't get it to work - maybe i am doing something basically wrong. > > Here is the issue in more detail: > > Like I said before, I am writing a Axis2 client to communicate with a > remote .Net service. This service is expecting the following WS-A headers: > > <wsa:Action>http://www.myservice.com/TestHarness/MyApplication</wsa:Action> > <wsa:MessageID>uuid:84ce994b-7615-42a4-be78-45621febe</wsa:MessageID> > <wsa:ReplyTo> > > <wsa:Address>http://schemas.xmlsoap.org/ws/2004/03/addressing/role/anonymous</wsa:Address> > </wsa:ReplyTo> > <wsa:To>urn:MyApplicationAPI</wsa:To> > The location of the service i.e actual URL is different(given below): > soap:address location > ="*https://myservices.test.com/testharness/myapplicationapi.asmx" > > > This is how i set the WS-A headers in my client(stub) code: > > EndpointReference epr = new EndpointReference("urn:MyApplicationAPI"); > _messageContext.setWSAAction("http://www.myservice.com/TestHarness/MyApplication"); > > _messageContext.setTo(epr); > > _messageContext.setMessageID("uuid:84ce996b-7615-42a4-be78-45621febe3fe"); > > *When I run the above code I get this exception: > >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>> > Exception in thread "main" org.apache.axis2.AxisFault: no protocol: > urn; nested exception is: > java.net.MalformedURLException: no protocol: urn; nested exception > is: > &n bsp; org.apache.axis2.AxisFault: no protocol: urn; nested > exception is: > java.net.MalformedURLException: no protocol: urn > at > org.apache.axis2.transport.http.CommonsHTTPTransportSender.invoke(CommonsHTTPTransportSender.java:245) > */<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<< > > If I change the EPR as follows: > > EndpointReference epr = new > EndpointReference("/**https://myservices.test.com/testharness/myapplicationapi.asmx**/"); > > and run I get the following exception: > >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>> > Exception in thread "main" org.apache.axis2.AxisFault: Destination > Unreachable --> WSE817: The <To> header must match the Actor > attribute on this receiver. The <To> header contained > "https://myservices.test.com/testharness/myapplicationapi.asmx" > whereas the Actor attribute was "urn:MyApplicationAPI". > at > org.apache.axis2.description.OutInAxisOperationClient.execute(OutInAxisOperation.java:295) > <<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<< > > So I am confused as to how to set the "WSA To" . The rest of the WSA > headers are getting set properly(i can see this when i print out the > SOAP Envelope) > > > Any help would be appreciated. > > Thanks, > Sri > > > > > > > > Deepal Jayasinghe <[EMAIL PROTECTED]>/* wrote: You have do one more > thing :) , that is you have to engage addressing in > order to have addressing functionality , using following code you can do > that. > 1. In the latest code > stb._getServiceClient().engageModule("addressing"); > 2. In 0.94 > stb.engageModule("addressing"); > > Sricharan Anand wrote: > > > Hi, > > > > I am using Axis2 version 0.94 to communicate with a remote .Net > > Webservice. The remote service is using WS-Addressing. > > > > I used the wsdl2java tool, gave the WSDL location and generated the > > stub to communicate with this service. When i execute the stub, it > > says "Deploying module addressing" - but i am not sure that its > > hitting the remote service since i don't get any response back. > > > > I don't see the WS-A headers(wsa:To, wsa:Action, wsa:MessageID) added > > in the stub. Are these getting added anywhere in the stub? If not, do > > i have to add these headers explicitly? > > > > I assumed that since WS-A is builtin - these headers should be > > automatically added. > > > > I am new to using Axis2 and any help would be appreciated. > > > > Thanks, > > Sri > > > > ------------------------------------------------------------------------ > > Yahoo! Mail > > Use Photomail > > > > to share photos without annoying attachments. > > > -- > Thanks, > Deepal > ................................................................ > ~Future is Open~ > > > > ------------------------------------------------------------------------ > Yahoo! Mail > Use Photomail > <http://pa.yahoo.com/*http://us.rd.yahoo.com/evt=38867/*http://photomail.mail.yahoo.com> > to share photos without annoying attachments. -- Thanks, Deepal ................................................................ ~Future is Open~
