Service with inputs from another service

vtsays
User offline. Last seen 2 years 7 weeks ago. Offline
Joined: 03/31/2009
Points: 10

A Service with inputs from another service is not working in my case.

Individually they work fine and using the green icon I am able to see the data both by

- Sending input parameters from a input label

- OR by directly setting the input parameters on the service

But when the 2nd service gets its inputs from the 1st service output, the 2nd service does not produce any result.

0
Your rating: None
smitchell
smitchell's picture
User offline. Last seen 2 weeks 5 days ago. Offline
Joined: 08/29/2008
Points: 34

Can you use the View EMML menu option in Wires (from More menu) and copy paste the EMML for your mashup? It would help to figure out what the problem may be.

<!--Session data-->

 

Sara, technical writer/jackbe

 

vtsays
User offline. Last seen 2 years 7 weeks ago. Offline
Joined: 03/31/2009
Points: 10

Below is the EMML, (I have attached as a separate file so that this is accessible and not interfering with viewing comments - Sara).

smitchell
smitchell's picture
User offline. Last seen 2 weeks 5 days ago. Offline
Joined: 08/29/2008
Points: 34

Thanks for posting the code. We are working through this to see what the problem is...so please bear with us.

<!--Session data-->

 

Sara, technical writer/jackbe

 

nzblue_fish
nzblue_fish's picture
User offline. Last seen 8 weeks 3 days ago. Offline
Joined: 09/30/2009
Points: 1195

Hi,

Without having all the detail it's a bit hard to debug the problem for certain, but I'm pretty certain that your issue is in the second constructor and that it's not formed correctly for the expected input on your second invoke.

Firstly, I noticed that there are no curly braces around the node paths in that constructor (constructor_30_out) so you won't get the reference resolved to the nodes you want.

The other thing I think you find will be wrong is that even if you put in the curly braces, your path won't return the text nodes for your PROG_ID and LANG_ID references. The way your path references are constructed, you'll get the full nodes themselves being resolved which means you'll end up with, for example, something like;

<tem:ProgID><PROG_ID>somevalue</PROG_ID></tem:ProgID>

when what I think you want is:

<tem:ProgID>somevalue</tem:ProgID>

So what you also need is to add at the end of your node path is /text() to retrieve just the text nodes.

Here's an example script that shows how the difference would be:

<mashup xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
    xsi:schemaLocation="http://www.jackbe.com/2008-03-01/EMMLSchema/ ../src/schemas/EMMLSpec.xsd"
    xmlns="http://www.jackbe.com/2008-03-01/EMMLSchema" xmlns:macro="http://www.jackbe.com/2008-03-01/EMMLMacro"
    name="test19">
    <operation name="run_test19">
        <output name="testResult" type="document" />
        <variables>
            <variable name="invoke_1_out" type="document">
                <WSGetIIONUserProfileResponse>
                    <WSGetIIONUserProfileResult>
                        <NewDataSet>
                            <Table>
                                <PROG_ID>TESTPROG123</PROG_ID>
                                <LANG_ID>EN</LANG_ID>
                            </Table>
                        </NewDataSet>
                    </WSGetIIONUserProfileResult>
                </WSGetIIONUserProfileResponse>
            </variable>
            <variable name="constructor_30_out" type="document" />
        </variables>

        <constructor outputvariable="constructor_30_out">
            <tem:WSGetSalesTypes xmlns:tem="http://tempuri.org/">
                <tem:ProgID>
                    {$invoke_1_out/*:WSGetIIONUserProfileResponse/*:WSGetIIONUserProfileResult/*:NewDataSet/*:Table/*:PROG_ID}
                </tem:ProgID>
                <tem:LangID>
                    {$invoke_1_out/*:WSGetIIONUserProfileResponse/*:WSGetIIONUserProfileResult/*:NewDataSet/*:Table/*:LANG_ID}
                </tem:LangID>
            </tem:WSGetSalesTypes>
        </constructor>

        <display message="&#10;&#13;constructor_30_(1)" variable="constructor_30_out" />

        <constructor outputvariable="constructor_30_out">
            <tem:WSGetSalesTypes xmlns:tem="http://tempuri.org/">
                <tem:ProgID>
                    {$invoke_1_out/*:WSGetIIONUserProfileResponse/*:WSGetIIONUserProfileResult/*:NewDataSet/*:Table/*:PROG_ID/text()}
                </tem:ProgID>
                <tem:LangID>
                    {$invoke_1_out/*:WSGetIIONUserProfileResponse/*:WSGetIIONUserProfileResult/*:NewDataSet/*:Table/*:LANG_ID/text()}
                </tem:LangID>
            </tem:WSGetSalesTypes>
        </constructor>

        <display message="&#10;&#13;constructor_30_(2)" variable="constructor_30_out" />

    </operation>

</mashup>

and the output that you'd get from this if you run it is;

constructor_30_(1)    <?xml version="1.0" encoding="UTF-8"?>
<tem:WSGetSalesTypes xmlns:tem="http://tempuri.org/">
   <tem:ProgID>
      <PROG_ID>TESTPROG123</PROG_ID>
   </tem:ProgID>
   <tem:LangID>
      <LANG_ID>EN</LANG_ID>
   </tem:LangID>
</tem:WSGetSalesTypes>

constructor_30_(2)    <?xml version="1.0" encoding="UTF-8"?>
<tem:WSGetSalesTypes xmlns:tem="http://tempuri.org/">
   <tem:ProgID>TESTPROG123</tem:ProgID>
   <tem:LangID>EN</tem:LangID>
</tem:WSGetSalesTypes>
Deepak Alur
Deepak Alur's picture
User offline. Last seen 1 week 3 days ago. Offline
Joined: 09/09/2008
Points: 565

Innes,

I am afraid you have hit a bug. We are going to fix it in the nex version.

Mash On!
- deepak alur | vp product + engineering at jackbe  | follow me