4 Replies Latest reply on Feb 14, 2005 5:35 PM by guptah

    Error while executing WS client

      Hi,

      I am new to web services and am trying to write a simple Hello webservice. The web service deploys fine but when I try to call it using client, I get the following error: -

      AxisFault
      faultCode: {http://schemas.xmlsoap.org/soap/envelope/}Server.userException
      faultSubcode:
      faultString: java.lang.NullPointerException
      faultActor:
      faultNode:
      faultDetail:
      {http://xml.apache.org/axis/}stackTrace: java.lang.NullPointerException
      at java.util.Hashtable.put(Hashtable.java:396)
      at com.sun.org.apache.xerces.internal.jaxp.SAXParserImpl.setProperty(SAXParserImpl.java:395)
      at org.apache.axis.encoding.DeserializationContextImpl.parse(DeserializationContextImpl.java:246)
      at org.apache.axis.SOAPPart.getAsSOAPEnvelope(SOAPPart.java:538)
      at org.apache.axis.Message.getSOAPEnvelope(Message.java:376)
      at org.apache.axis.client.Call.invokeEngine(Call.java:2583)
      at org.apache.axis.client.Call.invoke(Call.java:2553)
      at org.apache.axis.client.Call.invoke(Call.java:2248)
      at org.apache.axis.client.Call.invoke(Call.java:2171)
      at org.apache.axis.client.Call.invoke(Call.java:1691)
      at client.CPRWebServiceClient.main(CPRWebServiceClient.java:69)


      java.lang.NullPointerException
      at org.apache.axis.AxisFault.makeFault(AxisFault.java:129)
      at org.apache.axis.client.Call.invoke(Call.java:2251)
      at org.apache.axis.client.Call.invoke(Call.java:2171)
      at org.apache.axis.client.Call.invoke(Call.java:1691)
      at client.CPRWebServiceClient.main(CPRWebServiceClient.java:69)
      Caused by: java.lang.NullPointerException
      at java.util.Hashtable.put(Hashtable.java:396)
      at com.sun.org.apache.xerces.internal.jaxp.SAXParserImpl.setProperty(SAXParserImpl.java:395)
      at org.apache.axis.encoding.DeserializationContextImpl.parse(DeserializationContextImpl.java:246)
      at org.apache.axis.SOAPPart.getAsSOAPEnvelope(SOAPPart.java:538)
      at org.apache.axis.Message.getSOAPEnvelope(Message.java:376)
      at org.apache.axis.client.Call.invokeEngine(Call.java:2583)
      at org.apache.axis.client.Call.invoke(Call.java:2553)
      at org.apache.axis.client.Call.invoke(Call.java:2248)

      I am using JBoss 4.0.1, Apache axis 1.1, JWSDP 1.5.

      Here is jaxrpc-ri.xml :-

      <?xml version="1.0" encoding="UTF-8"?>
      <!DOCTYPE webServices>








      Here is config-interface.xml:-
      <?xml version="1.0" encoding="UTF-8"?>
      <!DOCTYPE configuration>







      Here is generated WSDL:-

      <?xml version="1.0" encoding="UTF-8" ?>
      - <definitions xmlns="http://schemas.xmlsoap.org/wsdl/" xmlns:tns="urn:foo" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/" name="CPRWebServices" targetNamespace="urn:foo">

      -





      -


      -


      -


      -
      -



      -




      -
      <soap:binding transport="http://schemas.xmlsoap.org/soap/http" style="rpc" />
      -
      <soap:operation soapAction="" />
      -
      <soap:body encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" use="encoded" namespace="urn:foo" />

      -
      <soap:body encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" use="encoded" namespace="urn:foo" />


      -
      <soap:operation soapAction="" />
      -
      <soap:body encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" use="encoded" namespace="urn:foo" />

      -
      <soap:body encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" use="encoded" namespace="urn:foo" />



      -
      -
      <soap:address xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/" location="http://gupta:8080/cprwebservices/cprws" />




      Any help is most appreciated.

      Thanks,
      Himanshu

        • 1. Re: Error while executing WS client
          thomas.diesler

          Could you provide a sample deployment in JIRA that allows me to reproduce what you are seeing? Ideally the client would be a Servlet, so that I only have to click on a link.

          • 2. Re: Error while executing WS client

            Hi Thomas,

            Thank you for the reply. I am not aware of JIRA and what it does. I can send you the sample code for both client and services, if thats what you require.

            Thanks,
            Himanshu

            • 3. Re: Error while executing WS client

              There is another thing I would like to mention. I was not using Apache-axis until I tried to run client. The first time I tried to run client, I got and excaption that some file from org.apache.... package is missing. So, I downloaded Apache-axis and copied its jar files in Classpath for client. After that I started getting this SOAP error.

              I wanted to mention this because I am not sure whether I was doing this right.

              Again, your help is appreciated.

              Thanks,
              Himanshu

              • 4. Re: Error while executing WS client

                OK. I got it working using a JSP as a client. But, I cannot access this webservice from a stanalone Java class. Any ideas?

                Thanks.