Kirstan, I'm building some examples to demonstrate passing in-memory data ... using an updated 5.1 build (#501) and using the wizard defaults to auto-generate the layout, but I'm getting a slightly wonky result.
Here is the
BizComponent:
<?
XML version="1.0" encoding="UTF-8"?>
<FILETEST xmlns:xa="http://xaware.org/xas/ns1" xa:bizcomptype="COPYBOOK" xa:response_type="process">
<xa:description>This BizComponent processes an in-memory structure passed in as a message instead of pointing to a file.</xa:description>
<xa:input>
<xa:param xa:name="data" xa:datatype="string" xa:default="CONTACT001NAME11NAMEXXCONTACT002NAME22NAMEYY0000000000NAME33NAMEZZ02/22/02" xa:description="Data to process" xa:required="yes" />
</xa:input>
<xa:request xa:request_type="text2xml" xa:record_source="%data%" xa:format="fixed_length" xa:source_type="message">
<xa:return />
</xa:request>
<xa:record_layout xa:record_start="0" xa:record_length="74">
<CONTACT xa:occurs="3">
<ID xa:start="0" xa:field_length="10" xa:pic_value="X(10)" />
<NAME xa:start="10" xa:field_length="10" xa:pic_value="X(10)" />
<STATE xa:start="20" xa:field_length="2" xa:pic_value="X(2)" />
</CONTACT>
<DATE xa:start="66" xa:field_length="8" xa:pic_value="X(8)" />
</xa:record_layout>
<xa:response>
<process>
<contact>
<ID>%ID%</ID>
<Name>%NAME%</Name>
<State>%STATE%</State>
</contact>
<date>%DATE%</date>
</process>
</xa:response>
Here is the result:
<Document>
<process>
<contact>
<ID>%ID%</ID>
<Name>%NAME%</Name>
<State>%STATE%</State>
</contact>
<date>02/22/02</date>
</process>
</Document>
My question is this: is data passed in by message like this assumed to be a single data set, i.e., is the the xa:occurs attribute valid in this type of scenario?
Also, since I auto-generated the BizComponent, then added the xa:source_type manually, shouldn't this example return substituted values, versus the unsubstituted ones it is returning now?
Virginia