Serice Reference call - Wierd Error RRS feed

  • Question

  • User-724725037 posted

    I've referenced a third party service reference and it created .svcinfo, .svcmap and couple of .xsd files.

    In my code I've created a proxy of this service and tried to call a method CreateAccount(with values). After calling this method I got the following error


    "The top XML element 'OrderItems' from namespace 'https://www.mysite.com/MyOrder' references distinct types APITest.ServiceReference1.OrderItems and APITest.ServiceReference1.OtherOrderItems. Use XML attributes to specify another XML name or namespace for the element or types.


    I was able to Call this method using SOAPUI tool and got a valid result from the service saying the account is created and it returned me the account number.

    I'm using  Visual Studio , c#/vb , windows forms app to reference this service.

    I did do a lot of search and didn't get a right link or direction to solve this error. Any Idea why this is happening?


    Thank you in advance.......

    Sunday, January 20, 2013 10:20 PM


  • User-724725037 posted

    It is rhe Reference.cs OrderITems element caused this issue.  Fixed it by adding a type, name space to it.

    • Marked as answer by Anonymous Thursday, October 7, 2021 12:00 AM
    Monday, January 21, 2013 12:06 PM