Hi all,

So, as we all know OS has some limitations when it comes to SOAP Web Services.

We need to consume a WS from a client that uses WS Addressing. We added the WSDL in our OS application but the WS Addressing specification wasn't added to the XML structure of our request because OS does not support it.

So we were able to add it to the specification and parameters to the header using the method SetWebReferenceSoapHeaders of the extension EnhancedWebReferences.


But, of course, things could not be so easy, right now we are struggling because we are exposing the Soap WS in OS that receives a request that uses WS-Addressing also.

So I tried the standard way and simply exposed the WS, gave the client the WSDL and he sent a request. When I track it in Wireshark it looks awesome, with the values we expect to receive. But when I see the structure in OS it simply comes empty.

Right now I am assuming this happens because our WSDL is not indicating that we use WS Addressing but they are sending the request with it.

 
Do you guys have any 'easy' solution for this? Or will I have to implement it using .NET? Because it makes sense that our exposed WS uses also WS Addressing since we need information about the XML like the MessageID to be able to relate the response with the correct request,

BTW I will put here the request we received so you can have an idea,


<?xml version="1.0" encoding="UTF-8"?><soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/" xmlns:wsa="http://www.w3.org/2005/08/addressing" xmlns:wsrm="http://schemas.xmlsoap.org/ws/2005/02/rm">   <soap:Header>      <wsa:Action>********SOMEURL********</wsa:Action>    

  <wsa:MessageID>b24c3136-f8b5-4b82-a166-79351eceb6aa</wsa:MessageID>      <wsa:To>SOMEURL</wsa:To>      <wsa:RelatesTo>uuid:6d8b9fe5-3300-427f-a8c3-7bf645c084e9</wsa:RelatesTo>   </soap:Header>   <soap:Body>      <ns:*****SOMEMETHOD***** xmlns:ns=******SOMEURL*******>         <ns:NISS>123456789</ns:NISS>         <ns:DataRetorno>2018-12-18T10:08:23.745Z</ns:DataRetorno>         <ns:SituacaoContributiva>R</ns:SituacaoContributiva>         <ns:CodigoResultado>0</ns:CodigoResultado>      </ns:CESRespostaPedidoSituacaoContrib>   </soap:Body></soap:Envelope>


If you need to use https://www.freeformatter.com/xml-formatter.html#ad-output so you can put the XML in a prettier format,


Thanks a lot, 

VC

Hi Vincent,

Especially with SOAP, it's important to state which version of the Platform you are using, as P11 has a number of improvements. Specifically, there's documentation on how to use WS Addressing.

Kilian Hekhuis wrote:

Hi Vincent,

Especially with SOAP, it's important to state which version of the Platform you are using, as P11 has a number of improvements. Specifically, there's documentation on how to use WS Addressing.

Hi Kilian Hekhuis

Thanks for the hint, actually I meant to indicate that I am using OS 9, and since I'm using an older version I don't have access to the reference OutSystems.SOAP.API;


Another thing I want to mention Is that I referred that I am trying to EXPOSE a WS with WS Addressing. The documentation you gave me allows me to CONSUME a WS that uses WS Addressing, which I am able to do without integration studio...


Cheers


Ah, you're on 9, bummer :). Can't you edit the WSDL to include the WS Addressing?

Kilian Hekhuis wrote:

Ah, you're on 9, bummer :). Can't you edit the WSDL to include the WS Addressing?

Well, actually that is what I meant to do. In a matter of fact, I even have the WSDL here with the WS-Addressing definition, but how can I expose a WS in Outsystems from a WSDL? Is it possible to achieve this?

I'm already predicting my future being resumed to a lot of hours in VS right? EHEH


Cheers m8

Unfortunately, I'm not too knowledgeable about exposing REST with WS Addressing, I'm not sure whether it can be done (especially in P9). It probably depends on whether you can hook something in VS and change content there.