Skip to Content
Author's profile photo Juan Manuel

Testing a Service Consumer Proxy

In the previous chapter we have created a Service consumer proxy:

http://scn.sap.com/community/pi-and-soa-middleware/blog/2012/10/24/creating-a-service-consumer-proxy

In this section we will see how to test a proxy. To do this we can press the icon highlighted in the picture below (or pressing F8):


Imagen1.png

In the “Test Service Consumer” window, we choose the Logical Port that we previously created from SOAMANAGER transaction code:


Imagen2.png

Change to the XML editor, and modify the default values. You can also skip this and execute the request.


Imagen3.png


The response must display the calculation in XML mode.


Imagen4.png


Now if we want to consume the WS using ABAP, we have to enter to trx. SE80 and create a new report:


Imagen5.png


Drag and drop the proxy class ZTESTCO_ZWS_CALCULO and you’ll get a template to consume it as shown below:


Imagen6.png


Modify the template to call the WS.


Imagen7.png

Note: setting the logical port in EXPORTING parameters it’s not mandatory because when we created it from SOAMANAGER trx. we checked the “Logical Port is default” option.

Now we can execute it:

Imagen8.png


This is just a dummy report, but it’s enough to understand the basis about how to consume a WS.  🙂

Assigned Tags

      4 Comments
      You must be Logged on to comment or reply to a post.
      Author's profile photo Former Member
      Former Member

      Hello Juan,

      Thanks for this excellent piece of work,But when I am testing a pop up is appearing asking for user/pwd.Can you please help me as how to avoid this pop up.

      Regards

      Naveen

      Author's profile photo Narpreet Singh
      Narpreet Singh

      Hi Naveen,

      just go to the service which u r calling and maintain the icf node of by entering into the logon data . Maintain the user name , password , language and the client. Now click on tab error pages--> logon errors select system logon then conifgure it by maintaing the client inside and the class.

      Hope it will be helpful.

      Regards

      Narpreet

      Author's profile photo Damir Karimov
      Damir Karimov

      Thanks a lot! Very useful information!

      Author's profile photo Former Member
      Former Member

      Nice blog.

      But on your test , you are consuming the webservice from the same network right?

      How can you publish your webservice so it can be called from outside of your network?

      thanks