SiebelGuide.com/siebelblogs

Siebel Blogs, News, Events, Tips and Tricks
Filed under WebServices, How To, Tips&Tricks, All

Today I was working in developing Web Services in Siebel and I realized that I need to send an XML message embedded in a SOAP envelope. When I was testing it I realized that Siebel did not like the special characters inside the xml elements because the parser had special meaning to it and would either ignore or error it.

For example:

I was sending an XML message as one of the Property Sets for a workflow which will be later interpreted using Integration object. So I inserted an xml message inside an SOAP element hoping that Siebel would consider that as string of characters. But it considered that as having a special meaning. My partial SOAP envelope is below.

<cus:IncomingXML>
<OpportunityBase>
<Name>t40174</Name>
<Contact>
<FirstName>Robert</FirstName>
<LastName>DCosta</LastName>
</Contact>
<OpportunityBase>
</cus:IncomingXML>



Where the element IncomingXML contains one of the input propertysets in the workflow. When Siebel receives this message it would parse the entire XML and not ignore the special characters.

To avoid having parser to understand that there is an embedded xml message inside the xml element we enclose the message inside a CDATA (Character Data) block like in the below case. When the parser sees the CDATA, it understands that as an actual message and not to parse it.

<cus:IncomingXML>
<![CDATA[
<OpportunityBase>
<Name>t40174</Name>
<Contact>
<FirstName>Robert</FirstName>
<LastName>DCosta</LastName>
</Contact>
<OpportunityBase>
]]>
</cus:IncomingXML>

This way the actual message wont be altered. Notice that the CDATA section starts with “<![CDATA[” and ends with “]]>

Using CDATA we can also send functions, javascript, URLs etc. I believe that CDATA is used very often..

Also keep in mind that the message enclosed inside CDATA cannot contain “]]>” and nested CDATA is not allowed.

I am not an expert in web services yet and as I am still exploring the web services world, this is could be a very basic tip but still useful. Let me know what you think. Post your comments.

Related posts(Auto Generated):

  1. Use of Transcode Business Service in Siebel
  2. PropertySets in Siebel - Made Easy
  3. PropertyExists Method in Siebel eScript
  4. Unlock a Project

Posted by Sridhar on Friday, July 18th, 2008


Page copy protected against web site content infringement by Copyscape
You can follow any responses to this entry through the magic of "RSS 2.0" and leave a trackback from your own site.

One Response to “How to Pass XML Message embeded in another XML”

Post A Comment

Recent Posts 

Recent Comments:

  • zenmed promo code: I understand that there are a lot of spam lately. Apparently it’s pretty difficult for people to...
  • Anupama: @Archana Whenever we use the UI to trigger a workflow use Runtime events. Use Workflow Policy whenever it is...
  • Judy Schreck - CDI Corporation: Systems Developer I-II/CRM Analytics Tech Lead (Oracle Siebel/OBIEE) CDI is seeking a CRM...
  • Moinuddin: Thank u very much. I am thankful to u for this valuable information.
  • remote support: i like this post greatly. ill be checking laterfor future readsthanks.