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>
<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>
<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"
xmlns="http://schemas.xmlsoap.org/wsdl/"
xmlns:xsd="http://www.w3.org/2001/XMLSchema"
xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/"
xmlns:tns="http://com.widgets/test"
xmlns:schema1="http://www.widgets.com/bqt_Output">
<types>
<xsd:schema targetNamespace="http://com.widgets/test" xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/">
<xsd:import namespace="http://www.widgets.com/bqt_Output" schemaLocation="http://chicago:8080/test/servlet/ArtifactDocumentService/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" />
<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" />
</port>
</service>
</definitions>Here is the WSDD:<deployment name="test" xmlns="http://xml.apache.org/axis/wsdd/"
xmlns:java="http://xml.apache.org/axis/wsdd/providers/java"
xmlns:xsi="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
