SOAP web service - specifying xsi type - HELP!

SOAP web service - specifying xsi type - HELP!

  

Hi,

I am currently consuming a SOAP service and everything is working OK except for one thing:

Outsystems is generating XML like this: 

<Proposal> ... </Proposal>

but i need

<Proposal xsi:type="DealerProposalData">...</Proposal>


Any way to do this?? 

Thanks

Tom

Hi Tom,


Can you see what type of databiding your service uses? RPC/Encoded, RPC/Literal or Document/Literal? It says that in both the wsdl and soap message. (See here on how to identify it on a payload)

Also what Platform Stack are you using (.NET or J2EE)?


Regards,
João Rosado

João,


Hi,

I am referencing a local .WSDL file, see the attached. Does this help?


 To add a bit more detail:

The providers of the SOAP service have checked at their end to see what XML is being received and the difference is:


What they expect to see

<Proposal xsi:type="DealerProposalData">
<ProposalID>0</ProposalID>
<ProposalType>CreditLimit</ProposalType>
<AgreeToPermitSearch>Yes</AgreeToPermitSearch>
<ApplicantType>Individual</ApplicantType>
<Applicants>
<ApplicantData>
<Designation>Primary</Designation>
<Title>Mr</Title>


etc...


What they actually receive


<Proposal>
<ProposalID>0</ProposalID>
<ProposalType>MotorVehicle</ProposalType>
<AgreeToPermitSearch>Yes</AgreeToPermitSearch>
<ApplicantType>Individual</ApplicantType>
<Applicants>
<ApplicantData>
<Designation>Primary</Designation>
<Title>Mr</Title>
<Forename>Thomas</Forename>
<Surname>Ciullo</Surname>


Basically Outsystems seems to be ignoring the WDSL (attached) and using the base Proposal class instead of the DealerProposalData class


Oh - Im using .NET, v10 OS

Any help here would be super.


Thanks

Tom



Interesting, dunno why the server would require that xsi:type to be defined in a document/literal service.

Ususally that only happens when the method is defined types like "any" or the it needs help deciding between 2 extension classes (and from what I can tell in that wsdl they are not ambiguous).

Since your file is called "custom", what was the customization that you previously did on the wsdl?


Regards,
João Rosado

Tried to use your wsdl in SoapUI to see how it generates the request and it does exactly the same as OutSystems, so it doesn't look it is doing anything is wrong based on that wsdl definition.


Regards,
João Rosado

Joao,

Thanks for the reply. 


Hmm, must admit it's an interesting one  


Interestingly, If you create a c# project and add a service / web reference using the above WSDL you will notice that it does create the XML with the DealerProposalData xsi type.So it seems C# is handling the base Proposal class differently, and in a way which is in line with the providers expectations. 

If I can't understand why this is happening, or how to tweak the XML before the request is sent then I'll have to implement the web service in an extension. 

I have tested this method and it works, but was hoping to avoid it as it bypasses the general ease of using the default OutSystems SOAP service and means more manual work for me configuring inputs parameters and type casting 

Solution

Hi Tom

How did you manage to replicate it via C#? I created a service based on your wsdl and consumed it via C# and it's not sending the xsi type (see attachment)



Solution

Joao, 

I just added a service reference to the WSDL at 

https://mowsuat.dsgfs.com/maiaonlinewebservice.asmx?WSDL

See attached c# class


Thanks

Tom

Hi Tom

I managed to replicate the issue and it is indeed a limitation of the platform, as we currently don't fully support inheritance. Using the wsdl from the link we can't introspect the DealerProposalData, and using the custom wsdl you provided the platform can introspect the type, but since we don't have inheritance the XSI never shows up in the XML.

The workaround is to call the method via and extension in Integration Studio as you seem to have done already.