Loading ...
Sorry, an error occurred while loading the content.

NullPointerException calling Axis from .NET C# client

Expand Messages
  • pakozma
    I am having problems sending a complex type as a parameter from dotnet client to Axis (4/3 build) web service. When I call the AXIS service using dotnet web
    Message 1 of 1 , Apr 5, 2002
    • 0 Attachment
      I am having problems sending a complex type as a parameter from
      dotnet client to Axis (4/3 build) web service. When I call the AXIS
      service using dotnet web service studio client, I get a
      java.lang.NullPointerException exception. There is nothing in the
      Tomcat log (both 3.3x and 4.0.4b1). Here are the request and response
      messages with the dotnet client and a request from an axis client
      (that works):

      *** start request from dotnet
      <?xml version="1.0" encoding="utf-8"?>
      <soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/"
      xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/"
      xmlns:tns="http://xmlinterface.xcut.clareos.com"
      xmlns:types="http://xmlinterface.xcut.clareos.com/encodedTypes"
      xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
      xmlns:xsd="http://www.w3.org/2001/XMLSchema">
      <soap:Body
      soap:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/">
      <tns:getC5ParamTest>
      <in0 href="#id1" />
      </tns:getC5ParamTest>
      <tns:Complex5Param id="id1" xsi:type="tns:Complex5Param">
      <s1 xsi:type="xsd:string">First String</s1>
      <s2 xsi:type="xsd:string">Second String</s2>
      <i1 xsi:type="xsd:int">42</i1>
      <b1 xsi:type="xsd:boolean">true</b1>
      </tns:Complex5Param>
      </soap:Body>
      </soap:Envelope>
      *** end request from dotnet

      *** start response from Axis
      Content-Type:text/xml; charset=utf-8

      <?xml version="1.0" encoding="utf-8"?>
      <soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/"
      xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/"
      xmlns:tns="http://xmlinterface.xcut.clareos.com"
      xmlns:types="http://xmlinterface.xcut.clareos.com/encodedTypes"
      xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
      xmlns:xsd="http://www.w3.org/2001/XMLSchema">
      <soap:Body>
      <soap:Fault>
      <faultcode
      xmlns:ns1="http://xml.apache.org/axis/">ns1:Server.userException</faul
      tcode>
      <faultstring>java.lang.NullPointerException</faultstring>
      <detail>
      <ns2:stackTrace
      xmlns:ns2="http://xml.apache.org/axis/">java.lang.NullPointerException
      at org.apache.axis.providers.java.RPCProvider.processMessage
      (Unknown Source)
      .
      .
      .
      org.apache.catalina.connector.http.HttpProcessor.run
      (HttpProcessor.java:1115)
      at java.lang.Thread.run(Thread.java:479)
      </ns2:stackTrace>
      </detail>
      </soap:Fault>
      </soap:Body>
      </soap:Envelope>
      *** end response from Axis

      Here is a request from an Axis client that works:

      *** start request from Axis client
      POST /xcut-app/services/Complex5 HTTP/1.0
      Content-Length: 786
      Host: localhost
      Content-Type: text/xml; charset=utf-8
      SOAPAction: ""

      <?xml version="1.0" encoding="UTF-8"?>
      <SOAP-ENV:Envelope SOAP-
      ENV:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"
      xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/"
      xmlns:xsd="http://www.w3.org/2001/XMLSchema"
      xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:SOAP-
      ENC="http://schemas.xmlsoap.org/soap/encoding/">
      <SOAP-ENV:Body>
      <ns1:getC5ParamTest
      xmlns:ns1="http://xmlinterface.xcut.clareos.com">
      <in0 href="#id0"/>
      </ns1:getC5ParamTest>
      <multiRef id="id0" SOAP-ENC:root="0" xsi:type="ns2:Complex5Param"
      xmlns:ns2="http://xmlinterface.xcut.clareos.com">
      <s2 xsi:type="xsd:string">Anoth</s2>
      <i1 xsi:type="xsd:int">42</i1>
      <b1 xsi:type="xsd:boolean">true</b1>
      <s1 xsi:nil="true"/>
      </multiRef>
      </SOAP-ENV:Body>
      </SOAP-ENV:Envelope>
      *** end request from Axis client

      The request looks good to me? The service just returns true. I can
      get dotnet to accept the same complex type as a return value from an
      Axis service (parameter passed is just a string in this case).

      The WSDL file used was generated using the Axis java2wsdl command. I
      can send it along if requested.

      I would appreciate any help. Thanks!

      ~ Peter
    Your message has been successfully submitted and would be delivered to recipients shortly.