cancel
Showing results for 
Search instead for 
Did you mean: 

want to create IDoc to Webservice Scenario

Former Member
0 Kudos

Hi All,

I wan to do Idoc to Web Service Scenario, I have already done Idoc to File Scenario and I have mapped the file of both end in ESR and I am done with Configuration in Integration Directory.

Now If I want to convert it to IDoc to Web Service Scenario, what all steps need to be done. and also want to know that How we can access and Send the files from Web Service to PI 7.1. As such web service is not available need to create the same also.

Can anyone provide How to guide on this scenario.

Regards,

Nitin Patil

Edited by: Nitin Patil on Dec 19, 2008 2:44 PM

Accepted Solutions (0)

Answers (5)

Answers (5)

Former Member
0 Kudos

Hey,

as you have familiar with idoc to file, the idoc to webservice scenario is not different.

You need to do the ALE settings on the R\3 side. import the Idoc in XI.

Now for mapping purpose you need the source and the target structure.

In case of webservice you need to import the WSLD (unlike the file in which you wold have created the data type and message type)

In order to import the WSLD, you need to do following things.

Ou require NWDS and the following settings needs to be done

Deployement of Web Services:-

Step 1)

Goto Windows->Open Perspective->J2EE development.

Step 2)

Goto File->new->Ejb module(give project name).

Step 3)

Right Click on the <project name> eg. work_ejb select new->Ejb.

Step 4)

Give an appropriate EJB name and default package (eg. com.xxx.yyy).

Also select stateless Ejb.

Click next then next and then next.

Step 5)

Add method with an appropriate name.

Mention the return type and also assign the required parameters.

Logic is written in the EJB module bean.

Step 6)

Right click on the <project name> and build.

Creates .jar

Step 7)

Goto File->new->Enterprise Application project(to create EAR)

Step 😎

Give project name, assign EJB and build.

Creates EAR.

Step 9)

Right Click on the EJB.

Goto new->Web services.

Specify name of the web service.

Specify EAR in the WEB service.

Step 10)

Build EAR.

Build Ejb.

Step 11)

Goto Windows->Prefrences->SAP j2EE engine.

Give the message server host name.

Step 12)

Right Click on EAR and deploy.

Step 13)

Goto-> http://<host name>:<port no.>/index.

Step 14)

Choose the web service name,test it and download it(default WSDL).

Step 15)

Import port(WSDL) in External definition of SAP PI.

After you import the wsld, you need to follow the same procedure as idoc to file.

regards,

Milan

Former Member
0 Kudos

Hi Nitin,

You need a receiver data structure. You can either create it or if you have a WSDL or xsd from the web service, you can use that for your target structure.

Create a MM and IM for IDOc to web service data mapping.

In Directory, create a new receiver SOAP communication channel and make the appropriate modification to the interface determincation and receiver determincation accordingly.

Have a look at shabz's blogs having a SOAP receiver :

[RFC -> XI -> WebService - A Complete Walkthrough (Part 1)|https://www.sdn.sap.com/irj/scn/weblogs?blog=/pub/wlg/3387] [original link is broken] [original link is broken] [original link is broken];

[RFC -> XI -> WebService - A Complete Walkthrough (Part 2)|https://www.sdn.sap.com/irj/scn/weblogs?blog=/pub/wlg/3408] [original link is broken] [original link is broken] [original link is broken];

Hope you got your question's answer.

Thanks

Pooja

Former Member
0 Kudos

The critical part is how to build your web service that accepts your IDOC XML as soap payload. Open your imported IDOC in Imported Objects, go to the tab WSDL, download the WSDL. Then try to find some tools to build web service interface based on the WSDL which is resulted from the IDOC. If that works, the rest is very simple. Just create a new soap communication channel and change the receiver agreement with the new CC. (If receiver system is different, then you need to change your receiver deter. interface deter. and receiver agreement).

Former Member
0 Kudos

Hi Jayson,

Can you please send detail steps do on this scenario.

Regards,

Nitin

SudhirT
Active Contributor
Former Member
0 Kudos

Nitin,

I don't know which too can build a web service interface based on pre-defined WSDL, I worked with on guy before, he was trying to archive it, but don't know if he got it or not.

Jayson

Former Member
0 Kudos

Hi Nitin,

Do you know the webservice you would like to call from XI ? If yes, then the webservice provider will either give you a WSDL or will provide you a structure in which provider can accept the message along with the web server URL/credentials details.

Check out the page 2 to page 8 to understand the Receiver SOAP configuration.

https://www.sdn.sap.com/irj/scn/go/portal/prtroot/docs/library/uuid/d23cbe11-0d01-0010-5287-873a2202...

Thanks,

Pooja

Former Member
0 Kudos

HI Nitin

You need to import the WSDL for consuming the webservice. Web service publisher will provide WSDL so that the client can consume it.

If you have a WSDL for use then import it and do normal scenario like you do for IDOC to file using receiver SOAP adapter. WSDL contains URL and SOAP action that you need to use in receiver adapter.

If you are not having any WSDL. then export the IDOC schema you have and download tools which can generate web service. Even your Windows system can publish using .Net extensions on IIS. (XML spy is also useful), Small java code with Apache server.. lots of options

Thanks

Gaurav

SudhirT
Active Contributor
0 Kudos

Changes would be like,you will have to create xsd for the target structure and import it into repository as external definition and use this for directly message type and rest configuration will be same for ESR.

For directory part replace file receiver channel by soap receiver channel.

thanks.

Former Member
0 Kudos

You can convert your scenario from IDOC to Webservices,But you webservice should have capability to accept the IDOC.You can search in SDN :WS as reciver:

Thanks

Prabhakar