Hello guys
I'm trying to consume web service by wsdl file, I tried by url, but I have some error, because an attribute data type structure is not set.
Error when consume web service by endpoint
Now I'm trying to consume the service by wsdl file
the definitions for this type on the xsd file are
I'm trying to change group by single element like that
but when I consume the wsdl file and publish the module I have compilation error
Internal Error
Compilation Error.
CustomClients\IUtilityFacadeInterfaceService_IUtilityFacadeInter\Structures.STAddressTypeStructure.cs(766,18): error CS1502: The best overloaded method match for 'ssNewUPUtility_eSign_IS.CcIUtilityFacadeInterfaceService_IUtilityFacadeInter.SOAPOpenEnum.FromProxyStructure(ssNewUPUtility_eSign_IS.ssProxy.OpenEnum)' has some invalid arguments
record.ssvalue = SOAPOpenEnum.FromProxyStructure((string) proxyObj.Value);
CustomClients\IUtilityFacadeInterfaceService_IUtilityFacadeInter\Structures.STAddressTypeStructure.cs(766,51): error CS1503: Argument 1: cannot convert from 'string' to 'ssNewUPUtility_eSign_IS.ssProxy.OpenEnum'
CustomClients\IUtilityFacadeInterfaceService_IUtilityFacadeInter\Structures.STAddressTypeStructure.cs(773,16): error CS0029: Cannot implicitly convert type 'ssNewUPUtility_eSign_IS.ssProxy.OpenEnum' to 'string'
record.Value = SOAPOpenEnum.ToProxyStructure(obj.ssvalue);
CustomClients\IUtilityFacadeInterfaceService_IUtilityFacadeInter\Structures.STAirBagTypeStructure.cs(766,18): error CS1502: The best overloaded method match for 'ssNewUPUtility_eSign_IS.CcIUtilityFacadeInterfaceService_IUtilityFacadeInter.SOAPOpenEnum.FromProxyStructure(ssNewUPUtility_eSign_IS.ssProxy.OpenEnum)' has some invalid arguments
CustomClients\IUtilityFacadeInterfaceService_IUtilityFacadeInter\Structures.STAirBagTypeStructure.cs(766,51): error CS1503: Argument 1: cannot convert from 'string' to 'ssNewUPUtility_eSign_IS.ssProxy.OpenEnum'
CustomClients\IUtilityFacadeInterfaceService_IUtilityFacadeInter\Structures.STAirBagTypeStructure.cs(773,16): error CS0029: Cannot implicitly convert type 'ssNewUPUtility_eSign_IS.ssProxy.OpenEnum' to 'string'
.
exist any workaround for do this?
Thanks in advanced
Hi @Artemio Sampayo Olivares,
What happens when you use SoapUI or Postman to consume the webservice? Does this work?
Why is the structure of address1 different from that of address2?
Best regards,
Bart
Hello @Bart Nooijens
Thank you for you support
Yes when I use SoapUi I can get the response without issue
the problem is whit addr1 is defined as group in this case as EXAMPLE_CHOICE and addr2 is defined as string
The definition for the request (Addr1)was defined by other team
SOAP is really pain in the ... in OutSystems. I never had a wsdl so far where i was able to simply import it. You may check the Unsupported cases and potential workarounds in the documentation https://success.outsystems.com/documentation/11/extensibility_and_integration/soap/consuming_soap_web_services/unsupported_soap_use_cases/ if that helps.
From my personal perspective. For simple SOAP based endpoints it is sometimes easier to consume the endpoint as a REST endpoint. You would then need to construct the XML request on your own and send in the request body along with correct content-type header.
For more complex integration you may consider creating a custom extension and create c# code from the wsdl using dotnet svcutil.
hello @Stefan Weber
I am trying to create an extension only with the method where I have the issue, but unfortunately in C# I can't get this method, I don't know what the problem is.
I don't know if problem with the web service methos definition
If you can provide some more details on the wsdl and how you tried to create a c# method i may can help you.
Hello Stefan
How Can I do that?
"You would then need to construct the XML request on your own and send in the request body along with correct content-type header. "
Hi,
Then add a wrapper server action. In that wrapper action you first build up a text variable with the request xml. You can do it by using string concatenation to add dynamic values to the request xml.
Something like this
Then call the REST consume with the request xml.
When retrieving use the actions from the Xml extension to retrieve all the values you need from the response. But as said. This only makes sense for simple calls. If it gets complicated e.g. because the response is quite complex to parse then you would be better off to create a custom code extension.
Best
Stefan
@Artemio Sampayo Olivares
Please add type="xsd:string" in your element then try. In some cases you may have to replace ref="Addr1" with name="Addr1".
We had similar scenarios,, adding only type="xsd:string" worked for us.
Hello
I changed
<xsd:element ref="Addr1" minOccurs="0" maxOccurs="1"/>
<xsd:element name="Addr1" type="xsd:string"/>
but still the Compilation Error.
Was you able to resolve?
Can try with below
<xsd:element name ="Addr1" type="xsd:string" minOccurs="0" maxOccurs="1"/>
Hi Artemio,
Can you please share the original wsdl so I can try to understand by my side?
Thanks