cancel
Showing results for 
Search instead for 
Did you mean: 

How to call java method via XI from ABAP code on SAP R/3?

Former Member
0 Kudos

Hi!!!

I prepared the following synchronous scenario and it works fine:

[java stand-alone app] <> [SOAP adapter]<>[SAP XI]<>[RFC adapter]<>[SAP R/3]

I could replace a SOAP adapter with java proxy, of course.

Now I would like to prepare a new scenario in another direction (sync or async):

[SAP R/3]>[RFC adapter]>[SAP XI]>[SOAP adapter]>[java Web Service on Apache Axis, for example]

I'm not sure how to call/execute/run/start this scenario from ABAP code on SAP R/3?

Regards,

Mariusz

Accepted Solutions (0)

Answers (2)

Answers (2)

Former Member
0 Kudos

Hello Mario,

All you need to do create an RFC which matches the interface(outbound) in XI and RFC destination for XI box and invoke the function module in background task in R/3 for XI RFC destination.

In XI map the outbound interface to java inbound interface. In integration directory assosciate the inbound interface to java stand alone system.

Best Regards

Rajan Kidambi.

Former Member
0 Kudos

You can do this two ways.

1. Define a Inbound interface in IR and generate inbound proxy for the interface. Implement the <interface>_PortTypeIMPL class with method in it for the interface <== this is where you need to impliment or invoke your java method.

2. Deploy this in any J2EE server.

3. Before Deploying in J2EE server make sure you impliment JPR in the J2EE server(Refer OSS Note588435)

4. Specify the enpoint for the scenarion in ID as http://<J2EE Host>:50000/MessagingSystem

5. Configure J2EE server for the bean deployed(follow steps in OSS Note653833)

Alternatively you can define the java method as webservise and use outbound soap adapter. fill in the section 2 of soap adapter [(ToWS): XMB clients to WS ].

Make XMBWS.TargetURL point to the webservice created. set listener port and path using params XMBWS.XMBPort, XMBWS.XMBPath.

Refer the enpoint for the same in ID to refer XMBPORT & XMBPath.

Best regards,

Rajan Kedambi

Best Regards,

Rajan Kidambi.

Former Member
0 Kudos

Hi!!!

Thank you for your answer!

I'm not sure if you understood me well. As I understood your answer you were trying to explain me how to generate proxy, right?

So I'll try to be more specific.

As I said I can send messages to SAP XI from a stand-alone java applications using different solutions:

a) SOAP adapter

b) java proxy

c) plain HTTP

I can also use a RFC adapter to invoke a function module from SAP R/3.

That's why my first scenario: Java app --> XI --> SAP R/3 is not a problem for me.

Now I would like to test an another scenario: SAP R/3 --> XI --> Java appl (it can be a web service).

So my question is: how to start a such scenario from an ABAP code that runs on SAP R/3 system? I suppose it's very easy, but I know how to do this. I'm still a beginner...

Regards,

Mariusz