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.



#Automation


#Applicationintegration
#webMethods
#Integration
 View Only
  • 1.  Handling %25 sign in XML data

    Posted 08/20/03 07:48 PM

    Hi,

    We just ran into an unusual issue on BC 4.6 (940 + CoreFix 2 [Fixes 1-7 + SP1&2]) where a % was causing the transmission of a XML document, via HTTP post, to fail. The log and the saved pipeline showed that the value was null. We are using the name=value option to transmit this particular XML doc.

    Has anyone run into this before? I fixed it by converting the % to “%” but why would this be an issue in the first place? Also, is there any other way to fix this? I am also looking into the encoding parameter to see if varying that would have any effect on this issue.

    Thanks,

    ajandja


    #webMethods
    #Integration-Server-and-ESB
    #Flow-and-Java-services


  • 2.  RE: Handling %25 sign in XML data

    Posted 08/26/03 08:25 AM

    Hi ajandja - that’s strange. I don’t see the need for escaping “%” as an XML character entity either.

    I thought I’d mention that WM references variables in the pipeline as “%VARIABLENAME%” (also within DSPs as “%value VARNAME%”.) Do you think this might have anything to do with it?


    #Flow-and-Java-services
    #Integration-Server-and-ESB
    #webMethods


  • 3.  RE: Handling %25 sign in XML data

    Posted 12/02/04 04:52 PM

    Hey Andrew!
    I´m getting a problem like you. A % character in my xml cause this error in a documentToRecord service:
    PE ref missing terminating ‘;’
    Have you ane news about your issue?
    Thank you,
    Fabiano


    #Flow-and-Java-services
    #webMethods
    #Integration-Server-and-ESB


  • 4.  RE: Handling %25 sign in XML data

    Posted 12/02/04 05:16 PM

    Integration Server uses the percent sign to effect pipeline substitution.

    If you try to set a value (click on blue arrow) on a value called POValue for example, then a popup box will appear with a box to input the POValue. Let’s say you have a value already in the pipeline called PurchaseOrderValue. You would put the following into the set value popup box: %PurchaseOrderValue% and you would check the box below labeled “Perform Variable Substituition.”

    I saw someplace in a manual that this could be changed, but I can’t remember where or how. Probably the admin manual.

    I suspect that perhaps the IS is getting upset because it expects a value surrounded by percent signs??

    Just a guess.

    HTH,

    Ray


    #webMethods
    #Integration-Server-and-ESB
    #Flow-and-Java-services


  • 5.  RE: Handling %25 sign in XML data

    Posted 12/02/04 08:13 PM

    Fabiano,
    If there’s no space between the ‘%’ and the next character an XML parser treats that character as the start of a Parameter Entity reference (PE ref), which must be terminated by a ‘;’. Hence, the message you received. So if the ‘%’ is to be transmitted as such it must be escaped using a character entity reference, as Andrew originally noted: “%”. HTH.


    #webMethods
    #Flow-and-Java-services
    #Integration-Server-and-ESB


  • 6.  RE: Handling %25 sign in XML data

    Posted 12/02/04 09:03 PM

    Hey Michael,

    Thanks for that little tidbit. I’ll add it to the vault of knowledge!

    ray


    #webMethods
    #Integration-Server-and-ESB
    #Flow-and-Java-services


  • 7.  RE: Handling %25 sign in XML data

    Posted 12/02/04 10:06 PM

    A percent character (%) is allowed to appear in the
    character data of an XML document.

    For example, the following XML document is well-formed:

    <?xml version=“1.0”?>
    <doc>110%</doc>

    Within a DTD, the percent character (%) may only be used
    to declare and reference parameter entities. Any other
    percent characters within a DTD must be encoded using
    character references (e.g., “%”).

    For example, the following XML document, which is
    equivalent to the XML document above, is well-formed,
    since it encodes the percent character as “%”:

    <?xml version=“1.0”?>
    <!DOCTYPE doc [
    <!ENTITY percent “110%”>
    ]>
    <doc>&percent;</doc>

    The following XML document is not well-formed, since
    its DTD contains a percent character that is not used
    to declare or reference a parameter entity.

    <?xml version=“1.0”?>
    <!DOCTYPE doc [
    <!ENTITY percent “110%”>
    ]>
    <doc>&percent;</doc>

    Hope this helps.

    Bob


    #webMethods
    #Integration-Server-and-ESB
    #Flow-and-Java-services