all groups > dotnet web services > february 2008 >
You're in the

dotnet web services

group:

Bugs in .NET 3.5 Web Service (Dynamic)



Bugs in .NET 3.5 Web Service (Dynamic) Jordan Z.
2/19/2008 1:27:00 PM
dotnet web services: We did a same code base test between 1.1 and 3.5.

In 1.1, when your .NET application reference a library with web reference
(dynamic), you can always easily overwrite the default URL by specifying a
different URL in your app config file or web config file.

Now, in 3.5, I find that this no longer works. No matter what URL you
specify in app config, it still point to default URL, which seems to be a
serious bug to us.

I am not sure if this is an intentional change, (not find any clue yet) or a
bug.

I cannot use new WCF for this, as the web service we are referencing is a
web service written in Java.

Any insight?

Thanks
Re: Bugs in .NET 3.5 Web Service (Dynamic) John Saunders [MVP]
2/19/2008 6:57:37 PM
[quoted text, click to view]

Look in the proxy class to see how it sets the URL.

In particular, I bet this setting has migrated to your new
Settings.settings file in the Properties folder.
--
--------------------------------------------------------------------------------
John Saunders | MVP - Windows Server System - Connected System Developer

Re: Bugs in .NET 3.5 Web Service (Dynamic) Jordan Z.
2/20/2008 9:57:02 AM
Hi. John. Thanks a lot for pointing it out. You are correct.

In 2.0, 3.5, we cannot rely on the old configuration section to overwrite
the dynamic web service URL any more. What we need to do is to configure it
in the new section of configuration file.

1. Adding section in section group containing web service reference's
property settings.
For example:
<configuration><configSections> <sectionGroup name="applicationSettings"
type="System.Configuration.ApplicationSettingsGroup, System, Version=2.0.0.0,
Culture=neutral, PublicKeyToken=b77a5c561934e089" >
<section name="MyWebServiceRefLibrary.Properties.Settings"
type="System.Configuration.ClientSettingsSection, System, Version=2.0.0.0,
Culture=neutral, PublicKeyToken=b77a5c561934e089" requirePermission="false" />
</sectionGroup></configSections>


2. Add this setting.

<applicationSettings>
<MyWebServiceRefLibrary.Properties.Settings>
<setting name="<MyWebServiceNameSpace_MyWebService"
serializeAs="String">
<value>http://localhost:8080/axis/services/MyWebService</value>
</setting>
</MyWebServiceRefLibrary.Properties.Settings>
</applicationSettings></configuration>


Jordan


[quoted text, click to view]
Re: Bugs in .NET 3.5 Web Service (Dynamic) John Saunders [MVP]
2/22/2008 1:23:53 PM
[quoted text, click to view]

Thanks for posting this. I see that I win my bet!
--
--------------------------------------------------------------------------------
John Saunders | MVP - Windows Server System - Connected System Developer

AddThis Social Bookmark Button