Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > ASP .Net > ASP .Net Web Services > WSDL shows wrong server name

Reply
Thread Tools

WSDL shows wrong server name

 
 
Bruce
Guest
Posts: n/a
 
      03-26-2006

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">
<wsdlort name="MyServiceSoap" binding="tns:MyServiceSoap">
<soap:address location="http://HPServer/action.asmx"/>
</wsdlort>
<wsdlort name="MyServiceSoap12" binding="tns:MyServiceSoap12">
<soap12:address location="http://HPServer/action.asmx"/>
</wsdlort>
</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


 
Reply With Quote
 
 
 
 
Steven Cheng[MSFT]
Guest
Posts: n/a
 
      03-27-2006
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/lib...7k(VS.80).aspx

#Using a Custom WSDL File in ASP.NET Web Services
http://pluralsight.com/blogs/craig/a.../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.


 
Reply With Quote
 
 
 
 
Bruce
Guest
Posts: n/a
 
      03-29-2006
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

"Steven Cheng[MSFT]" <(E-Mail Removed)> wrote in message
news:cxT%(E-Mail Removed)...
> 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/lib...7k(VS.80).aspx
>
> #Using a Custom WSDL File in ASP.NET Web Services
> http://pluralsight.com/blogs/craig/a.../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.
>
>



 
Reply With Quote
 
Steven Cheng[MSFT]
Guest
Posts: n/a
 
      03-29-2006
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.

 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
IE shows false and Firefox shows true Gianni Javascript 3 07-10-2009 09:18 PM
webservices, wsdl & xsd (schema-2-wsdl) Dark Java 1 11-14-2008 07:58 PM
Modifying service name and port name in WSDL Wind ASP .Net Web Services 1 04-01-2008 10:52 PM
Session var in page_load shows old value, buttonclick shows new . Whats wrong gce ASP .Net 0 05-07-2005 06:50 AM
OVERride "binding" name and "portType" name in WSDL Bilge ASP .Net Web Services 0 11-21-2003 09:52 PM



Advertisments