You are viewing a plain text version of this content. The canonical link for it is here.
Posted to soap-user@ws.apache.org by frj <fr...@teamlog.fr> on 2002/08/12 19:01:43 UTC

No Deserializer found to deserialize a &apos !!!!

Hello everyone ...

I deployed a web service on TOMCAT 3.2.4 with soap-2_3_1.
I wrote two simples Clients in Java & C++.
The first client use Apache SOAP and the second use Ms toolkit SOAP

With the Java client, there is no problem
But when i try to perform my C++ client, i have a Fault code.
However, i have mapping the attribut type in DeployementDescriptor.xml

---------------------------Client Requet--------------------------------- ->

<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/">
<SOAP-ENV:Body>
<ns1:HelloWorld xmlns:ns1="urn:HelloWorld" 
SOAP-ENV:encodingStyle="http://shemas.xmlsoap.org/soap/encoding/">
<name>toto</name>
</ns1:HelloWorld>
</SOAP-ENV:Body>
</SOAP-ENV:Envelope>

---------------------------Server Response---------------------------------->

<?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/2001/XMLSchema-instance" 
xmlns:xsd="http://www.w3.org/2001/XMLSchema">
<SOAP-ENV:Body>
<SOAP-ENV:Fault>
<faultcode>SOAP-ENV:Client</faultcode>
<faultstring>No Deserializer found to deserialize a 
&apos;http://schemas.xmlsoap.org/soap/envelope/:Parameter&apos; using 
encoding style 
&apos;http://shemas.xmlsoap.org/soap/encoding/&apos;.</faultstring>
<faultactor>/soap/servlet/rpcrouter</faultactor>
</SOAP-ENV:Fault>

-----------------------------DeployementDescriptor.xml------------------------>

<isd:service xmlns:isd="http://xml.apache.org/xml-soap/deployment" 
id="urn:HelloWorld">
 <isd:provider type="java" scope="Application" methods="HelloWorld">
   <isd:java class="Server" static="false"/>
 </isd:provider>
 <isd:faultListener>org.apache.soap.server.DOMFaultListener</isd:faultListener
>
 <isd:mappings>
  <isd:map encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"
   xmlns:x="" qname="x:name"
   xml2JavaClassName="org.apache.soap.encoding.soapenc.StringDeserializer"/>
  </isd:mappings>
</isd:service>

------------------------------Client.cpp-------------------------------------------->

#include "C:\Program Files\Microsoft Visual Studio\VC98\ATL\SRC\stdafx.h" 
#include <stdio.h> 
 
#import "msxml3.dll"  
using namespace MSXML2; 
 
#import "C:\Program Files\Fichiers communs\MSSoap\Binaries\mssoap1.dll" 
exclude("IStream", "ISequentialStream", "_LARGE_INTEGER","_ULARGE_INTEGER", 
"tagSTATSTG", "_FILETIME") 
using namespace MSSOAPLib; 
 
void HelloWorld() 
{ 
 
   ISoapSerializerPtr Serializer; 
   ISoapReaderPtr Reader; 
   ISoapConnectorPtr Connector; 
 
   // Connect to the service 
   Connector.CreateInstance(__uuidof(HttpConnector)); 
   Connector->Property["EndPointURL"] = 
"http://192.168.0.4:8080/soap/servlet/rpcrouter"; 
   Connector->Connect(); 
 
   // Begin message 
   Connector->Property["SoapAction"] = "uri:HelloWorld"; 
   Connector->BeginMessage(); 
 
   // Create the SoapSerializer 
   Serializer.CreateInstance(__uuidof(SoapSerializer)); 
 
   // Connect the serializer to the input stream of the connector 
   Serializer->Init(_variant_t((IUnknown*)Connector->InputStream)); 
 
   // Build the SOAP Message 
   Serializer->startEnvelope("SOAP-ENV","NONE",""); 
   Serializer->startBody("NONE"); 
   
Serializer->startElement("HelloWorld","urn:HelloWorld","http://shemas.xmlsoap.org/soap/encoding/","ns1"); 
   Serializer->startElement("name","","NONE",""); 
   Serializer->writeString("toto"); 
   Serializer->endElement(); 
   Serializer->endElement(); 
   Serializer->endBody(); 
   Serializer->endEnvelope(); 
    
   // Send the message to the web service 
   Connector->EndMessage();       
 
   // Let us read the response 
   Reader.CreateInstance(__uuidof(SoapReader)); 
 
   // Connect the reader to the output stream of the connector 
   Reader->Load(_variant_t((IUnknown*)Connector->OutputStream), ""); 
 
   // Display the result 
   printf("RĂ©ponse: %s\n", (const char*)Reader->RPCResult->text); 
     
} 
 
int main() 
{ 
   CoInitialize(NULL); 
   HelloWorld(); 
   CoUninitialize(); 
 
   return 0; 
 
}


Thx to help me.
Regards
Francis