You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@servicemix.apache.org by bradtwurst <na...@xoxy.net> on 2006/12/05 19:39:59 UTC

ServiceMix and cdata in SOAP message

Hello all again,

I am encountering an issue that I am not sure how to solve.

I am creating the following SOAP XML as a string and I am setting to the
context of a message via the command "message.setContent(new
StringSource(xmlString));".

--------------------------------------------------------
<?xml version="1.0" encoding="UTF-8"?><Envelope
xmlns="http://schemas.xmlsoap.org/soap/envelope/"><Body><msgResults><MsgResult>
  <msgId>000041</msgId>
 
<operatingData><![CDATA[BOARDCODE=8324816CGN&THRESHOLD.VALUE=10]]></operatingData>
  <success>true</success>
  <errors/>
</MsgResult></msgResults></Body></Envelope>
--------------------------------------------------------

If I deliver the message to a fileWriter endpoint, the output is correct
with the CDATA intact.

If I deliver the message to a external http endpoint (using the http
component) with the following endpoint

--------------------------------------------------------
	<http:endpoint service="test:status-httpProvider-service"
		endpoint="status-httpProvider-endpoint" role="provider"
		locationURI="http://sw:8081/" />
--------------------------------------------------------

The CDATA section is changed to:

--------------------------------------------------------
<?xml version="1.0" encoding="UTF-8"?><Envelope
xmlns="http://schemas.xmlsoap.org/soap/envelope/"><Body><msgResults><MsgResult>
  <msgId>000041</msgId>
  <operatingData>BOARDCODE=8324816CGN&amp;THRESHOLD.VALUE=10</operatingData>
  <success>true</success>
  <errors/>
</MsgResult></msgResults></Body></Envelope>
--------------------------------------------------------


Any suggestions as to what I might be doing incorrectly.

Thanks,
James
-- 
View this message in context: http://www.nabble.com/ServiceMix-and-cdata-in-SOAP-message-tf2763414s12049.html#a7705113
Sent from the ServiceMix - User mailing list archive at Nabble.com.


Re: ServiceMix and cdata in SOAP message

Posted by bradtwurst <na...@xoxy.net>.
The process is as follows:

(I am using the pojo client for this)
I create a new message for the http provider endpoint.
and I am creating the xml data through the use of a string variable
(including the soap envelope tags)

The message content is then set to the xml 'string' using a stringSource and
I send the message to the http provider

The http provider is configured:

		<http:endpoint service="test:status-httpProvider-service"
		endpoint="status-httpProvider-endpoint" role="provider"
		locationURI="http://0.0.0.0:81/testRcvMsgService/"/>

I have a tcp monitor setup on port 81 that captures the stream and I see
that the cdata line is no longer there and has been replaced by the escaped
data.

Is there some information missing, let me know.

Thanks,
James




gnodet wrote:
> 
> What's you actual configuration ? 
> 
> 

-- 
View this message in context: http://www.nabble.com/ServiceMix-and-cdata-in-SOAP-message-tf2763414s12049.html#a7766986
Sent from the ServiceMix - User mailing list archive at Nabble.com.


Re: ServiceMix and cdata in SOAP message

Posted by Guillaume Nodet <gn...@gmail.com>.
What's you actual configuration ? I don't really
see any reason why the cdata is not sent at the end.
I think there may be a transformation which removes the
cdata, but I guess it could be fixed.

On 12/8/06, bradtwurst <na...@xoxy.net> wrote:
>
> Thanks for the responses.
>
> It is true that the two code snippets are equivalent.  The issue is that the
> customer's 'service' receiving the message does not have the opportunity to
> use a true xml parser and they were hoping that the message that I send them
> could have that portion of it wrapped in a cdata section as it would be
> easier for them to parse the data in the message string.  I was hoping that
> SM might be able to handle this capability for me.
>
> I will discuss the options with the customer and we'll see what happens...
>
> Thanks again,
> James
> --
> View this message in context: http://www.nabble.com/ServiceMix-and-cdata-in-SOAP-message-tf2763414s12049.html#a7758687
> Sent from the ServiceMix - User mailing list archive at Nabble.com.
>
>


-- 
Cheers,
Guillaume Nodet

RE: ServiceMix and cdata in SOAP message

Posted by bradtwurst <na...@xoxy.net>.
Thanks for the responses.

It is true that the two code snippets are equivalent.  The issue is that the
customer's 'service' receiving the message does not have the opportunity to
use a true xml parser and they were hoping that the message that I send them
could have that portion of it wrapped in a cdata section as it would be
easier for them to parse the data in the message string.  I was hoping that
SM might be able to handle this capability for me.  

I will discuss the options with the customer and we'll see what happens...

Thanks again,
James
-- 
View this message in context: http://www.nabble.com/ServiceMix-and-cdata-in-SOAP-message-tf2763414s12049.html#a7758687
Sent from the ServiceMix - User mailing list archive at Nabble.com.


Re: ServiceMix and cdata in SOAP message

Posted by Guillaume Nodet <gn...@gmail.com>.
Nothing afaik.  But the xml are equivalent.
Is that a real problem ?

On 12/5/06, bradtwurst <na...@xoxy.net> wrote:
>
> Hello all again,
>
> I am encountering an issue that I am not sure how to solve.
>
> I am creating the following SOAP XML as a string and I am setting to the
> context of a message via the command "message.setContent(new
> StringSource(xmlString));".
>
> --------------------------------------------------------
> <?xml version="1.0" encoding="UTF-8"?><Envelope
> xmlns="http://schemas.xmlsoap.org/soap/envelope/"><Body><msgResults><MsgResult>
>   <msgId>000041</msgId>
>
> <operatingData><![CDATA[BOARDCODE=8324816CGN&THRESHOLD.VALUE=10]]></operatingData>
>   <success>true</success>
>   <errors/>
> </MsgResult></msgResults></Body></Envelope>
> --------------------------------------------------------
>
> If I deliver the message to a fileWriter endpoint, the output is correct
> with the CDATA intact.
>
> If I deliver the message to a external http endpoint (using the http
> component) with the following endpoint
>
> --------------------------------------------------------
>         <http:endpoint service="test:status-httpProvider-service"
>                 endpoint="status-httpProvider-endpoint" role="provider"
>                 locationURI="http://sw:8081/" />
> --------------------------------------------------------
>
> The CDATA section is changed to:
>
> --------------------------------------------------------
> <?xml version="1.0" encoding="UTF-8"?><Envelope
> xmlns="http://schemas.xmlsoap.org/soap/envelope/"><Body><msgResults><MsgResult>
>   <msgId>000041</msgId>
>   <operatingData>BOARDCODE=8324816CGN&amp;THRESHOLD.VALUE=10</operatingData>
>   <success>true</success>
>   <errors/>
> </MsgResult></msgResults></Body></Envelope>
> --------------------------------------------------------
>
>
> Any suggestions as to what I might be doing incorrectly.
>
> Thanks,
> James
> --
> View this message in context: http://www.nabble.com/ServiceMix-and-cdata-in-SOAP-message-tf2763414s12049.html#a7705113
> Sent from the ServiceMix - User mailing list archive at Nabble.com.
>
>


-- 
Cheers,
Guillaume Nodet

Re: ServiceMix and cdata in SOAP message

Posted by bradtwurst <na...@xoxy.net>.
Sorry to bother, but can anyway point me in the right direction to solve this
problem.

afaik, it appears that the http component is causing the issue.  What would
be a good way to debug this?

Also, the previous post (via nabble) caused the output to be incorrect.  The
output (as captured going out of the http component) is

--------------------------------------------------------
<?xml version="1.0" encoding="UTF-8"?><Envelope
xmlns="http://schemas.xmlsoap.org/soap/envelope/"><Body><msgResults><MsgResult>
  <msgId>000041</msgId>
 
<operatingData>BOARDCODE=8324816CGN&amp;amp;THRESHOLD.VALUE=10</operatingData>
  <success>true</success>
  <errors/>
</MsgResult></msgResults></Body></Envelope>
-------------------------------------------------------- 


Thanks,
James
-- 
View this message in context: http://www.nabble.com/ServiceMix-and-cdata-in-SOAP-message-tf2763414s12049.html#a7743479
Sent from the ServiceMix - User mailing list archive at Nabble.com.