cancel
Showing results for 
Search instead for 
Did you mean: 

Soap adapter: string transformations issues

Former Member
0 Kudos

I have a difficult issue:

I want to send a SOAP message to a thirdparty environment ,this environment requieres a special format of the message XML to String; iu2019ll put a sample:

< SOAP:Body >

< ns0:application xmlns:ns0=u201Dhttp://xxxxxx/yyyyyyy.com/zzzzu201D >

< in0>

< inputMessage >

< request>name </request >

< versionMsg>x.0

u2026u2026u2026u2026..

< /parameters >

< /inputMessage>

This is the meesage that i process with PI. Then when it arrives to the other environment should be as this one, i'll write wrong the chars because the web change it in code...:

u201C< SOAP:Body >

< ns0:application xmlns:ns0=u201Dhttp://xxxxxx/yyyyyyy.com/zzzzu201D>

< in0>

& lt inputMessage& gt

& lt request & gt name& lt /request& gt

& lt versionMsg& gt x.0& lt /versionMsg& gt

etc etc etcu2026u2026.u201D

I have changed it in the mapping, it's something easy to map a source structure ot a target whit a string field and mark Return as XML in the source field. that's ok.

But now is the problem: The SOAP adapter changes all the '&' in differents chars as:&|#|34 (i separate whit |in this sample) or the tag > or < in other ascii chars.

Some one knows what can i do? i have tried too whit the last post, the module config for SOAP adapter: strictXML2PlainBean but it doesn't work.

Any help will be appreciated.

Best regards and thanks in advance.

Thanks in advance and best regards.

Accepted Solutions (1)

Accepted Solutions (1)

stefan_grube
Active Contributor
0 Kudos

> But now is the problem: The SOAP adapter changes all the '&' in differents chars as:&|#|34 (i separate whit |in this sample) or the tag > or < in other ascii chars.

> Some one knows what can i do?

You can do nothing. This is hardcoded. But it should not be an issue as :&|#|34 should be accepted by the receiver as well.

Former Member
0 Kudos

No, the problem is that the SOAP adapter does the escaping of these chars, so i can't control it. I am trying to deploy a EAR in the server, but i guess that an easiest way should exist for this case.

The main problem is that the thirdparty system has an filter and this kind of chars are not allowed, this system only understand & lt and & gt in the string field.

Thanks anyway

Edited by: Cantabria on Mar 18, 2010 3:07 PM

stefan_grube
Active Contributor
0 Kudos

> No, the problem is that the SOAP adapter does the escaping of these chars, so i can't control it. I am trying to deploy a EAR in the server, but i guess that an easiest way should exist for this case.

This does not help, as the SOAP adater bean is always the last.

You can try creating the SOAP header by yourself and use the 'no SOAP header' option.

Then the SOAP adapter does not change the payload.

Former Member
0 Kudos

Ooooh...sounds good, i'll try this way, i mean that it should be done with a java mapping wich is going to create the soap envelope and then...goes to the comm channel without the 'soap header' dissable...well, i'll post the result.

Thanks for this new idea.

stefan_grube
Active Contributor
0 Kudos

I should mention that SOAP adapter use contenttype application/xml when you check "do not use SOAP header"

You need messageTransformBean to change this to text/mxl which is expected for SOAP.

Former Member
0 Kudos

Ok mate, thanks and i'll check this way in the future, but right now we have done a change in the third party environment for the correct transormation and now it runs correctly, but thanks a lot for your responses because these are very helpful for me and maybe for othr persons that have the same problem.

Regars.

Answers (0)