Hi Paula & Steeve,

This is possible, it just requires some work. One way to accomplish this is
to implement your own Provider on the server-side. Your provider would have
to know how to deal with in/out and out parameters, in addition to the in
parameters the current providers support. The Response object does include
all parameters sent back, in addition to the return value.

Thanks,
-Matt

> -----Original Message-----
> From: Steeve Gilbert [mailto:[EMAIL PROTECTED]]
> Sent: Wednesday, August 01, 2001 10:24 AM
> To: [EMAIL PROTECTED]
> Subject: RE: Having SOAP server return a Response object
>
>
>
> Yeah...  I tried one time to have more then one parameters returns by a
> method and get them thru Response.getParams() but I think this ain't
> possible.  Anyway if someone find out, please tell me.  Oh well, then good
> luck Paula!
>
> Steeve...
>
>
>
>
>
> "Paula Young" <[EMAIL PROTECTED]> on 01/08/2001 10:12:08 AM
>
> Please respond to [EMAIL PROTECTED]
>
> To:   <[EMAIL PROTECTED]>
> cc:    (bcc: Steeve Gilbert/G_STGEORGES/CANAM_MANAC)
>
> Subject:  RE: Having SOAP server return a Response object
>
>
> Steeve, my client gets the OrderEntry across SOAP to the server without
> trouble.  I was just wondering if my client could get the Response object
> for the reply, and be able to parse the vector of parameter objects in the
> Response object to get the parameter name/value pairs using
> Response.getParams() instead of Response.getReturnValue() .  I guess this
> isn't possible and perhaps I do need to return a String[] and have my
> client
> code parse the array, knowing that [1] is sa1, [2] is sa2, etc.  The
> String[] does get passed with positional integrity - ie., the
> values should
> change positions in the array I hope.
>
> thanks again-
> Paula Young
>
>  -----Original Message-----
> From:     Steeve Gilbert [mailto:[EMAIL PROTECTED]]
> Sent:     Wednesday, August 01, 2001 9:39 AM
> To:  [EMAIL PROTECTED]
> Subject:  RE: Having SOAP server return a Response object
>
>
>
> >Thanks, guess I read the Response class api doc page wrong.
>
> Not really.  It's just that the Response object is create automatically by
> Apache Soap, it's not your job to build it.  Like it's not your job to
> build the entire soap message.
>
> Ok...  I think you see SOAP more complicated then it really is.  Can you
> show us your client code?  You're server should look like this and nothing
> more except other method if you have some.  But OrderEntry won't pass thru
> the soap I think.
>
> public class Server
> {
>  public String[] Request(OrderEntry orderentry)
>   {
>     String[] sa = new String[4];
>     sa[1] = "String1";
>     sa[2] = "String2";
>     sa[3] = "String3";
>     sa[4] = "String4";
>     return(sa);
>   }
> }
>
> You don't have to wrap everything, the Apache soap take care of this.
> Check this client sample...
> http://www.xmethods.net/download/servicefiles/TempClient.java
>
> Steeve...
>
>
>
>
> "Paula Young" <[EMAIL PROTECTED]> on 01/08/2001 09:16:54 AM
>
> Please respond to [EMAIL PROTECTED]
>
> To:   <[EMAIL PROTECTED]>
> cc:    (bcc: Steeve Gilbert/G_STGEORGES/CANAM_MANAC)
>
> Subject:  RE: Having SOAP server return a Response object
>
>
> Thanks, guess I read the Response class api doc page wrong.
>
> Do you know if there's anyway to get a tagname wrapper around
> each string?,
> like sa1 and sa2 here:
> >         <sa1 xsi:type="xsd:string">String1value</sa1>
> >         <sa2 xsi:type="xsd:string">String2value</sa2>
>
> Thanks for your help!
> Paula
>
>  -----Original Message-----
> From:     Steeve Gilbert [mailto:[EMAIL PROTECTED]]
> Sent:     Wednesday, August 01, 2001 8:56 AM
> To:  [EMAIL PROTECTED]
> Subject:  Re: Having SOAP server return a Response object
>
>  << File: winmail.dat >>
> Try using a String array.  Something like...
>
>  public String[] Request(OrderEntry orderentry)
>   {
>     String[] sa = new String[4];
>     sa[1] = "String1";
>     sa[2] = "String2";
>     sa[3] = "String3";
>     sa[4] = "String4";
>     return(sa);
>   }
>
> By the way, method exposed by your server doesn't need (and are not made
> to) return a Response object.  You have to return type that have a
> serializer like String, Double, Integer...  and their arrays.
>
> Good luck!
>
> Steeve...
>
>
>
>
> "Paula Young" <[EMAIL PROTECTED]> on 31/07/2001 04:48:50 PM
>
> Please respond to [EMAIL PROTECTED]
>
> To:   "Soap-User" <[EMAIL PROTECTED]>
> cc:    (bcc: Steeve Gilbert/G_STGEORGES/CANAM_MANAC)
>
> Subject:  Having SOAP server return a Response object
>
>
> In the soap api docs for the Response class, it says that both the client
> and the server use Response objects to represent the result of a method
> invocation.
>
> I'm trying to have my server return a soap encoded response
> consisting of 4
> string values.  And I tried to do this as a vector of params  in the
> construction of my Response object.  My server code looks like:
>
>   public Response Request(OrderEntry orderentry)
>   {
>     //  ...process the order entry here
>
>     // build a good response:
>     Vector params = new Vector();
>     params.addElement(new Parameter("StatusCode", String.class, "0",
> null));
>     params.addElement(new Parameter("OrderComment", String.class, "Payment
> Due July 31, 2001", null));
>     Response resp = new Response("urn:Result", "ReqStat",
> (Parameter) null,
> params, (Header) null,
>             Constants.NS_URI_SOAP_ENC, null);
>     return(resp);
>   }
>
> This ends up getting an exception thrown on the Server side
> because there's
> no serializer defined for the Response object return type:
> Fault Code   = SOAP-ENV:Server
> Fault String = java.lang.IllegalArgumentException: No Serializer found to
> serialize a 'org.apache.soap.rpc.Response' using encoding style
> 'http://schemas.xmlsoap.org/soap/encoding/'.
>
> ...is there a different style of encoding (besides
> Constants.NS_URI_SOAP_ENC) that I need to specify?  Do I really need to
> specify a serializer in the deployment descriptor?  I just want to easily
> return 2 soap encoded string values.
>
> Paula Young
>
> (See attached file: winmail.dat)
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>

Reply via email to