March 25

Integrate SAP and Job boards (By Consuming Web Services)

 

This blog covers following configuration steps performed to setup the interface between SAP and Job boards.

1. Create Consumer Proxy consuming the external web service
2. Create logical port for the consumer proxy class
3. Enabling HTTPS service
4. Installing SSL certificates
5. Changes made to services accessed by external candidates

1. Creation of Consumer Proxy consuming the external web service

Create Enterprise service in SE80
a. Create – > Enterprise Service

01

b. Service Consumer has to be selected as we are consuming the web services provided by job boards

02

c. Create Enterprise service using “External WSDL/Schema”

03

d. Choose Local file in next step. (During this step, Download the WSDL to local PC first, as shown in next screenshot)

04
e. Download WSDL to local PC
Open the Web service, Click the Service description -> View source -> Download to PC

05

06

f. Use the downloaded file in wizard

07

g. Select “JobsSoap” and proceed

08

h. Assign to package, Give prefix name

09

i. Consumer proxy class will be generated as shown in the below screenshot

10

2. Create logical port for the consumer proxy class created in above step

Open transaction SOAMANAGER11

Search for below consumer proxy

12

Logical port is already defined with name “EREC_POST_JOBS” which is used for posting jobs. Even in production, logical port with same name will be created.

13

a. Steps to create Logical port:
Click Create  WSDL Based Configuration

14

b. Give Port name

15

c. Upload WSDL information via file

16

d. Binding is by default soap12, proceed without changing

17

e. We don’t need to do anything in consumer security
f. HTTP Settings, maintain proxy details in below highlighted section and Finish

18

What is the need of Proxy User?
When we tried to trigger the web service, we have encountered below exception in the trace “Connect to Host XXXX Port XXXX error NIECONN_REFUSED“ which is because of restrictions on fire wall which has refused the communication to go out to web service.

3. Enabling HTTPS service
HTTPS service is setup in transaction SMICM

19

4. Installing SSL certificates
Enabled SSL Client Anonymous and installed certificate related to job board using transaction code STRUST

20

 

Note : Why did we make Step 3 and Step 4 configurations
A Logical Port was configured to use HTTPS protocol. Executing the call fails with
1. “ICF Error when creating object – Argument not found” error
2. SRT Framework exception: Service Ping ERROR: Error when calling SOAP Runtime                 functions: SRT: Couldn’t create Object: (“ICF Error when creating HTTP client                           object by Config for URL …
3. Or a less informative ICM_HTTP_SSL_ERROR.

This error occurs, if the system is not properly configured for SSL, or the certificates haven’t been assigned to the correct PSE.

Solution:
First check if the SSL is setup in the system.

1. Make sure there is an active HTTPS port in transaction SMICM >> Go to >> Services
2. Check SAP Note 510007 and configure SAPCRYPTOLIB in the system.
3. The most common problems that could occur, after above settings have been done:
a. HTTPS protocol is used, but the authentication method is done with User /                                 Password data in HTTP Header (Basic) or SOAP Header (Usernametoken). In                               this case the Anonym PSE must be active in transaction STRUST. Go to                                         transaction STRUST and Create / Activate this PSE: SSL client Anonymous                                   (Identity: ANONYM)
4. If X.509 Certificates are used for authentication, the selected PSE must be active and              the certificates should be added to this PSE.
5. One typical error which could be seen in the ICM trace is: “the verification of the server’s certificate chain failed”. Check SAP Note 1094342 for details.

Now that all required configurations are maintained and consumer proxy has been generated, you are free to call the methods provided by the external web services and interact with it. In this scenario, external web service expects the job posting information in specific XML format. Once a valid XML file is provided, job gets posted onto the job board immediately.

For any kind of clarifications or queries, Please get in touch with me on msaptechblogs@gmail.com