You are viewing a plain text version of this content. The canonical link for it is here.
Posted to soap-user@xml.apache.org by Khondker Akhter <Kh...@msdw.com> on 2001/02/28 21:39:10 UTC
Re: How to communicate between Apache-SOAP and MSSOAP.(stock quote
service)
here is what i am trying to do:
run the StockQuoteService in tomcat/apache (works)
access the service from an thin vb client:
***********************************************************
vb client::
Private Sub Form_Load()
Dim symbol As String
Const WDSL_URL As String =
"http://mgfrm65:8181/services/StockQuoteService.wsdl"
'Const name = "urn:xmltoday-delayed-quotes"
symbolTB.Text = "IBM"
End Sub
Private Sub getQuoteCB_Click()
Dim ret As Variant
Dim sc As New MSSOAPLib.SoapClient
'Dim sc As Object
'Set sc = CreateObject("MSSOAP.SoapClient")
On Error GoTo do_err
symbol = symbolTB.Text
quoteL.Caption = symbol
Call
sc.mssoapinit("http://mgfrm65:8181/services/StockQuoteService.wsdl", _
"StockQuoteService", _
"StockQuotePort")
ret = sc.getQuote(symbol)
quoteL = ret
do_cont:
Exit Sub
do_err:
MsgBox Err & ": " & Error$
MsgBox sc.faultactor & vbCrLf & _
sc.faultcode & vbCrLf & _
sc.faultstring
End Sub
Private Sub quitB_Click()
Unload Me
End Sub
***********************************************************
***********************************************************
the code for the StockQuoteService.wsdl is:
<?xml version="1.0"?>
<definitions name="StockQuoteService"
targetNamespace="urn:xmltoday-delayed-quotes"
xmlns:tns="urn:xmltoday-delayed-quotes"
xmlns="http://schemas.xmlsoap.org/wsdl/"
xmlns:xsd="http://www.w3.org/1999/XMLSchema"
xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/">
<message name="getQuoteInput">
<part name="symbol" type="xsd:string"/>
</message>
<message name="getQuoteOutput">
<part name="quote" type="xsd:float"/>
</message>
<portType name="GetQuote">
<operation name="getQuote">
<input message="getQuoteInput"/>
<output message="getQuoteOutput"/>
</operation>
</portType>
<binding name="GetQuoteSoapBinding" type="GetQuote">
<soap:binding style="rpc"
transport="http://schemas.xmlsoap.org/soap/http"/>
<operation name="getQuote">
<soap:operation soapAction=""/>
<input>
<soap:body use="encoded"
encodingStyle="http://schemas.xmlsoap.org/soap/encoding/
http://www.ibm.com/namespaces/xmi"
namespace="urn:xmltoday-delayed-quotes"/>
</input>
<output>
<soap:body use="encoded"
encodingStyle="http://schemas.xmlsoap.org/soap/encoding/
http://www.ibm.com/namespaces/xmi"
namespace="urn:xmltoday-delayed-quotes"/>
</output>
</operation>
</binding>
<service name="StockQuoteService">
<port name="StockQuotePort" binding="GetQuoteSoapBinding">
<soap:address
location="http://mgfrm65:8181/soap/servlet/rpcrouter"/>
</port>
</service>
</definitions>
***********************************************************
when i run my client and response from the server is :
HTTP/1.0 400 Bad Request
Content-Length: 536
Date: Wed, 28 Feb 2001 20:28:16 GMT
Servlet-Engine: Tomcat Web Server/3.1 (JSP 1.1; Servlet 2.2; Java 1.2.2;
SunOS 5.5.1 sparc; java.vendor=Sun Microsystems Inc.)
Set-Cookie: JSESSIONID=To1019mC8478576703846645At;Path=/soap
Set-Cookie2:
JSESSIONID=To1019mC8478576703846645At;Version=1;Discard;Path="/soap"
Content-Language: en
Content-Type: text/xml; charset=utf-8
Status: 400
<?xml version='1.0' encoding='UTF-8'?>
<SOAP-ENV:Envelope
xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/"
xmlns:xsi="http://www.w3.org/1999/XMLSchema-instance"
xmlns:xsd="http://www.w3.org/1999/XMLSchema">
<SOAP-ENV:Body>
<SOAP-ENV:Fault>
<faultcode>SOAP-ENV:Client</faultcode>
<faultstring>No Deserializer found to deserialize a ':symbol' using
encoding style 'http://schemas.xmlsoap.org/soap/encoding/'.</faultstring>
<faultactor>/soap/servlet/rpcrouter</faultactor>
</SOAP-ENV:Fault>
</SOAP-ENV:Body>
</SOAP-ENV:Envelope>
***********************************************************
what does this mean??