axis-java-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Paul Fremantle" <pzf...@gmail.com>
Subject Re: AXIS2 and .NET Interop
Date Fri, 26 Oct 2007 09:53:33 GMT
Is there any error log on the .NET side?

I can't see anything really wrong with the Axis2 request. How did you
generate the client?

Paul

On 10/26/07, Maxim Geraskyn <maxim.ge@gmail.com> wrote:
>
> Problem description
> --------------------------------------
> When I call .NET service ( Visual Studio 2005 ) using
> Axis2-generated client I got exception:
>
> Exception in thread "main" org.apache.axis2.AxisFault: The input
> stream for an incoming message is null.
> at org.apache.axis2.transport.TransportUtils.createSOAPMessage(
> TransportUtils.java:71)
> at org.apache.axis2.description.OutInAxisOperationClient.handleResponse(
> OutInAxisOperation.java:326)
> at org.apache.axis2.description.OutInAxisOperationClient.send(
> OutInAxisOperation.java:389)
> at org.apache.axis2.description.OutInAxisOperationClient.executeImpl(
> OutInAxisOperation.java:211)
> at org.apache.axis2.client.OperationClient.execute(OperationClient.java
> :163)
> at com.triniforce.soap.sample.Service1Stub.getStrings(Unknown Source)
> at inv.CallSoap.main(Unknown Source)
>
> Service function declaration
> ---------------------------------------
> String[] getString(String []);
>
> Schema
> --------------------------------------
>       <s:element name="getStrings">
>         <s:complexType>
>           <s:sequence>
>             <s:element minOccurs="0" maxOccurs="1" name="arg"
> type="tns:ArrayOfString"/>
>           </s:sequence>
>         </s:complexType>
>       </s:element>
>       <s:element name="getStringsResponse">
>         <s:complexType>
>           <s:sequence>
>             <s:element minOccurs="0" maxOccurs="1"
> name="getStringsResult" type="tns:ArrayOfString"/>
>           </s:sequence>
>         </s:complexType>
>       </s:element>
>
>       <s:complexType name="ArrayOfString">
>         <s:sequence>
>           <s:element minOccurs="0" maxOccurs="unbounded" name="string"
> nillable="true" type="s:string"/>
>         </s:sequence>
>       </s:complexType>
>
> Calling code
> --------------------------------------
>         Service1Stub stub = new  Service1Stub(null,
> "http://localhost:8091/Service1.asmx");
>         GetStringsResponse res;
>         GetStrings arg = new GetStrings();
>         ArrayOfString arr1 = new ArrayOfString();
>         arr1.setString(new String[]{"Str1", null, "Str2"});
>         arg.setArg(arr1);
>         stub.getStrings(arg);
>
> Request data
> --------------------------------------
> POST /Service1.asmx HTTP/1.1
> Content-Type: application/soap+xml; charset=UTF-8;
> action="http://triniforce.com/soap/sample/getStrings"
> User-Agent: Axis2
> Host: localhost:8091
> Transfer-Encoding: chunked
>
> 158
> <?xml version='1.0' encoding='UTF-8'?><soapenv:Envelope
> xmlns:soapenv="http://www.w3.org/2003/05/soap-envelope
> "><soapenv:Body><ns1:getStrings
> xmlns:ns1="http://triniforce.com/soap/sample
> "><ns1:arg><ns1:string>Str1</ns1:string><ns1:string>Str</ns1:string><ns1:string>Str2</ns1:string></ns1:arg></ns1:getStrings></soapenv:Body></soapenv:Envelope>
> 0
>
> Answer data
> --------------------------------------
> HTTP/1.1 400 Bad Request
> Server: ASP.NET Development Server/8.0.0.0
> Date: Fri, 26 Oct 2007 08:45:01 GMT
> X-AspNet-Version: 2.0.50727
> Cache-Control: private
> Content-Length: 0
> Connection: Close
>
>
> Axis 1.4
> ------------------------------
> Axis 1.4 works better
>
>
> Axis 1.4 request data
> ------------------------------
> POST /Service1.asmx HTTP/1.0
> Content-Type: text/xml; charset=utf-8
> Accept: application/soap+xml, application/dime, multipart/related, text/*
> User-Agent: Axis/1.4
> Host: localhost:8091
> Cache-Control: no-cache
> Pragma: no-cache
> SOAPAction: "http://triniforce.com/soap/sample/getStrings"
> Content-Length: 381
>
> Axis 1.4 response data
> -------------------------------
> HTTP/1.1 200 OK
> Server: ASP.NET Development Server/8.0.0.0
> Date: Fri, 26 Oct 2007 08:54:24 GMT
> X-AspNet-Version: 2.0.50727
> Cache-Control: private, max-age=0
> Content-Type: text/xml; charset=utf-8
> Content-Length: 408
> Connection: Close
>
> <?xml version="1.0" encoding="utf-8"?><soap:Envelope
> xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/"
> xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
> xmlns:xsd="http://www.w3.org/2001/XMLSchema
> "><soap:Body><getStringsResponse
> xmlns="http://triniforce.com/soap/sample
> "><getStringsResult><string>Str1</string><string>Str3</string></getStringsResult></getStringsResponse></soap:Body></soap:Envelope>
>
> Some thoughts
> -------------------------------
> Axis 1.4 can call .NET service, but does not pass null element of array.
> Axis2 1.4 generates correct xml request, including null, but
> obviously .net does not understand http headeres.
>
> If I send xml generated by Axis2 using SoapUI tool, it works perect.
> SoapUI headers:
> POST /Service1.asmx HTTP/1.1
> Content-Type: text/xml;charset=UTF-8
> SOAPAction: "http://triniforce.com/soap/sample/getStrings"
> User-Agent: Jakarta Commons-HttpClient/3.0.1
> Host: localhost:8091
> Content-Length: 453
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: axis-user-unsubscribe@ws.apache.org
> For additional commands, e-mail: axis-user-help@ws.apache.org
>
>


-- 
Paul Fremantle
Co-Founder and VP of Technical Sales, WSO2
OASIS WS-RX TC Co-chair

blog: http://pzf.fremantle.org
paul@wso2.com

"Oxygenating the Web Service Platform", www.wso2.com

Mime
View raw message