Calling SOAP web services from MEC

Here is a primer on how to invoke SOAP web services from Infor M3 Enterprise Collaborator (MEC) using the Send Web Service process, where MEC is the SOAP client calling SOAP servers.

MEC process

I am using MEC version 11.4.3.

We find the Send Web Service process in Partner Admin > Agreement > Processes:

The properties are the following:

The MEC Partner Admin Tool User Guide does not have much information:

The MEC training workbook does not have information either.

I decompiled MEC and found the Java class I was expecting it to use a legitimate SOAP client such as Apache CXF, but it uses a mere

Consequently, this process does no more than the HTTPOut process albeit the additional SOAP action property.


There are many problems with this type of implementation:

  • It does not validate the message against the web service’s WSDL, the XML Schemas, not even against XML syntax
  • It does not have a factory to create client stubs
  • It is byte-based (we could send whatever content) whereas SOAP clients are more RPC-like with setters and getters for parameters
  • It is HTTP-centric, not SOAP-centric
  • It is restricted to HTTP whereas SOAP is agnostic to the underlying transport protocol, e.g. SOAP supports FTP
  • It does not support WS-Security for XML Encryption and XML Signature
  • It does not support the use of HTTP proxy
  • Etcetera

Anyway, let’s give it a try.

Sample web service

I have a sample web service from TMW SystemsLink, a Transportation Management Software. It is available on my customer’s network. It is only setup for HTTP (not HTTPS), without authentication, thus it is insecure, but it is easy for illustration purposes.

First, I ensure I can get to the WSDL:

Test with SoapUI

Then, I test the web service with a SOAP client such as SoapUI:

Then, I get the SOAP action and content type to be used later (we can get them from the WS-A and http log tabs of SoapUI or from Fiddler):

Test with Java – optional

Optionally, I test the web service with the URLConnection in Java, from the same location and JRE as MEC:

javac && java -cp . Test

class Test {
	public static void main(String[] args) throws Exception {
		URL url = new URL("http://tmwsl/TMWSystemsLink/APIWCFServices.svc");
		URLConnection con = url.openConnection();
		con.setRequestProperty("Content-Type", "text/xml;charset=UTF-8");
		con.setRequestProperty("SOAPAction", "");
		String data = "<soapenv:Envelope xmlns:soapenv=\"\" xmlns:tem=\"\" xmlns:tmw=\"\"><soapenv:Header/><soapenv:Body><tem:RetrieveCarrier><tem:criteria><tmw:CarrierID>JONCOL</tmw:CarrierID></tem:criteria></tem:RetrieveCarrier></soapenv:Body></soapenv:Envelope>";
		con.setRequestProperty("Content-Length", "" + data.length());
		OutputStreamWriter out = new OutputStreamWriter(con.getOutputStream());
		BufferedReader in = new BufferedReader(new InputStreamReader(con.getInputStream()));
		String s;
		while ((s = in.readLine()) != null) {

The result is the SOAP response:

Test in Partner Admin

Now, I am ready to test in Partner Admin. I create a simple test agreement with the Send Web Service process configured to the end point address, content type, and SOAP action:

Then, I add a simple detection such as the default DiskIn, I reload the communication channel in the MEC Grid Management Pages, I create a file with the sample SOAP request, I drop the file in the DiskIn folder, I wait for MEC to process the file, and I check the result; the usual steps in MEC.


Here is the result in MEC Grid Management Pages, it successfully finished sending the SOAP request, and getting the SOAP response:

Here is the resulting POST HTTP request: 10

At this point we can use Partner Admin and MEC Mapper to transform an M3 MBM and generate the SOAP request, we can process the SOAP response, etc.


That was an illustration of how to call SOAP web services from Infor M3 Enterprise Collaborator (MEC) using the Send Web Service process, for MEC to be a SOAP client calling SOAP servers. Despite “Web Service” in its name, the process is deceitfully not very SOAP oriented, but we can manage with it.

Future work

In future posts I will:

  • Explore how to securely call a web service over HTTPS (not HTTP); if I use a custom server certificate, I have to setup the JRE keystore, or explore the Partner Admin > Manage > Certificate Keystores:
  • Explore how to use the Partner Admin > Manage > Web Service Definitions; I do not know what this is for:
  • Explore how to use the Manage > Advanced > WebServiceSyncIn/Out; I think that is for MEC to be a SOAP server, accept requests, and serve responses:
    future3 future3_

That’s it.

Please leave a comment, click Like, click Follow to subscribe, share around you, and come write the next blog post.

Published by


ex- M3 Technical Consultant

6 thoughts on “Calling SOAP web services from MEC”

  1. Hi Thibaud. Have you found anything interesting on this SOAP web service? I investigated a bit this topic a few months ago for our UK branch which asked me to use the shipping API from Royal Mail (forwarder agent in UK). I quickly gave up and surrendered; it requires a nonce, a password digest… which is not possible at the time being. The simple http request seams to work but i don’t know how to receive the response from the server (for example, GlobalWeather.wsdl allow you to retrieve weather in San Francisco 😉 ).


    1. I’ll take a look. What’s the URL? I don’t see it. In parallel, I am working on securely calling web services from MEC, using XML-Encryption and XML-Signature; maybe that’s what you mean. Also, I sent you an important email to your Yahoo, please read it.


    2. You could be referring to HTTP Basic Digest Access Authentication (supported by the Infor Grid Router authentication methods), or to WSSE (deprecated) the pre-OASIS version of WS-Security (supported for MEC’s WebServiceSyncIn; must developed for MEC’s SendWebService).


  2. Hi,

    I have a solution to develop where I need to call ecb exchange rate API in MEC.
    And take the response from API and update in m3 via MEC

    Can you please help me in understanding which solution approach is good


Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s