When creating SOAP Service with WSDL: error CS0103: The name 'binding' does not exist

I am Using OS11 and trying to create a SOAP Service with a WSDL. This WSDL already works in SOAP UI, so it is valid.

After importing the WSDL Outsystems starts generating the service and this does results in the creation of the methods in OS. But when i try to publish the Module i get the error:

Quote:

Internal Error

Compilation Error.
CustomClients\DataserviceService\CcDataserviceService.ophalenInschrijving.cs(60,1): error CS0103: The name 'binding' does not exist in the current context
binding.SendTimeout = new TimeSpan(0, 0, 100);
CustomClients\DataserviceService\CcDataserviceService.ophalenInschrijving.cs(61,48): error CS0103: The name 'binding' does not exist in the current context
serviceInvoker = new ssProxy.DataserviceClient(binding, new EndpointAddress(serviceUrl));

State: Second stage compilation

End Quote

I am quite sure the WSDL is correct and i don't think its a very complex one either. 

Also: OS doesnot report the problem when creating the service, but when it tries to compile the module, so my questions are:

- Does anyone know if i can fix this problem by altering the WSDL (What could be the issue)?

- Should i report it to Outsystems so they can use the input to improve the SOAP-utils? (I think the error should occur before creating the SOAP-service, not while trying to publish.

 


Hi Stefano,

Can you share the WSDL? Then I give it a try.

Regards,

Daniel

Daniël Kuhlmann wrote:

Hi Stefano,

Can you share the WSDL? Then I give it a try.

Regards,

Daniel

Hi Daniel,

Thank you for trying.

It's the wsdl of KvK:

http://schemas.kvk.nl/contracts/kvk/dataservice/catalogus/2015/02/KVK-KvKDataservice.wsdl

You will get a recursion error first, but if you change the Type of the response to XS:String that will be fixed.




Hi again.

As the SOAP has recursion which is not supported by OutSystems, there is a described way to work around it.

https://success.outsystems.com/Documentation/11/Extensibility_and_Integration/SOAP/Consuming_SOAP_Web_Services/Unsupported_SOAP_Use_Cases#recursion

Did you try that already?

Regards,

Daniel

Alternatively you could make an Extension and  import the WSDL there as webservice to generate proxy code that you than can use in your extension. 

For more information see: https://success.outsystems.com/Documentation/How-to_Guides/How_to_consume_a_Web_Service_in_Integration_Studio

Daniël Kuhlmann wrote:

Alternatively you could make an Extension and  import the WSDL there as webservice to generate proxy code that you than can use in your extension. 

For more information see: https://success.outsystems.com/Documentation/How-to_Guides/How_to_consume_a_Web_Service_in_Integration_Studio

We already have that, but we have the desire to loose the extension because there is not enough knowledge to update it. In fact i am the only one able to understand the code right now. 

But since we have now upgraded to OS11 we are trying to see if we can do the webservice in OS. 

And since we got this far its kind of frustrating we can't publish due to this binding error. ;)


Hope you can help.


Daniël Kuhlmann wrote:

Hi again.

As the SOAP has recursion which is not supported by OutSystems, there is a described way to work around it.

https://success.outsystems.com/Documentation/11/Extensibility_and_Integration/SOAP/Consuming_SOAP_Web_Services/Unsupported_SOAP_Use_Cases#recursion

Did you try that already?

Regards,

Daniel

Sorry, missed this one.

It was kind of difficult to lose the recursion because the types contain lots of extended types etc. So i tried to change the type into string, which worked (since i got as far as a generated webservice). But we cant publish the module with that generated SOAP service due to the error mentioned above.


I have attached the wsdl with the changes. You will see you can generate the SOAP-service and methods but will not be able to publish...

I think you should try the workaround as described in the OutSystems success document I shared.

It is some work, but at least you should be able to consume the WSDL without an extension.

We removed the recursion from the response by changing the type to string (see KvKwsdlstripped attached to my previous comment). 

this worked, OS could create the service (we have the green button), but when compiling the module it breaks:

Internal Error
Compilation Error.
CustomClients\DataserviceService\CcDataserviceService.ophalenInschrijving.cs(60,1): error CS0103: The name 'binding' does not exist in the current context
binding.SendTimeout = new TimeSpan(0, 0, 100);
CustomClients\DataserviceService\CcDataserviceService.ophalenInschrijving.cs(61,48): error CS0103: The name 'binding' does not exist in the current context
serviceInvoker = new ssProxy.DataserviceClient(binding, new EndpointAddress(serviceUrl));


State: Second stage compilation



I already understood you did that, but that is not what the workaround is that is described in the success document.