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 Mir S Islam <mi...@mindspring.com> on 2001/05/30 23:56:00 UTC
custom type mapping
Hi, I am new to soap. Maybe because lack of knowledge I am unable to do
some custom type mapping. Please give suggestions as deemed. Please reply to
email and to the list.
I am trying to write a java client which is going to talk to IdooXoap (a C++
implementation). Everything is fine as long as type mapping are default (eg:
int, string etc). But when a custom type is introduced the javac client is
choking. From various posts posted here I understand that there needs tobe a
custom typemapping for the custom type. I have tried the following code in
the client without much luck.
StringDeserializer sd = new StringDeserializer ();
smr.mapTypes (Constants.NS_URI_SOAP_ENC,
new QName ("http://earthlink.com/vncproxy.xsd", "MyList"),
String.class, null, sd);
call.setSOAPMappingRegistry(smr);
<SNIP>
This is the portion ov debug output I am getting from server. Basically the
server is returning a custom type "MyList" which consistes of several string
type values. With the above java code all I get is a blank line. How can I
create mappings for "MyList" so that the values can be displayed properly? I
am using apache soap 2.1 for java client, IdooXoap for the soap server (so,
I can't create mappings in DeploymentDescriptor.xml file)
<SOAP-ENV:Body>
<ns0:GetSessionListResponse xmlns:ns0="http://myhost/vproxy.xsd">
<list xsi:type="ns0:MyList">
<value xsi:type="xsd:string">mir</value>
<next xsi:type="ns0:MyList"><value xsi:type="xsd:string">atl</value>
<next xsi:type="ns0:MyList"><value xsi:type="xsd:string">h20</value>
<next xsi:null="true"xsi:type="ns0:MyList"/></next></next></list>
</ns0:GetSessionListResponse></SOAP-ENV:Body>
Thanks.
Mir
---------------------------------------------------------------------
To unsubscribe, e-mail: soap-user-unsubscribe@xml.apache.org
For additional commands, email: soap-user-help@xml.apache.org
Re: custom type mapping
Posted by Sanjiva Weerawarana <sa...@watson.ibm.com>.
Please look at the samples in the 2.2 release and also look at
the docs on how to deal with complex types. You need a custom
deserializer to deal with the new type; the StringDeserializer
cannot deserialize it.
The docs are online at
http://xml.apache.org/soap/docs
and also included in the 2.2 distribution.
Sanjiva.
----- Original Message -----
From: "Mir S Islam" <mi...@mindspring.com>
To: <so...@xml.apache.org>
Sent: Wednesday, May 30, 2001 5:56 PM
Subject: custom type mapping
> Hi, I am new to soap. Maybe because lack of knowledge I am unable to do
> some custom type mapping. Please give suggestions as deemed. Please reply
to
> email and to the list.
>
> I am trying to write a java client which is going to talk to IdooXoap (a
C++
> implementation). Everything is fine as long as type mapping are default
(eg:
> int, string etc). But when a custom type is introduced the javac client is
> choking. From various posts posted here I understand that there needs tobe
a
> custom typemapping for the custom type. I have tried the following code in
> the client without much luck.
>
> StringDeserializer sd = new StringDeserializer ();
> smr.mapTypes (Constants.NS_URI_SOAP_ENC,
> new QName ("http://earthlink.com/vncproxy.xsd", "MyList"),
> String.class, null, sd);
> call.setSOAPMappingRegistry(smr);
>
> <SNIP>
>
> This is the portion ov debug output I am getting from server. Basically
the
> server is returning a custom type "MyList" which consistes of several
string
> type values. With the above java code all I get is a blank line. How can I
> create mappings for "MyList" so that the values can be displayed properly?
I
> am using apache soap 2.1 for java client, IdooXoap for the soap server
(so,
> I can't create mappings in DeploymentDescriptor.xml file)
>
> <SOAP-ENV:Body>
> <ns0:GetSessionListResponse xmlns:ns0="http://myhost/vproxy.xsd">
> <list xsi:type="ns0:MyList">
> <value xsi:type="xsd:string">mir</value>
> <next xsi:type="ns0:MyList"><value xsi:type="xsd:string">atl</value>
> <next xsi:type="ns0:MyList"><value xsi:type="xsd:string">h20</value>
> <next xsi:null="true"xsi:type="ns0:MyList"/></next></next></list>
> </ns0:GetSessionListResponse></SOAP-ENV:Body>
>
> Thanks.
>
> Mir
>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: soap-user-unsubscribe@xml.apache.org
> For additional commands, email: soap-user-help@xml.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: soap-user-unsubscribe@xml.apache.org
For additional commands, email: soap-user-help@xml.apache.org
Re: custom type mapping
Posted by Sanjiva Weerawarana <sa...@watson.ibm.com>.
Please look at the samples in the 2.2 release and also look at
the docs on how to deal with complex types. You need a custom
deserializer to deal with the new type; the StringDeserializer
cannot deserialize it.
The docs are online at
http://xml.apache.org/soap/docs
and also included in the 2.2 distribution.
Sanjiva.
----- Original Message -----
From: "Mir S Islam" <mi...@mindspring.com>
To: <so...@xml.apache.org>
Sent: Wednesday, May 30, 2001 5:56 PM
Subject: custom type mapping
> Hi, I am new to soap. Maybe because lack of knowledge I am unable to do
> some custom type mapping. Please give suggestions as deemed. Please reply
to
> email and to the list.
>
> I am trying to write a java client which is going to talk to IdooXoap (a
C++
> implementation). Everything is fine as long as type mapping are default
(eg:
> int, string etc). But when a custom type is introduced the javac client is
> choking. From various posts posted here I understand that there needs tobe
a
> custom typemapping for the custom type. I have tried the following code in
> the client without much luck.
>
> StringDeserializer sd = new StringDeserializer ();
> smr.mapTypes (Constants.NS_URI_SOAP_ENC,
> new QName ("http://earthlink.com/vncproxy.xsd", "MyList"),
> String.class, null, sd);
> call.setSOAPMappingRegistry(smr);
>
> <SNIP>
>
> This is the portion ov debug output I am getting from server. Basically
the
> server is returning a custom type "MyList" which consistes of several
string
> type values. With the above java code all I get is a blank line. How can I
> create mappings for "MyList" so that the values can be displayed properly?
I
> am using apache soap 2.1 for java client, IdooXoap for the soap server
(so,
> I can't create mappings in DeploymentDescriptor.xml file)
>
> <SOAP-ENV:Body>
> <ns0:GetSessionListResponse xmlns:ns0="http://myhost/vproxy.xsd">
> <list xsi:type="ns0:MyList">
> <value xsi:type="xsd:string">mir</value>
> <next xsi:type="ns0:MyList"><value xsi:type="xsd:string">atl</value>
> <next xsi:type="ns0:MyList"><value xsi:type="xsd:string">h20</value>
> <next xsi:null="true"xsi:type="ns0:MyList"/></next></next></list>
> </ns0:GetSessionListResponse></SOAP-ENV:Body>
>
> Thanks.
>
> Mir
>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: soap-user-unsubscribe@xml.apache.org
> For additional commands, email: soap-user-help@xml.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: soap-user-unsubscribe@xml.apache.org
For additional commands, email: soap-user-help@xml.apache.org