Configure PPC to hit different web service server

  • Thread starter Thread starter Harry Simpson
  • Start date Start date
H

Harry Simpson

I've set a web reference to the webservice on my local box.
http://localhost/Webservicename/Start.asmx
But when i deploy it'll be different obviously ....
I've googled this and it talks about setting the Web Reference to dynamic.
Then in the Settings.Config set the url to the webservice's start asmx page.

Then in code:
after creating the web service object instance:
objService.url = http://differentserver/Webservicename/Start.asmx

Where is it I can set the web reference to dynamic?? I can't find such a
beast...

TIA

Harry

PS....or is there a better way?
 
Thanks Sergey,

I'm using my own version of the Configuration settings deal.
Have not seen this .Discover method though.

Thanks for the tip.

Harry

Sergey Bogdanov said:
For storing your application settings consider full framework analogue -
ConfigurationSettings [1] which is written in OpenNETCF. Then in your
applicaiton use:

WebService ws = new WebService();
ws.Url = Configuration.AppSettings["WebService.Url"];
ws.Discover();

ws.WebMethod();

[1]
http://www.opennetcf.org/SourceBrow...netPub/wwwroot/Source/OpenNETCF/Configuration

Best regards,
Sergey Bogdanov
http://www.sergeybogdanov.com

Harry said:
I've set a web reference to the webservice on my local box.
http://localhost/Webservicename/Start.asmx
But when i deploy it'll be different obviously ....
I've googled this and it talks about setting the Web Reference to
dynamic. Then in the Settings.Config set the url to the webservice's
start asmx page.

Then in code:
after creating the web service object instance:
objService.url = http://differentserver/Webservicename/Start.asmx

Where is it I can set the web reference to dynamic?? I can't find such a
beast...

TIA

Harry

PS....or is there a better way?
 
Sorry, forget about .Discover I was involved in my ASP.NET project (in
the ASP.NET environment you should call .Discover) and that is why was a
bit confused by it...

Best regards,
Sergey Bogdanov
http://www.sergeybogdanov.com

Harry said:
Thanks Sergey,

I'm using my own version of the Configuration settings deal.
Have not seen this .Discover method though.

Thanks for the tip.

Harry

For storing your application settings consider full framework analogue -
ConfigurationSettings [1] which is written in OpenNETCF. Then in your
applicaiton use:

WebService ws = new WebService();
ws.Url = Configuration.AppSettings["WebService.Url"];
ws.Discover();

ws.WebMethod();

[1]
http://www.opennetcf.org/SourceBrow...netPub/wwwroot/Source/OpenNETCF/Configuration

Best regards,
Sergey Bogdanov
http://www.sergeybogdanov.com

Harry said:
I've set a web reference to the webservice on my local box.
http://localhost/Webservicename/Start.asmx
But when i deploy it'll be different obviously ....
I've googled this and it talks about setting the Web Reference to
dynamic. Then in the Settings.Config set the url to the webservice's
start asmx page.

Then in code:
after creating the web service object instance:
objService.url = http://differentserver/Webservicename/Start.asmx

Where is it I can set the web reference to dynamic?? I can't find such a
beast...

TIA

Harry

PS....or is there a better way?
 
I've got the same problem (working in PPC and ASP.NET) but i was about to
ask you where you got discover....<g>


Sergey Bogdanov said:
Sorry, forget about .Discover I was involved in my ASP.NET project (in the
ASP.NET environment you should call .Discover) and that is why was a bit
confused by it...

Best regards,
Sergey Bogdanov
http://www.sergeybogdanov.com

Harry said:
Thanks Sergey,

I'm using my own version of the Configuration settings deal.
Have not seen this .Discover method though.

Thanks for the tip.

Harry

For storing your application settings consider full framework analogue -
ConfigurationSettings [1] which is written in OpenNETCF. Then in your
applicaiton use:

WebService ws = new WebService();
ws.Url = Configuration.AppSettings["WebService.Url"];
ws.Discover();

ws.WebMethod();

[1]
http://www.opennetcf.org/SourceBrow...netPub/wwwroot/Source/OpenNETCF/Configuration

Best regards,
Sergey Bogdanov
http://www.sergeybogdanov.com

Harry Simpson wrote:

I've set a web reference to the webservice on my local box.
http://localhost/Webservicename/Start.asmx
But when i deploy it'll be different obviously ....
I've googled this and it talks about setting the Web Reference to
dynamic. Then in the Settings.Config set the url to the webservice's
start asmx page.

Then in code:
after creating the web service object instance:
objService.url = http://differentserver/Webservicename/Start.asmx

Where is it I can set the web reference to dynamic?? I can't find such a
beast...

TIA

Harry

PS....or is there a better way?
 
Back
Top