IC4NOTICE: developerWorks Community will be offline May 29-30, 2015 while we upgrade to the latest version of IBM Connections. For more information, read our upgrade FAQ.
2 replies Latest Post - ‏2013-02-08T00:06:14Z by AnthonyinPortland
7 Posts

Pinned topic Any Experience With Diffgram Processing?

‏2011-12-14T15:43:09Z |
I'm working with a .net Web Service API that returns some results as Diffgrams. Unfortunately, this means when I map an output from Cast Iron Studio the diffgram portion in the "body" is an "any{}" element with an "occurrence" child. I get the sense that I should substitute the any node with something, but I'm new at Cast Iron and I haven't been able to make sense of how that would work.

To give some context around what the service returns, here is a sample:

<GetSalesRepsResponse xmlns="">
<xs:schema id="NewDataSet" xmlns="" xmlns:xs="" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
<xs:element name="NewDataSet" msdata:IsDataSet="true" msdata:UseCurrentLocale="true">
<xs:choice minOccurs="0" maxOccurs="unbounded">
<xs:element name="Table">
<xs:element name="ResourceID" msdata:DataType="System.Guid, mscorlib, Version=, Culture=neutral, PublicKeyToken=b77a5c561934e089" type="xs:string" minOccurs="0"/>
<xs:element name="Name" type="xs:string" minOccurs="0"/>
<diffgr:diffgram xmlns:msdata="urn:schemas-microsoft-com:xml-msdata" xmlns:diffgr="urn:schemas-microsoft-com:xml-diffgram-v1">
<NewDataSet xmlns="">
<Table diffgr:id="Table1" msdata:rowOrder="0">
<Name>FirstName LastName</Name>

My current plan is to deep copy the results and parse it with XSLT, but I think there must be a better way. If anyone has any advice or experience with this, I'd appreciate the help. Thanks!
Updated on 2013-02-08T00:06:14Z at 2013-02-08T00:06:14Z by AnthonyinPortland
  • SystemAdmin
    1250 Posts

    Re: Any Experience With Diffgram Processing?

    ‏2012-10-23T03:15:36Z  in response to AnthonyinPortland
    Hi Anthony, did you find a solution for this? I got the same problem, and couldn't find a way to solve this.Are there any suggestions? Thanks
    • AnthonyinPortland
      7 Posts

      Re: Any Experience With Diffgram Processing?

      ‏2013-02-08T00:06:14Z  in response to SystemAdmin
      Was searching for something else and saw this...3 months late, but may help someone else.

      the only solution i came up with was XSLT - in my case I'm doing a simple xsl:template match="/" and xsl:copy-of select="//*:NewDataSet/Table" to return the table and go from there. I filter and profile the results for what I need.

      It's not elegant, but it works.

      <?xml version="1.0" encoding="UTF-8"?>
      <xsl:stylesheet version="2.0" xmlns:xsl="" xmlns:xs="" xmlns:fn="">
      <xsl:template match="/">
      <xsl:copy-of select="//*:NewDataSet/Table "/>