Coming to new to WebAPI and i am having a namespace issue
I have a POST method in my WebAPI that accepts an object as JSON or XML however the method is to be consumed by a BizTalk service which adds its own namespace to the xml.
<ns0:Person xmlns:ns0="http://Acme/Esb/DestinationSchemas/Person/v1.0">
<WorkEmail>Someemail@acme.com</WorkEmail>
<PersonId>10</PersonId>
<UserName>Shouldhaveone</UserName>
</ns0:Person>
and my WebAPI Post method is defined as follows
<Person xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<PersonId>10</PersonId>
<WorkEmail>Someemail@acme.com</WorkEmail>
<UserName>Shouldhaveone</UserName>
</Person>
As you can see the namespaces are different and whenever the Post called the object is null. Can someone please advise me of the best approach to ignore the namespaces of incoming requests
Many thanks