Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
HomeAnnouncementsFree MagazinesWhite PapersSubmit Content
Discussion GroupsASP.NETWindows FormsLanguages.NET FrameworkVisual Studio.NET
Articles.NET FrameworkASP.NETToolsWindows Forms
.NET DirectoryOpen Source ProjectsUser GroupsWeb Resources
Related Topics
Visual Basic 6SQL ServerMS AccessOther DB ProductsMS Server ProductsMore Topics ...

.NET Forum / ASP.NET / Web Services / March 2006

Tip: Looking for answers? Try searching our database.

WSDL shows wrong server name

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Bruce - 26 Mar 2006 06:41 GMT
I am running a Web Services application on a Windows 2003 Server
(specifically, SBS 2003, SP1).  When I query the Web Service for a WSDL
file, I find that the WSDL is advertising the wrong server name.  The WSDL
shows the address to be "HPServer" (which is the Windows networking name of
the server) rather than showing the internet domain name of the server.
Here is the snip from the WSDL file (with the actual names replaced by
aliases for this public posting...)...

 <wsdl:service name="MyService">
   <wsdl:port name="MyServiceSoap" binding="tns:MyServiceSoap">
     <soap:address location="http://HPServer/action.asmx"/>
   </wsdl:port>
   <wsdl:port name="MyServiceSoap12" binding="tns:MyServiceSoap12">
      <soap12:address location="http://HPServer/action.asmx"/>
   </wsdl:port>
 </wsdl:service>

Within my client application, after I do "update web reference" in VS2005, I
have to manually replace all occurances of "HPServer" throughout the project
with "domainname.com" to make it work correctly.

How can I fix this, so the Web Service on the server advertises the correct
address?

Thanks,
-- Bruce
Steven Cheng[MSFT] - 27 Mar 2006 10:03 GMT
Hi Bruce,

Glad to see you again:). How are you doing on the former webservice/ ISA
server issue, have you got any progress on that?

Regarding on the ASP.NET autogenerated WSDL document, it will always
generate the service address through the local intranet's address of the
machine(in your case it's the machine/server name of the development
machine). Actually, the public ip address or dns specific address name may
vary depend on the network environment between the client and server, so
it's abit hard to let the ASP.NET webservice dynamic generate the correct
ip/servername address accordign to different client.

IMO, for development time, since we can test the webservice through local
client or local intranet client, the default autogenerated wsdl document
and service description page should be ok. When we need to deploy/publish
the webservice to production server(which has certian public ip address or
dns server address), we can consider customizing the webservice description
page. And currently there're two simple means to do this:

1. Entirely replace the default generated webservice description page with
our custom page and also use our custon wsdl document(may copy the
autogenerated one and modify the service address element value).

2. Just provide a custom WSDL document page(through WebServiceBinding
setting).

Here are two web articles discussing on this:

#<wsdlHelpGenerator> Element  
http://msdn2.microsoft.com/en-us/library/ycx1yf7k(VS.80).aspx

#Using a Custom WSDL File in ASP.NET Web Services
http://pluralsight.com/blogs/craig/archive/2005/12/15/17482.aspx

Hope this helps and please let me know if there's anything else we can help.

Regards,

Steven Cheng
Microsoft Online Community Support

==================================================

When responding to posts, please "Reply to Group" via your newsreader so
that others may learn and benefit from your issue.

==================================================

This posting is provided "AS IS" with no warranties, and confers no rights.
Bruce - 29 Mar 2006 06:56 GMT
Steven,

Thanks for your help on this.

Just for clarification, the problem was that the public-facing server (where
the app is deployed) was showing the wrong server name in the WSDL file.
Yesterday, we got some help on our ISA 2004 configuration on the server in
question, and that fixed the problem.  The WSDL is fine now.

Thanks,
-- Bruce

> Hi Bruce,
>
[quoted text clipped - 49 lines]
> This posting is provided "AS IS" with no warranties, and confers no
> rights.
Steven Cheng[MSFT] - 29 Mar 2006 07:29 GMT
Thank you for the followup Bruce,

Glad that you've fixed the problem now. Anyway, if you have any further
questions or anything else we can help later, please feel free to post here.

Regards,

Steven Cheng
Microsoft Online Community Support

==================================================

When responding to posts, please "Reply to Group" via your newsreader so
that others may learn and benefit from your issue.

==================================================

This posting is provided "AS IS" with no warranties, and confers no rights.

Free Magazines

Get these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...

Oracle MagazineNetwork ComputingComputer WorldBio-IT WorldeWeekInformation WeekInfosecurity
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2009 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.