IBM webMethods Hybrid Integration

IBM webMethods Hybrid Integration

Join this online group to communicate across IBM product users and experts by sharing advice and best practices with peers and staying up to date regarding product enhancements.


#TechXchangePresenter
 View Only
  • 1.  SOAP BODY replacing %2360 with amplt ampgt

    Posted Wed August 10, 2005 01:42 AM

    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:

    com.wm.app.b2b.server.SOAPException: [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?


    #soa
    #webMethods
    #API-Management


  • 2.  RE: SOAP BODY replacing %2360 with amplt ampgt

    Posted Wed August 10, 2005 02:47 PM

    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.


    #webMethods
    #API-Management
    #soa


  • 3.  RE: SOAP BODY replacing %2360 with amplt ampgt

    Posted Thu August 11, 2005 04:26 AM

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

    Mark C


    #webMethods
    #soa
    #API-Management


  • 4.  RE: SOAP BODY replacing %2360 with amplt ampgt

    Posted Thu August 11, 2005 02:50 PM

    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.


    #API-Management
    #soa
    #webMethods


  • 5.  RE: SOAP BODY replacing %2360 with amplt ampgt

    Posted Thu August 11, 2005 03:31 PM

    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.


    #soa
    #API-Management
    #webMethods


  • 6.  RE: SOAP BODY replacing %2360 with amplt ampgt

    Posted Thu August 11, 2005 05:15 PM

    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


    #API-Management
    #webMethods
    #soa