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 Paul Dermody <pa...@miradorsoftware.com> on 2001/04/11 18:44:32 UTC

I wonder why..

Hi
I want to take 2 parameters from a  form in a jsp page,   encode them in a
soap message and send them over http to another another servlet whereupon  I
call a method.
I dont want to use websevices like our apache friends.
Has anyone else attempted this? 

All comments welcome
Paul

-----Original Message-----
From: Barry Fortune [mailto:BFortune@yipes.com]
Sent: 11 April 2001 17:29
To: 'soap-user@xml.apache.org'
Subject: RE: Array Serialization


We are using Apache SOAP ver 2.1 and are running into a problem to marshall
nested arrays.
The marshalling code cannot understand the typ "Array" - we ge the fault:
	No mapping found for  '
http://schemas.xmlsoap.org/soap/encoding/:Array' using encoding style

Does anyone have any ideas - we could write our own Serializer, but I am
trying to avoid this.

----------------------------------------------------------------------------
---------------------------------------------------------

The server code is:

public class SoapWithArrayService {
public String[][] manipulate(String[][] name) { return name; }
}

----------------------------------------------------------------------------
---------------------------------------------------------

The XML generated is:

<SOAP-ENV:Body> 
<ns1:manipulate xmlns:ns1="soap-with-array"
SOAP-ENV:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/">
 <arryname xmlns:ns2="http://schemas.xmlsoap.org/soap/encoding/"
xsi:type="ns2:Array" ns2:arrayType="ns2:Array[2]">
 <item xsi:type="ns2:Array" ns2:arrayType="xsd:string[2]"> 
	<item xsi:type="xsd:string">One</item> 
	<item xsi:type="xsd:string">Two</item>
 </item> 
<item xsi:type="ns2:Array" ns2:arrayType="xsd:string[2]">
	<item xsi:type="xsd:string">three</item> 
	<item xsi:type="xsd:string">four</item>
 </item> 
</arryname>
 </ns1:manipulate>
 </SOAP-ENV:Body> 

----------------------------------------------------------------------------
---------------------------------------------------------

The Server generates a fault:

<SOAP-ENV:Body>
 <SOAP-ENV:Fault> 
	<faultcode>SOAP-ENV:Client</faultcode>
	 <faultstring>No mapping found for  '
http://schemas.xmlsoap.org/soap/encoding/:Array' using encoding style
'http://schemas.xmlsoap.org/soap/encoding/'.	</faultstring>
	 <faultactor>/rpcrouter</faultactor>
 </SOAP-ENV:Fault> 
</SOAP-ENV:Body>

-----Original Message-----
From: Brandon Rife [mailto:brandon_rife@spectramarketing.com]
Sent: Tuesday, April 10, 2001 12:52 PM
To: 'soap-user@xml.apache.org'
Subject: RE: Array Serialization


We use of arrays of arrays to transfer tabular data.  What problems are you
having?

Brandon

> -----Original Message-----
> From:	Barry Fortune [SMTP:BFortune@yipes.com]
> Sent:	Tuesday, April 10, 2001 3:22 PM
> To:	'sbelanger@xpert-inc.com'; 'soap-user@xml.apache.org'
> Subject:	RE: Array Serialization
> 
> Hi Stéphane or anyone else,
> 
> I was wondering if you have ever tried Arrays of Arrays - we had a problem
> with that.
> 
> Thanks,
> 
> Barry Fortune
> 
> -----Original Message-----
> From: Stéphane Bélanger [mailto:sbelanger@xpert-inc.com]
> Sent: Friday, March 30, 2001 12:25 PM
> To: 'soap-user@xml.apache.org'
> Subject: RE: Array Serialization
> 
> 
> I've done arrays of classes, for instance 
> 
> Address[] getAddresses(...)
> 
> In this case, I would only map the class itself like this:
> 
> mapTypes(Constants.NS_URI_SOAP_ENC, new QName("NameSpace", "Address"),
>          Address.class, beanSer, beanSer);
> 
> and put the appropriate stuff in the DD:
> 
> <isd:map encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"
> 		xmlns:x="NameSpace"
> 		qname="x:Address"
> 		javaType="com.....Address"
> 	
> xml2JavaClassName="org.apache.soap.encoding.soapenc.BeanSerializer"
> 	
> java2XMLClassName="org.apache.soap.encoding.soapenc.BeanSerializer"/>
> 
> 
> I never had to map an array, it is supported directly in Apache SOAP.
> 
> Stéphane
> 
> -----Message d'origine-----
> De : Terry_Truta@i2.com [mailto:Terry_Truta@i2.com]
> Envoyé : 30 mars, 2001 14:57
> À : soap-user@xml.apache.org
> Objet : Array Serialization
> 
> 
> Has anyone done array serialization? None of the examples do this. What do
> you put for the javaType parameter for the mapTypes method of the
> SOAPMappingRegistry object? Better yet does any have some sample code?
> Thanks.
> 
> 
> ---------------------------------------------------------------------
> 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
> 
> ---------------------------------------------------------------------
> 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

---------------------------------------------------------------------
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: I wonder why..

Posted by Peter Glynn <gl...@tcd.ie>.
Why don't you want to use Apache SOAP.
Could could just do it the old way but that is very messy parsing a
XML(SOAP) message on the server side.It that what your looking for or are
you looking for another SOAP Java Implementation(Toolkit) to do it for you?



----- Original Message -----
From: "Paul Dermody" <pa...@miradorsoftware.com>
To: <so...@xml.apache.org>
Sent: Wednesday, April 11, 2001 5:44 PM
Subject: I wonder why..


> Hi
> I want to take 2 parameters from a  form in a jsp page,   encode them in a
> soap message and send them over http to another another servlet whereupon
I
> call a method.
> I dont want to use websevices like our apache friends.
> Has anyone else attempted this?
>
> All comments welcome
> Paul
>
> -----Original Message-----
> From: Barry Fortune [mailto:BFortune@yipes.com]
> Sent: 11 April 2001 17:29
> To: 'soap-user@xml.apache.org'
> Subject: RE: Array Serialization
>
>
> We are using Apache SOAP ver 2.1 and are running into a problem to
marshall
> nested arrays.
> The marshalling code cannot understand the typ "Array" - we ge the fault:
> No mapping found for  '
> http://schemas.xmlsoap.org/soap/encoding/:Array' using encoding style
>
> Does anyone have any ideas - we could write our own Serializer, but I am
> trying to avoid this.
>
> --------------------------------------------------------------------------
--
> ---------------------------------------------------------
>
> The server code is:
>
> public class SoapWithArrayService {
> public String[][] manipulate(String[][] name) { return name; }
> }
>
> --------------------------------------------------------------------------
--
> ---------------------------------------------------------
>
> The XML generated is:
>
> <SOAP-ENV:Body>
> <ns1:manipulate xmlns:ns1="soap-with-array"
> SOAP-ENV:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/">
>  <arryname xmlns:ns2="http://schemas.xmlsoap.org/soap/encoding/"
> xsi:type="ns2:Array" ns2:arrayType="ns2:Array[2]">
>  <item xsi:type="ns2:Array" ns2:arrayType="xsd:string[2]">
> <item xsi:type="xsd:string">One</item>
> <item xsi:type="xsd:string">Two</item>
>  </item>
> <item xsi:type="ns2:Array" ns2:arrayType="xsd:string[2]">
> <item xsi:type="xsd:string">three</item>
> <item xsi:type="xsd:string">four</item>
>  </item>
> </arryname>
>  </ns1:manipulate>
>  </SOAP-ENV:Body>
>
> --------------------------------------------------------------------------
--
> ---------------------------------------------------------
>
> The Server generates a fault:
>
> <SOAP-ENV:Body>
>  <SOAP-ENV:Fault>
> <faultcode>SOAP-ENV:Client</faultcode>
> <faultstring>No mapping found for  '
> http://schemas.xmlsoap.org/soap/encoding/:Array' using encoding style
> 'http://schemas.xmlsoap.org/soap/encoding/'. </faultstring>
> <faultactor>/rpcrouter</faultactor>
>  </SOAP-ENV:Fault>
> </SOAP-ENV:Body>
>
> -----Original Message-----
> From: Brandon Rife [mailto:brandon_rife@spectramarketing.com]
> Sent: Tuesday, April 10, 2001 12:52 PM
> To: 'soap-user@xml.apache.org'
> Subject: RE: Array Serialization
>
>
> We use of arrays of arrays to transfer tabular data.  What problems are
you
> having?
>
> Brandon
>
> > -----Original Message-----
> > From: Barry Fortune [SMTP:BFortune@yipes.com]
> > Sent: Tuesday, April 10, 2001 3:22 PM
> > To: 'sbelanger@xpert-inc.com'; 'soap-user@xml.apache.org'
> > Subject: RE: Array Serialization
> >
> > Hi Stéphane or anyone else,
> >
> > I was wondering if you have ever tried Arrays of Arrays - we had a
problem
> > with that.
> >
> > Thanks,
> >
> > Barry Fortune
> >
> > -----Original Message-----
> > From: Stéphane Bélanger [mailto:sbelanger@xpert-inc.com]
> > Sent: Friday, March 30, 2001 12:25 PM
> > To: 'soap-user@xml.apache.org'
> > Subject: RE: Array Serialization
> >
> >
> > I've done arrays of classes, for instance
> >
> > Address[] getAddresses(...)
> >
> > In this case, I would only map the class itself like this:
> >
> > mapTypes(Constants.NS_URI_SOAP_ENC, new QName("NameSpace", "Address"),
> >          Address.class, beanSer, beanSer);
> >
> > and put the appropriate stuff in the DD:
> >
> > <isd:map encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"
> > xmlns:x="NameSpace"
> > qname="x:Address"
> > javaType="com.....Address"
> >
> > xml2JavaClassName="org.apache.soap.encoding.soapenc.BeanSerializer"
> >
> > java2XMLClassName="org.apache.soap.encoding.soapenc.BeanSerializer"/>
> >
> >
> > I never had to map an array, it is supported directly in Apache SOAP.
> >
> > Stéphane
> >
> > -----Message d'origine-----
> > De : Terry_Truta@i2.com [mailto:Terry_Truta@i2.com]
> > Envoyé : 30 mars, 2001 14:57
> > À : soap-user@xml.apache.org
> > Objet : Array Serialization
> >
> >
> > Has anyone done array serialization? None of the examples do this. What
do
> > you put for the javaType parameter for the mapTypes method of the
> > SOAPMappingRegistry object? Better yet does any have some sample code?
> > Thanks.
> >
> >
> > ---------------------------------------------------------------------
> > 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
> >
> > ---------------------------------------------------------------------
> > 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
>
> ---------------------------------------------------------------------
> 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
>


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


Re: I wonder why..

Posted by Peter Glynn <gl...@tcd.ie>.
Why don't you want to use Apache SOAP.
Could could just do it the old way but that is very messy parsing a
XML(SOAP) message on the server side.It that what your looking for or are
you looking for another SOAP Java Implementation(Toolkit) to do it for you?



----- Original Message -----
From: "Paul Dermody" <pa...@miradorsoftware.com>
To: <so...@xml.apache.org>
Sent: Wednesday, April 11, 2001 5:44 PM
Subject: I wonder why..


> Hi
> I want to take 2 parameters from a  form in a jsp page,   encode them in a
> soap message and send them over http to another another servlet whereupon
I
> call a method.
> I dont want to use websevices like our apache friends.
> Has anyone else attempted this?
>
> All comments welcome
> Paul
>
> -----Original Message-----
> From: Barry Fortune [mailto:BFortune@yipes.com]
> Sent: 11 April 2001 17:29
> To: 'soap-user@xml.apache.org'
> Subject: RE: Array Serialization
>
>
> We are using Apache SOAP ver 2.1 and are running into a problem to
marshall
> nested arrays.
> The marshalling code cannot understand the typ "Array" - we ge the fault:
> No mapping found for  '
> http://schemas.xmlsoap.org/soap/encoding/:Array' using encoding style
>
> Does anyone have any ideas - we could write our own Serializer, but I am
> trying to avoid this.
>
> --------------------------------------------------------------------------
--
> ---------------------------------------------------------
>
> The server code is:
>
> public class SoapWithArrayService {
> public String[][] manipulate(String[][] name) { return name; }
> }
>
> --------------------------------------------------------------------------
--
> ---------------------------------------------------------
>
> The XML generated is:
>
> <SOAP-ENV:Body>
> <ns1:manipulate xmlns:ns1="soap-with-array"
> SOAP-ENV:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/">
>  <arryname xmlns:ns2="http://schemas.xmlsoap.org/soap/encoding/"
> xsi:type="ns2:Array" ns2:arrayType="ns2:Array[2]">
>  <item xsi:type="ns2:Array" ns2:arrayType="xsd:string[2]">
> <item xsi:type="xsd:string">One</item>
> <item xsi:type="xsd:string">Two</item>
>  </item>
> <item xsi:type="ns2:Array" ns2:arrayType="xsd:string[2]">
> <item xsi:type="xsd:string">three</item>
> <item xsi:type="xsd:string">four</item>
>  </item>
> </arryname>
>  </ns1:manipulate>
>  </SOAP-ENV:Body>
>
> --------------------------------------------------------------------------
--
> ---------------------------------------------------------
>
> The Server generates a fault:
>
> <SOAP-ENV:Body>
>  <SOAP-ENV:Fault>
> <faultcode>SOAP-ENV:Client</faultcode>
> <faultstring>No mapping found for  '
> http://schemas.xmlsoap.org/soap/encoding/:Array' using encoding style
> 'http://schemas.xmlsoap.org/soap/encoding/'. </faultstring>
> <faultactor>/rpcrouter</faultactor>
>  </SOAP-ENV:Fault>
> </SOAP-ENV:Body>
>
> -----Original Message-----
> From: Brandon Rife [mailto:brandon_rife@spectramarketing.com]
> Sent: Tuesday, April 10, 2001 12:52 PM
> To: 'soap-user@xml.apache.org'
> Subject: RE: Array Serialization
>
>
> We use of arrays of arrays to transfer tabular data.  What problems are
you
> having?
>
> Brandon
>
> > -----Original Message-----
> > From: Barry Fortune [SMTP:BFortune@yipes.com]
> > Sent: Tuesday, April 10, 2001 3:22 PM
> > To: 'sbelanger@xpert-inc.com'; 'soap-user@xml.apache.org'
> > Subject: RE: Array Serialization
> >
> > Hi Stéphane or anyone else,
> >
> > I was wondering if you have ever tried Arrays of Arrays - we had a
problem
> > with that.
> >
> > Thanks,
> >
> > Barry Fortune
> >
> > -----Original Message-----
> > From: Stéphane Bélanger [mailto:sbelanger@xpert-inc.com]
> > Sent: Friday, March 30, 2001 12:25 PM
> > To: 'soap-user@xml.apache.org'
> > Subject: RE: Array Serialization
> >
> >
> > I've done arrays of classes, for instance
> >
> > Address[] getAddresses(...)
> >
> > In this case, I would only map the class itself like this:
> >
> > mapTypes(Constants.NS_URI_SOAP_ENC, new QName("NameSpace", "Address"),
> >          Address.class, beanSer, beanSer);
> >
> > and put the appropriate stuff in the DD:
> >
> > <isd:map encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"
> > xmlns:x="NameSpace"
> > qname="x:Address"
> > javaType="com.....Address"
> >
> > xml2JavaClassName="org.apache.soap.encoding.soapenc.BeanSerializer"
> >
> > java2XMLClassName="org.apache.soap.encoding.soapenc.BeanSerializer"/>
> >
> >
> > I never had to map an array, it is supported directly in Apache SOAP.
> >
> > Stéphane
> >
> > -----Message d'origine-----
> > De : Terry_Truta@i2.com [mailto:Terry_Truta@i2.com]
> > Envoyé : 30 mars, 2001 14:57
> > À : soap-user@xml.apache.org
> > Objet : Array Serialization
> >
> >
> > Has anyone done array serialization? None of the examples do this. What
do
> > you put for the javaType parameter for the mapTypes method of the
> > SOAPMappingRegistry object? Better yet does any have some sample code?
> > Thanks.
> >
> >
> > ---------------------------------------------------------------------
> > 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
> >
> > ---------------------------------------------------------------------
> > 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
>
> ---------------------------------------------------------------------
> 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
>


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