views:

23

answers:

1

Hi all,

Following is the wsdl file of my service:

    <wsdl:types>
      <xsd:schema targetNamespace="http://tempuri.org/Imports"&gt;
      <xsd:import schemaLocation="http://localhost:3789/VideoUpload.svc?xsd=xsd0" namespace="http://tempuri.org/" /> 
      <xsd:import schemaLocation="http://localhost:3789/VideoUpload.svc?xsd=xsd1" namespace="http://schemas.microsoft.com/2003/10/Serialization/" /> 
      <xsd:import schemaLocation="http://localhost:3789/VideoUpload.svc?xsd=xsd2" namespace="http://schemas.datacontract.org/2004/07/UploadVideoProtocol" /> 
      </xsd:schema>
    </wsdl:types>
-----
<wsdl:definitions>
<wsdl:service name="VideoUpload">
<wsdl:port name="BasicHttpBinding_IVideoUpload" binding="tns:BasicHttpBinding_IVideoUpload">
  <soap:address location="http://localhost:3789/VideoUpload.svc" /> 
  </wsdl:port>
  </wsdl:service>
</wsdl:definitions>

In the above, i could change the namespace by specifying the custom namespace inside the code in service contract and behaviour.

But i need to hcnage the endpoint address specified in the schmema location,

schemaLocation="http://localhost:3789/VideoUpload.svc?xsd=xsd0"

to my own defined endpoint address as:

schemaLocation="http://myservice.com:8080/VideoUpload.svc?xsd=xsd0"

What is the procedure to achieve this? what has to be mentioned in the code to change the default endpoint generated? Can anyone please help me on this?

+1  A: 

You have to change httpGetUrl.

Check out these posts.

http://knowledgebaseworld.blogspot.com/2010/06/domain-name-replaced-with-machine-name.html http://knowledgebaseworld.blogspot.com/2010/06/wsdl-service-soap-address-location.html

Imran

IBhadelia
hey thanks... works great. but when i assigned a domain name instead the ip address i couldnt access. how to use the same with a domain name instead specifying an ip address?
Googler
It should work, as dns resolves ip address and send request to specific IP, make sure about configuration settings
IBhadelia
configuration settings of web config or IIS? I have changed the host header of the that particular service hosted on IIS as some domain(www.yourdomain.com). i have mentioned the same in httpGetUrl as http:\\www.yourdomain.com:8080/VideoUpload.svc?. but it doesn't work. May i know what are all the settings has to e changed in IIS? can u pls help me on this?
Googler