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.
Click the new button to also create a webservice operation which is implemented via the query object of Genil model
Click new button:
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.
click Confirm Selection to continue.
3. in step3, it is allowed to specify certain fields as read only.
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.
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.
Create new binding for Service Definition PROD_WS
use tcode SOAMANAGER, click Web Service Configuration.
Search by object name = PROD_WS:
Select search result and click Create Service button:
Specify Service name and Binding name:
Select SSL as Transport Level Security
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.
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.
Click Finish button, click the icon “Open Binding WSDL Generation”,
write down the WSDL link:
Create the service consumer proxy in ABAP backend
1. tcode SE80, choose tab “Enterprise Services Browser”, right click on Objects, choose “Create new Object”,
Choose Service Consumer and click continue:
Specify a prefix:
Lots of proxy objects for runtime usage will be created:
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.
Now the consumer proxy class is ready for use. We can find all its available methods and signature in class builder.
In part 2 of this blog, we will discuss how to use this proxy class to consume web service in ABAP program.