In this blog I will create a web service which is exposed via Genil model PROD in CRM web client UI and consume it via a simple ABAP program.

Create web service in CRM Webclient UI

1. log on CRM Web ui with business role SERVICEPRO, work center Service Operation, Create a new Web service:

Choose Material as Business Object, choose Product/Individual Product as Component, Product as Root object.

Mark check box Read, Create and Change.

/wp-content/uploads/2014/02/clipboard1_377708.png

Click the new button to also create a webservice operation which is implemented via the query object of Genil model

/wp-content/uploads/2014/02/clipboard2_377709.png

Click new button:

/wp-content/uploads/2014/02/clipboard3_377710.png

2. in step2 of the creation wizard, simply click select all to ensure all attributes in Genil model PROD are involved in the web service.

/wp-content/uploads/2014/02/clipboard4_377735.png

click Confirm Selection to continue.

/wp-content/uploads/2014/02/clipboard5_377736.png

3. in step3, it is allowed to specify certain fields as read only.

/wp-content/uploads/2014/02/clipboard6_377737.png

4. In final step of wizard, we can specify the security profile of created web service. The differences of the two can be found in the chapter when we talk about how to consume the web service. In this blog I choose BASIC as security profile.

/wp-content/uploads/2014/02/clipboard7_377738.png

Click Activate button and then click Productive button in toolbar. Now we have finished the creation and the webservice PROD_WS is ready to be consumed.

/wp-content/uploads/2014/02/clipboard8_377739.png

Create new binding for Service Definition PROD_WS

use tcode SOAMANAGER, click Web Service Configuration.

/wp-content/uploads/2014/02/clipboard9_377740.png


Search by object name = PROD_WS:

/wp-content/uploads/2014/02/clipboard9_377740.png

Select search result and click Create Service button:

/wp-content/uploads/2014/02/clipboard10_377742.png

Specify Service name and Binding name:

/wp-content/uploads/2014/02/clipboard11_377743.png

Select SSL as Transport Level Security

/wp-content/uploads/2014/02/clipboard12_377744.png

If you select SECURE as security profile in web service creation step, the Authentication Level will be Strong instead of Basic, and the checkbox “User ID/Password” will be disabled, which means in that case, only X.509 SSL Client Certificate or Single Sign On are allowed.

/wp-content/uploads/2014/02/clipboard13_377745.png

In this blog, since both the creation of web service and service consumption are done in AG3, I mark “Make Local Call” as Local System Call.

/wp-content/uploads/2014/02/clipboard14_377746.png

Click Finish button, click the icon “Open Binding WSDL Generation”,

/wp-content/uploads/2014/02/clipboard15_377747.png

write down the WSDL link:

/wp-content/uploads/2014/02/clipboard16_377748.png

Create the service consumer proxy in ABAP backend

1. tcode SE80, choose tab “Enterprise Services Browser”, right click on Objects, choose “Create new Object”,

/wp-content/uploads/2014/02/clipboard17_377749.png

Choose Service Consumer and click continue:

/wp-content/uploads/2014/02/clipboard18_377750.png

/wp-content/uploads/2014/02/clipboard19_377751.png

/wp-content/uploads/2014/02/clipboard20_377752.png

Specify a prefix:

/wp-content/uploads/2014/02/clipboard21_377753.png

Lots of proxy objects for runtime usage will be created:

/wp-content/uploads/2014/02/clipboard22_377754.png

Finally the ABAP consumer proxy class ZZCO_PROD_WS has been generated, which would be used in the ABAP program to consume the web service.

/wp-content/uploads/2014/02/clipboard23_377755.png

Now the consumer proxy class is ready for use. We can find all its available methods and signature in class builder.

CLASS.png

In part 2 of this blog, we will discuss how to use this proxy class to consume web service in ABAP program.

To report this post you need to login first.

1 Comment

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

Leave a Reply