on 09-16-2011 4:36 PM
Hi all,
I have developed a transaction which has an output parameter of type list, derived from the classic ERP BAPI Flight Get List
When I invoke the transaction as web service from a SOAP test tool I get a SOAP response like:
<MyTestOutput>
[[string:FRA], [string:TYO], [string:FCO], [string:KIX]]
</MyTestOutput>
So the output xml element is just one, containing the whole list.
I don't like this because the web service consumer must parse that element to get all the result items.
What I would like is a more xml-like output structure, such as:
<MyTestOutput>[string:FRA]</MyTestOutput>
<MyTestOutput>[string:TYO]</MyTestOutput>
<MyTestOutput>[string:FCO]</MyTestOutput>
<MyTestOutput>[string:KIX]</MyTestOutput>
Is there a simple way to achieve that?
In the help/guides I have studied there's no hint about how to do so.
Thanks, regards
Vincenzo
Hi Vincenzo,
I reopened your thread.
Instead of making your output parameter type of List, create an output parameter of type xml. If you look at most of the transactions available as downloads, you will see numerous examples of the types of structures the xml will accomodate. And you will not have to convert the outputs back to xml for further processing.
If you use a repeater to build your xml, you can accomplish the structure you desire. Alternatively, you can build an MII Document and the format will be
<Rowsets>
<Rowset>
<Row>
<your Fieldname>
data1
</your Fieldname>
</Row>
<Row>
<your Fieldname>
data2
</your Fieldname>
</Row>
<Row>
<your Fieldname>
data3
</your Fieldname>
</Row>
<Row>
<your Fieldname>
data4
</your Fieldname>
</Row>
</Rowset>
</Rowsets>
Regards,
Mike
Edited by: Michael Appleby on Sep 20, 2011 1:29 PM
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
13 | |
6 | |
3 | |
2 | |
1 | |
1 | |
1 | |
1 | |
1 | |
1 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.