You are viewing a plain text version of this content. The canonical link for it is here.
Posted to c-user@axis.apache.org by Sam Carleton <sc...@miltonstreet.com> on 2009/12/12 04:51:25 UTC

.Net client can call Axis2/C service, Axis2/C client cannot

For about a year now I have been using Axis2/C on the server side with a
great deal of success.  I am now trying to use it on the client side and
things are not working. I just tried with .Net's WCF and it worked fine,
looking at the envelopes, there is an obvious difference:

.Net WCF Envelope:

  <s:Envelope xmlns:s="http://schemas.xmlsoap.org/soap/envelope/">
    <s:Body xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:xsd="http://www.w3.org/2001/XMLSchema">
      <getVersionCheck xmlns="urn:mmpp:parataMgr"/>
    </s:Body>
  </s:Envelope>

Axis2/C Envelope:

  <soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/
">
    <soapenv:Header xmlns:wsa="http://www.w3.org/2005/08/addressing">
      <wsa:To>http://localhost:8041/axis2/services/parataMgr</wsa:To>
      <wsa:Action>urn:mmpp:parataMgr/getVersionCheck</wsa:Action>

 <wsa:MessageID>urn:uuid:57dbfc1e-a42e-4501-894b-7e6bf4a8f2bb</wsa:MessageID>
    </soapenv:Header>
    <soapenv:Body>
      <n:getVersionCheck xmlns:n="urn:mmpp:parataMgr"></n:getVersionCheck>
    </soapenv:Body>
  </soapenv:Envelope>

I am using the auto generated method signature for
"getVersionCheck|urn:mmpp:parataMgr" operation, I used these options to
generate the code:

-uri ParataMgr.wsdl -d adb -u

And here is the schema from the WSDL:

      <xsd:element name="getVersionCheck">
        <xsd:complexType>
          <xsd:sequence>
          </xsd:sequence>
        </xsd:complexType>
      </xsd:element>

      <xsd:element name="getVersionCheckResponse">
        <xsd:complexType>
          <xsd:sequence>
            <xsd:element name="version" type="xsd:int"></xsd:element>
          </xsd:sequence>
        </xsd:complexType>
      </xsd:element>

Re: .Net client can call Axis2/C service, Axis2/C client cannot

Posted by Sam Carleton <sc...@gmail.com>.
Damitha,

Thank you!  It is ParataMgr, don't know how I missed that one.  I do
appreciate the help and all the help in general wso2.com has provided me
over the last year, it has been great!

Sam

On Sat, Dec 12, 2009 at 2:01 PM, Damitha Kumarage <da...@wso2.com> wrote:

> Check your service name. Is it parataMgr or ParataMgr?
> Damitha

Re: .Net client can call Axis2/C service, Axis2/C client cannot

Posted by Damitha Kumarage <da...@wso2.com>.
Check your service name. Is it parataMgr or ParataMgr?
Damitha
Sam Carleton wrote:
> Selvaratnam,
>
> Thank you for your help!!!!  I was assuming the issue was related to 
> the header in the request..  Here is the TCPMon log for the Axis2/C 
> client to Axis2/C service that does not work:
>
> ########## *************** BEGIN *************** ##########
>
>   POST /axis2/services/parataMgr HTTP/1.1
>   User-Agent: Axis2C/1.6.0
>   SOAPAction: "urn:mmpp:parataMgr/getVersionCheck"
>   Content-Length: 472
>   Content-Type: text/xml;charset=UTF-8
>   Host: 127.0.0.1:8041 <http://127.0.0.1:8041>
>
>   <soapenv:Envelope 
> xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/">
>     <soapenv:Header xmlns:wsa="http://www.w3.org/2005/08/addressing">
>       <wsa:To>http://localhost:8041/axis2/services/parataMgr</wsa:To>
>       <wsa:Action>urn:mmpp:parataMgr/getVersionCheck</wsa:Action>
>      
>  <wsa:MessageID>urn:uuid:a6418349-1d84-43d4-801f-98333d974be4</wsa:MessageID>
>     </soapenv:Header>
>     <soapenv:Body>
>       <n:getVersionCheck xmlns:n="urn:mmpp:parataMgr"></n:getVersionCheck>
>     </soapenv:Body>
>   </soapenv:Envelope>
>
> ///////////////////////////////////
>
>   HTTP/1.1 500 Internal Server Error
>   Date: Sat, 12 Dec 2009 16:02:42 GMT
>   Server: Apache/2.2.11 (Win32) Axis2C/1.6.0 PHP/5.2.5
>   Content-Length: 425
>   Connection: close
>   Content-Type: text/xml
>
>   <soapenv:Envelope 
> xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/">
>     <soapenv:Body>
>       <soapenv:Fault>
>         <faultcode>soapenv:Server</faultcode>
>         <faultstring>Service Not Found</faultstring>
>         <detail>
>           <Exception>Service Not Found, Endpoint referance address is 
> http://localhost:8041/axis2/services/parataMgr and wsa actions is 
> urn:mmpp:parataMgr/getVersionCheck</Exception>
>         </detail>
>       </soapenv:Fault>
>     </soapenv:Body>
>   </soapenv:Envelope>
>
> ########## *************** END *************** ##########
>
> Here is the TCPMon log for the .Net WCF client to Axis2/C service that 
> works just fine
>
> ########## *************** BEGIN *************** ##########
>
>   POST /axis2/services/ParataMgr HTTP/1.1
>   Content-Type: text/xml; charset=utf-8
>   VsDebuggerCausalityData: 
> uIDPoxSbbbbBUrlHuNPN/pxDwgwAAAAA34KEJ2oVP0O6Dw1Dp8a2Sfbfz3XaB2ZDq08omNFFhx8ACQAA
>   SOAPAction: "urn:mmpp:parataMgr/getVersionCheck"
>   Host: 127.0.0.1:8041 <http://127.0.0.1:8041>
>   Content-Length: 238
>   Expect: 100-continue
>   Connection: Keep-Alive
>
>   <s:Envelope xmlns:s="http://schemas.xmlsoap.org/soap/envelope/">
>     <s:Body xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" 
> xmlns:xsd="http://www.w3.org/2001/XMLSchema">
>       <getVersionCheck xmlns="urn:mmpp:parataMgr"/>
>     </s:Body>
>   </s:Envelope>
>
> ///////////////////////////////////
>
>   HTTP/1.1 100 Continue
>
>   HTTP/1.1 200 OK
>   Date: Sat, 12 Dec 2009 15:58:09 GMT
>   Server: Apache/2.2.11 (Win32) Axis2C/1.6.0 PHP/5.2.5
>   Content-Length: 230
>   Keep-Alive: timeout=5, max=100
>   Connection: Keep-Alive
>   Content-Type: text/xml
>
>   <soapenv:Envelope 
> xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/">
>     <soapenv:Body>
>       <n:getVersionCheckResponse xmlns:n="urn:mmpp:parataMgr">
>         <version>100</version>
>       </n:getVersionCheckResponse>
>     </soapenv:Body>
>   </soapenv:Envelope>
>


-- 
__________________________________________________________________

Damitha Kumarage
Technical Lead; WSO2 Inc.
"Oxygenating the Web Service Platform; " http://www.wso2.com/

blog: " http://damithakumarage.wordpress.com/
__________________________________________________________________

Re: .Net client can call Axis2/C service, Axis2/C client cannot

Posted by Sam Carleton <sc...@gmail.com>.
Selvaratnam,

Thank you for your help!!!!  I was assuming the issue was related to the
header in the request..  Here is the TCPMon log for the Axis2/C client to
Axis2/C service that does not work:

########## *************** BEGIN *************** ##########

  POST /axis2/services/parataMgr HTTP/1.1
  User-Agent: Axis2C/1.6.0
  SOAPAction: "urn:mmpp:parataMgr/getVersionCheck"
  Content-Length: 472
  Content-Type: text/xml;charset=UTF-8
  Host: 127.0.0.1:8041

  <soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/
">
    <soapenv:Header xmlns:wsa="http://www.w3.org/2005/08/addressing">
      <wsa:To>http://localhost:8041/axis2/services/parataMgr</wsa:To>
      <wsa:Action>urn:mmpp:parataMgr/getVersionCheck</wsa:Action>

 <wsa:MessageID>urn:uuid:a6418349-1d84-43d4-801f-98333d974be4</wsa:MessageID>
    </soapenv:Header>
    <soapenv:Body>
      <n:getVersionCheck xmlns:n="urn:mmpp:parataMgr"></n:getVersionCheck>
    </soapenv:Body>
  </soapenv:Envelope>

///////////////////////////////////

  HTTP/1.1 500 Internal Server Error
  Date: Sat, 12 Dec 2009 16:02:42 GMT
  Server: Apache/2.2.11 (Win32) Axis2C/1.6.0 PHP/5.2.5
  Content-Length: 425
  Connection: close
  Content-Type: text/xml

  <soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/
">
    <soapenv:Body>
      <soapenv:Fault>
        <faultcode>soapenv:Server</faultcode>
        <faultstring>Service Not Found</faultstring>
        <detail>
          <Exception>Service Not Found, Endpoint referance address is
http://localhost:8041/axis2/services/parataMgr and wsa actions is
urn:mmpp:parataMgr/getVersionCheck</Exception>
        </detail>
      </soapenv:Fault>
    </soapenv:Body>
  </soapenv:Envelope>

########## *************** END *************** ##########

Here is the TCPMon log for the .Net WCF client to Axis2/C service that works
just fine

########## *************** BEGIN *************** ##########

  POST /axis2/services/ParataMgr HTTP/1.1
  Content-Type: text/xml; charset=utf-8
  VsDebuggerCausalityData:
uIDPoxSbbbbBUrlHuNPN/pxDwgwAAAAA34KEJ2oVP0O6Dw1Dp8a2Sfbfz3XaB2ZDq08omNFFhx8ACQAA
  SOAPAction: "urn:mmpp:parataMgr/getVersionCheck"
  Host: 127.0.0.1:8041
  Content-Length: 238
  Expect: 100-continue
  Connection: Keep-Alive

  <s:Envelope xmlns:s="http://schemas.xmlsoap.org/soap/envelope/">
    <s:Body xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:xsd="http://www.w3.org/2001/XMLSchema">
      <getVersionCheck xmlns="urn:mmpp:parataMgr"/>
    </s:Body>
  </s:Envelope>

///////////////////////////////////

  HTTP/1.1 100 Continue

  HTTP/1.1 200 OK
  Date: Sat, 12 Dec 2009 15:58:09 GMT
  Server: Apache/2.2.11 (Win32) Axis2C/1.6.0 PHP/5.2.5
  Content-Length: 230
  Keep-Alive: timeout=5, max=100
  Connection: Keep-Alive
  Content-Type: text/xml

  <soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/
">
    <soapenv:Body>
      <n:getVersionCheckResponse xmlns:n="urn:mmpp:parataMgr">
        <version>100</version>
      </n:getVersionCheckResponse>
    </soapenv:Body>
  </soapenv:Envelope>

Re: .Net client can call Axis2/C service, Axis2/C client cannot

Posted by Selvaratnam Uthaiyashankar <ut...@gmail.com>.
Hi Sam,

I assume, you are thinking that the problem is due to WS-Addressing..

What is the service you are using? Is it Axis2/C? And what is the
error message you are getting? If the server side is axis2/C, you will
not get any errors due to addressing headers.

You can disable WS-Addressing. Addressing module is engaged globally
in axis2.xml

Regards,
Shankar


On Sat, Dec 12, 2009 at 9:21 AM, Sam Carleton
<sc...@miltonstreet.com> wrote:
> For about a year now I have been using Axis2/C on the server side with a
> great deal of success.  I am now trying to use it on the client side and
> things are not working. I just tried with .Net's WCF and it worked fine,
> looking at the envelopes, there is an obvious difference:
> .Net WCF Envelope:
>   <s:Envelope xmlns:s="http://schemas.xmlsoap.org/soap/envelope/">
>     <s:Body xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
> xmlns:xsd="http://www.w3.org/2001/XMLSchema">
>       <getVersionCheck xmlns="urn:mmpp:parataMgr"/>
>     </s:Body>
>   </s:Envelope>
> Axis2/C Envelope:
>   <soapenv:Envelope
> xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/">
>     <soapenv:Header xmlns:wsa="http://www.w3.org/2005/08/addressing">
>       <wsa:To>http://localhost:8041/axis2/services/parataMgr</wsa:To>
>       <wsa:Action>urn:mmpp:parataMgr/getVersionCheck</wsa:Action>
>
>  <wsa:MessageID>urn:uuid:57dbfc1e-a42e-4501-894b-7e6bf4a8f2bb</wsa:MessageID>
>     </soapenv:Header>
>     <soapenv:Body>
>       <n:getVersionCheck xmlns:n="urn:mmpp:parataMgr"></n:getVersionCheck>
>     </soapenv:Body>
>   </soapenv:Envelope>
> I am using the auto generated method signature for
> "getVersionCheck|urn:mmpp:parataMgr" operation, I used these options to
> generate the code:
> -uri ParataMgr.wsdl -d adb -u
> And here is the schema from the WSDL:
>       <xsd:element name="getVersionCheck">
>         <xsd:complexType>
>           <xsd:sequence>
>           </xsd:sequence>
>         </xsd:complexType>
>       </xsd:element>
>       <xsd:element name="getVersionCheckResponse">
>         <xsd:complexType>
>           <xsd:sequence>
>             <xsd:element name="version" type="xsd:int"></xsd:element>
>           </xsd:sequence>
>         </xsd:complexType>
>       </xsd:element>
>



-- 
S.Uthaiyashankar
Software Architect
WSO2 Inc.
http://wso2.com/ - "The Open Source SOA Company"