axis-java-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Ted Jones" <Tjo...@metamatrix.com>
Subject Empty SOAP Body in Input Message Causes NPE on Axis 1.3
Date Mon, 12 Jun 2006 13:55:53 GMT
I am executing a web service with no input parameters so the SOAP body
is empty like so:
 
<soapenv:Envelope
xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/">
   <soapenv:Body/>
</soapenv:Envelope>
 
I am getting an NPE returned before I even hit my Web Service, so I am
assuming the exception is happening in Axis somewhere (I'm not seeing a
stack trace). Here is the response:
 
<?xml version="1.0" encoding="UTF-8"?>
<soapenv:Envelope
xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/"
xmlns:xsd="http://www.w3.org/2001/XMLSchema"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<soapenv:Body>
  <soapenv:Fault>
   <faultcode>soapenv:Server.userException</faultcode>
   <faultstring>java.lang.NullPointerException</faultstring>
   <detail/>
  </soapenv:Fault>
</soapenv:Body>
</soapenv:Envelope>
 
I get this using Coral and Systinet as my clients. When I generate an
Axis client, I do not get an NPE but I get a node added to my body with
the operation name in it (which I don't want to see as my logic depends
on the body to be empty when no inputs are provided).
 
Here is the WSDL:
<definitions name="widgetServices"
targetNamespace="http://com.widgets/test
<BLOCKED::BLOCKED::http://com.widgets/test> "
    xmlns="http://schemas.xmlsoap.org/wsdl/
<BLOCKED::BLOCKED::http://schemas.xmlsoap.org/wsdl/> "
    xmlns:xsd="http://www.w3.org/2001/XMLSchema
<BLOCKED::BLOCKED::http://www.w3.org/2001/XMLSchema> "
    xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/
<BLOCKED::BLOCKED::http://schemas.xmlsoap.org/wsdl/soap/> "
    xmlns:tns="http://com.widgets/test
<BLOCKED::BLOCKED::http://com.widgets/test> "
    xmlns:schema1="http://www.widgets.com/bqt_Output
<BLOCKED::BLOCKED::http://www.widgets.com/bqt_Output> ">
   <types>
      <xsd:schema targetNamespace="http://com.widgets/test
<BLOCKED::BLOCKED::http://com.widgets/test> "
xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/
<BLOCKED::BLOCKED::http://schemas.xmlsoap.org/wsdl/> ">
         <xsd:import namespace="http://www.widgets.com/bqt_Output
<BLOCKED::BLOCKED::http://www.widgets.com/bqt_Output> "
schemaLocation="http://chicago:8080/test/servlet/ArtifactDocumentService
/test/bqt_Output.xsd
<BLOCKED::BLOCKED::http://chicago:8080/test/servlet/ArtifactDocumentServ
ice/test/bqt_Output.xsd> " />
      </xsd:schema>
   </types>
   <message name="bqt_SMALLA_getSMALLA_Input">
      <documentation>Input message for operation
bqt_SMALLA/getSMALLA.</documentation>
   </message>
   <message name="bqt_SMALLA_getSMALLA_SMALLA_OutputMsg">
      <documentation>Output message for operation
bqt_SMALLA/getSMALLA.</documentation>
      <part name="bqt_SMALLA_getSMALLA_SMALLA_OutputMsg"
element="schema1:SMALLA_Output" />
   </message>
   <portType name="bqt_SMALLA">
      <operation name="getSMALLA">
         <input name="Input" message="tns:bqt_SMALLA_getSMALLA_Input" />
         <output name="SMALLA_OutputMsg"
message="tns:bqt_SMALLA_getSMALLA_SMALLA_OutputMsg" />
      </operation>
   </portType>
   <binding name="bqt_SMALLA" type="tns:bqt_SMALLA">
      <soap:binding style="document"
transport="http://schemas.xmlsoap.org/soap/http
<BLOCKED::BLOCKED::http://schemas.xmlsoap.org/soap/http> " />
      <operation name="getSMALLA">
         <soap:operation style="document"
soapAction="bqt_WS.bqt_SMALLA.getSMALLA" />
         <input name="Input">
            <soap:body use="literal" />
         </input>
         <output name="SMALLA_OutputMsg">
            <soap:body use="literal" />
         </output>
      </operation>
   </binding>
   <service name="widgetsDataServices">
      <port name="bqt_SMALLA" binding="tns:bqt_SMALLA">
         <soap:address
location="http://chicago:8080/test/services/service
<BLOCKED::BLOCKED::http://chicago:8080/test/services/service> " />
      </port>
   </service>
</definitions>
Here is the WSDD:
<deployment name="test" xmlns="http://xml.apache.org/axis/wsdd/
<BLOCKED::BLOCKED::http://xml.apache.org/axis/wsdd/> " 
            xmlns:java="http://xml.apache.org/axis/wsdd/providers/java
<BLOCKED::BLOCKED::http://xml.apache.org/axis/wsdd/providers/java> "
            xmlns:xsi="http://www.w3.org/2000/10/XMLSchema-instance
<BLOCKED::BLOCKED::http://www.w3.org/2000/10/XMLSchema-instance> ">
  <!-- note that either style="message" OR provider="java:MSG" both work
-->
  <service name="service" provider="java:MSG">   
    <parameter name="className"
value="com.widgets.soap.lds.service.DataServiceWebService" />
    <parameter name="allowedMethods" value="executeDataservice" />
  </service>
</deployment>  
 
Any help would be greatly appreciated!
 
Thanks,
Ted Jones

Mime
View raw message