SOAP 1.2 HTTP Binding
WCF implements SOAP 1.2 HTTP binding as described in the SOAP 1.2-part 2
(SOAP12Part2) specification with the following clarifications.

SOAP 1.2 introduced an optional action parameter for the
application/soap+xml media type. This parameter is useful to optimize
message dispatch without requiring that the body of the SOAP message be
parsed when WS-Addressing is not used.

  a.. R2221: The application/soap+xml action parameter, when present on a
SOAP 1.2 request, must match the soapAction attribute on the
wsoap12:operation element inside the corresponding WSDL binding.

  b.. R2222: The application/soap+xml action parameter, when present on a
SOAP 1.2 message, must match wsa:Action when WS-Addressing 2004/08 or
WS-Addressing 1.0 are used.

When WS-Addressing is disabled and an incoming request does not contain an
action parameter, message Action is considered not specified.

You are not using WS-Addressing therefore

the wsoap12:operation element of the SOAPAction attribute specified does not
match the Action specified

"http://triniforce.com/soap/sample/getStrings";

Assuming you have a properly formed WSDL
this Appears to be a bug in WSDL2Java utility
Suggest going to JIRA for more info
http://issues.apache.org/jira/browse/AXIS2

Anyone else?
HTH/
Martin--
---- Original Message -----
From: "Maxim Geraskyn" <[EMAIL PROTECTED]>
To: <axis-user@ws.apache.org>
Sent: Friday, October 26, 2007 5:30 AM
Subject: AXIS2 and .NET Interop


> 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.j
ava:71)
>  at
org.apache.axis2.description.OutInAxisOperationClient.handleResponse(OutInAx
isOperation.java:326)
>  at
org.apache.axis2.description.OutInAxisOperationClient.send(OutInAxisOperatio
n.java:389)
>  at
org.apache.axis2.description.OutInAxisOperationClient.executeImpl(OutInAxisO
peration.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:g
etStrings
>
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</st
ring><string>Str3</string></getStringsResult></getStringsResponse></soap:Bod
y></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: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
>


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to