none
How to remove xmlns from Message RRS feed

Answers

  • Hello dat1,

    Keep in mind that to the service there is a big difference between:

    <LoginCredentials xmlns:i="http://www.w3.org/2001/XMLSchema-instance">
          <Password xmlns="http://schemas.datacontract.org/2004/07/UnitTestProject1.Xyz">123</Password>
          <UserName xmlns="http://schemas.datacontract.org/2004/07/UnitTestProject1.Xyz">ABC</UserName>
    </LoginCredentials> 

    and

    <LoginCredentials>
          <Password>123</Password>
          <UserName>ABC</UserName>
    </LoginCredentials> 
    My suggestion is to update your message contract so that username and password have a "" namespace.  Take a look at using to remove.
    [MessageBodyMember(Namespace = "")]
    If this does not work, please post your contract for the login credentials.


    Jeff

    Wednesday, February 26, 2014 10:08 PM

All replies

  • Hello dat1,

    Keep in mind that to the service there is a big difference between:

    <LoginCredentials xmlns:i="http://www.w3.org/2001/XMLSchema-instance">
          <Password xmlns="http://schemas.datacontract.org/2004/07/UnitTestProject1.Xyz">123</Password>
          <UserName xmlns="http://schemas.datacontract.org/2004/07/UnitTestProject1.Xyz">ABC</UserName>
    </LoginCredentials> 

    and

    <LoginCredentials>
          <Password>123</Password>
          <UserName>ABC</UserName>
    </LoginCredentials> 
    My suggestion is to update your message contract so that username and password have a "" namespace.  Take a look at using to remove.
    [MessageBodyMember(Namespace = "")]
    If this does not work, please post your contract for the login credentials.


    Jeff

    Wednesday, February 26, 2014 10:08 PM
  • Thank you!
    Wednesday, March 5, 2014 1:53 AM