I think this isn't the problem because the return
value is org.w3c.doc.Element which needs
NS_URI_LITERAL_XML as enc style, and then the
Exception come when the client try to serialize into
XML the array of String; that is before the server
receive the request. In fact I try the same thing
using a simple String instead of an array of String,
and it works fine.

bye 
Luca

--- Robert Englander <[EMAIL PROTECTED]> ha scritto: > 
> I think your problem is here:
> 
>
call.setEncodingStyleURI(Constants.NS_URI_LITERAL_XML);
> 
> This declares that you are using literal encoding
> for the return value.  The default serializers
> are not associated with this namespace.  They
> are associated with NS_URI_SOAP_ENC, as you used
> for your request parameters.  So when the result
> comes back, no deserializer is found for strings
> using literal encoding.
> 
> Someone...correct me if I'm wrong please.
> 
> -----Original Message-----
> From: luca rasconi <[EMAIL PROTECTED]>
> Date: Thu, 9 Aug 2001 01:19:42 +0200 (CEST)
> Subject: how to serialize an array of
> java.lang.String?
> 
> > hi all,
> > I've a problem serializing an array of
> String...let's
> > hope.
> > From soap doc:
> > "Parameters must bu serialize into XML before they
> can
> > transmitted, and so Apache SOAP provides of a
> number
> > of pre-defined serilizers which are available...".
> > And i read that array has a pre-defined
> serializer...
> > I've deploied a service which returns an
> > org.w3c.dom.Element, and should accept as
> parameter an
> > array of java.lang.String.
> > 
> > So I wrote this:
> > 
> > ....
> > String request[]=new String[3];
> > request[0]="a";
> > request[1]="b";
> > request[2]="c";
> > Call call=new Call();
> > call.setTargetObjectURI(myUrn);
> > call.setMethodName(myMeth);
> >
>
call.setEncodingStyleURI(Constants.NS_URI_LITERAL_XML);
> > Vector params= new Vector();
> > params.addElement(new
> >
>
Parameter("par",String[].class,request,ConStants.NS_URI_SOAP_ENC));
> > call.setPrams(params);
> > Response resp=call.invoke(myurl);
> > ....
> > 
> > When I try to execute this code there's this
> error:
> > SOAPException= SOAP-ENV:Client, No Serializer
> found to
> > serialize a 'java.lang.String' using 
> > encoding style
> > 'http://xml.apache.org/xml-soap/literalxml'
> > 
> > The error happen when the client try to serialize
> the
> > array of String into XML; this 
> > because it use litaralxml as enc style.
> > But i ask me what
> > 'http://xml.apache.org/xml-soap/literalxml' has to
> do
> > with java.lang.String when I set for that
> parameter
> > another encoding Style?
> > 
> > Initially I thought that errors came from String[]
> > notation so I translated all as Vector but the 
> > result is the same.
> > 
> > I don't know!
> > Is there anybody who can help me?
> > thank you
> > Luca
> > 
> >
>
_____________________________________________________________________
> > _
> > Do You Yahoo!?
> > Il tuo indirizzo gratis e per sempre @yahoo.it su
> > http://mail.yahoo.it
> > 
> 
>  

______________________________________________________________________
Do You Yahoo!?
Il tuo indirizzo gratis e per sempre @yahoo.it su http://mail.yahoo.it

Reply via email to