Skip to Content

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

To report this post you need to login first.

4 Comments

You must be Logged on to comment or reply to a post.

  1. Naveen Tripathi

    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

    (0) 
    1. 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

      (0) 
  2. juan lee

    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

    (0) 

Leave a Reply