Application Development Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 

Bypass/remove tag in ABAP based Web Service

0 Kudos

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.

13 REPLIES 13

Sandra_Rossi
Active Contributor

In the generated web service definition, there is an "exposed" checkbox. Untick it, that's all.

0 Kudos

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.

0 Kudos

You did it for Acknowledgements (with a S). Do it only for the Acknoledgement (without S) node.

0 Kudos

For Acknowledgement the check box is not editable.

below is screen shot of that

Please advise.

Thanks,

Raja.

0 Kudos

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" .

0 Kudos

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

0 Kudos

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.

0 Kudos

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.

0 Kudos

Implement a real proxy with the service interface definition you need, call the Function Module inside and implement a mapping.

0 Kudos

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.

former_member629447
Participant
0 Kudos

Hi, Did you find any solution to this? If yes, can help to provide, since I am facing similar issue. Thanks!

rafamarfer
Explorer
0 Kudos

Hello, we have exactly the same issue...is there any work around to solve this?

ArthurParisius
Contributor
0 Kudos

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.