SOAP BODY replacing %2360 with amplt ampgt

We have a vendor that wants to receive the xml body encoded rather than xml. When we try to add the bodyEntry to the soapData in pub.soap.utils:addBodyEntry we get this error: [ISS.0088.9129] Invalid node: XML blocks must be in a container

We have tried to pub.string:HTMLEncode and also string.replace all <> to &lt &gt and both calls fail. When we do nothing to the xml the addBodyEntry everything works fine. Does anybody know of a way to work around this or set a setting so that the addBodyEntry call will work?

Have you tried entity-encoding (HTMLEncode) just the individual body strings before mapping them into the target document?

You don’t want to entity-encode the <> symbols surrounding tags.

Uh, dare I ask why your trading partner wants to do this?

Mark C

The vendors explanation is that the need this for .net. We are now using string.replace and now are trying to use wm.tnweb.wrapper:xmlEncode - it has the whole message in &lt &gt instead of <>. It still includes a main tag but the message is the way they want it. If you have any other ideas how to get the body added without tags i would appreciate it.

From the W3C 2004 recommendation:

"4.6 Predefined Entities

[Definition: Entity and character references MAY both be used to escape the left angle bracket, ampersand, and other delimiters. A set of general entities (amp, lt, gt, apos, quot) is specified for this purpose. Numeric character references MAY also be used; they are expanded immediately when recognized and MUST be treated as character data, so the numeric character references “<” and “&” MAY be used to escape < and & when they occur in character data.]"

I’ve run into more than one situation where this is being used.

The vendor’s explanation is suspect. Properly developed .Net apps can certainly process soap messages without html encoding the XML. I think there may be an example on Advantage of how to exchange messages with .Net apps.

A couple of years ago, I created .Net assemblies that consumed IS web services and didn’t have to do this. Surely, its even easier now.

Mark C