You are viewing a plain text version of this content. The canonical link for it is here.
Posted to java-user@axis.apache.org by אלחנן מעיין <El...@Phoenix.co.il> on 2007/08/15 10:28:21 UTC

RE:[AXIS2] org.apache.axis2.AxisFault: input stream for an incoming message is null

I have also encounted the same issue when invoking a dotnet2 service, the service retruns a string. It's a simple helloWorld, to me seemed the webserivce wasn't even activated in the firstplace

 

 

________________________________

From: Tushar Kolwalkar [mailto:Tushar.Kolwalkar@landgate.wa.gov.au] 
Sent: Wednesday, August 15, 2007 6:09 AM
To: axis-user@ws.apache.org
Subject: org.apache.axis2.AxisFault: input stream for an incoming message is null

 

Hello,

 

We have a Web Service deployed on a GSOAP server. I have used Axis2 code generator plugin for Eclipse to generate the client stubs. The Web Service predominantly deals with returning images. This is an MTOM Web Service. All the operations that return image work fine. There is only one operation (getHighestVersionNumber()) which does not return image; it returns a version number of the image for a given image ID. The return type of this operation is int. When I invoke this operation, I get a strange error. Interestingly if I invoke this operation using SOAP UI, we get back the expected results without any problems. Please note I am making a synchronous request. The exception message is as follows:

 

Caused by: org.apache.axis2.AxisFault: The input stream for an incoming message is null.

      at org.apache.axis2.transport.TransportUtils.createSOAPMessage(TransportUtils.java:61)

      at org.apache.axis2.description.OutInAxisOperationClient.send(OutInAxisOperation.java:356)

      at org.apache.axis2.description.OutInAxisOperationClient.execute(OutInAxisOperation.java:294)

      at au.com.global360.Get_imageStub.getHighestVersionNumber(Get_imageStub.java:405)

 

The HTTP Response header is as follows:

 

15:43:36 DEBUG header -- << "HTTP/1.1 202 ACCEPTED[\r][\n]"

15:43:36 DEBUG header -- << "Server: gSOAP/2.7[\r][\n]"

15:43:36 DEBUG header -- << "Content-Type: application/soap+xml; charset=utf-8[\r][\n]"

15:43:36 DEBUG header -- << "Transfer-Encoding: chunked[\r][\n]"

15:43:36 DEBUG header -- << "Connection: keep-alive[\r][\n]"

15:43:37 DEBUG header -- >> "POST / HTTP/1.1[\r][\n]"

15:43:37 DEBUG header -- >> "Content-Type: application/soap+xml; charset=UTF-8; action="urn:getImageAsTiff"[\r][\n]"

15:43:37 DEBUG header -- >> "User-Agent: Axis2[\r][\n]"

15:43:37 DEBUG header -- >> "Transfer-Encoding: chunked[\r][\n]"

15:43:37 DEBUG header -- >> "[\r][\n]"

15:43:37 DEBUG content -- >> "117[\r][\n]"

 

The response header for all other operations that work fine comes as "HTTP/1.1 200 OK" but for getHighestVersionNumber(), it is "HTTP/1.1 202 ACCEPTED". Interestingly the response header for this call using SOAP UI is again "HTTP/1.1 200 OK", so there is something wrong the way the Axis generated client stub makes the SOAP request. 

 

Please see the WSDL copied below for your reference. Any help on this problem is much appreciated.

 

WSDL:

 

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

<definitions xmlns:tns="urn:global360.com.au/store" xmlns:SOAP-ENV="http://www.w3.org/2003/05/soap-envelope" xmlns:SOAP-ENC="http://www.w3.org/2003/05/soap-encoding" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xop="http://www.w3.org/2004/08/xop/include" xmlns:mimexml="http://www.w3.org/2004/11/mimexml" xmlns:gi="urn:global360.com.au/store" xmlns:SOAP="http://schemas.xmlsoap.org/wsdl/soap12/" xmlns:MIME="http://schemas.xmlsoap.org/wsdl/mime/" xmlns:WSDL="http://schemas.xmlsoap.org/wsdl/" xmlns="http://schemas.xmlsoap.org/wsdl/" name="get_image" targetNamespace="urn:global360.com.au/store">

      <WSDL:types>

            <schema targetNamespace="urn:global360.com.au/store" xmlns:SOAP-ENV="http://www.w3.org/2003/05/soap-envelope" xmlns:SOAP-ENC="http://www.w3.org/2003/05/soap-encoding" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xop="http://www.w3.org/2004/08/xop/include" xmlns:mimexml="http://www.w3.org/2004/06/mimexml" xmlns:gi="urn:global360.com.au/store" xmlns="http://www.w3.org/2001/XMLSchema" elementFormDefault="unqualified" attributeFormDefault="unqualified">

                  <simpleType name="ResultCode">

                        <restriction base="xsd:string">

                              <enumeration value="RESULT-OK"/>

                              <enumeration value="DOCUMENT-ID-UNKNOWN"/>

                              <enumeration value="VERSION-INVALID-FOR-DOCUMENT-ID"/>

                              <enumeration value="RESULT-LAST"/>

                        </restriction>

                  </simpleType>

                  <!-- operation request element -->

                  <element name="getHighestVersionNumber">

                        <complexType>

                              <sequence>

                                    <element name="documentId" type="xsd:string" minOccurs="0" maxOccurs="1" nillable="true"/>

                              </sequence>

                        </complexType>

                  </element>

                  <!-- operation response element -->

                  <element name="getHighestVersionNumberResponse">

                        <complexType>

                              <sequence>

                                    <element name="version" type="xsd:int" minOccurs="0" maxOccurs="1" nillable="true"/>

                              </sequence>

                        </complexType>

                  </element>

                  <!-- operation request element -->

                  <element name="getImageAsTiffByVersion">

                        <complexType>

                              <sequence>

                                    <element name="documentId" type="xsd:string" minOccurs="0" maxOccurs="1" nillable="true"/>

                                    <element name="version" type="xsd:int" minOccurs="1" maxOccurs="1"/>

                              </sequence>

                        </complexType>

                  </element>

                  <!-- operation response element -->

                  <element name="getImageReturn">

                        <complexType>

                              <sequence>

                                    <element name="version" type="xsd:int" minOccurs="1" maxOccurs="1"/>

                                    <element name="file" nillable="true" type="base64Binary"/>

                                    <!-- <element name="file" type="gi:File" minOccurs="1" maxOccurs="1"/> -->

                              </sequence>

                        </complexType>

                  </element>

                  <!-- operation request element -->

                  <element name="getImageAsPDFByVersion">

                        <complexType>

                              <sequence>

                                    <element name="documentId" type="xsd:string" minOccurs="0" maxOccurs="1" nillable="true"/>

                                    <element name="version" type="xsd:int" minOccurs="1" maxOccurs="1"/>

                              </sequence>

                        </complexType>

                  </element>

                  <!-- operation request element -->

                  <element name="getImageAsTiff">

                        <complexType>

                              <sequence>

                                    <element name="documentId" type="xsd:string" minOccurs="0" maxOccurs="1" nillable="true"/>

                              </sequence>

                        </complexType>

                  </element>

                  <!-- operation request element -->

                  <element name="getImageAsPDF">

                        <complexType>

                              <sequence>

                                    <element name="documentId" type="xsd:string" minOccurs="0" maxOccurs="1" nillable="true"/>

                              </sequence>

                        </complexType>

                  </element>

                  <!-- operation request element -->

                  <element name="checkApiVersion">

                        <complexType>

                              <sequence>

                                    <element name="apiVersionRequired" type="xsd:string" minOccurs="0" maxOccurs="1" nillable="true"/>

                              </sequence>

                        </complexType>

                  </element>

                  <!-- operation response element -->

                  <element name="CheckApiVersionResult">

                        <complexType>

                              <sequence>

                                    <element name="apiVersion" type="xsd:string" minOccurs="0" maxOccurs="1" nillable="true"/>

                                    <element name="resultCode" type="xsd:int" minOccurs="1" maxOccurs="1"/>

                                    <element name="errorText" type="xsd:string" minOccurs="0" maxOccurs="1" nillable="true"/>

                              </sequence>

                        </complexType>

                  </element>

            </schema>

      </WSDL:types>

      <message name="getHighestVersionNumberRequest">

            <part name="parameters" element="gi:getHighestVersionNumber"/>

      </message>

      <message name="getHighestVersionNumberResponse">

            <part name="parameters" element="gi:getHighestVersionNumberResponse"/>

      </message>

      <message name="getImageAsTiffByVersion">

            <part name="parameters" element="gi:getImageAsTiffByVersion"/>

      </message>

      <message name="getImageReturn">

            <part name="parameters" element="gi:getImageReturn"/>

      </message>

      <message name="getImageAsPDFByVersion">

            <part name="parameters" element="gi:getImageAsPDFByVersion"/>

      </message>

      <message name="getImageAsTiff">

            <part name="parameters" element="gi:getImageAsTiff"/>

      </message>

      <message name="getImageAsPDF">

            <part name="parameters" element="gi:getImageAsPDF"/>

      </message>

      <message name="checkApiVersion">

            <part name="parameters" element="gi:checkApiVersion"/>

      </message>

      <message name="CheckApiVersionResult">

            <part name="parameters" element="gi:CheckApiVersionResult"/>

      </message>

      <portType name="get_imagePortType">

            <operation name="getHighestVersionNumber">

                  <documentation>Service definition of function gi__getHighestVersionNumber</documentation>

                  <input message="tns:getHighestVersionNumberRequest"/>

                  <output message="tns:getHighestVersionNumberResponse"/>

            </operation>

            <operation name="getImageAsTiffByVersion">

                  <documentation>Service definition of function gi__getImageAsTiffByVersion</documentation>

                  <input message="tns:getImageAsTiffByVersion"/>

                  <output message="tns:getImageReturn"/>

            </operation>

            <operation name="getImageAsPDFByVersion">

                  <documentation>Service definition of function gi__getImageAsPDFByVersion</documentation>

                  <input message="tns:getImageAsPDFByVersion"/>

                  <output message="tns:getImageReturn"/>

            </operation>

            <operation name="getImageAsTiff">

                  <documentation>Service definition of function gi__getImageAsTiff</documentation>

                  <input message="tns:getImageAsTiff"/>

                  <output message="tns:getImageReturn"/>

            </operation>

            <operation name="getImageAsPDF">

                  <documentation>Service definition of function gi__getImageAsPDF</documentation>

                  <input message="tns:getImageAsPDF"/>

                  <output message="tns:getImageReturn"/>

            </operation>

            <operation name="checkApiVersion">

                  <documentation>Service definition of function gi__checkApiVersion</documentation>

                  <input message="tns:checkApiVersion"/>

                  <output message="tns:CheckApiVersionResult"/>

            </operation>

      </portType>

      <binding name="get_image" type="tns:get_imagePortType">

            <SOAP:binding style="document" transport="http://schemas.xmlsoap.org/soap/http"/>

            <operation name="getHighestVersionNumber">

                  <SOAP:operation/>

                  <input>

                        <SOAP:body parts="parameters" use="literal"/>

                  </input>

                  <output>

                        <SOAP:body parts="parameters" use="literal"/>

                  </output>

            </operation>

            <operation name="getImageAsTiffByVersion">

                  <SOAP:operation/>

                  <input>

                        <SOAP:body parts="parameters" use="literal"/>

                  </input>

                  <output>

                        <SOAP:body parts="parameters" use="literal"/>

                  </output>

            </operation>

            <operation name="getImageAsPDFByVersion">

                  <SOAP:operation/>

                  <input>

                        <SOAP:body parts="parameters" use="literal"/>

                  </input>

                  <output>

                        <SOAP:body parts="parameters" use="literal"/>

                  </output>

            </operation>

            <operation name="getImageAsTiff">

                  <SOAP:operation/>

                  <input>

                        <SOAP:body parts="parameters" use="literal"/>

                  </input>

                  <output>

                        <SOAP:body parts="parameters" use="literal"/>

                  </output>

            </operation>

            <operation name="getImageAsPDF">

                  <SOAP:operation/>

                  <input>

                        <SOAP:body parts="parameters" use="literal"/>

                  </input>

                  <output>

                        <SOAP:body parts="parameters" use="literal"/>

                  </output>

            </operation>

            <operation name="checkApiVersion">

                  <SOAP:operation/>

                  <input>

                        <SOAP:body parts="parameters" use="literal"/>

                  </input>

                  <output>

                        <SOAP:body parts="parameters" use="literal"/>

                  </output>

            </operation>

      </binding>

      <service name="get_image">

            <documentation>gSOAP 2.7.8c generated service definition</documentation>

            <port name="get_image" binding="tns:get_image">

                  <SOAP:address location="http://localhost:8080"/>

            </port>

      </service>

</definitions>

 

Thanks,

Tushar Kolwalkar

Information Management

Landgate

(08) 9273 0756 (ext: 7756)

www.landgate.wa.gov.au

tushar.kolwalkar@landgate.wa.gov.au

  

This e-mail and any files transmitted with it are intended only for the use of the addressee(s). It may contain information that is confidential and privileged, in which case neither is intended to be waived or lost by mistaken delivery to you. If you are not an intended recipient, any use, interference with, disclosure, distribution or copying of this material is unauthorised and prohibited. If you receive this e-mail in error, please notify the sender by return e-mail and delete the message and any attachments from your system. Unless specifically indicated, this e-mail does not constitute formal advice or commitment by the sender or the Western Australian Land Information Authority (Landgate). Information in this message not relating to the official business of Landgate shall be understood as neither given nor endorsed by it. It is your responsibility to check any attachments for viruses and defects before opening or sending them on. Landgate’s liability is limited to re-supplying affected attachments.