Topic
  • 2 replies
  • Latest Post - ‏2012-11-28T23:07:17Z by Sri_XI50
Sri_XI50
Sri_XI50
23 Posts

Pinned topic Recognizing the input format ( Binary Vs. XML )

‏2012-11-27T21:12:34Z |
Hi,

I have two questions on recognizing the formats.... Can someone help ?

1) I am thinking of a case where I sent a request to server and got some exception, it might be XML format or may be HTML or non-xml. How can we detect the format and proceed ?

2) When we want datapower to reject a transaction we can use either Reject or XReject and DP will throw soap fault back. Assume if I am working with CICS in the front end, do I have any way to control the error and return it in Binary format ?

Thanks.
Updated on 2012-11-28T23:07:17Z at 2012-11-28T23:07:17Z by Sri_XI50
  • swlinn
    swlinn
    1348 Posts

    Re: Recognizing the input format ( Binary Vs. XML )

    ‏2012-11-28T19:14:12Z  
    1) You can do a binary transformation as your first action to do a simple wrapping of the message content in an xml structure. Then you would do a dp:parse of the value-of that node, and if you get a nodeset, XML, otherwise, non-XML. I'm pretty sure Hermann has some examples if not in this forum on his blog.

    2) You can return a non-xml format for sure. Again, Hermann most probably has some good examples.

    Regards,
    Steve
  • Sri_XI50
    Sri_XI50
    23 Posts

    Re: Recognizing the input format ( Binary Vs. XML )

    ‏2012-11-28T23:07:17Z  
    • swlinn
    • ‏2012-11-28T19:14:12Z
    1) You can do a binary transformation as your first action to do a simple wrapping of the message content in an xml structure. Then you would do a dp:parse of the value-of that node, and if you get a nodeset, XML, otherwise, non-XML. I'm pretty sure Hermann has some examples if not in this forum on his blog.

    2) You can return a non-xml format for sure. Again, Hermann most probably has some good examples.

    Regards,
    Steve
    Hi Steve,

    Thank you so much. My first question is answered.

    I tried to search on this forum for these questions before posting, but couldn't find anything. may be my search string is not good. However below is my second question

    2) When we want datapower to reject a transaction we can use either Reject or XReject and DP will throw soap fault back. Assume if I am working with CICS in the front end, do I have any way to control the error ( Extension to earlier question: like adding soap fault code and someother information etc. in soap fault ) or return error in Binary format ?

    Thanks.