07-19-2016 11:17 AM
Hi All,
We have a requirement to generate a web service from RFC function module, The function module has importing parameter as deep structure with table types. The web service has been generated and working fine from soapUI. But we found that in WSDL a tag <item>..</item> for repeating table rows, which is not expecting from our client side.They have a request structure which is already using for another communication to Oracle system. Now they want to use same for SAP and are asking us same from SAP. We have removed the <item>..</item> tag manually from WSDL file. We found in testing the service from soapUI, the internal table is not filling with data(found it in FM debugging).
How to remove/bypass the <item>..</item> from web service.We have searched in SDN forums but no luck. Please help us if there is a way to get it done or any alternative solution. Any help much appreciated.
Below is the request:
<Acknowledgement>
<!--Zero or more repetitions:-->
<item>
<OriginalTransactionId>?</OriginalTransactionId>
<OrgId>?</OrgId>
<CustomerCode>?</CustomerCode>
<Data>?</Data>
<StatusCode>?</StatusCode>
<StatusDescription>?</StatusDescription>
</item>
</Acknowledgement>
Thanks in advance.
Raja.
07-19-2016 3:00 PM
In the generated web service definition, there is an "exposed" checkbox. Untick it, that's all.
07-19-2016 4:04 PM
Thanks for immediate response.
We have unchecked the exposed checkbox and tested. If we unchecked that we are not getting elements in the service request.
we are getting request
<soapenv:Body>
<urn:ZsanmWoAck/>
</soapenv:Body>
Instead of
<urn:ZsanmWoAck>
<!--Optional:-->
<Acknowledgements>
<MessageId>?</MessageId>
<TransactionId>?</TransactionId>
<DateTime>?</DateTime>
<AckType>?</AckType>
<Acknowledgement>
<!--Zero or more repetitions:-->
<item>
<OriginalTransactionId>?</OriginalTransactionId>
<OrgId>?</OrgId>
<CustomerCode>?</CustomerCode>
<Data>?</Data>
<StatusCode>?</StatusCode>
<StatusDescription>?</StatusDescription>
</item>
</Acknowledgement>
</Acknowledgements>
</urn:ZsanmWoAck>
Raja.
07-19-2016 4:07 PM
You did it for Acknowledgements (with a S). Do it only for the Acknoledgement (without S) node.
07-19-2016 5:06 PM
For Acknowledgement the check box is not editable.
below is screen shot of that
Please advise.
Thanks,
Raja.
07-19-2016 6:32 PM
My bad, it surely works only at the first level (whole parameter).
You have to go to the "types" tab, copy the type Acknoledgments to Acknowledgements2, and delete the field Acknowledgement. Then come back to the "external view" tab, and for Acknowledgements, select Acknowledgements2 as the "Param type" .
07-19-2016 7:18 PM
Hi Sandra Rossi,
Thanks for your help.
I think my question was not clear. I have to expose all the elements under Acknowledgments(row type) and Acknowledgment (table type which is used to repeated rows) without <item> ...</item>
Like Below structure:
<urn:ZsanmWoAck>
<!--Optional:-->
<Acknowledgements>
<MessageId>?</MessageId>
<TransactionId>?</TransactionId>
<DateTime>?</DateTime>
<AckType>?</AckType>
<Acknowledgement>
<OriginalTransactionId>?</OriginalTransactionId>
<OrgId>?</OrgId>
<CustomerCode>?</CustomerCode>
<Data>?</Data>
<StatusCode>?</StatusCode>
<StatusDescription>?</StatusDescription>
</Acknowledgement>
</Acknowledgements>
</urn:ZsanmWoAck>
Please help me to get it.
Thanks,
Raja
07-19-2016 7:32 PM
But Acknowledgment is an internal table, so it may have several lines, so it's normal that there's an extra tag for every line (even if you have only one line). What you want is too specific. If you want to pass only one line as if it was a structure, then I don't see an other solution than changing the parameter type of the function module to a structure instead of an internal table (and change the code accordingly), and regenerate the service definition.
07-19-2016 8:16 PM
Yes, in SAP point of view there will be a line type(extra tag <item>) for every line. But our service will be called from external system (non sap system) and there is a request structure which is already in use with another system(Acknowledgment is using as table). they have asked us to build service in SAP based on their request structure. But in SAP we are getting the extra tag <item> which is not in their system.
Please suggest.
07-19-2016 9:33 PM
Implement a real proxy with the service interface definition you need, call the Function Module inside and implement a mapping.
07-19-2016 10:26 PM
Can we create a service definition proxy in ECC6.0? if yes, can you please guide me, how to create proxy with service definition
We are not using PI system.
07-29-2020 5:02 AM
Hi, Did you find any solution to this? If yes, can help to provide, since I am facing similar issue. Thanks!
07-15-2021 11:43 AM
Hello, we have exactly the same issue...is there any work around to solve this?
07-15-2021 3:05 PM
I'm not that familiar with all this, but my thought would go to making a simple transformation for just the table, so you'll be able to get that in an XML string and than manipulate the string. Of course also change the field in the service definition to a string.
No idea if this would work but that's where my thoughts go.