Return-Path: Delivered-To: apmail-ws-axis-user-archive@www.apache.org Received: (qmail 36532 invoked from network); 29 Jun 2007 15:01:39 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 29 Jun 2007 15:01:39 -0000 Received: (qmail 31333 invoked by uid 500); 29 Jun 2007 15:01:29 -0000 Delivered-To: apmail-ws-axis-user-archive@ws.apache.org Received: (qmail 31277 invoked by uid 500); 29 Jun 2007 15:01:29 -0000 Mailing-List: contact axis-user-help@ws.apache.org; run by ezmlm Precedence: bulk Reply-To: axis-user@ws.apache.org list-help: list-unsubscribe: List-Post: List-Id: Delivered-To: mailing list axis-user@ws.apache.org Received: (qmail 31201 invoked by uid 99); 29 Jun 2007 15:01:29 -0000 Received: from herse.apache.org (HELO herse.apache.org) (140.211.11.133) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 29 Jun 2007 08:01:28 -0700 X-ASF-Spam-Status: No, hits=2.0 required=10.0 tests=HTML_MESSAGE,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (herse.apache.org: domain of amilasuriarachchi@gmail.com designates 66.249.92.175 as permitted sender) Received: from [66.249.92.175] (HELO ug-out-1314.google.com) (66.249.92.175) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 29 Jun 2007 08:01:22 -0700 Received: by ug-out-1314.google.com with SMTP id s2so602694uge for ; Fri, 29 Jun 2007 08:01:01 -0700 (PDT) DKIM-Signature: a=rsa-sha1; c=relaxed/relaxed; d=gmail.com; s=beta; h=domainkey-signature:received:received:message-id:date:from:to:subject:mime-version:content-type; b=bpoaOE06UuFy0gEZM2VStFEMvKzgn8Orm/0SgKAhZqx7UY/qqLOfsjfmrw8l1MuMJZNhrkvy14+L9opHsoPOcRa9bbBJG5F5Cyi7yM/UtlPxqaAj9UOdnEXVKKw627UQoVeA4KLkSf53EOtTbOx/BlNvBDeAh4YFCIhF5nSQ8Yk= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=beta; h=received:message-id:date:from:to:subject:mime-version:content-type; b=Hl+tbFXMnpCOEuusivk+LH5x2N/y8ozHhNRTu3lIm1cOQkvgx5fdYJp/NNKeIxxkLnCQAAmIBmCr3MhDSwtLX3oaDK4fe87BmyPoZDRrZ9XUZ8oWfs+KeHvOZZBbaqWRPsBd1mWtXsD2oEUocn6dYRA+Z48+WJHd3xiCqlaVyjg= Received: by 10.82.170.2 with SMTP id s2mr6462399bue.1183129260785; Fri, 29 Jun 2007 08:01:00 -0700 (PDT) Received: by 10.82.172.13 with HTTP; Fri, 29 Jun 2007 08:01:00 -0700 (PDT) Message-ID: <60708f4b0706290801xa394a0fhe04bb40715c8ee0c@mail.gmail.com> Date: Fri, 29 Jun 2007 20:31:00 +0530 From: "Amila Suriarachchi" To: axis-dev@ws.apache.org, axis-user@ws.apache.org Subject: [Axis2}Addressing Problem MIME-Version: 1.0 Content-Type: multipart/alternative; boundary="----=_Part_39921_3583814.1183129260767" X-Virus-Checked: Checked by ClamAV on apache.org ------=_Part_39921_3583814.1183129260767 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Content-Disposition: inline I generated Code for the following wsdl [1] which is listed in the microsoft interop site. used the following command to codegen with a build I locally created for the current svn. sh wsdl2java.sh -uri http://131.107.72.15/WSAddressingCR_Service_WCF/WSAddressingAugust2004.svc?wsdl-o ~/projects/microsoftInterop/addressing/ -ap -uw -u -p org.tempuri.submission.echo try to send a request to CustomBinding_Echo2 in following way public void testCustomBinding_Echo2() { try { WSAddressingCRCustomBinding_Echo2Stub stub = new WSAddressingCRCustomBinding_Echo2Stub( configurationContext, " http://131.107.72.15/WSAddressingCR_Service_WCF/WSAddressingAugust2004.svc/Soap11/Manual "); stub._getServiceClient().getOptions().setProperty( AddressingConstants.WS_ADDRESSING_VERSION, AddressingConstants.Submission.WSA_NAMESPACE); stub._getServiceClient().getOptions().setProperty( AddressingConstants.INCLUDE_OPTIONAL_HEADERS,true); // this is to redirect the message to tcpmon with out changing the To field stub._getServiceClient().getOptions().setProperty( Constants.Configuration.TRANSPORT_URL, " http://localhost:8085/WSAddressingCR_Service_WCF/WSAddressingAugust2004.svc/Soap11/Manual "); String result = stub.Echo("Test String"); assertEquals(result,"Test String"); } catch (AxisFault axisFault) { axisFault.printStackTrace(); fail(); } catch (java.rmi.RemoteException e) { fail(); } } here configuration context is point to defult axis2.xml and repository. I got the follwing exception org.apache.axis2.AxisFault: A required message information header, To, MessageID, or Action, is not present. at org.apache.axis2.addressing.AddressingFaultsHelper.triggerAddressingFault( AddressingFaultsHelper.java:352) at org.apache.axis2.addressing.AddressingFaultsHelper.triggerMessageAddressingRequiredFault (AddressingFaultsHelper.java:272) at org.apache.axis2.handlers.addressing.AddressingSubmissionInHandler.checkForMandatoryHeaders (AddressingSubmissionInHandler.java:53) at org.apache.axis2.handlers.addressing.AddressingInHandler.extractAddressingInformation (AddressingInHandler.java:185) at org.apache.axis2.handlers.addressing.AddressingInHandler.invoke( AddressingInHandler.java:94) at org.apache.axis2.engine.Phase.invoke(Phase.java:288) at org.apache.axis2.engine.AxisEngine.invoke(AxisEngine.java:225) at org.apache.axis2.engine.AxisEngine.receive(AxisEngine.java:146) at org.apache.axis2.description.OutInAxisOperationClient.handleResponse( OutInAxisOperation.java:345) at org.apache.axis2.description.OutInAxisOperationClient.send( OutInAxisOperation.java:388) at org.apache.axis2.description.OutInAxisOperationClient.executeImpl( OutInAxisOperation.java:202) at org.apache.axis2.client.OperationClient.execute(OperationClient.java :142) at org.tempuri.submission.echo.WSAddressingCRCustomBinding_Echo2Stub.Echo (WSAddressingCRCustomBinding_Echo2Stub.java:178) at org.tempuri.submission.echo.WSAddressingCRSubmissionTest.testCustomBinding_Echo2 (WSAddressingCRSubmissionTest.java:184) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke( NativeMethodAccessorImpl.java:39) at sun.reflect.DelegatingMethodAccessorImpl.invoke( DelegatingMethodAccessorImpl.java:25) at java.lang.reflect.Method.invoke(Method.java:585) Here is the request and response messages http://131.107.72.15/WSAddressingCR_Service_WCF/WSAddressingAugust2004.svc/Soap11/Manual http://schemas.xmlsoap.org/ws/2004/08/addressing/role/anonymous urn:uuid:A26E71AFEBE8477B8D1183128682560 http://example.org/action/echoIn Test String 0 response http://example.org/action/echoOut urn:uuid:A26E71AFEBE8477B8D1183128682560 Test String A part from CustomBinding_Echo2 and CustomBinding_Echo3 ports in submmision wsdl all other ports works fine. (i.e final version wsdl works fine for all casses) Can someone please explain the reason? Thanks Amila. [1] http://131.107.72.15/WSAddressingCR%5FService%5FWCF/WSAddressingAugust2004.svc?wsdl [2]http://131.107.72.15/WSAddressingCR%5FService%5FWCF/ - first page -- Amila Suriarachchi, WSO2 Inc. ------=_Part_39921_3583814.1183129260767 Content-Type: text/html; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Content-Disposition: inline I generated Code for the following wsdl [1] which is listed in the microsoft interop site.
used the following command to codegen with a build I locally created for the current svn.

sh wsdl2java.sh -uri http://131.107.72.15/WSAddressingCR_Service_WCF/WSAddressingAugust2004.svc?wsdl -o ~/projects/microsoftInterop/addressing/ -ap -uw -u -p org.tempuri.submission.echo

try to send a request to CustomBinding_Echo2 in following way

public void testCustomBinding_Echo2() {
        try {
            WSAddressingCRCustomBinding_Echo2Stub stub = new WSAddressingCRCustomBinding_Echo2Stub(
                    configurationContext,
                    " http://131.107.72.15/WSAddressingCR_Service_WCF/WSAddressingAugust2004.svc/Soap11/Manual");
            stub._getServiceClient().getOptions().setProperty( AddressingConstants.WS_ADDRESSING_VERSION,
                    AddressingConstants.Submission.WSA_NAMESPACE);
            stub._getServiceClient().getOptions().setProperty(AddressingConstants.INCLUDE_OPTIONAL_HEADERS ,true);
           
           // this is to redirect the message to tcpmon with out changing the To field
            stub._getServiceClient().getOptions().setProperty(Constants.Configuration.TRANSPORT_URL,
                    "http://localhost:8085/WSAddressingCR_Service_WCF/WSAddressingAugust2004.svc/Soap11/Manual");

            String result = stub.Echo("Test String");
            assertEquals(result,"Test String");
       } catch (AxisFault axisFault) {
            axisFault.printStackTrace();
            fail();
        } catch (java.rmi.RemoteException e) {
            fail();
        }
}

here configuration context is point to defult axis2.xml and repository.

I got the follwing exception
org.apache.axis2.AxisFault: A required message information header, To, MessageID, or Action, is not present.
    at org.apache.axis2.addressing.AddressingFaultsHelper.triggerAddressingFault(AddressingFaultsHelper.java :352)
    at org.apache.axis2.addressing.AddressingFaultsHelper.triggerMessageAddressingRequiredFault(AddressingFaultsHelper.java:272)
    at org.apache.axis2.handlers.addressing.AddressingSubmissionInHandler.checkForMandatoryHeaders (AddressingSubmissionInHandler.java:53)
    at org.apache.axis2.handlers.addressing.AddressingInHandler.extractAddressingInformation(AddressingInHandler.java:185)
    at org.apache.axis2.handlers.addressing.AddressingInHandler.invoke (AddressingInHandler.java:94)
    at org.apache.axis2.engine.Phase.invoke(Phase.java:288)
    at org.apache.axis2.engine.AxisEngine.invoke(AxisEngine.java:225)
    at org.apache.axis2.engine.AxisEngine.receive(AxisEngine.java :146)
    at org.apache.axis2.description.OutInAxisOperationClient.handleResponse(OutInAxisOperation.java:345)
    at org.apache.axis2.description.OutInAxisOperationClient.send(OutInAxisOperation.java:388)
    at org.apache.axis2.description.OutInAxisOperationClient.executeImpl(OutInAxisOperation.java:202)
    at org.apache.axis2.client.OperationClient.execute(OperationClient.java:142)
    at org.tempuri.submission.echo.WSAddressingCRCustomBinding_Echo2Stub.Echo (WSAddressingCRCustomBinding_Echo2Stub.java:178)
    at org.tempuri.submission.echo.WSAddressingCRSubmissionTest.testCustomBinding_Echo2(WSAddressingCRSubmissionTest.java:184)
    at sun.reflect.NativeMethodAccessorImpl.invoke0 (Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
    at java.lang.reflect.Method.invoke (Method.java:585)

Here is the request and response messages
<?xml version='1.0' encoding='UTF-8'?>
   <soapenv:Envelope xmlns:wsa=" http://schemas.xmlsoap.org/ws/2004/08/addressing" xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/">
      <soapenv:Header>
         <wsa:To>http://131.107.72.15/WSAddressingCR_Service_WCF/WSAddressingAugust2004.svc/Soap11/Manual</wsa:To>
         <wsa:ReplyTo>
            <wsa:Address>http://schemas.xmlsoap.org/ws/2004/08/addressing/role/anonymous</wsa:Address>
         </wsa:ReplyTo>
         <wsa:MessageID>urn:uuid:A26E71AFEBE8477B8D1183128682560</wsa:MessageID>
         <wsa:Action>http://example.org/action/echoIn </wsa:Action>
      </soapenv:Header>
      <soapenv:Body>
         <s1:echoIn xmlns:s1="http://example.org/echo">Test String</s1:echoIn>
      </soapenv:Body>
   </soapenv:Envelope>0

response
<s:Envelope xmlns:s="http://schemas.xmlsoap.org/soap/envelope/" xmlns:a=" http://schemas.xmlsoap.org/ws/2004/08/addressing">
   <s:Header>
      <a:Action s:mustUnderstand="1"> http://example.org/action/echoOut</a:Action>
      <a:RelatesTo>urn:uuid:A26E71AFEBE8477B8D1183128682560</a:RelatesTo>
   </s:Header>
   <s:Body>
      <echoOut xmlns=" http://example.org/echo">Test String</echoOut>
   </s:Body></s:Envelope>

A part from CustomBinding_Echo2 and CustomBinding_Echo3 ports in submmision wsdl all other ports works fine.
(i.e final version wsdl works fine for all casses)

Can someone please explain the reason?

Thanks
Amila.

[1] http://131.107.72.15/WSAddressingCR%5FService%5FWCF/WSAddressingAugust2004.svc?wsdl
[2]http://131.107.72.15/WSAddressingCR%5FService%5FWCF/ - first page
--
Amila Suriarachchi,
WSO2 Inc. ------=_Part_39921_3583814.1183129260767--