Title Namespace Mismatch Error

I have wsdl generated from XSD using WCSF Blue. I use this service from a console application client. I get the following exception (SOAP?). What is wrong with wsdl? How can we fix this?

The header namespace mismatch in the UserCredentials member of type RestaurantService.AddRestaurant.

The header namespace found in the description is urn: thinktecture-com: demos: restaurantservice: headerdata: v1.

The element namespace deduced by formatting is urn: thinktecture-com: demos: restaurantservice: wsdl: v1.

This mismatch may occur if the namespace specified in XmlElementAttribute or XmlArrayAttribute does not match the namespace specified in MessageHeaderAttribute or MessageHeaderArrayAttribute or the contract namespace.

Wsdl

enter image description here

Header data

enter image description here

+4
source share
1 answer

I plan to use the following approach:

Service code is generated from wsdl using a tool (blue WCSF). Using the service, when wsdl is created, it is a little different. In this way,

  1. Try creating a client using the wsdl obtained by viewing the svc file. Refer to the endpoint address in the configuration file for this new client. Make sure our customer address matches the address of this customer.
0
source

Source: https://habr.com/ru/post/1432925/


All Articles