ws-soap-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Helen Luther" <>
Subject XMLSchema-instance and XMLSchema
Date Tue, 15 Jan 2002 18:22:07 GMT
   I am using VB6 as the client attempting to access an APACHE SOAP 2.2 Web
service.  If I set the xsi and xsd vars (bolded in VB6 code below) to :
   XSI = ""
   XSD =
Everything works well.

However, when I set them to:
   XSI = ""
   XSD =
   XSI = ""
   XSD =

I get error :
No Deserializer found to deserialize a :Parameter1 using encoding style

I even used the TcpTunnelGui troubleshooting tool to compare the XML
produced by the "1999" code versus the "2000" / "2001" code.  The generated
XML for all 3 is exactly the same.  The server XML response includes xsi and
xsd uri's of 1999, how does server pick the xsi and xsd uri's to respond
with?  I.e. why is it using 1999 instead of 2000 or 2001 - I thought it
responded based on what was in the requests' envelope.


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





Dim Connector As SoapConnector
   Dim Serializer As SoapSerializer
   Dim Reader As SoapReader

   Dim ENC As String
   Dim XSI As String
   Dim XSD As String
   Dim LOCAL_URL As String
   Dim URI As String
   Dim Method As String

   ENC = ""
   XSI = ""
   XSD = ""
   LOCAL_URL = "http://localhost:8080/soap/servlet/rpcrouter"

   URI = "urn:MyTest"
   Method = "someMethod"

   ' The Connector will handle the HTTP Connection
   ' Prepare the Connector to talk to the SOAP Server.

   Set Connector = New HttpConnector
   Connector.Property("EndPointURL") = LOCAL_URL
   Connector.Property("SoapAction") = URI & "#" & Method

   ' The Serializer will help you build the SOAP Envelope
   Set Serializer = New SoapSerializer

   ' Associate the Serializer with the Connecter
   Serializer.Init Connector.InputStream

   ' Start the SOAP Enveloper and specify the Encoding and XML-Schema
   Serializer.startEnvelope "", "STANDARD"

   Serializer.SoapNamespace "xsi", XSI
   Serializer.SoapNamespace "xsd", XSD

   'Start the body of the message - the root element is always the Service
URI and method

   Serializer.startElement Method, URI, , "method"

   ' Write each method paramenter out as a child to the root element
   Serializer.startElement "Parameter1"
   Serializer.SoapAttribute "type", , "xsd:string", "xsi"
   Serializer.writeString "myParameter"

   ' End the root element, the body and the envelope

   ' Ending the message causes it to be sent

   'Retrieve a result if the method returned one
   ' The Reader will help you access the result
    Set Reader = New SoapReader
   ' Load the result into the Reader
   Reader.Load Connector.OutputStream

   ' If no fault loading the Reader, then you can go ahead
   ' and pull the result of the invocation out of the DOM
   ' contained in the reader.  There are many ways to do
   ' this ranging from methods highly specialized to the task
   ' at hand (and thus quite efficient) to more general and
   ' reusable methods that are not so efficient.

   strLocationInCode = "Check Reader for fault."
   If Not Reader.Fault Is Nothing Then
       MsgBox Reader.faultstring.Text, vbExclamation
       MsgBox Reader.RPCResult.Text
       ' Parse the DOM to extract the result set.
   End If

   Exit Sub

    MsgBox "Error " & Err.Number & " " & Err.Description

End Sub

View raw message