You are viewing a plain text version of this content. The canonical link for it is here.
Posted to soap-user@ws.apache.org by "Brown, Matthew A." <MA...@cleveland-cliffs.com> on 2001/03/23 22:32:30 UTC

MessageRouter SoapContext Response

I'm designing a soap service that employs the use of the Message Router
Servlet- as the client applications will send XML documents to my Tomcat
Server.  I can receive the XML, parse it, process it. My problem is in
building a response. I've built an XML document that the client applications
will receive- but I can't get the XML into a response.  

The MessageRouter Servlet requires an Envelope, Soap Context for the
incoming request and outgoing response for the parameters.  I want my XML
message to go out via the outgoing response stream.  Does anyone have an
approach to this that has worked?

Thanks so much. 

Matt 

Re: MessageRouter SoapContext Response

Posted by Wei Qian <We...@oracle.com>.
Hi:

Please take a look of the example in samples/messaging.

In MessageRouterServlet, you call

 resCtx.setRootPart( "Your response in XML",
       Constants.HEADERVAL_CONTENT_TYPE_UTF8);

 before

  sres = new TransportMessage(null, resCtx, null);

In client side, you can follow the same code in SendMessage.java
to get the response back.

Cheers,

-Wei
----- Original Message -----
From: "Brown, Matthew A." <MA...@cleveland-cliffs.com>
To: <so...@xml.apache.org>
Sent: Friday, March 23, 2001 4:32 PM
Subject: MessageRouter SoapContext Response


> I'm designing a soap service that employs the use of the Message Router
> Servlet- as the client applications will send XML documents to my Tomcat
> Server.  I can receive the XML, parse it, process it. My problem is in
> building a response. I've built an XML document that the client
applications
> will receive- but I can't get the XML into a response.
>
> The MessageRouter Servlet requires an Envelope, Soap Context for the
> incoming request and outgoing response for the parameters.  I want my XML
> message to go out via the outgoing response stream.  Does anyone have an
> approach to this that has worked?
>
> Thanks so much.
>
> Matt
>


Re: MessageRouter SoapContext Response

Posted by Wei Qian <We...@oracle.com>.
Hi:

Please take a look of the example in samples/messaging.

In MessageRouterServlet, you call

 resCtx.setRootPart( "Your response in XML",
       Constants.HEADERVAL_CONTENT_TYPE_UTF8);

 before

  sres = new TransportMessage(null, resCtx, null);

In client side, you can follow the same code in SendMessage.java
to get the response back.

Cheers,

-Wei
----- Original Message -----
From: "Brown, Matthew A." <MA...@cleveland-cliffs.com>
To: <so...@xml.apache.org>
Sent: Friday, March 23, 2001 4:32 PM
Subject: MessageRouter SoapContext Response


> I'm designing a soap service that employs the use of the Message Router
> Servlet- as the client applications will send XML documents to my Tomcat
> Server.  I can receive the XML, parse it, process it. My problem is in
> building a response. I've built an XML document that the client
applications
> will receive- but I can't get the XML into a response.
>
> The MessageRouter Servlet requires an Envelope, Soap Context for the
> incoming request and outgoing response for the parameters.  I want my XML
> message to go out via the outgoing response stream.  Does anyone have an
> approach to this that has worked?
>
> Thanks so much.
>
> Matt
>