I have a mashup created in wires. It returns the data I expect, however it would be useful to have a friendlier set of names in any mashlet produced. I was hoping to simply wrap this mashup in a new mashup and move the data to a new xml document as the documentation suggests, but this approach is not delivering the data I expect - though i am getting xml tree I expect. The emml is included below:
<mashup xmlns="http://www.jackbe.com/2008-03-01/EMMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:macro="http://www.jackbe.com/2008-03-01/EMMLMacro" name="WatchListGuidInWrappedNameTest" xsi:schemaLocation="http://www.jackbe.com/2008-03-01/EMMLSchema../src/schemas/EMMLSpec.xsd">
<operation name="runMashup">
<variable name="limitRecords" type="number" default="-2" />
<presto-meta name="prestoMeta_createdBy" />
<presto-meta name="prestoMeta_state" />
<presto-meta name="prestoMeta_customProperties" />
<presto-meta name="prestoMeta_sequenceNumber" />
<presto-meta name="prestoMeta_WiresGraphXML" />
<output name="result" type="document" service="WatchListGuidIn" />
<variable name="inputparam_1_4" type="string" default="e86a8618-05e4-4901-b0f9-a32686a2c975" />
<invoke name="invoke_1" header="" service="WatchListGuidIn" operation="runMashup" serviceVersion="" outputvariable="result2" onerror="continue" inputvariables="inputparam_1_4" />
<constructor outputvariable="result">
<result>
<Name>{$result2/tblDescription_tblUserImage_tblWatchList/tblDescription_tblUserImage_tblDescription_SubjName}</Name>
<Address>{$result2/tblDescription_tblUserImage_tblWatchList/tblDescription_tblUserImage_tblDescription_SubjAddress}</Address>
</result>
</constructor>
</operation>
</mashup
- Login or register to post comments
- Email this page

It would help if you could
It would help if you could show us what the result from your WatchListGuidIn mashup looks like and what you are expecting as output.
<!--Session data-->
<!--Session data-->
Sara, technical writer/jackbe
(No subject)
Hi, as Sara said it's a bit
Hi,
as Sara said it's a bit hard to see what the problem is without knowing for sure the output from the <invoke> and what you are actually getting at the moment, but I'm taking a stab in the dark here that the problem is the way you are accessing the node content in your <constructor> statement. Here's a mocked up test I did using your emml. It produces what I think it should if you modify the constructor to include the ..../text() when building your Name and Address nodes. Try it to see if this works or post back examples of the output/expected results. Cheers, Innes
<mashup xmlns="http://www.jackbe.com/2008-03-01/EMMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:macro="http://www.jackbe.com/2008-03-01/EMMLMacro" name="WatchListGuidInWrappedNameTest" xsi:schemaLocation="http://www.jackbe.com/2008-03-01/EMMLSchema../src/schemas/EMMLSpec.xsd"> <operation name="runMashup"> <variable name="limitRecords" type="number" default="-2" /> <presto-meta name="prestoMeta_createdBy" /> <presto-meta name="prestoMeta_state" /> <presto-meta name="prestoMeta_customProperties" /> <presto-meta name="prestoMeta_sequenceNumber" /> <presto-meta name="prestoMeta_WiresGraphXML" /> <output name="result" type="document" service="WatchListGuidIn" /> <variable name="inputparam_1_4" type="string" default="e86a8618-05e4-4901-b0f9-a32686a2c975" /> <variables> <!-- mock up output from the invoke --> <variable name="result2" type="document"> <tblDescription_tblUserImage_tblWatchList> <tblDescription_tblUserImage_tblDescription_SubjName>John Smith</tblDescription_tblUserImage_tblDescription_SubjName> <tblDescription_tblUserImage_tblDescription_SubjAddress>24 Somewhere Street, A Little Town, InABigCountry</tblDescription_tblUserImage_tblDescription_SubjAddress> </tblDescription_tblUserImage_tblWatchList> </variable> </variables> <!-- Comment this out for the purposes of testing --> <!-- <invoke name="invoke_1" header="" service="WatchListGuidIn"--> <!-- operation="runMashup" serviceVersion="" outputvariable="result2"--> <!-- onerror="continue" inputvariables="inputparam_1_4" />--> <constructor outputvariable="result"> <result> <Name>{$result2/tblDescription_tblUserImage_tblWatchList/tblDescription_tblUserImage_tblDescription_SubjName/text()}</Name> <Address>{$result2/tblDescription_tblUserImage_tblWatchList/tblDescription_tblUserImage_tblDescription_SubjAddress/text()}</Address> </result> </constructor> </operation> </mashup> and it produces: <?xml version="1.0" encoding="UTF-8"?><result>
<Name>John Smith</Name>
<Address>24 Somewhere Street, A Little Town, InABigCountry</Address>
</result>