I'm trying to integrate with a webservice that uses WS-Addressing. Started a test project in SoapUI and i have it working now; next step use it in OutSystems.

1st step: call the webservice from SoapUI:

To use this webservice i have to enable WS-A Addressing; and Add default wsa:To

This will create following Request from SoapUI:The request looks like this:

Tested the action, and... we've got response (a Token).

Next Step: Impement this in ServiceStudio

Referenced the Webservice in a eSpace and i have the RequestToken method available in SS; but this a call will create a Request without the WSA-Addressing soap:Header.

Add WSA-Addressing

To add WSA-Addressing - or do other stuff in the soap:Header - OutSystems has the EnhancedWebReferences API

With the SetWebReferenceSoapHeaders from this API, I can add 2 SoapHeader with the wsa:Action and wsa:To elements. (It is not possible to set the namespace and prefix in the soap:Header, so i have to add it in every Element). Like this:

Now, let's test this...

Result: Error

The request failed with HTTP status 415: Cannot process the message because the content type 'text/xml; charset=utf-8' was not the expected type 'application/soap+xml; charset=utf-8&apos

What am i doing wrong?!?

The Request from OutSystems looks like this:

Hi Matthias,

The error you are receiving from the Web Service you are calling has nothing to do with WS-Addressing. The  'text/xml; charset=utf-8' was not the expected type 'application/soap+xml; charset=utf-8' error happens when you try to consume a SOAP 1.2 service - only SOAP 1.1 services are directly supported on Service Studio.

To invoke that Web Service you will need to create an Extension in Integration Studio. You can check this document for thorough information: http://www.outsystems.com/help/integrationstudio/9.1/index.htm#t=Managing_Extensions%2FImport_Web_Services_from_a_.Net_Assembly.htm (it is also applicable to OutSystems version 10).

Best regards,

Pedro Guimarães

Thank you Pedro Guimarães, I have created a Extension with the with the information. All actions are created. Now i only have to create a action to set the URL and enable WS-A Addressing.