Quantcast
Channel: SCN : Blog List - Customer Relationship Management (SAP CRM)
Viewing all articles
Browse latest Browse all 229

Step by Step to create web service in CRM UI and consume it in ABAP- Part1

$
0
0


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.

clipboard1.png

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

clipboard2.png

Click new button:

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

clipboard4.png

click Confirm Selection to continue.

clipboard5.png

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

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

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

clipboard8.png

Create new binding for Service Definition PROD_WS

 

use tcode SOAMANAGER, click Web Service Configuration.

clipboard9.png


Search by object name = PROD_WS:

clipboard9.png

Select search result and click Create Service button:

clipboard10.png

Specify Service name and Binding name:

clipboard11.png

Select SSL as Transport Level Security

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

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

clipboard14.png

Click Finish button, click the icon "Open Binding WSDL Generation",

clipboard15.png

write down the WSDL link:

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

clipboard17.png

Choose Service Consumer and click continue:

clipboard18.png

clipboard19.png

clipboard20.png

Specify a prefix:

clipboard21.png

Lots of proxy objects for runtime usage will be created:

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

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


Viewing all articles
Browse latest Browse all 229

Trending Articles