Service Studio Crashes when trying to import WSDL Methods

When trying to import WSDL Methods, service studio crashes with the following message:

ServiceStudio.Presenter.RuntimeImplementation+FullStackException: Exception in thread Main ---> ServiceStudio.PluginAPI.ExceptionWithAttachments: Unable to consume SOAP Web Service ---> System.InvalidOperationException: Sequence contains more than one matching element ---> System.InvalidOperationException: Sequence contains more than one matching element
   at System.Linq.Enumerable.SingleOrDefault[TSource](IEnumerable`1 source, Func`2 predicate)
   at ServiceStudio.Plugin.SOAP.Parser.ImportedWSDL.GetStructureWithoutXMLKind(IEnumerable`1 clientStructures, XmlQualifiedName qualifiedName)
   at ServiceStudio.Plugin.SOAP.Parser.ImportedWSDL.GetStructure(ICustomClient client, XmlQualifiedName qualifiedName, KindOfXmlTag XmlTag, String parentName)
   at ServiceStudio.Plugin.SOAP.Parser.ImportedWSDL.UnrollXmlGroup(ICustomClient client, ICustomStructure structure)
   at ServiceStudio.Plugin.SOAP.Parser.ImportedWSDL.UnrollXmlGroupInStructures(ICustomClient client)
   at ServiceStudio.Plugin.SOAP.Parser.ImportedWSDL.SetMissingTypes(ICustomClient client)
   at ServiceStudio.Plugin.SOAP.Parser.ImportedWSDL.CreateStructuresInClient(ICustomClient client)
   at ServiceStudio.Plugin.SOAP.SOAPClientDescriptor.ImportFromWSDLDefinition(ICustomClient client, ImportedWSDL importedWSDL, IEnumerable`1 methods)
   at ServiceStudio.Plugin.SOAP.SOAPClientDescriptor.<>c__DisplayClass71_0.<DoMethodsLogic>b__2()
   at prs#neqdnjwf.prs#mkbjehvp(Object aox, DoWorkEventArgs aoy)
   at System.ComponentModel.BackgroundWorker.OnDoWork(DoWorkEventArgs e)
   at System.ComponentModel.BackgroundWorker.WorkerThreadStart(Object argument)


Hi,

Not all features of SOAP are supported by OutSystems Consume SOAP Service, for a reference see vor v11:

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

That said the error "Sequence contains more than one matching element"

I think the bottom cause could applies to your situation, there is a work around described.

Regards,

Daniel

Daniels link probably will suffice. But i was wondering if you have the same problem i was facing.

I had the same problem in OS10 with a WSDL that contained 2 bindings. OS11 will give you a popup where you can choose which one you want to use. OS10 does not.


Workaround is the same: delete the binding you don't need, including all references to it in the WSDL.

Daniël Kuhlmann wrote:

Hi,

Not all features of SOAP are supported by OutSystems Consume SOAP Service, for a reference see vor v11:

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

That said the error "Sequence contains more than one matching element"

I think the bottom cause could applies to your situation, there is a work around described.

Regards,

Daniel

Hi Daniël, 

Thanks for the response, the stack trace generated by outsystems doesn´t help at all. The WSDL is huge, I will have to go throw the whole file using trial and error in order to find out what is causing the problem. Very fustrating.




Hi Paulo,

Just for my understanding, when you say "crashes", what do you mean exactly?

Stefano Valente wrote:

Daniels link probably will suffice. But i was wondering if you have the same problem i was facing.

I had the same problem in OS10 with a WSDL that contained 2 bindings. OS11 will give you a popup where you can choose which one you want to use. OS10 does not.


Workaround is the same: delete the binding you don't need, including all references to it in the WSDL.

Hi Stefano, 

Thanks for the response. My wsdl doesn´t have 2 bindings, service studio crashes out of nothing when trying to import the file. The problem is that the wsdl is huge and I will have to go through the whole thing in order to find out what the problem is.


Paulo Vivacqua wrote:

Stefano Valente wrote:

Daniels link probably will suffice. But i was wondering if you have the same problem i was facing.

I had the same problem in OS10 with a WSDL that contained 2 bindings. OS11 will give you a popup where you can choose which one you want to use. OS10 does not.


Workaround is the same: delete the binding you don't need, including all references to it in the WSDL.

Hi Stefano, 

Thanks for the response. My wsdl doesn´t have 2 bindings, service studio crashes out of nothing when trying to import the file. The problem is that the wsdl is huge and I will have to go through the whole thing in order to find out what the problem is.


Can you try to import the wsdl in OS11? Perhaps your personal environment?

This could give you more information on the why.


Kilian Hekhuis wrote:

Hi Paulo,

Just for my understanding, when you say "crashes", what do you mean exactly?

Hello Kilian, 

After selecting the SOAP service I want to consume, service studio throws an unexpected error and I have to restart it.

Attached the generated error.




System.Net.WebException: The remote server returned an error: (404) Not Found


Could this be a firewall of proxy error?

Stefano Valente wrote:

System.Net.WebException: The remote server returned an error: (404) Not Found


Could this be a firewall of proxy error?

Hi Stefano, 

Thanks for taking your time to analise the log. I am able to import the WSDL using SoapUI without any issue, it´s definitely an service studio´s problem. Iam using version 11.5.45.

SoapUi will run from where you have installed it. This does not mean the wsdl will run from Outsystems server.

But since there are issues with some wsdl parts i am inclined to think you are right.

Are you allowed to share the wsdl?

Stefano Valente wrote:

SoapUi will run from where you have installed it. This does not mean the wsdl will run from Outsystems server.

But since there are issues with some wsdl parts i am inclined to think you are right.

Are you allowed to share the wsdl?


Hi Stefano, 

Thanks again for the response. I´ve attached the wsdl in case you have time to take a look. Just try to import it to service studio and the error will be generated. Note that I´ve changed the endpoints to dummy due to client confidentiality. 




You forgot something :)


ooops.



I'm afraid i have some bad news:

"It's not currently possible to create Actions from some operations defined in a WSDL that contain special characters like "-"."

So it says in the link Daniel provided.

It seems all your methods have an - in the name.


There is no work-around in OS.

Stefano Valente wrote:

I'm afraid i have some bad news:

"It's not currently possible to create Actions from some operations defined in a WSDL that contain special characters like "-"."

So it says in the link Daniel provided.

It seems all your methods have an - in the name.


There is no work-around in OS.

Thanks Stefano,  
Even after removing the "-" on my WSDL the error remais. I could not identify what the duplicates elements are.

Attached the WSDL without the "-".

Solution

I get the 404 error. This is normal ofcourse because you changed the endpoint.

SOAPUI doesnot check the destination when creating a project. OS does. 

If you try the wsdl without the "-" but with the correct endpoint, you will get the same error ( i predict) because the methods are not known (without the "-").

I don't think you can get this working with the standard SOAP in OS. You could try to get it done with an extension.

This will open C# where you can try the WCF to create the Channel.

If this works you will have a lot of work trying to expose all methods to OS though.


Solution

Stefano Valente wrote:

I get the 404 error. This is normal ofcourse because you changed the endpoint.

SOAPUI doesnot check the destination when creating a project. OS does. 

If you try the wsdl without the "-" but with the correct endpoint, you will get the same error ( i predict) because the methods are not known (without the "-").

I don't think you can get this working with the standard SOAP in OS. You could try to get it done with an extension.

This will open C# where you can try the WCF to create the Channel.

If this works you will have a lot of work trying to expose all methods to OS though.


Hi Stefano, 

You´re right, I will probably have to deal with the services outside outsystems or create an extension, which sucks big time. 

Thanks for your help.