11
Views
4
Comments
How to replace SetWebReferenceURL with SOAP Extensibility API
Application Type
Traditional Web
Service Studio Version
11.10.2 (Build 36659)
Platform Version
11.0.606.0

Guys, we were using SetWebReferenceURL up to now for consuming SOAP web services, but now we get the following error:

The 'SetWebReferenceURL' Server Action cannot be used with the 'CyTA_spcCreateFutureSR' consumed SOAP Web Service created in OutSystems 11. Use the SOAP Extensibility API instead.

How do I deploy the same functionality using SOAP Extensibility API?


Thanks,

Marios


mvp_badge
MVP
Rank: #46

Hi Marios, in the documentation Use Advanced Extensibility - OutSystems  you can find the sample code to do that:

Example: Change service endpoint at runtime - OutSystems

You need to create an extension and use the SOAP Extensibility API with this code:


01// required 'using' statements at the beginning of the file
02using System.ServiceModel;
03using OutSystems.SOAP.API;
04 
05/* ... */
06 
07// replace the 'MssChangeEndpoint' function placeholder with the following code
08public void MssChangeEndpoint(string ssUri) {
09    var client = SoapRequest.GetCurrentClient();
10    client.Endpoint.Address = new EndpointAddress(ssUri);
11}


regards

Fabio

Rank: #1838

Thanks, Fabio,

This isn't the same as ChangeEndpoint action in  SOAPExtensibilitySamples?


Regards,


Marios


Rank: #54771

Hi Guys, I'm having the same issue. In my case I uploaded the XML (SOAP) file from my local due to unauthorize error and upon testing I'm having an error:

The HTTP request is unauthorized with client authentication scheme 'Basic'. The authentication header received from the server was 'NTLM'.  

- Already created the ChangeEndpoint action in Integration Studio.
- Added ChangeEndpoint to OnBeforeReq.

- ChangeEndpoint value
- Im calling the SOAP using the GetWebServiceCredential Server Action to my Screen button.

Do I need to change or add?

Thank You and Best Regards