1

I am trying to make a CoreWCF SOAP endpoint which is backwards compatible with a legacy .NET Framework SOAP API. One problem remaining is that if I call any method (OperationContract), the XML output references http://tempuri.org/ instead of my custom namespace. I can't seem to see any way to change this value. Here's a snippet of my code:

[ServiceContract(Name = "UploaderAPI")]
[XmlSerializerFormat]
[XmlRoot(Namespace = "http://x-rm.com")]
public interface IUploaderAPISoap
{
    [OperationContract(Action = "http://x-rm.com/uploaderapi/HelloWorld")]
    HelloWorldResponse HelloWorld(string echo);
}

But that gives this output in Postman: Please see line 3 which mentions xmlns="http://tempuri.org/

<s:Envelope xmlns:s="http://schemas.xmlsoap.org/soap/envelope/">
    <s:Body xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
        <HelloWorldResponse xmlns="http://tempuri.org/">
            <HelloWorldResult>
                <HelloWorldResult xmlns="http://mileagecount.live.x-rm.com/uploaderapi">Hi there, foo</HelloWorldResult>
            </HelloWorldResult>
        </HelloWorldResponse>
    </s:Body>
</s:Envelope>

I believe this is what's causing the client application to reject the response.

2

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.