Last post Jun 13, 2017 10:57 AM by mgebhard
Jun 13, 2017 10:42 AM|DShu|LINK
I am trying to resolve this issue I have which converts my SOAP response to Data Structure defined by XSD.
1. Previous implementation
We had a SOAP call we consumed and had a proxy for it in solution. So when we got response from Web service, Proxy did the job
of converting that response to Data Structure defined in XSD.
Now that we are rewriting web service in the back, there are few changes on how it's being consumed now
2. It is a rest call though I am mimicking response as in I am sending SOAP reponse back. So at this point I see same reponse as I used to see it before.
The problem is binding this reponse with the XSD structure. Before it was taken care of by proxy in the back but now that we don't have that we are having issues
converting SOAP into Object.
Limitations: I can change reponse as needed but I won't be able to change XSD and few limited changes to code.
Any idea how to map response to XSD and transfer to object ? Would like to get more insight on how they are mapped in the back when proxy does it so we can replicate it.
I can share more info if needed.
<ns2:Type1 xmlns="urn:n2bb:namespace1" xmlns:ns2="urn:n2bb:namespace2">
<ns2:Type2 isHidden="false" sortId="0" fullPath="/">
<metadata value="source-id:11300:N" name="TuningURL"/>
<Type2 isHidden="false" sortId="2147483647" fullPath="/">
<metadata value="ForceShow" name="DisplayRule"/>
<metadata value="None" name="SearchBy"/>
<metadata value="false" name="IsAdult"/>
Jun 13, 2017 10:57 AM|mgebhard|LINK
Simply look at the old proxy code. It has everything you need to deserialize the SOAP message.
If you want to create objects based on the XSD then see the xsd.exe tool.