hi Scott,
thanks for that. it was pretty much the conclusion I was coming too - I just didn't know if there might be a way to re-use the SOAP envelope rather than parse the message and create a new one?
Duncan
| "Scott Nichol"
<[EMAIL PROTECTED]>
15/04/2005 16:59
|
|
If the fields you add will depend on the contents of the SOAP envelope being passed through the proxy, you pretty definitely will want to parse the envelope into something, then create a new envelope to pass through. You could do this with a standard XML parser. Creating and traversing the DOM to see what you have received is not too onerous; likewise for subsequently adding elements and serializing the modified DOM to a stream.
If you are always going to add the same fields, you might try to cheat and not do full parsing, but I would guess that in the long run, you would be better off using a parser and manipulating a DOM.
Scott Nichol
Do not send e-mail directly to this e-mail address,
because it is filtered to accept only mail from
specific mail lists.
----- Original Message -----
From: <[EMAIL PROTECTED]>
To: <[email protected]>
Sent: Friday, April 15, 2005 9:52 AM
Subject: transforming bytes to SOAP Message
> Hello, I hope someone can help.
>
> We're sending SOAP messages to our web service via a simple proxy. the
> proxy sets up input and output streams and passes with SOAP message on to
> the web service with no problems. Now what we want to do is add fields to
> the body of the SOAP message when it passes through the proxy.
>
> I suppose an ideal way to do this would be to transform the bytes stream
> back to a SOAP message and manipulate the body, before passing it on. does
> anyone know how to do this? The main problem is that the proxy is not in a
> J2EE container so we can't use HTTPRequest.
>
> Ideally I don't want to have to do string manipulation on the input and
> repopulate a new envelope, if I can help it.
>
> I'd be grateful of any help.
>
> cheers
> Duncan
>
> This email message, including any attachments transmitted with it, is CONFIDENTIAL and may contain legally privileged information.
> This message is intended solely for the use of the individual or entity to whom it is addressed. If you are not the intended recipient you should not read, copy, distribute, disclose or otherwise use this information.
> If you have received this message in error, please notify us immediately and delete it from your system. The integrity and security of this message cannot be guaranteed and it may be subject to data corruption and unauthorised amendment, for which we accept no liability.
> Euroclear reserves the right to retain email messages on its systems and to the extent and under circumstances permitted by applicable law, to monitor and intercept email messages to and from its systems.
> Euroclear is the marketing name for the Euroclear system, Euroclear plc, Euroclear SA/NV and their affiliates.
>
> http://www.euroclear.com
>
>
