axis-java-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Ted Jones (JIRA)" <j...@apache.org>
Subject [jira] Commented: (AXIS2-837) Java2WSDL should generate a WSDL interface that accepts an empty SOAP Body
Date Mon, 26 Jun 2006 13:50:45 GMT
    [ http://issues.apache.org/jira/browse/AXIS2-837?page=comments#action_12417811 ] 

Ted Jones commented on AXIS2-837:
---------------------------------

I am executing a web service (Axis 1.3, but it looks like the same issue in Axis 2) 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 since 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>  
  


> Java2WSDL should generate a WSDL interface that accepts an empty SOAP Body
> --------------------------------------------------------------------------
>
>          Key: AXIS2-837
>          URL: http://issues.apache.org/jira/browse/AXIS2-837
>      Project: Apache Axis 2.0 (Axis2)
>         Type: Bug

>     Reporter: Davanum Srinivas
>     Assignee: Deepal Jayasinghe

>
> Java code:
> public class TestAxis {
>     public String getDate(){
>         return new java.util.Date().toString();
>     }
> }
> Quote from Anne at http://marc.theaimsgroup.com/?l=axis-user&m=115089935000189&w=2:
> Java2WSDL should generate a WSDL interface that accepts an empty SOAP Body. e.g.,
> <wsdl:message name="getDateMessage"/>
> But based on a bunch of recent messages I've seen, Axis2 barfs on an empty SOAP Body.
This is a bug that needs to be fixed. I don't know if anyone has created a JIRA for it.

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
   http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see:
   http://www.atlassian.com/software/jira


---------------------------------------------------------------------
To unsubscribe, e-mail: axis-dev-unsubscribe@ws.apache.org
For additional commands, e-mail: axis-dev-help@ws.apache.org


Mime
View raw message