I have application as a web service with client and service. The application is creating wsdl file with some properties. The other company who is sending XML file to consume our web service wants to change the namespace in our web service. Is there any possibility how to make it in Visual Studio? I though it could be easy in e.g. Service References but I couldn't find it on internet.
Edit: There are two folders in the solution. One is for Client(MasterDataClient), second is for Service (MasterDataService). There is an Interface in Service folder called IMasterDataService with this code:
using System.ServiceModel;
using System.CodeDom.Compiler;
namespace MyWebService
{
[GeneratedCodeAttribute("System.ServiceModel", "4.0.0.0")]
[ServiceContractAttribute(Namespace = "urn:sap-com:document:sap:soap:functions:mc-style")]
public interface IMasterDataService
{
[OperationContract]
[XmlSerializerFormat()]
checkInterfaceResponse checkInterface(checkInterfaceRequest request);
[OperationContract]
[XmlSerializerFormat()]
updateMaterialResponse1 updateMaterial(updateMaterialRequest1 request);
[OperationContract]
[XmlSerializerFormat()]
updatePriceListResponse1 updatePriceList(updatePriceListRequest1 request);
[OperationContract]
[XmlSerializerFormat()]
notifyFullDataReadyResponse1 notifyFullDataReady(notifyFullDataReadyRequest1 request);
[OperationContract]
[XmlSerializerFormat()]
updateCustomerResponse1 updateCustomer(updateCustomerRequest1 request);
[OperationContract]
[XmlSerializerFormat()]
updateVendorResponse1 updateVendor(updateVendorRequest1 request);
}
}
Do I just change the value of attribute Namespace within ServiceContractAttribute? Am I right? And then deploy it?
Result look fine.
<wsdl:definitions xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/" xmlns:wsu="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd" xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/" xmlns:soap12="http://schemas.xmlsoap.org/wsdl/soap12/" xmlns:tns="http://tempuri.org/" xmlns:wsa="http://schemas.xmlsoap.org/ws/2004/08/addressing" xmlns:wsx="http://schemas.xmlsoap.org/ws/2004/09/mex" xmlns:wsap="http://schemas.xmlsoap.org/ws/2004/08/addressing/policy" xmlns:wsaw="http://www.w3.org/2006/05/addressing/wsdl" xmlns:msc="http://schemas.microsoft.com/ws/2005/12/wsdl/contract" xmlns:i0="http://service.sc/" xmlns:wsp="http://schemas.xmlsoap.org/ws/2004/09/policy" xmlns:wsa10="http://www.w3.org/2005/08/addressing" xmlns:wsam="http://www.w3.org/2007/05/addressing/metadata" name="MasterDataService" targetNamespace="http://tempuri.org/">
<wsdl:import namespace="http://service.sc/" location="http://localhost:52798/MasterDataService.svc?wsdl=wsdl0"/>
<wsdl:types/>
<wsdl:binding name="CoopEndPoint" type="i0:IMasterDataService">
<soap:binding transport="http://schemas.xmlsoap.org/soap/http"/>
<wsdl:operation name="checkInterface">
<soap:operation soapAction="http://service.sc/IMasterDataService/checkInterface" style="document"/>
<wsdl:input>