Ask a Question related to ASP.NET Web Services, Design and Development.
-
Maziar Aflatoun #1
Making a dynamic web service call
Hi,
Is there a way to connect to a Web Service dynamically at runtime (Web
Reference URL)? I have always used Visual Studio to create a Web Reference
and then used it in my code. However, that always requires the URL to the
Web Service to be the same on the staging site and the production site. Now
I have two instances of the same application running (Staging site and
Production) and want to store the URL in a file instead. Is there a way to
do this?
ex. Web.Config AppSetting <add key="WebServiceURL"
Value=http://....webserv.asmx>
Thank you
Maz.
Maziar Aflatoun Guest
-
Web Service Call to consume SAP Web Service
Greetings, I have been stuck trying to get CF 8 to talk to SAP serviced Web Service. Here is code I am using: <cfscript> ws =... -
Making Spyr Dynamic
Have searched for but could not find so I am asking: Can someone clue me into how I can use a Collapsible Panel or Accordion Panel in a PHP page... -
Making dynamic pages static
I need to build a static site (user requirement) with DW template but a number of the pages will contain the same information - a perfect... -
Making a dynamic button
I am bringing into flash xml files via a web service connector and a data set component. Bound to these are are various components to retreive... -
Drop down menu and making it dynamic
Hi All, I have created a Popup menu using Dreamweaver through behaviours. The issue is the menu is bit lengther and when the menu is displayed... -
Brock Allen #2
Re: Making a dynamic web service call
You can use wsdl.exe to generate the proxy instead and use the /urlkey:SomeKey
command line parameter. "SomeKey" will be the element in <appSettings> where
you've stored the URL. The proxy will then automatically read <appSettings?
to fetch the URL. The other option is to manually set the Url property on
the proxy from you code prior to invoking it.
-Brock
DevelopMentor
[url]http://staff.develop.com/ballen[/url]
> Hi,
>
> Is there a way to connect to a Web Service dynamically at runtime (Web
> Reference URL)? I have always used Visual Studio to create a Web
> Reference and then used it in my code. However, that always requires
> the URL to the Web Service to be the same on the staging site and the
> production site. Now I have two instances of the same application
> running (Staging site and Production) and want to store the URL in a
> file instead. Is there a way to do this?
>
> ex. Web.Config AppSetting <add key="WebServiceURL"
> Value=http://....webserv.asmx>
>
> Thank you
> Maz.
Brock Allen Guest
-
Maziar Aflatoun #3
Re: Making a dynamic web service call
Thanks found an easier way
In the properties window of the Web Reference set the property
URL Behavior = Dynamic
This will put an entry into the app.config file that looks something like
this:
<add key="MyApp.TestService.TestService"
value="http://MyServer/MyVirtualDir/MyService.asmx"/>
Which can be edited to reflect the server you wish to work on either in the
app.config directly or in the Web Reference properties again by changing the
Web Reference URL property
Maz.
"Brock Allen" <ballen@NOSPAMdevelop.com> wrote in message
news:857034632538536296323024@msnews.microsoft.com ...> You can use wsdl.exe to generate the proxy instead and use the
> /urlkey:SomeKey command line parameter. "SomeKey" will be the element in
> <appSettings> where you've stored the URL. The proxy will then
> automatically read <appSettings? to fetch the URL. The other option is to
> manually set the Url property on the proxy from you code prior to invoking
> it.
>
> -Brock
> DevelopMentor
> [url]http://staff.develop.com/ballen[/url]
>
>
>>>> Hi,
>>
>> Is there a way to connect to a Web Service dynamically at runtime (Web
>> Reference URL)? I have always used Visual Studio to create a Web
>> Reference and then used it in my code. However, that always requires
>> the URL to the Web Service to be the same on the staging site and the
>> production site. Now I have two instances of the same application
>> running (Staging site and Production) and want to store the URL in a
>> file instead. Is there a way to do this?
>>
>> ex. Web.Config AppSetting <add key="WebServiceURL"
>> Value=http://....webserv.asmx>
>>
>> Thank you
>> Maz.
>
>
Maziar Aflatoun Guest



Reply With Quote

