Actually there is a way in Apache SOAP .. its a little trick based
on how Apache SOAP determines the encoding to use for the returned
values. If you set an encoding style on the outgoing Call then
that will get used as the return encoding style. If you want to
encode outgoing parameters using a different encoding style, then
you can do that as you add each parameter - encoding style is
one of the arguments of Parameter. This is sort of how
samples.addressbook.GetAllListings works, except that doesn't have
any call parameters so its not fully illustrative.

However, you are right that SOAP has no first-class way to do that.
The above workaround is implementation dependent.

Sanjiva.

----- Original Message -----
From: "Saint-Martin Cecile" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Thursday, June 07, 2001 11:30 AM
Subject: Re: Problem with getting Response


> There is  no way to specify encoding style for return parameter...
> To resolve this we have written our own provider...
> If all parameters you use (in and out) are DOM Element, you can write :
> call.setEncodingStyleURI(Constants.NS_URI_LITERAL_XML)
>
> See address book examples and mailing list archives.
>
> Cecile Saint-Martin
> [EMAIL PROTECTED]
>
>
> ----- Original Message -----
> From: <[EMAIL PROTECTED]>
> To: <[EMAIL PROTECTED]>
> Sent: Thursday, June 07, 2001 4:38 PM
> Subject: Problem with getting Response
>
>
> > Hi,
> >
> > I'm trying to make a program capable of sending a DOM Element (or
Document)
> > to a SOAP server in order to manipule this Node ... the Call seems to
work
> > but the response seems not to be correct ... here is the error message :
> >      Ouch, the call failed:
> >        Fault Code   = SOAP-ENV:Server
> >        Fault String = java.lang.IllegalArgumentException:
> >           No Serializer found to serialize a 'org.w3c.dom.Element' using
> > encoding style http://schemas.xmlsoap.org/soap/encoding/'.
> >
> > Here is a part of my client program :
> >      params.addElement(new Parameter("addedDocument", Element.class,
> > requeteXML.getDocumentElement(), Constants.NS_URI_LITERAL_XML));
> >      call.setParams(params);
> >      Response resp;
> >      try
> >      {resp = call.invoke(url, "");}
> >
> > Here is a simple program Server just to test it (it sends back the
received
> > element ...) :
> >      public Element Traiter_Requete(Element ElementXML) throws
IOException
> >            {
> >           return ElementXML;
> >            }
> >
> > Can anybody help me with explaining how I can send any types of
parameter
> > in a SOAP call and a SOAP Response ....  I manage to send primitive type
as
> > String, file etc .... but I'd like to send others types of parameter
....
> > is it difficult ??
> >
> > Thanks !!
> >
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: [EMAIL PROTECTED]
> > For additional commands, email: [EMAIL PROTECTED]
> >
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, email: [EMAIL PROTECTED]


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, email: [EMAIL PROTECTED]

Reply via email to