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 Dario Iorfida <ja...@yahoo.it> on 2001/05/23 12:34:07 UTC

How to receive Complex type from a VB Server?

Hi,
Does anybody know how to receive complex object from a VB Server, using a 
MS High Level API??
I used MS example DocSample3 (CustomMapper) to build the server (except for 
zipCode field, that I cat off). I'm able to pass complex type data as a 
request, but I can't it them as a response:
I made an Address class with get and set methods, and tell the client to 
map "Result" as an Address class, as follows:

smr.mapTypes (Constants.NS_URI_SOAP_ENC, new QName 
("urn:xml-soap-address-demo", "Result"), Address.class, beanSer, beanSer);

However, response is:
Caught SOAPException (SOAP-ENV:Client): No Deserializer found to 
deserialize a ':Result' using encoding style
'http://schemas.xmlsoap.org/soap/encoding/'.

Thank you in advance!!!


This is the response from the server:

<?xml version="1.0" encoding="UTF-8" standalone="no" ?>
<SOAP-ENV:Envelope
SOAP-ENV:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"
xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/">
<SOAP-ENV:Body>
<SOAPSDK1:EchoAddrResponse xmlns:SOAPSDK1="http://tempuri.org/message/">
<Result>
<name>pippo</name>
<street>pluto</street>
<city>paperopoli</city>
<state>Ca</state>
</Result>
</SOAPSDK1:EchoAddrResponse>
</SOAP-ENV:Body>
</SOAP-ENV:Envelope


_________________________________________________________
Do You Yahoo!?
Get your free @yahoo.com address at http://mail.yahoo.com


---------------------------------------------------------------------
To unsubscribe, e-mail: soap-user-unsubscribe@xml.apache.org
For additional commands, email: soap-user-help@xml.apache.org


Re: How to receive Complex type from a VB Server!

Posted by Dario Iorfida <ja...@yahoo.it>.
Hi,
I just found a possible solution:
not only  "Result" field need to be mapped, but also inner fields, such as 
street, name, city and state.
So code may looks as follows:


   SOAPMappingRegistry smr = new SOAPMappingRegistry ();
   StringDeserializer sd = new StringDeserializer ();
   BeanSerializer beanSer = new BeanSerializer();

  smr.mapTypes (Constants.NS_URI_SOAP_ENC, new QName ("", "Result"), 
Address.class, beanSer, beanSer);
  smr.mapTypes (Constants.NS_URI_SOAP_ENC, new QName ("", "name"), null, 
null, sd);
  smr.mapTypes (Constants.NS_URI_SOAP_ENC, new QName ("", "street"), null, 
null, sd);
  smr.mapTypes (Constants.NS_URI_SOAP_ENC, new QName ("", "city"), null, 
null, sd);
  smr.mapTypes (Constants.NS_URI_SOAP_ENC, new QName ("", "state"), null, 
null, sd);

Does anybody has a cleaner solution?

Dario

At 12.34 23/05/01 +0200, you wrote:
>Hi,
>Does anybody know how to receive complex object from a VB Server, using a 
>MS High Level API??
>I used MS example DocSample3 (CustomMapper) to build the server (except 
>for zipCode field, that I cat off). I'm able to pass complex type data as 
>a request, but I can't it them as a response:
>I made an Address class with get and set methods, and tell the client to 
>map "Result" as an Address class, as follows:
>
>smr.mapTypes (Constants.NS_URI_SOAP_ENC, new QName 
>("urn:xml-soap-address-demo", "Result"), Address.class, beanSer, beanSer);
>
>However, response is:
>Caught SOAPException (SOAP-ENV:Client): No Deserializer found to 
>deserialize a ':Result' using encoding style
>'http://schemas.xmlsoap.org/soap/encoding/'.
>
>Thank you in advance!!!
>
>
>This is the response from the server:
>
><?xml version="1.0" encoding="UTF-8" standalone="no" ?>
><SOAP-ENV:Envelope
>SOAP-ENV:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"
>xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/">
><SOAP-ENV:Body>
><SOAPSDK1:EchoAddrResponse xmlns:SOAPSDK1="http://tempuri.org/message/">
><Result>
><name>pippo</name>
><street>pluto</street>
><city>paperopoli</city>
><state>Ca</state>
></Result>
></SOAPSDK1:EchoAddrResponse>
></SOAP-ENV:Body>
></SOAP-ENV:Envelope
>
>
>_________________________________________________________
>Do You Yahoo!?
>Get your free @yahoo.com address at http://mail.yahoo.com
>
>
>---------------------------------------------------------------------
>To unsubscribe, e-mail: soap-user-unsubscribe@xml.apache.org
>For additional commands, email: soap-user-help@xml.apache.org


_________________________________________________________
Do You Yahoo!?
Get your free @yahoo.com address at http://mail.yahoo.com


---------------------------------------------------------------------
To unsubscribe, e-mail: soap-user-unsubscribe@xml.apache.org
For additional commands, email: soap-user-help@xml.apache.org


Re: How to receive Complex type from a VB Server!

Posted by Dario Iorfida <ja...@yahoo.it>.
Hi,
I just found a possible solution:
not only  "Result" field need to be mapped, but also inner fields, such as 
street, name, city and state.
So code may looks as follows:


   SOAPMappingRegistry smr = new SOAPMappingRegistry ();
   StringDeserializer sd = new StringDeserializer ();
   BeanSerializer beanSer = new BeanSerializer();

  smr.mapTypes (Constants.NS_URI_SOAP_ENC, new QName ("", "Result"), 
Address.class, beanSer, beanSer);
  smr.mapTypes (Constants.NS_URI_SOAP_ENC, new QName ("", "name"), null, 
null, sd);
  smr.mapTypes (Constants.NS_URI_SOAP_ENC, new QName ("", "street"), null, 
null, sd);
  smr.mapTypes (Constants.NS_URI_SOAP_ENC, new QName ("", "city"), null, 
null, sd);
  smr.mapTypes (Constants.NS_URI_SOAP_ENC, new QName ("", "state"), null, 
null, sd);

Does anybody has a cleaner solution?

Dario

At 12.34 23/05/01 +0200, you wrote:
>Hi,
>Does anybody know how to receive complex object from a VB Server, using a 
>MS High Level API??
>I used MS example DocSample3 (CustomMapper) to build the server (except 
>for zipCode field, that I cat off). I'm able to pass complex type data as 
>a request, but I can't it them as a response:
>I made an Address class with get and set methods, and tell the client to 
>map "Result" as an Address class, as follows:
>
>smr.mapTypes (Constants.NS_URI_SOAP_ENC, new QName 
>("urn:xml-soap-address-demo", "Result"), Address.class, beanSer, beanSer);
>
>However, response is:
>Caught SOAPException (SOAP-ENV:Client): No Deserializer found to 
>deserialize a ':Result' using encoding style
>'http://schemas.xmlsoap.org/soap/encoding/'.
>
>Thank you in advance!!!
>
>
>This is the response from the server:
>
><?xml version="1.0" encoding="UTF-8" standalone="no" ?>
><SOAP-ENV:Envelope
>SOAP-ENV:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"
>xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/">
><SOAP-ENV:Body>
><SOAPSDK1:EchoAddrResponse xmlns:SOAPSDK1="http://tempuri.org/message/">
><Result>
><name>pippo</name>
><street>pluto</street>
><city>paperopoli</city>
><state>Ca</state>
></Result>
></SOAPSDK1:EchoAddrResponse>
></SOAP-ENV:Body>
></SOAP-ENV:Envelope
>
>
>_________________________________________________________
>Do You Yahoo!?
>Get your free @yahoo.com address at http://mail.yahoo.com
>
>
>---------------------------------------------------------------------
>To unsubscribe, e-mail: soap-user-unsubscribe@xml.apache.org
>For additional commands, email: soap-user-help@xml.apache.org


_________________________________________________________
Do You Yahoo!?
Get your free @yahoo.com address at http://mail.yahoo.com


---------------------------------------------------------------------
To unsubscribe, e-mail: soap-user-unsubscribe@xml.apache.org
For additional commands, email: soap-user-help@xml.apache.org