You are viewing a plain text version of this content. The canonical link for it is here.
Posted to java-user@axis.apache.org by babloosony <ba...@gmail.com> on 2005/03/20 14:19:29 UTC

Can this soap message be consumed ?

Hi All,

I am using AXIS 1.2 RC2, Custom (De)Serializers. I am returning a
custom class (Forecast.java) from a EJB Web Service method  which has
java.util.HashMap member variable in it. Now when I access this
service I am getting below  soap response from the web service
deployed on WebSphere. It is assumed that my hashmap has
java.lang.String's as  keys and java.lang.String's as values


<soapenv:Envelope
xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/"
xmlns:xsd="http://www.w3.org/2001/XMLSchema"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
   <soapenv:Body>
      <getWeatherResponse
xmlns="http://ws.sosnoski.com/wsdl/wroxaxis/appendixb">
         <forecast xmlns="http://ws.sosnoski.com/schemas/wroxaxis/appendixb">
            <zip>343434</zip>
            <city>Campbell</city>
            <state>CA</state>
            <date>April 11, 2003</date>
            <hash-map size="2">
               <entry key="a">b</entry>
               <entry key="c">d</entry>
            </hash-map>
         </forecast>
      </getWeatherResponse>
	</soapenv:Body>
</soapenv:Envelope>



I think for any web service client to consume this message it needs
custom (De)Serializes. Can any java based client or .NET based client
successfully consume this soap message ?  How does a .NET client
consume this ?  Please suggest ?

How can the HashMap representation in soap message can be translated
to java.util.HashMap on client side assuming we are
using java on client side ?



Thanks & Regards,
Kumar.

Re: Can this soap message be consumed ?

Posted by babloosony <ba...@gmail.com>.
Anne- 

Thank you for the response. Atleast a HashMap represenation in a
document/literal WSDL with key's of java.lang.String type and value's
as java.lang.String type can't be consumed on the .NET/Java side ?

I am aware that Arrays's confirm to BP 1.0 but just thinking how can a
HashMap cannot be interropable ?

Thanks,
Kumar.


On Sun, 20 Mar 2005 13:50:31 -0500, Anne Thomas Manes <at...@gmail.com> wrote:
> Kumar,
> 
> I suggest you convert your hashmap into an array.
> 
> Anne
> 
> 
> On Sun, 20 Mar 2005 18:49:29 +0530, babloosony <ba...@gmail.com> wrote:
> > Hi All,
> >
> > I am using AXIS 1.2 RC2, Custom (De)Serializers. I am returning a
> > custom class (Forecast.java) from a EJB Web Service method  which has
> > java.util.HashMap member variable in it. Now when I access this
> > service I am getting below  soap response from the web service
> > deployed on WebSphere. It is assumed that my hashmap has
> > java.lang.String's as  keys and java.lang.String's as values
> >
> > <soapenv:Envelope
> > xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/"
> > xmlns:xsd="http://www.w3.org/2001/XMLSchema"
> > xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
> >    <soapenv:Body>
> >       <getWeatherResponse
> > xmlns="http://ws.sosnoski.com/wsdl/wroxaxis/appendixb">
> >          <forecast xmlns="http://ws.sosnoski.com/schemas/wroxaxis/appendixb">
> >             <zip>343434</zip>
> >             <city>Campbell</city>
> >             <state>CA</state>
> >             <date>April 11, 2003</date>
> >             <hash-map size="2">
> >                <entry key="a">b</entry>
> >                <entry key="c">d</entry>
> >             </hash-map>
> >          </forecast>
> >       </getWeatherResponse>
> >         </soapenv:Body>
> > </soapenv:Envelope>
> >
> > I think for any web service client to consume this message it needs
> > custom (De)Serializes. Can any java based client or .NET based client
> > successfully consume this soap message ?  How does a .NET client
> > consume this ?  Please suggest ?
> >
> > How can the HashMap representation in soap message can be translated
> > to java.util.HashMap on client side assuming we are
> > using java on client side ?
> >
> > Thanks & Regards,
> > Kumar.
> >
>

Re: Can this soap message be consumed ?

Posted by c....@tcs.com.
Hi Kumar,

I faced the similar problem with return types. There are no standard 
serializers/deserializers available for Map implementations.
Even I had to convert them to arrays.. the structure I followed was :
Vector of String arrays..
First element of Vector being String array headers..
and rest String array of data...
This works fine...

Please let me know if you find any stuff for Map implementations..


Chandrashekhar D Tupe




Anne Thomas Manes <at...@gmail.com> 
03/21/05 12:20 AM

Please respond to
axis-user@ws.apache.org


To
axis-user@ws.apache.org, babloosony <ba...@gmail.com>
cc

Subject
Re: Can this soap message be consumed ?






Kumar, 

I suggest you convert your hashmap into an array.

Anne


On Sun, 20 Mar 2005 18:49:29 +0530, babloosony <ba...@gmail.com> 
wrote:
> Hi All,
> 
> I am using AXIS 1.2 RC2, Custom (De)Serializers. I am returning a
> custom class (Forecast.java) from a EJB Web Service method  which has
> java.util.HashMap member variable in it. Now when I access this
> service I am getting below  soap response from the web service
> deployed on WebSphere. It is assumed that my hashmap has
> java.lang.String's as  keys and java.lang.String's as values
> 
> <soapenv:Envelope
> xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/"
> xmlns:xsd="http://www.w3.org/2001/XMLSchema"
> xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
>    <soapenv:Body>
>       <getWeatherResponse
> xmlns="http://ws.sosnoski.com/wsdl/wroxaxis/appendixb">
>          <forecast xmlns="
http://ws.sosnoski.com/schemas/wroxaxis/appendixb">
>             <zip>343434</zip>
>             <city>Campbell</city>
>             <state>CA</state>
>             <date>April 11, 2003</date>
>             <hash-map size="2">
>                <entry key="a">b</entry>
>                <entry key="c">d</entry>
>             </hash-map>
>          </forecast>
>       </getWeatherResponse>
>         </soapenv:Body>
> </soapenv:Envelope>
> 
> I think for any web service client to consume this message it needs
> custom (De)Serializes. Can any java based client or .NET based client
> successfully consume this soap message ?  How does a .NET client
> consume this ?  Please suggest ?
> 
> How can the HashMap representation in soap message can be translated
> to java.util.HashMap on client side assuming we are
> using java on client side ?
> 
> Thanks & Regards,
> Kumar.
>

ForwardSourceID:NT0000285E 


Notice: The information contained in this e-mail message and/or attachments to it may contain confidential or privileged information.   If you are not the intended recipient, any dissemination, use, review, distribution, printing or copying of the information contained in this e-mail message and/or attachments to it are strictly prohibited.   If you have received this communication in error, please notify us by reply e-mail or telephone and immediately and permanently delete the message and any attachments.  Thank you

Re: Can this soap message be consumed ?

Posted by Anne Thomas Manes <at...@gmail.com>.
Kumar, 

I suggest you convert your hashmap into an array.

Anne


On Sun, 20 Mar 2005 18:49:29 +0530, babloosony <ba...@gmail.com> wrote:
> Hi All,
> 
> I am using AXIS 1.2 RC2, Custom (De)Serializers. I am returning a
> custom class (Forecast.java) from a EJB Web Service method  which has
> java.util.HashMap member variable in it. Now when I access this
> service I am getting below  soap response from the web service
> deployed on WebSphere. It is assumed that my hashmap has
> java.lang.String's as  keys and java.lang.String's as values
> 
> <soapenv:Envelope
> xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/"
> xmlns:xsd="http://www.w3.org/2001/XMLSchema"
> xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
>    <soapenv:Body>
>       <getWeatherResponse
> xmlns="http://ws.sosnoski.com/wsdl/wroxaxis/appendixb">
>          <forecast xmlns="http://ws.sosnoski.com/schemas/wroxaxis/appendixb">
>             <zip>343434</zip>
>             <city>Campbell</city>
>             <state>CA</state>
>             <date>April 11, 2003</date>
>             <hash-map size="2">
>                <entry key="a">b</entry>
>                <entry key="c">d</entry>
>             </hash-map>
>          </forecast>
>       </getWeatherResponse>
>         </soapenv:Body>
> </soapenv:Envelope>
> 
> I think for any web service client to consume this message it needs
> custom (De)Serializes. Can any java based client or .NET based client
> successfully consume this soap message ?  How does a .NET client
> consume this ?  Please suggest ?
> 
> How can the HashMap representation in soap message can be translated
> to java.util.HashMap on client side assuming we are
> using java on client side ?
> 
> Thanks & Regards,
> Kumar.
>