thanks, the StringWriter works.

regards,
Yong Chen


-----Original Message-----
From: Sanjiva Weerawarana [mailto:[EMAIL PROTECTED]]
Sent: Monday, June 11, 2001 8:12 PM
To: [EMAIL PROTECTED]
Subject: Re: How to set output parameters in my server code


Why not just serialize (marshall) the envelope into the output
writer? That'll make it into a string .. if you really want the
string as a string, then create a StringWriter and serialize
into that.

Sanjiva.

----- Original Message -----
From: "Yong Chen" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Monday, June 11, 2001 5:40 PM
Subject: RE: How to set output parameters in my server code


>
> Does any one know how to convert an envelope to string?
>
> I'm using message service which requires the server method be in fixed
> format (Envelope e, SOAPContext reqCtx, SOAPContext resCtx) throws...
>
> What I'm doing is building an DOM element based on my data, then creating
an
> envelope from this element via e=Envelope.unmarshall(element, resCtx),
then
> doing a resCtx.setRootPart(e.toString(), "text/xml") to send this envelope
> to client.
>
> Unfortunately the env.toString() part doesn't work well, so how can I
> convert an envelope to a string?
>
> or the question is: how do I send an envelope to client when using message
> service? (I actually also want to know how to do it when using RPC).
>
> Any help is greately appreciated.
>
> Yong Chen
>
>
> -----Original Message-----
> From: Sanjiva Weerawarana [mailto:[EMAIL PROTECTED]]
> Sent: Friday, June 08, 2001 2:22 AM
> To: [EMAIL PROTECTED]
> Subject: Re: How to set output parameters in my server code
>
>
> I don't think there's an example, but all you have to do is
> new org.apache.soap.Envelope, fill it up and write it out to
> the response stream.
>
> Sanjiva.
>
> ----- Original Message -----
> From: "Yong Chen" <[EMAIL PROTECTED]>
> To: <[EMAIL PROTECTED]>
> Sent: Thursday, June 07, 2001 5:30 PM
> Subject: RE: How to set output parameters in my server code
>
>
> >
> > I think I'll just use message service, so I can send back an envelop
which
> > contains all my output parameters. Is there any example showing how to
> > assemble the envelop on server side inside the service method? (I guess
> that
> > will be related to SOAPContext). The sample (messaging only shows how to
> > throw exception).
> >
> > thanks
> > Yong Chen
> >
> > -----Original Message-----
> > From: Sanjiva Weerawarana [mailto:[EMAIL PROTECTED]]
> > Sent: Thursday, June 07, 2001 11:02 AM
> > To: [EMAIL PROTECTED]
> > Subject: Re: How to set output parameters in my server code
> >
> >
> > That's not strictly true - Java methods don't support out
> > params hence the JavaRPCProvider doesn't. You can make
> > Apache SOAP support it - the docs (see interop docs
> > in the 2.2 release) tell you how to do this.
> >
> > Sanjiva.
> >
> > ----- Original Message -----
> > From: "Hansen, Richard" <[EMAIL PROTECTED]>
> > To: <[EMAIL PROTECTED]>
> > Sent: Thursday, June 07, 2001 9:18 AM
> > Subject: RE: How to set output parameters in my server code
> >
> >
> > > Apache SOAP does not support out params.
> > >
> > >
> > > Hi,
> > > I am trying to invoke a java method of a java service on server (via
> > > .../servlet/rpcrouter to deploy this service, actually just a java
class
> > > containing that method). My problem is, this method will not only
return
> a
> > > value, it will also have some output parameters. I guess on client
side
> I
> > > can use getParams() method of Response class to get these parameters,
> but
> > > how do I set these output parameters in the method on server side (to
> send
> > > them to client)? I could not find any example usage from the samples
> > coming
> > > together with Apache soap server.
> > >
> > > thanks
> > > Yong Chen
> > >
> > > ---------------------------------------------------------------------
> > > 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]
>
>
> ---------------------------------------------------------------------
> 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]

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

Reply via email to