У меня есть веб-служба .NET 4.0, у которой целевое пространство имен "http://tempuri.org" при создании WSDL. Клиент отправляет мне конверт SOAP с xmlns, установленным на «uri:company:agent» (см. пример ниже). Моя служба отклоняет конверт SOAP, поскольку пространства имен не совпадают.
<SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/" xmlns:ns1="urn:company:agent">
<SOAP-ENV:Body>
<ns1:send_message xmlns="urn:company:agent">
<item1>abc</item1>
Я получаю следующую ошибку:
<faultstring xml:lang="en-US">Error in deserializing body of request message for operation 'send_message'. OperationFormatter encountered an invalid Message body. Expected to find node type 'Element' with name 'send_message' and namespace 'http://tempuri.org/'. Found node type 'Element' with name 'ns1:send_message' and namespace 'urn:company:agent'</faultstring>
Мой вопрос заключается в следующем: я не могу найти, где изменить пространство имен моего проекта в Visual Studio 2010, чтобы оно отражало "uri:company:agent" вместо "http://tempuri.org/". ". Я тщательно изучил, но любые изменения, которые я делаю, не отражаются в WSDL.