That was it exactly. Thank you!

________________________________

From: Paul Fremantle [mailto:[EMAIL PROTECTED]
Sent: Tue 11/14/2006 3:23 AM
To: [email protected]
Subject: Re: Problem calling .NET WebService from Axis2 Java Client



John

It may be that because you are using the URL with the /Ping appended
.NET assumes this is a pure XML req/resp (tho its pretty odd since its
getting a SOAP message!). Why don't you try using the
/NGLPTOServices_VS/InventoryServices.asmx URL and making sure you set
the right Action in Axis2 which will cause a SOAPAction to flow. This
might push .NET into sending a SOAP response.

Paul

On 11/14/06, Urban, John <[EMAIL PROTECTED]> wrote:
> I think I see the problem. Just not sure how to add the SOAP header to .NET 
> web service.
> Here is the reqest and response via tcpmon:
>
> request:
>
> POST /NGLPTOServices_VS/InventoryServices.asmx/Ping HTTP/1.1
> User-Agent: Axis/2.0
> Host: 127.0.0.1:8081
> Transfer-Encoding: chunked
> Content-Type: application/soap+xml; 
> charset=UTF-8;action="http://tempuri.org/Ping";;
>
> de
> <?xml version='1.0' encoding='UTF-8'?><soapenv:Envelope 
> xmlns:soapenv="http://www.w3.org/2003/05/soap-envelope";><soapenv:Header 
> /><soapenv:Body><ns1:Ping xmlns:ns1="http://tempuri.org/"; 
> /></soapenv:Body></soapenv:Envelope>
> 0
>
> response:
>
> HTTP/1.1 200 OK
> Server: ASP.NET Development Server/8.0.0.0
> Date: Tue, 14 Nov 2006 03:56:28 GMT
> X-AspNet-Version: 2.0.50727
> Cache-Control: private, max-age=0
> Content-Type: text/xml; charset=utf-8
> Content-Length: 95
> Connection: Close
>
> <?xml version="1.0" encoding="utf-8"?>
> <string xmlns="http://tempuri.org/";>I am alive</string>
>
>
>
> -----Original Message-----
> From: Urban, John
> Sent: Mon 11/13/2006 2:14 PM
> To: [email protected]
> Subject: RE: Problem calling .NET WebService from Axis2 Java Client
>
> So there is probably a special configuration/setting I have to do to
> IIS, or some annotation I need to add to the .NET web service
> [WebMethod] to get it to work?
>
> I'll try TCPMON. Thanks.
>
> -----Original Message-----
> From: Paul Fremantle [mailto:[EMAIL PROTECTED]
> Sent: Monday, November 13, 2006 1:56 PM
> To: [email protected]
> Subject: Re: Problem calling .NET WebService from Axis2 Java Client
>
> The easiest way to debug this will be to use TCPMON or some other
> tracer to see what the response looks like.
>
> Paul
>
> On 11/13/06, Urban, John <[EMAIL PROTECTED]> wrote:
> >
> >
> >
> >
> > I generated the java code from the wsdl using wsdl2java in the axis2
> > distribution. I got everything to compile.
> >
> >
> >
> > I am able to get the call the .net 2.0 web service with the code and
> get a
> > response back(I even stepped through the VS debugger):
> >
> > [javacode]
> >  InventoryServicesStub stub = new InventoryServicesStub(null,
> >
> "http://localhost:2067/NGLPTOServices_VS/InventoryServices.asmx/Ping";);
> >  InventoryServicesStub.Ping ping = new InventoryServicesStub.Ping();
> >
> > InventoryServicesStub.PingResponse response =
> > stub.Ping(ping);
> >
> > String results = response.getPingResult();
> >  System.out.println("Response : " + results);
> >  [/javacode]
> >
> > I can see it execute in Visual Studio debugger and return. When
> control
> >  comes back to my eclipse debugger, I get the following AxisFault:
> >
> > "First Element must contain the local name, Envelope"
> >
> > How do I fix this?
> >
> > Here is my WSDL:
> >
> > [code]
> >  <?xml version="1.0" encoding="utf-8"?>
> >  <wsdl:definitions
> > xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/";
> >  xmlns:tm="http://microsoft.com/wsdl/mime/textMatching/";
> >  xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/";
> >  xmlns:mime="http://schemas.xmlsoap.org/wsdl/mime/";
> >  xmlns:tns="http://tempuri.org/";
> >  xmlns:s="http://www.w3.org/2001/XMLSchema";
> >  xmlns:soap12="http://schemas.xmlsoap.org/wsdl/soap12/";
> >  xmlns:http="http://schemas.xmlsoap.org/wsdl/http/";
> >  targetNamespace="http://tempuri.org/";
> >  xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/";>
> >    <wsdl:types>
> >      <s:schema elementFormDefault="qualified"
> >  targetNamespace="http://tempuri.org/";>
> >        <s:element name="Ping">
> >          <s:complexType />
> >        </s:element>
> >        <s:element name="PingResponse">
> >          <s:complexType>
> >            <s:sequence>
> >              <s:element minOccurs="0" maxOccurs="1" name="PingResult"
> >  type="s:string" />
> >            </s:sequence>
> >          </s:complexType>
> >        </s:element>
> >        <s:element name="GetInventoryReport">
> >          <s:complexType />
> >        </s:element>
> >        <s:element name="GetInventoryReportResponse">
> >          <s:complexType>
> >            <s:sequence>
> >              <s:element minOccurs="0" maxOccurs="1"
> >  name="GetInventoryReportResult" type="tns:Results" />
> >            </s:sequence>
> >          </s:complexType>
> >        </s:element>
> >        <s:complexType name="Results">
> >          <s:sequence>
> >            <s:element minOccurs="1" maxOccurs="1" name="timestamp"
> >  type="s:dateTime" />
> >            <s:element minOccurs="0" maxOccurs="1" name="status"
> >  type="s:string" />
> >            <s:element minOccurs="0" maxOccurs="1" name="message"
> >  type="s:string" />
> >            <s:element minOccurs="0" maxOccurs="1" name="report"
> >  type="tns:ArrayOfInventoryReport" />
> >          </s:sequence>
> >        </s:complexType>
> >        <s:complexType name="ArrayOfInventoryReport">
> >          <s:sequence>
> >            <s:element minOccurs="0" maxOccurs="unbounded"
> >  name="InventoryReport" nillable="true" type="tns:InventoryReport" />
> >          </s:sequence>
> >        </s:complexType>
> >        <s:complexType name="InventoryReport">
> >          <s:sequence>
> >            <s:element minOccurs="0" maxOccurs="1" name="CONTRACT"
> >  type="s:string" />
> >            <s:element minOccurs="0" maxOccurs="1" name="PRODUCT_NAME"
> >  type="s:string" />
> >            <s:element minOccurs="0" maxOccurs="1" name="VOLUME_TYPE"
> >  type="s:string" />
> >            <s:element minOccurs="0" maxOccurs="1"
> name="MV_HEADER_DATE"
> >  type="s:string" />
> >            <s:element minOccurs="0" maxOccurs="1" name="TICKET"
> >  type="s:string" />
> >            <s:element minOccurs="1" maxOccurs="1" name="BARRELS"
> >  type="s:double" />
> >            <s:element minOccurs="1" maxOccurs="1" name="PRODUCT_ORDER"
> >  type="s:int" />
> >            <s:element minOccurs="1" maxOccurs="1" name="SORT_ORDER"
> >  type="s:int" />
> >          </s:sequence>
> >        </s:complexType>
> >      </s:schema>
> >    </wsdl:types>
> >    <wsdl:message name="PingSoapIn">
> >      <wsdl:part name="parameters" element="tns:Ping" />
> >    </wsdl:message>
> >    <wsdl:message name="PingSoapOut">
> >      <wsdl:part name="parameters" element="tns:PingResponse" />
> >    </wsdl:message>
> >    <wsdl:message name="GetInventoryReportSoapIn">
> >      <wsdl:part name="parameters"
> > element="tns:GetInventoryReport" />
> >    </wsdl:message>
> >    <wsdl:message name="GetInventoryReportSoapOut">
> >      <wsdl:part name="parameters"
> >  element="tns:GetInventoryReportResponse" />
> >    </wsdl:message>
> >    <wsdl:portType name="InventoryServicesSoap">
> >      <wsdl:operation name="Ping">
> >        <wsdl:input message="tns:PingSoapIn" />
> >        <wsdl:output message="tns:PingSoapOut" />
> >      </wsdl:operation>
> >      <wsdl:operation name="GetInventoryReport">
> >        <wsdl:input message="tns:GetInventoryReportSoapIn"
> > />
> >        <wsdl:output message="tns:GetInventoryReportSoapOut"
> > />
> >      </wsdl:operation>
> >    </wsdl:portType>
> >    <wsdl:binding name="InventoryServicesSoap"
> >  type="tns:InventoryServicesSoap">
> >      <soap:binding
> > transport="http://schemas.xmlsoap.org/soap/http"; />
> >      <wsdl:operation name="Ping">
> >        <soap:operation soapAction="http://tempuri.org/Ping";
> >  style="document" />
> >        <wsdl:input>
> >          <soap:body use="literal" />
> >        </wsdl:input>
> >        <wsdl:output>
> >          <soap:body use="literal" />
> >        </wsdl:output>
> >      </wsdl:operation>
> >      <wsdl:operation name="GetInventoryReport">
> >        <soap:operation
> >  soapAction="http://tempuri.org/GetInventoryReport";
> > style="document" />
> >        <wsdl:input>
> >          <soap:body use="literal" />
> >        </wsdl:input>
> >        <wsdl:output>
> >          <soap:body use="literal" />
> >        </wsdl:output>
> >      </wsdl:operation>
> >    </wsdl:binding>
> >    <wsdl:binding name="InventoryServicesSoap12"
> >  type="tns:InventoryServicesSoap">
> >      <soap12:binding
> > transport="http://schemas.xmlsoap.org/soap/http"; />
> >      <wsdl:operation name="Ping">
> >        <soap12:operation soapAction="http://tempuri.org/Ping";
> >  style="document" />
> >        <wsdl:input>
> >          <soap12:body use="literal" />
> >        </wsdl:input>
> >        <wsdl:output>
> >          <soap12:body use="literal" />
> >        </wsdl:output>
> >      </wsdl:operation>
> >      <wsdl:operation name="GetInventoryReport">
> >        <soap12:operation
> >  soapAction="http://tempuri.org/GetInventoryReport";
> > style="document" />
> >        <wsdl:input>
> >          <soap12:body use="literal" />
> >        </wsdl:input>
> >        <wsdl:output>
> >          <soap12:body use="literal" />
> >        </wsdl:output>
> >      </wsdl:operation>
> >    </wsdl:binding>
> >    <wsdl:service name="InventoryServices">
> >      <wsdl:port name="InventoryServicesSoap"
> >  binding="tns:InventoryServicesSoap">
> >        <soap:address
> >
> location="http://localhost:2067/NGLPTOServices_VS/InventoryServices.asmx
> "/>
> >      </wsdl:port>
> >      <wsdl:port name="InventoryServicesSoap12"
> >  binding="tns:InventoryServicesSoap12">
> >        <soap12:address
> >
> location="http://localhost:2067/NGLPTOServices_VS/InventoryServices.asmx
> "/>
> >      </wsdl:port>
> >    </wsdl:service>
> >  </wsdl:definitions>
> >  [/code]
> >
> >
>
>
> --
> Paul Fremantle
> VP/Technology, WSO2 and OASIS WS-RX TC Co-chair
>
> http://bloglines.com/blog/paulfremantle
> [EMAIL PROTECTED]
>
> "Oxygenating the Web Service Platform", www.wso2.com
>
> ---------------------------------------------------------------------
> 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]
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
>


--
Paul Fremantle
VP/Technology, WSO2 and OASIS WS-RX TC Co-chair

http://bloglines.com/blog/paulfremantle
[EMAIL PROTECTED]

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

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


<<winmail.dat>>

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

Reply via email to