Skip to content

XAware Community

Get the Flash Player to see this player.
Flash Image Rotator Module by Joomlashack.
XAware 5.6
Need Help
Webinars and Events
Advanced Tutorials
Webinars and Events

You are here: Home arrow Forums
XAware Community Forums
Welcome, Guest
Please Login or Register.    Lost Password?
Re:Xml mapping with input of 2 xml's (1 viewing) (1) Guest
Go to bottom Post Reply Favoured: 0
TOPIC: Re:Xml mapping with input of 2 xml's
#5001
prichards (Admin)
Admin
Posts: 319
User Offline Click here to see the profile of this user
Re:Xml mapping with input of 2 xml's 10 Years, 11 Months ago Karma: 18  
There are many ways that you can manage multiple XML inputs depending on what you are trying to accomplish, and your logic for merging the XML into a single result. For your simple example below, I would use a File BizComponent Read XML, to read from each document and copy the XML into the BizDoc (perhaps wrapped by another element) so that you end up with XML that looks something like:

<files>
<abc>
<a/>
<b/>
<c/>
</abc>
<xyz>
<x/>
<y/>
<z/>
</xyz>
</files>

(Alternatively, you could pass one as Input XML and read the other file.)

Then you can pass the entire <files/> element into an XML mapper, and map the fields as desired. You can also map the fields directly in the BizDoc (for the simple example you posted) and use xa:response to return the <pqr/> result, or use the File BizComp Write XML, to save the results to a file.

You cannot simply pass two XML inputs into a single BizDoc, since a BizDoc receives only one Input XML area, which is passed through whichever connector you are using. You would have to combine the XML into a single input before calling XAware. (Just as you can't make multiple requests in a single HTTP or SOAP call, but you can combine fields in the data passed in the HTTP request or in the SOAP body.)

Please look at the Designer Help for File BizComponent, the Designer Examples, and look at File -> New -> File From Template -> File BizComponent to write/read XML to create File BizComps for XML.

You can also review the xa:href attribute, which allows you to retrieve XML from a file or URL. There are numerous other design options, depending on your specific requirements, that may be more complex than you need. For example, you can serialize the XML (into strings) and invoke the BizDoc with the XML strings as parameters, convert to XML using xa:text_to_xml in the BizDoc, and then map the fields.
 
Report to moderator   Logged Logged  
  The administrator has disabled public write access.
      Topics Author Date
    thread link
Xml mapping with input of 2 xml's
ankit.vernekar 2009/07/07 02:55
    thread link
thread linkthread link Re:Xml mapping with input of 2 xml's
prichards 2009/07/07 11:59
Go to top Post Reply
Powered by FireBoardget the latest posts directly to your desktop

Community Login

Get the Flash Player to see this player.
Flash Image Rotator Module by Joomlashack.
Commercial
Free Training
QuickStart Packages
Image 4 Title
Image 5 Title

Visit XAware.com