Loading ...
Sorry, an error occurred while loading the content.

Re: Help Me.........Getting Error...of Deserialization...

Expand Messages
  • Jose Maestro
    I think something like this would work: Connector.BeginMessage Set Serializer = New SoapSerializer30 Serializer.Init Connector.InputStream
    Message 1 of 3 , Jun 23, 2005
    • 0 Attachment
      I think something like this would work:
      Connector.BeginMessage

      Set Serializer = New SoapSerializer30
      Serializer.Init Connector.InputStream

      Serializer.StartEnvelope
      Serializer.SoapAttribute "xmlns:xsi", ,
      "http://www.w3.org/2001/XMLSchema-instance"
      Serializer.SoapAttribute "xmlns:xsd", ,
      "http://www.w3.org/2001/XMLSchema"

      Serializer.StartBody
      Serializer.StartElement "add", "urn:onjavaserver"

      Serializer.StartElement "A"
      Serializer.SoapAttribute "xsi:type", , "xsd:integer"
      Serializer.WriteString "10"
      Serializer.EndElement

      Serializer.StartElement "B"
      Serializer.SoapAttribute "xsi:type", , "xsd:integer"
      Serializer.WriteString "10"
      Serializer.EndElement

      Serializer.EndElement
      Serializer.EndBody
      Serializer.EndEnvelope

      Connector.EndMessage

      --- In soapbuilders@yahoogroups.com, "vinay balpande"
      <vinay_balpande@r...> wrote:
      >
      > Hello...Everyone...please Help me I am Getting following
      Deserialization Error..
      >
      > No Deserializer found to deserialize a 'http://schemas.xmlsoap.org
      > /soap/envelope/:Parameter' using encoding style ''.
      >
      > I am Connecting the Microsoft Client using Low Level SOAP API to
      WebService running on Apache TomCat.
      > It is working fine for JAVA client....
      >
      > WebService contains only one method add(int a, int b)
      > and it is returning the result of a+b as an integer value...
      >
      > Is it a error for string or integer?????
      >
      >
      > This is my Code....
      >
      >
      > #include <stdio.h>
      > #import "msxml4.dll"
      > using namespace MSXML2;
      > #import "C:\Program Files\Common Files\MSSoap\Binaries\mssoap30.dll" \
      > exclude("IStream", "IErrorInfo", "ISequentialStream",
      "_LARGE_INTEGER", \
      > "_ULARGE_INTEGER", "tagSTATSTG", "_FILETIME")
      > using namespace MSSOAPLib30;
      > void Add()
      > {
      >
      > ISoapSerializerPtr Serializer;
      > ISoapReaderPtr Reader;
      > ISoapConnectorPtr Connector;
      > // Connect to the service.
      > Connector.CreateInstance(__uuidof(HttpConnector30));
      > Connector->Property["EndPointURL"] =
      "http://myserver:8080/soap/servlet/rpcrouter";
      > HRESULT hr = Connector->Connect();
      > if (SUCCEEDED(hr))
      > printf("abcd\n");
      >
      > // Begin the message.
      >
      > Connector->Property["SoapAction"] = "urn:onjavaserver";
      > Connector->BeginMessage();
      >
      > // Create the SoapSerializer object.
      > hr = Serializer.CreateInstance(__uuidof(SoapSerializer30));
      >
      > // Connect the serializer object to the input stream of the
      connector object.
      > hr = Serializer->Init(_variant_t((IUnknown*)Connector->InputStream));
      >
      > // Build the SOAP Message.
      > hr = Serializer->StartEnvelope("","STANDARD","");
      > hr = Serializer->StartBody("");
      > Serializer->StartElement("add","urn:onjavaserver","","m");
      > hr = Serializer->StartElement("A","","","");
      > hr = Serializer->WriteString("10");
      > hr = Serializer->EndElement();
      > hr = Serializer->StartElement("B","","","");
      > hr = Serializer->WriteString("10");
      > hr = Serializer->EndElement();
      > hr = Serializer->EndElement();
      > hr = Serializer->EndBody();
      > hr = Serializer->EndEnvelope();
      >
      >
      > // Send the message to the XML Web service.
      > hr = Connector->EndMessage();
      >
      >
      > // Read the response.
      > hr = Reader.CreateInstance(__uuidof(SoapReader30));
      >
      > // Connect the reader to the output stream of the connector object.
      > hr = Reader->Load(_variant_t((IUnknown*)Connector->OutputStream),
      "");
      >
      > // Display the result.
      > printf("Answer: %s\n", (const char*)Reader->RpcResult->text);
      > printf("Fault String: %s\n", (const char*)Reader->FaultString->text);
      > printf("Fault Code: %s\n", (const char*)Reader->FaultCode->text);
      > }
      >
      > int main()
      > {
      > CoInitialize(NULL);
      > Add();
      > CoUninitialize();
      > return 0;
      > }
    Your message has been successfully submitted and would be delivered to recipients shortly.