I am trying to receive a request in WCF. I need to respond with a MessageContract, therefore I need to take a MessageContract as input. I cannot alter the input SOAP request and must accept it as is.
<soapenv:Envelope xmlns:soapenv="http://www.w3.org/2003/05/soap-envelope">
<soapenv:Header xmlns:wsa="http://www.w3.org/2005/08/addressing">
<wsa:To>http://localhost/SomeService.svc</wsa:To>
<wsa:MessageID soapenv:mustUnderstand="true">urn:uuid:72A256A3317AF1411C1719318536115</wsa:MessageID>
<wsa:Action soapenv:mustUnderstand="true">urn:ihe:iti:2007:CrossGatewayQuery</wsa:Action>
</soapenv:Header>
<soapenv:Body>
<query:AdhocQueryRequest
xmlns:query="urn:oasis:names:tc:ebxml-regrep:xsd:query:3.0"
xmlns:rs="urn:oasis:names:tc:ebxml-regrep:xsd:rs:3.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns="urn:oasis:names:tc:ebxml-regrep:xsd:rim:3.0">
<query:ResponseOption returnComposedObjects="true" returnType="ObjectRef" />
<AdhocQuery id="urn:uuid:14d4debf-8f97-4251-9a74-a90016b0af0d" home="2.16.840.1.113883.3.9075">
<Slot name="$XDSDocumentEntryPatientId">
<ValueList>
<Value>'111111111^^^&2.16.840.1.113883.4.1&ISO'</Value>
</ValueList>
</Slot>
<Slot name="$XDSDocumentEntryStatus">
<ValueList>
<Value>('urn:oasis:names:tc:ebxml-regrep:StatusType:Approved', 'urn:oasis:names:tc:ebxml-regrep:StatusType:Deprecated')</Value>
</ValueList>
</Slot>
</AdhocQuery>
</query:AdhocQueryRequest>
</soapenv:Body>
</soapenv:Envelope>
I have tried to manually build the MessageContract. I have tried using paste special XML as classes in Visual Studio. I have tried creating classes from XML with online tool https://xmltocsharp.azurewebsites.net/. I even tried the approach defined here: /a/64321991/3298156 .
Any help would be appreciated.