1

I'm using:

  • .NET Core 3.0 (C#)
  • SOAPCore for serialization
  • SQL Server

I have a pre-built SOAP service from a legacy system that is providing a request structured with two (2) Elements (RequestHeader and SearchPolicyDetails):

<soap:Envelope xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
               xmlns:xsd="http://www.w3.org/2001/XMLSchema" 
               xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/">
  <soap:Body>
    <RequestHeader xmlns="http://xxx">
       <RequestDate>2019-11-18+05:30</RequestDate>
       <SourceSystemRequestNo>1001</SourceSystemRequestNo>
    </RequestHeader>
    <SearchPolicyDetails xmlns="http://xxx">
       <policyNumber>xxxxxxxx</policyNumber>
       <asOfDate>2019-12-24</asOfDate>
    </SearchPolicyDetails>
  </soap:Body>
</soap:Envelope>

I can get both to run if I use a singular endpoint on my SOAP Endpoints (I.e. RequestHeader returns the data I want or SearchPolicyDetails returns the data I want. However I would like to get them to run consecutively so i can return the data from each into a single response:

<s:Envelope xmlns:xsd="http://www.w3.org/2001/XMLSchema" 
            xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"  
            xmlns:s="http://schemas.xmlsoap.org/soap/envelope/">
    <s:Body>
        <RequestHeaderResponse>
           {{DATA}}
        </RequestHeaderResponse>
        <SearchPolicyDetailsResponse>
           {{DATA}}
        </SearchPolicyDetailsResponse>
    </s:Body>
</s:Envelope>

Is this possible since I do not know if it would be possible to get the team who built the legacy system to update the request objects. Currently if I run them in the same request the payload only returns the first Element's data.

0 Answers0