This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

Sending Character Entities in Web Service Request

Hello,

We have a Remedy web service configured in OIM 7.0.2 to create Remedy work orders from OIM. We have generated the custom script to call the web service method using the OIM web service wizard. One of the fields we need to send is a description field with line breaks. We're passing the value to the custom script as below, with the 
 character entity representing carriage returns:

User First Name: John
User Last Name: Doe
User Network ID: JXD301202
User Employee ID: 999999999

Requested Application: Oracle
Requested Entitlement: Admin

However, I analyzed the SOAP request being sent to Remedy using Wireshark and noticed that & is being encoded to & as below, even though it is part of a character entity representation:

<Detailed_Description>User First Name: John&#13;User Last Name: Doe&#13;User Network ID: JXD301202&#13;User Employee ID: 999999999&#13;&#13;Requested Application: Oracle&#13;Requested Entitlement: Admin</Detailed_Description>

How can I send character entities to a web service from OIM as-is without being encoded? In this particular case, how can I have the SOAP request be generated with the description field as follows:

<Detailed_Description>User First Name: John
User Last Name: Doe
User Network ID: JXD301202
User Employee ID: 999999999

Requested Application: Oracle
Requested Entitlement: Admin</Detailed_Description>

Thanks in advance,

Febin

Parents
  • Hi George,

    My point was that the below is perfectly valid XML - the serializer shouldn't escape the "&" once it sees that it is followed by a valid character representation:

    <Detailed_Description>User First Name: John&#13;User Last Name: Doe</Detailed_Description>

    To drive home the point, I get the same issue if I try to send the character entity of "&" - "&#38;". This gets serialized and sent as follows:

    <Detailed_Description>User First Name: John&amp;#38;User Last Name: Doe</Detailed_Description>

    I forgot to mention in my original post, but the strange thing is that this was working perfectly fine before without any code changes. We did install some hotfixes and a new module - not sure if these caused something related to change.

    I'd already tried to wrap the description in a CDATA block, but the special characters involved get escaped here as well:

    <Detailed_Description>&lt;![CDATA[User First Name: John&amp;#13;User Last Name: Doe]]&gt;</Detailed_Description>

    I just tried replacing "&#13;" with "/r" but that didn't get serialized correctly and got sent as-s:

    <Detailed_Description>User First Name: John/rUser Last Name: Doe</Detailed_Description>

    Thanks,
    Febin
Reply
  • Hi George,

    My point was that the below is perfectly valid XML - the serializer shouldn't escape the "&" once it sees that it is followed by a valid character representation:

    <Detailed_Description>User First Name: John&#13;User Last Name: Doe</Detailed_Description>

    To drive home the point, I get the same issue if I try to send the character entity of "&" - "&#38;". This gets serialized and sent as follows:

    <Detailed_Description>User First Name: John&amp;#38;User Last Name: Doe</Detailed_Description>

    I forgot to mention in my original post, but the strange thing is that this was working perfectly fine before without any code changes. We did install some hotfixes and a new module - not sure if these caused something related to change.

    I'd already tried to wrap the description in a CDATA block, but the special characters involved get escaped here as well:

    <Detailed_Description>&lt;![CDATA[User First Name: John&amp;#13;User Last Name: Doe]]&gt;</Detailed_Description>

    I just tried replacing "&#13;" with "/r" but that didn't get serialized correctly and got sent as-s:

    <Detailed_Description>User First Name: John/rUser Last Name: Doe</Detailed_Description>

    Thanks,
    Febin
Children
No Data