Skip to main content

developerWorks >  SOA and Web services  >  Forums  >  IBM WebSphere DataPower SOA Appliance  >  developerWorks

Passing the output of a Transform binary action to a regular transform    Point your RSS reader here for a feed of the latest messages in this thread


     

 
 

My developerWorks
 Welcome, Guest
Sign in or register
Permlink Replies: 1 - Pages: 1 - Last Post: Nov 5, 2009 2:06 PM Last Post By: mmatamoros Threads: [ Previous | Next ]
DP_SOA_Member

Posts: 8
Registered: Jul 30, 2008 06:41:57 PM
Passing the output of a Transform binary action to a regular transform
Posted: Nov 04, 2009 01:18:15 PM
Click to report abuse...   Click to reply to this thread Reply
I have a question related to datapower XI 50 programming. (I'm pretty new to DP)

I have a binary tranform action for trasforming xml data to cobol copy book.

I want to have the output of the binary tranform action,(ie. the cobol copybook) to be embedded as the payload of an xml message in the succeding tranform action.
Input of the tranform action is:
=================================
<m:MemberService_GetMemberDetail_Request> <m:memberId>YTH248M54634</m:memberId> <m:name> <m:first>CATHERINE</m:first> <m:last>GROVE</m:last> </m:name> <m:dateOfBirth>1951-12-30</m:dateOfBirth> <m:gender>F</m:gender> <m:requestDate> <m:begin>2005-11-16</m:begin> <m:end>2005-11-16</m:end> </m:requestDate> <m:includePcp>Y</m:includePcp> <m:includeCoverageHistory>N</m:includeCoverageHistory> <m:includeAddress>Y</m:includeAddress> <m:includeSubscriberInfo>Y</m:includeSubscriberInfo> <m:benefitRequest> <m:requestTypeCode>HIPAA_STC</m:requestTypeCode> <m:requestTypeValue>30</m:requestTypeValue> </m:benefitRequest> </m:MemberService_GetMemberDetail_Request>
Output of the binary tranform action is:
======================================
YTH248M54634 CATHERINE GROVE 1951-12-30F2005-11-162005-11-16YNYYHIPAA_STC 30

I want to generate a final out like this:
<root>
<header>
</header>
<body>
<!-- Note that the content of the body is the out put of the binary tranform action
YTH248M54634 CATHERINE GROVE 1951-12-30F2005-11-162005-11-16YNYYHIPAA_STC 30
</body>
</root>

So, I'm trying wrap up the cobol copy book data, inside an xml tag, so I can easily handle this xml data in the subsequent tranformation, which has appropriate xsl to do the job?
Any suggestion to handle this scenario?
mmatamoros

Posts: 21
Registered: Apr 14, 2009 10:21:20 AM
Re: Passing the output of a Transform binary action to a regular transform
Posted: Nov 05, 2009 02:06:37 PM   in response to: DP_SOA_Member in response to: DP_SOA_Member's post
Click to report abuse...   Click to reply to this thread Reply
What you should do is the following:

  • Put the output of the binary transformation into a context variable at the end of the binary transformation.
  • Create a rule where through a transform action you create the XML (the format done in XSL) where you use the context variable to set the body of the XML message

This should work out to your needs.


Point your RSS reader here for a feed of the latest messages in all forums