cancel
Showing results for 
Search instead for 
Did you mean: 

Calling Webservice from SAP ME

Former Member
0 Kudos

Hi

I have searched the forum unfortunately I am not able to find an answer to my question.

Basically, I would like to call an external System from SAP ME via web service. I am thinking to use Collaboration Link for this purpose. For example COLLABORATION_SHOPORDER_RELEASE, I would like to trigger the Web service.

What should I do? Where Can I get the documentation about this (edit: I have found it in SDK) ? Do I need SDK for it (writting own code)?

This is not SAPMEINT or any ERP integration, it is just custom systtem integration. I appreciate any recomendation.

Thanks

Edited by: Seng Kiang Hoe on Jul 21, 2011 11:19 AM

-


what I have done are

1. Created a collaborative directive maintenance with just simple HTTP transport (synchronized set to true)

2. In the HTTP transport parameter I inserted the

url=http://xxx:50000/XMII/Runner?Transaction=EquipmentIntegration/trx_CreateOrder

3. In Collaboration Link, I linked COLLABORATION_SHOPORDER_RELEASE to the Directive maintenance I have created.

4. When I releases shop order Internal error occur

Any idea? The url above works. I just want to trigger the MII transaction without input.

Edited by: Seng Kiang Hoe on Jul 21, 2011 2:01 PM

Accepted Solutions (0)

Answers (1)

Answers (1)

Former Member
0 Kudos

Hey Seng

Yes you do need SDK to develop outbound web service calls from SAP ME. There is an Eclipse project Web Service Client (Outbound) for that purpose. You put the wsdl there to generate proxy classes. Then you use the proxy classes in the code, for example in the collaboration plugins.

As for calling xMII transaction I think the easiest way is to use SOAP UI.

Thanks

Ivan

Former Member
0 Kudos

Hi Ivan

Thank you for answering, but I think you misunderstood what I am looking for.

The plug-ins are already there in ME. For example Transport, I am using Simple HTTP Transport to call an Outbound HTTP. In this case this HTTP is an MII's transaction.

I want to call this WebService each time when I release shop therefore in COllaboration Link Maintenace I have the Trigger Action Collaboration_Shop_Order_Create link to the Collaboration I have created.

I do not want to call MII's transaction with SoapUI but with SAP ME.

Any Idea how I could do it? If you still do not understand what I mean, please let me know. I will try my best to explain it again.

The error that i got from trace

javax.ejb.EJBException: (Failed in component: sap.com/meear) Exception raised from invocation of public void com.sap.me.collaboration.CollaborationDirectiveMsgBean.onMessage(javax.jms.Message) method on bean instance com.sap.me.collaboration.CollaborationDirectiveMsgBean@17d8a085 for bean sap.com/meearxml|me.integration.collaboration.ejb-5.2.4.8-Base.jarxml|CollaborationDirectiveMsgBean in application sap.com/meear.; nested exception is: javax.ejb.TransactionRolledbackLocalException: (Failed in component: sap.com/meear) Exception raised from invocation of public com.sap.me.frame.Data com.sap.me.collaboration.CollaborationHandlerSOBean.processMessage(com.sap.me.collaboration.CollaborationMessage) throws com.sap.me.collaboration.CollaborationException method on bean instance com.sap.me.collaboration.CollaborationHandlerSOBean@4d4b93a7 for bean sap.com/meearxml|me.integration.collaboration.ejb-5.2.4.8-Base.jarxml|CollaborationHandlerSO in application sap.com/meear.; nested exception is: com.sap.me.collaboration.CollaborationConfigurationException: Invalid collaboration configuration: Invalid collaboration configuration: Plug-in not defined. When processing CollaborationMessage: site = 101841, action = COLLABORATION_SHOPORDER_MODIFIED messageID: ID:0067D2B600000072-00000000000185c268202:1314ed962dc:-7fee directive = TRANSPORT_ACTIVITY_BO[java.lang.String]=ActivityBO:SIMPLE HTTP TRANSP

ENABLE_SYNCH_PROCESSING[java.lang.String]=false

MODIFIED_DATE_TIME[com.visiprise.globalization.impl.IcuDateTime]=2011-07-22T11:46:33.000Z

HANDLE[java.lang.String]=CollaborationDirectiveBO:101841,TEST_SHOP_ORDER_RELEASE

TRANSPORT_PARAMETERS[java.lang.String]=url=http://server:50000/XMII/Runner?Transaction=EquipmentIntegration/Auftrag_Process/trx_CreateOrder&IllumLoginName=test&IllumLoginPassword=test&session=false

T_PLUG_INFO[com.sap.me.frame.Data]= ENABLED[java.lang.String]=true

ACTIVITY[java.lang.String]=SIMPLE HTTP TRANSP

CLASS_OR_PROGRAM[java.lang.String]=com.sap.me.collaboration.SimpleHTTPTransport

Edited by: Seng Kiang Hoe on Jul 22, 2011 1:53 PM

Edited by: Seng Kiang Hoe on Jul 22, 2011 1:56 PM

Former Member
0 Kudos

Hi Seng,

The problem is in collaboration directive you defined.

The error says " Invalid collaboration configuration: Plug-in not defined.".

Besides the Transport plugin you have to define Data Aquisition and Formatting plugins. These three plugins are required to process collaboration messages. The Callback plugin is optional.

You can find more information about collaboration plugins in the SDK documentation Implementation Guide and Outbound Collaboration Framework Guide

Thanks

Ivan

Former Member
0 Kudos

Hi Ivan

I have read the SDK documentation before configuring the collaboration. According to the docu in page 12

You can create as many directives as you need. Within a particular directive, each of the four plug-in types is optional (as long as at least one is present). If more than one plug-in is used, they are executed in the order listed above. Use those plugs-ins and properties that meet your specific data propagation needs.

It is clearly mentioned that each plug in is optional but there must exist at least one plug in. In my case I am using Transport plug in. Am I intepret it wrong?

Data Aqusition plug in is used if one needs additional data (in my case i do not need any additional data)

Formating plug in is used to format the additional data

Transport is used to transport the data

Callback is used to process the reply of the external system

So that is why I have only Transport plug in to call simple HTTP not other plug in configured.

thanks

Former Member
0 Kudos

Hi Seng,

That's correct in general for plugins developed by 3rd party. That means that if you put all three functions (data aquisition, formatting and transport) into the transport plugin, you are good.

In your case the difference is that you are using predefined plugin. This plugin expects the data from corresponding formatter plugin. In turn if you use predefined formatter plugin it expects the data from corresponding data aquisition plugin. All these plugins should be compatible - understand each other output - otherwise it doesn't work

Thanks

Ivan

Former Member
0 Kudos

Hi Ivan

I have tried to configure all 4 plug in as you mentioned

Directive: ERP_SCRAP_CONFIRMATION

Data Acquisition ERP Scrap Confirmation DA Plug In (without parameter)

Formating ERP WS Formatter Plug In (class=com.sap.xi.me.erpcon.ScrapConfirmationRequestType as param)

Transport ERP Confirmation Transport (operation=scrapConfirmation;url=http://server:50000/XMII/Runner?Transaction=EquipmentIntegration/Auftrag_Process/trx_CreateOrder&InputParameter=DOC&OutputParameter=*&IllumLoginName=test&IllumLoginPassword=test&session=false)

Call back ERP Generic Callback Plug In

Collaboration Link Maintenance

Trigger Action COLLABORATION_SFC_SCRAP

Directive ERP_SCRP_CONFIRMATION

However each time scrap occured the transcation is not called, and there is no error occured.

But if I change the Transport to Simple HTTP transport , error occured.

500 Internal Server Error is returned for HTTP request [http://server:50000/manufacturing/com/sap/me/production/client/Complete.jsp]:

component [/com/sap/me/system/common/client/ErrorPage.jsp],

web module [manufacturing],

application [sap.com/me~ear],

DC name [],

CSN component[],

problem categorization [],

internal categorization [566200682].

any idea?

Former Member
0 Kudos

ERP integration should be enabled and configured in order to trigger ERP* actions.

If you just want to call the webservice on non-ERP action you'll need to create custom Data Aquisition and Formatter plugins with SDK and reuse predefined transport plugin.

Thanks

Ivan

Former Member
0 Kudos

The ERP integration is also a called to MII's transaction. This mean if I use the this collaboration directive, I shoudl be able to call any MII transaction.