Showing posts with label services. Show all posts
Showing posts with label services. Show all posts

Wednesday, March 28, 2012

Web Service

Hi,

I'm new in aspx an new in web services. i made a few web services as test and works fine. I have the following situation :

I have a process that needs 30 min to run. I launch the process using asp.net in a web page. This process consist in charge a table in a SQL database from a TXT file, and make some actions.

My question is : can i use a web service as batch procesing to do that charge and let the browser free so the usr can do other task?

Thk's

:thumb:not sure but one suggestion, a poor one, would be to use frames in the browser.
you could do threading but do not think ASP.NET has that, unless im mistaken :)
Do you mean you need an Asynchronous Web Service? Does the web service need to return a result to the user?

web Service

how to call a function from wed services to a windows application?Please explain more about what you want to do. You want to write a Web service that makes a call to a Windows application? What kind of Windows application? What are you trying to do?

Don
donkienly thanks for your reply.Lets make my question more specific.If i would like to do a calculator which is in the windows application where the calculation metod/function are all in the web services.
problems is I already created the web services but i cant call it out from in the windows application,while i write the function name in the windows application it shown me the error that the function is not a member of the web services.how can i avoid it?
Ah, gotcha. Have you added a Web reference to your project, assuiming you are using Visual Studio .NET? If not, you have to do that first, in the Solution Explorer window.

Let me know if you've done that, and we can go from there.

Don
Refer
Link
thanks i managed to fixed it
how if i would like to store the data from the web service to the client database(PDA) where the client is programed in windows application.

Web service

I am wanting to display the following:

http://www.nraila.org/Services/Legi...dates.asmx?WSDL

in a datagrid on a website.

Any good place to start in figuring out how to do this? I've found some
RSS stuff on the web, but it doesnt allow you to adjust the content like
loading it into a datagrid would do.

BCGoober:
I got it up and running in about 2 minutes, bet you can do the same.

In VS.Net, open a web project (new or existing), right click on "References"
and select "Add Web reference" enter that URL in the box and hit "go".
Click "Add Referenc"

in your page, drop a datagrid, set the AutoGenerateColumns to true ala:
<asp:DataGrid AutoGenerateColumns="True" Runat="server" ID="grid" /
in your codebehind, just do:
Protected grid As System.Web.UI.WebControls.DataGrid

Private Sub Page_Load(ByVal sender As Object, ByVal e As System.EventArgs)
Handles MyBase.Load
Dim nraila As New org.nraila.www.NRAILANewsandUpdatesSyndication
grid.DataSource = nraila.GetLegislativeUpdates()
grid.DataBind()
End Sub

and you should be all go :)

Karl

--
MY ASP.Net tutorials
http://www.openmymind.net/

"Goober" <goober@.christian.net> wrote in message
news:e6EKBrJCFHA.612@.TK2MSFTNGP09.phx.gbl...
> I am wanting to display the following:
> http://www.nraila.org/Services/Legi...dates.asmx?WSDL
> in a datagrid on a website.
> Any good place to start in figuring out how to do this? I've found some
> RSS stuff on the web, but it doesnt allow you to adjust the content like
> loading it into a datagrid would do.
> BC
Karl :
how to add a web reference when there is a proxy ??

"Karl Seguin" wrote:

> Goober:
> I got it up and running in about 2 minutes, bet you can do the same.
> In VS.Net, open a web project (new or existing), right click on "References"
> and select "Add Web reference" enter that URL in the box and hit "go".
> Click "Add Referenc"
> in your page, drop a datagrid, set the AutoGenerateColumns to true ala:
> <asp:DataGrid AutoGenerateColumns="True" Runat="server" ID="grid" />
> in your codebehind, just do:
> Protected grid As System.Web.UI.WebControls.DataGrid
> Private Sub Page_Load(ByVal sender As Object, ByVal e As System.EventArgs)
> Handles MyBase.Load
> Dim nraila As New org.nraila.www.NRAILANewsandUpdatesSyndication
> grid.DataSource = nraila.GetLegislativeUpdates()
> grid.DataBind()
> End Sub
> and you should be all go :)
> Karl
>
> --
> MY ASP.Net tutorials
> http://www.openmymind.net/
>
> "Goober" <goober@.christian.net> wrote in message
> news:e6EKBrJCFHA.612@.TK2MSFTNGP09.phx.gbl...
> > I am wanting to display the following:
> > http://www.nraila.org/Services/Legi...dates.asmx?WSDL
> > in a datagrid on a website.
> > Any good place to start in figuring out how to do this? I've found some
> > RSS stuff on the web, but it doesnt allow you to adjust the content like
> > loading it into a datagrid would do.
> > BC
>
Vinay:
To be honest I didn't know...but a google search turned up a couple results
you might find handy:
http://www.devx.com/tips/Tip/17401?trk=DXRSS_DOTNET
and
http://www.codeproject.com/vb/net/w...ce_by_proxy.asp

Hope this helps,
Karl
--
MY ASP.Net tutorials
http://www.openmymind.net/

"vinay" <vinay@.discussions.microsoft.com> wrote in message
news:8A4764EA-CFA0-41F3-8B76-C9FB38307CAA@.microsoft.com...
> Karl :
> how to add a web reference when there is a proxy ??
> "Karl Seguin" wrote:
> > Goober:
> > I got it up and running in about 2 minutes, bet you can do the same.
> > In VS.Net, open a web project (new or existing), right click on
"References"
> > and select "Add Web reference" enter that URL in the box and hit "go".
> > Click "Add Referenc"
> > in your page, drop a datagrid, set the AutoGenerateColumns to true ala:
> > <asp:DataGrid AutoGenerateColumns="True" Runat="server" ID="grid" />
> > in your codebehind, just do:
> > Protected grid As System.Web.UI.WebControls.DataGrid
> > Private Sub Page_Load(ByVal sender As Object, ByVal e As
System.EventArgs)
> > Handles MyBase.Load
> > Dim nraila As New org.nraila.www.NRAILANewsandUpdatesSyndication
> > grid.DataSource = nraila.GetLegislativeUpdates()
> > grid.DataBind()
> > End Sub
> > and you should be all go :)
> > Karl
> > --
> > MY ASP.Net tutorials
> > http://www.openmymind.net/
> > "Goober" <goober@.christian.net> wrote in message
> > news:e6EKBrJCFHA.612@.TK2MSFTNGP09.phx.gbl...
> > > I am wanting to display the following:
> > > > http://www.nraila.org/Services/Legi...dates.asmx?WSDL
> > > > in a datagrid on a website.
> > > > Any good place to start in figuring out how to do this? I've found
some
> > > RSS stuff on the web, but it doesnt allow you to adjust the content
like
> > > loading it into a datagrid would do.
> > > > BC

Web service

I am wanting to display the following:
http://www.nraila.org/Services/Legi...dates.asmx?WSDL
in a datagrid on a website.
Any good place to start in figuring out how to do this? I've found some
RSS stuff on the web, but it doesnt allow you to adjust the content like
loading it into a datagrid would do.
BCGoober:
I got it up and running in about 2 minutes, bet you can do the same.
In VS.Net, open a web project (new or existing), right click on "References"
and select "Add Web reference" enter that URL in the box and hit "go".
Click "Add Referenc"
in your page, drop a datagrid, set the AutoGenerateColumns to true ala:
<asp:DataGrid AutoGenerateColumns="True" Runat="server" ID="grid" />
in your codebehind, just do:
Protected grid As System.Web.UI.WebControls.DataGrid
Private Sub Page_Load(ByVal sender As Object, ByVal e As System.EventArgs)
Handles MyBase.Load
Dim nraila As New org.nraila.www.NRAILANewsandUpdatesSyndication
grid.DataSource = nraila.GetLegislativeUpdates()
grid.DataBind()
End Sub
and you should be all go :)
Karl
MY ASP.Net tutorials
http://www.openmymind.net/
"Goober" <goober@.christian.net> wrote in message
news:e6EKBrJCFHA.612@.TK2MSFTNGP09.phx.gbl...
> I am wanting to display the following:
> http://www.nraila.org/Services/Legi...dates.asmx?WSDL
> in a datagrid on a website.
> Any good place to start in figuring out how to do this? I've found some
> RSS stuff on the web, but it doesnt allow you to adjust the content like
> loading it into a datagrid would do.
> BC
Karl :
how to add a web reference when there is a proxy '
"Karl Seguin" wrote:

> Goober:
> I got it up and running in about 2 minutes, bet you can do the same.
> In VS.Net, open a web project (new or existing), right click on "Reference
s"
> and select "Add Web reference" enter that URL in the box and hit "go".
> Click "Add Referenc"
> in your page, drop a datagrid, set the AutoGenerateColumns to true ala:
> <asp:DataGrid AutoGenerateColumns="True" Runat="server" ID="grid" />
> in your codebehind, just do:
> Protected grid As System.Web.UI.WebControls.DataGrid
> Private Sub Page_Load(ByVal sender As Object, ByVal e As System.EventArgs)
> Handles MyBase.Load
> Dim nraila As New org.nraila.www.NRAILANewsandUpdatesSyndication
> grid.DataSource = nraila.GetLegislativeUpdates()
> grid.DataBind()
> End Sub
> and you should be all go :)
> Karl
>
> --
> MY ASP.Net tutorials
> http://www.openmymind.net/
>
> "Goober" <goober@.christian.net> wrote in message
> news:e6EKBrJCFHA.612@.TK2MSFTNGP09.phx.gbl...
>
>
Vinay:
To be honest I didn't know...but a google search turned up a couple results
you might find handy:
http://www.devx.com/tips/Tip/17401?trk=DXRSS_DOTNET
and
http://www.codeproject.com/vb/net/w...ce_by_proxy.asp
Hope this helps,
Karl
--
MY ASP.Net tutorials
http://www.openmymind.net/
"vinay" <vinay@.discussions.microsoft.com> wrote in message
news:8A4764EA-CFA0-41F3-8B76-C9FB38307CAA@.microsoft.com...
> Karl :
> how to add a web reference when there is a proxy '
> "Karl Seguin" wrote:
>
"References"
System.EventArgs)
some
like

web service 401 unauthorized

I am using Avanade ACA web services which I guess uses .net web
services under the wraps. My requirement is use windows authentication
and allow user identity to pass thru to the web service and then to a
database.
I have two websites in the same box - one is the UI and other is the
webservices. It works when I have anonymous clicked on in the
webservices but it does not work when I switch this off and windows
authentication on. It throws the exception - system.net.webexception
401 Unathorrized.
I have tried using
<system.net>
<defaultProxy useDefaultCredentials="true">
<system.net>
in the web services but with no success. I have also given all
permissions to the Network Service (default app pool identity) for the
file system for the web site.
Now this looks like a common problem with .net web services and I am
not sure what else I can try.
Anyone done this before or have some idea?
Thanks in advance
Kishana Webservice method call simply transmits a SOAP envelope; no windows
credentials are included. So using Windows authentication in the IIS without
some sort of mechanism to transmit credentials as one would get with a norma
l
browser request that knows how to reply to the www-authenticate challenge is
not going to work.
-- Peter
Site: http://www.eggheadcafe.com
UnBlog: http://petesbloggerama.blogspot.com
Short Urls & more: http://ittyurl.net
"kishan.bisht@.gmail.com" wrote:

> I am using Avanade ACA web services which I guess uses .net web
> services under the wraps. My requirement is use windows authentication
> and allow user identity to pass thru to the web service and then to a
> database.
> I have two websites in the same box - one is the UI and other is the
> webservices. It works when I have anonymous clicked on in the
> webservices but it does not work when I switch this off and windows
> authentication on. It throws the exception - system.net.webexception
> 401 Unathorrized.
> I have tried using
> <system.net>
> <defaultProxy useDefaultCredentials="true">
> <system.net>
> in the web services but with no success. I have also given all
> permissions to the Network Service (default app pool identity) for the
> file system for the web site.
> Now this looks like a common problem with .net web services and I am
> not sure what else I can try.
> Anyone done this before or have some idea?
> Thanks in advance
> Kishan
>
On Mar 20, 12:46=A0am, Peter Bromberg [C# MVP]
<pbromb...@.yahoo.NoSpamMaam.com> wrote:
> a Webservice method call simply transmits a SOAP envelope; no windows
> credentials are included. So using Windows authentication in the IIS witho=[/color
]
ut
> some sort of mechanism to transmit credentials as one would get with a nor=[/color
]
mal
> browser request that knows how to reply to the www-authenticate challenge =[/color
]
is
> not going to work.
> -- Peter
> Site:http://www.eggheadcafe.com
> UnBlog:http://petesbloggerama.blogspot.com
> Short Urls & more:http://ittyurl.net
>
> "kishan.bi...@.gmail.com" wrote:
>
>
>
>
>
>
>
> - Show quoted text -
Thanks Peter.
So that means if I need to invoke web services programmatically from
the asp.net I will have to explicitly set user credentials on the SOAP
header.
Is there something built into the framework to do that?
Kishan

Monday, March 26, 2012

Web service Application

what is web services in asp.net. can it possible to discuss about one web service application.Web Services are basically applications that can be accessed remotely in order to perform a function for multiple users. An example of a very basic Web Service might be one that converts a value from Km to Miles. The client application would take the value in Km, format it in the way that the Web Service requires and send the value off to the Service. The service would perform the conversion and send the new value back for the client to display or use in it's own way.
A more complex example is the Amazon.com Web Service. This Service allows any user to connect to it's database of products, perform searches, use a shopping cart and many, many other functions without having to create much more than a simple application. In simplified terms I suppose the Web Service is like a pre-built back-end for your application, which means you only have to create a front-end to format the information that you recieve.

Google have webservice and Amazon also
Check this refrenece
http://aspnet.4guysfromrolla.com/articles/100803-1.aspx
HTH

web service beginners question

I have seen examples of web services where a particular method returns a
single value, a string or an integer usually. I need to be able to
return 1 or more values (depending upon what an SQL query returns). If
I write a method in my web service that returns an ArrayList or array,
will the XML that is returned by the web service deal with this
appropriately (i.e. put each element in the array in a separate tag)?
Cheers,
Mike
*** Sent via Developersdex http://www.examnotes.net ***
Don't just participate in USENET...get rewarded for it!how about returning a dataset. a dataset is the only serializeable,
remoteable object.
Regards,
Alvin Bruney
[ASP.NET MVP http://mvp.support.microsoft.com/default.aspx]
Got tidbits? Get it here... http://tinyurl.com/27cok
"Mike P" <mrp@.telcoelectronics.co.uk> wrote in message
news:%23a8qSZShEHA.1972@.TK2MSFTNGP09.phx.gbl...
>I have seen examples of web services where a particular method returns a
> single value, a string or an integer usually. I need to be able to
> return 1 or more values (depending upon what an SQL query returns). If
> I write a method in my web service that returns an ArrayList or array,
> will the XML that is returned by the web service deal with this
> appropriately (i.e. put each element in the array in a separate tag)?
>
> Cheers,
> Mike
>
> *** Sent via Developersdex http://www.examnotes.net ***
> Don't just participate in USENET...get rewarded for it!
Alvin,
Yes, I'd think that returning a dataset would be the best option.
I'm currently reading data from an XML file using XPathNavigator and
XPathNodeIterator to select the subset of data that I want. I've never
using the XPath objects before so I'm not sure how to get this data into
a dataset.
XPathDocument doc = new
XPathDocument(@."C:\inetpub\wwwroot\test\test.xml");
XPathNavigator nav = doc.CreateNavigator();
XPathNodeIterator iter =
nav.Select("/test/translation/engword[preceding-sibling::fraword = '" +
strFraWord + "']");
Can anybody help me out with this?
Cheers,
Mike
*** Sent via Developersdex http://www.examnotes.net ***
Don't just participate in USENET...get rewarded for it!
Mike,
Any data at all may be sent via a web service.
The only requirement is that the object you are sending has to utilize the
iSerializable interface. The ArrayList object does so, so that is one you
can use as is.
You may also build your own classes which utilize iSerializable.
Sincerely,
S. Justin Gengo, MCP
Web Developer / Programmer
www.aboutfortunate.com
"Out of chaos comes order."
Nietzsche
"Mike P" <mrp@.telcoelectronics.co.uk> wrote in message
news:%23a8qSZShEHA.1972@.TK2MSFTNGP09.phx.gbl...
>I have seen examples of web services where a particular method returns a
> single value, a string or an integer usually. I need to be able to
> return 1 or more values (depending upon what an SQL query returns). If
> I write a method in my web service that returns an ArrayList or array,
> will the XML that is returned by the web service deal with this
> appropriately (i.e. put each element in the array in a separate tag)?
>
> Cheers,
> Mike
>
> *** Sent via Developersdex http://www.examnotes.net ***
> Don't just participate in USENET...get rewarded for it!

web service beginners question

I have seen examples of web services where a particular method returns a
single value, a string or an integer usually. I need to be able to
return 1 or more values (depending upon what an SQL query returns). If
I write a method in my web service that returns an ArrayList or array,
will the XML that is returned by the web service deal with this
appropriately (i.e. put each element in the array in a separate tag)?

Cheers,

Mike

*** Sent via Developersdex http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it!how about returning a dataset. a dataset is the only serializeable,
remoteable object.

--
Regards,
Alvin Bruney
[ASP.NET MVP http://mvp.support.microsoft.com/default.aspx]
Got tidbits? Get it here... http://tinyurl.com/27cok
"Mike P" <mrp@.telcoelectronics.co.uk> wrote in message
news:%23a8qSZShEHA.1972@.TK2MSFTNGP09.phx.gbl...
>I have seen examples of web services where a particular method returns a
> single value, a string or an integer usually. I need to be able to
> return 1 or more values (depending upon what an SQL query returns). If
> I write a method in my web service that returns an ArrayList or array,
> will the XML that is returned by the web service deal with this
> appropriately (i.e. put each element in the array in a separate tag)?
>
> Cheers,
> Mike
>
> *** Sent via Developersdex http://www.developersdex.com ***
> Don't just participate in USENET...get rewarded for it!
Alvin,

Yes, I'd think that returning a dataset would be the best option.

I'm currently reading data from an XML file using XPathNavigator and
XPathNodeIterator to select the subset of data that I want. I've never
using the XPath objects before so I'm not sure how to get this data into
a dataset.

XPathDocument doc = new
XPathDocument(@."C:\inetpub\wwwroot\test\test.xml");
XPathNavigator nav = doc.CreateNavigator();
XPathNodeIterator iter =
nav.Select("/test/translation/engword[preceding-sibling::fraword = '" +
strFraWord + "']");

Can anybody help me out with this?

Cheers,

Mike

*** Sent via Developersdex http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it!

Saturday, March 24, 2012

Web service not updating

Hi,

I could not see a forum for web services so it is here.

I having written a service with VS 2005.

When i am making changes to it, I am not seeing the changes applied.

To publish I am using a FTP client to copy the precompiled files to the website which is public on the internet (IIS 6.0)

I added code to throw a exception when it calls my function in the web service but it is not firing.

Is it being cached somehow???

I have tried restarting IIS on the server even.

Malcolm

If you reset IIS then it's not a server caching issue. Perhaps your calling app/browser is caching it, or if you are on a network do you have a caching/proxy box inbetween that is caching?

I am consuming the service via a Winforms app VS2005.

So does that make a difference?


Not sure... but perhaps it's being cached locally then, similar to your Browser's "temp files".

Web Service Parameters Lost

Hello,

I am trying to learn about web services. I was able to get a working
VS 2005 web service and VS 2005 web service consumer application to
communicate. The service would return the passed in string parameter
and "Hello World", thus printing "myteststring Hello Word"

When I tried to use a Delphi 2006 win32 web service consumer for the
same service, the parameters were lost and it just returned "Hello
World". I first thought that there was something wrong with my Delphi
client, but when I tried to use another service made from .NET it
worked fine. Now I am thinking that my web service is at fault.

0. How should I begin troubleshooting this setup?
1. Is there a setting in VS/Delphi that could affect parameter
passing
2. How can I capture the SOAP requests into/outof the web service to
examine what is different between the clients

Thanks,

BryanHi,

hinsbr@.cableone.net wrote:
> Hello,
> I am trying to learn about web services. I was able to get a working
> VS 2005 web service and VS 2005 web service consumer application to
> communicate. The service would return the passed in string parameter
> and "Hello World", thus printing "myteststring Hello Word"
> When I tried to use a Delphi 2006 win32 web service consumer for the
> same service, the parameters were lost and it just returned "Hello
> World". I first thought that there was something wrong with my Delphi
> client, but when I tried to use another service made from .NET it
> worked fine. Now I am thinking that my web service is at fault.
> 0. How should I begin troubleshooting this setup?
> 1. Is there a setting in VS/Delphi that could affect parameter
> passing
> 2. How can I capture the SOAP requests into/outof the web service to
> examine what is different between the clients
> Thanks,
> Bryan

Disclaimer: All information here is valid in the Framework 1.1, I am not
sure if it changed in 2.0.

In my experience, a typical case where parameters get lost is that you
use a RPC SOAP request with a Document SOAP Web Method, or the opposite.
SOAP comes in two flavours, RPC and Document. To enable a RPC Web
Method, you need the decoration attribute:

[SoapRpcMethod]

before the method declaration (where you place the [WebMethod]
attribute). Per default, web methods work in document mode in Visual Studio.

To debug the setup, a good idea is to observe the HTTP request/response,
where you should see the SOAP XML content. To do this, I use TCP Trace.
It's not very complicated to use, but you need to change the destination
port of your web service request, for example to 8080. Please refer to
TCP Trace documentation at
http://www.pocketsoap.com/tcpTrace/

This should help you to get on track.

Greetings,
Laurent

Web Service Parameters Lost

Hello,
I am trying to learn about web services. I was able to get a working
VS 2005 web service and VS 2005 web service consumer application to
communicate. The service would return the passed in string parameter
and "Hello World", thus printing "myteststring Hello Word"
When I tried to use a Delphi 2006 win32 web service consumer for the
same service, the parameters were lost and it just returned "Hello
World". I first thought that there was something wrong with my Delphi
client, but when I tried to use another service made from .NET it
worked fine. Now I am thinking that my web service is at fault.
0. How should I begin troubleshooting this setup?
1. Is there a setting in VS/Delphi that could affect parameter
passing
2. How can I capture the SOAP requests into/outof the web service to
examine what is different between the clients
Thanks,
BryanHi,
hinsbr@.cableone.net wrote:
> Hello,
> I am trying to learn about web services. I was able to get a working
> VS 2005 web service and VS 2005 web service consumer application to
> communicate. The service would return the passed in string parameter
> and "Hello World", thus printing "myteststring Hello Word"
> When I tried to use a Delphi 2006 win32 web service consumer for the
> same service, the parameters were lost and it just returned "Hello
> World". I first thought that there was something wrong with my Delphi
> client, but when I tried to use another service made from .NET it
> worked fine. Now I am thinking that my web service is at fault.
> 0. How should I begin troubleshooting this setup?
> 1. Is there a setting in VS/Delphi that could affect parameter
> passing
> 2. How can I capture the SOAP requests into/outof the web service to
> examine what is different between the clients
> Thanks,
> Bryan
Disclaimer: All information here is valid in the Framework 1.1, I am not
sure if it changed in 2.0.
In my experience, a typical case where parameters get lost is that you
use a RPC SOAP request with a Document SOAP Web Method, or the opposite.
SOAP comes in two flavours, RPC and Document. To enable a RPC Web
Method, you need the decoration attribute:
[SoapRpcMethod]
before the method declaration (where you place the [WebMethod]
attribute). Per default, web methods work in document mode in Visual Studio.
To debug the setup, a good idea is to observe the HTTP request/response,
where you should see the SOAP XML content. To do this, I use TCP Trace.
It's not very complicated to use, but you need to change the destination
port of your web service request, for example to 8080. Please refer to
TCP Trace documentation at
http://www.pocketsoap.com/tcpTrace/
This should help you to get on track.
Greetings,
Laurent

Web Service question

Some developers say Web Services are slow. Is Remoting any faster? Or what's better than them? Please explain pros and cons on each one of them. Thanks.


thuhue, you seem to ask a lot of these kinds of questions. Therehave been a lot of articles and blog posts on this topic. Youmight consider using Google or visiting the MSDN library and doing somereading so that you have gained this background information foryourself.

Web Service Question

First you must forgive me because I am new to web services! My question/sit
uation is this. I have a messenger program (Windows Form based) that uses a
web service. Is there any way to check if that web service is online at an
y given time. I have read
where programs that use web services will "hang" if the service goes down.
Is there any way to make sure a web service is up before executing function
calls against it? Please post examples. I love this .NET stuff! C# is ver
y even for a former ja
va guy.
Thank you in advance,
DeanOn Mon, 5 Jul 2004 14:32:01 -0700, Dean Bortell
<DeanBortell@.discussions.microsoft.com> wrote:

>First you must forgive me because I am new to web services! My question/situation
is this. I have a messenger program (Windows Form based) that uses a web service.
Is there any way to check if that web service is online at any given time. I have r
ead
where programs that use web services will "hang" if the service goes down.
Is there any way to make sure a web service is up before executing function
calls against it? Please post examples. I love this .NET stuff! C# is ver
y even for a former j
ava guy.
>
A web service is nothing more than a web page with a well publicized
way of sending and receiving data. Other than just sending something
and seeing what comes back, I dont know of anything else.
Of course, it should be something you can track as well. If you want
to have a client side timeout, you could do so on your side.

Web Service Question

First you must forgive me because I am new to web services! My question/situation is this. I have a messenger program (Windows Form based) that uses a web service. Is there any way to check if that web service is online at any given time. I have read where programs that use web services will "hang" if the service goes down. Is there any way to make sure a web service is up before executing function calls against it? Please post examples. I love this .NET stuff! C# is very cool even for a former java guy.

Thank you in advance,

DeanOn Mon, 5 Jul 2004 14:32:01 -0700, Dean Bortell
<DeanBortell@.discussions.microsoft.com> wrote:

>First you must forgive me because I am new to web services! My question/situation is this. I have a messenger program (Windows Form based) that uses a web service. Is there any way to check if that web service is online at any given time. I have read where programs that use web services will "hang" if the service goes down. Is there any way to make sure a web service is up before executing function calls against it? Please post examples. I love this .NET stuff! C# is very cool even for a former java guy.

A web service is nothing more than a web page with a well publicized
way of sending and receiving data. Other than just sending something
and seeing what comes back, I dont know of anything else.

Of course, it should be something you can track as well. If you want
to have a client side timeout, you could do so on your side.

Web Service Question

Hi there,
I'm new to web services. I'm writing a basic file maintenance
application in asp.net. For example I'll fill a grid with all the records
from a table, then allow the user to select a record (row) and I'll show the
individual fields of the row in the form. The user can update the fields and
then I'd like to send the fields back through a web service for updating.
I've tried to specify a custom class as the parameter. See the example
below. My problem is that when I specify the class as a paramenterin the
client application I get a compile time error "Value of type
"IdealClass.atyMaint' cannot be converted to
'Ideal.updAccountType.atymaint." Atymaint is the name of my class. I have
this class defined in a project that is separate from my web service project
and my client project. I then reference this class from both the web service
and client projects. See the excerpts below.

From IdealClass project in atyMaint.vb

Public Class atyMaint

Public AMTYP as string
Public AMDESC as string
Public AMPRICE as string

End Class

From client project

dim atymaint as new idealclass.atymaint

atymaint.amtyp = me.txttype.text
atymaint.amdesc = me.txtdesc.text
atymaint.amprice = me.txtprice.text

dimWebservice as new updAccountType.updAccountType
errMsgString = Webservice.updAccountType(atymaint)

From web service project

<WebMethod () > _
Pubic Function updAccountType(ByVal atymaint as IdealClass.atyMaint) as
string

... stuff

End FunctionHiya! :)

I hope I can provide some help for you, but I'm not quite sure of all the
details as I have forgotten all about VB since C# arrived. ;) Anyway, here's
some hints that might get it working..

When using a web reference you have to use the generated proxy class
'Ideal.updAccountType.atymaint' instead of 'IdealClass.atyMaint'. If you
want to do some plumbing, (and repetitive work :P) you can fix this by
clicking "Show all files" in the Solution Explorer, navigate to your web
reference, expand it and it's Reference.map document. Inside you should find
Reference.vb. Comment out the proxy class, and replace all references to
atyMaint with IdealClass.atyMaint. You have to redo this every time you
update the web reference. In addition, you have to specify how
IdealClass.atyMaint should serialize as XML. Add
<System.Xml.Serialization.XmlRoot("atyMaint")> above Public Class atyMaint,
and <System.Xml.Serialization.XmlElement("AMTYP")> above Public AMTYP as
string etc.

There's a nice tool for generating web service proxy classes called wsdl.exe
included in the .net framework you can use to get rid of the update web
reference problem though. You can read more about it here:
http://msdn.microsoft.com/library/d...erviceProxy.asp
There's also a lot more info on web services in the same folder as that
article. ;)

HTH,
Lars-Erik

"benthanger@.online.nospam"
<benthangeronlinenospam@.discussions.microsoft.com> wrote in message
news:8DEFC42E-21E7-4057-B20B-381B319CB478@.microsoft.com...
> Hi there,
> I'm new to web services. I'm writing a basic file maintenance
> application in asp.net. For example I'll fill a grid with all the records
> from a table, then allow the user to select a record (row) and I'll show
> the
> individual fields of the row in the form. The user can update the fields
> and
> then I'd like to send the fields back through a web service for updating.
> I've tried to specify a custom class as the parameter. See the example
> below. My problem is that when I specify the class as a paramenterin the
> client application I get a compile time error "Value of type
> "IdealClass.atyMaint' cannot be converted to
> 'Ideal.updAccountType.atymaint." Atymaint is the name of my class. I
> have
> this class defined in a project that is separate from my web service
> project
> and my client project. I then reference this class from both the web
> service
> and client projects. See the excerpts below.
> From IdealClass project in atyMaint.vb
> Public Class atyMaint
> Public AMTYP as string
> Public AMDESC as string
> Public AMPRICE as string
> End Class
> From client project
> dim atymaint as new idealclass.atymaint
> atymaint.amtyp = me.txttype.text
> atymaint.amdesc = me.txtdesc.text
> atymaint.amprice = me.txtprice.text
> dimWebservice as new updAccountType.updAccountType
> errMsgString = Webservice.updAccountType(atymaint)
> From web service project
> <WebMethod () > _
> Pubic Function updAccountType(ByVal atymaint as IdealClass.atyMaint) as
> string
> ... stuff
> End Function

Thursday, March 22, 2012

web service reference

I have a web app that is referencing several web services. When I make a change to a web service (add, modify a method), I have to 'Add Web Reference' for the changes to take affect. If I do 'Update web reference' the web app does not see the web service changes.

The web services are on the same box as I'm developing on, the .wsdl files are pointing to the correct location, but the changes aren't happening unless I do 'Add Web Reference'.

Does anyone have or had this same issue? If so how did you resolve it?"Mike" <Mike@.community.nospam.comwrote in message
news:O9I2Vxz4HHA.3940@.TK2MSFTNGP05.phx.gbl...
I have a web app that is referencing several web services. When I make a
change to a web service (add, modify a method), I have to 'Add Web
Reference' for the changes to take affect. If I do 'Update web reference'
the web app does not see the web service changes.

The web services are on the same box as I'm developing on, the .wsdl files
are pointing to the correct location, but the changes aren't happening
unless I do 'Add Web Reference'.

Does anyone have or had this same issue? If so how did you resolve it?

----
What are your web references pointing to? The .asmx files, the .wsdl files,
or .asmx?WSDL?

Also, have you built and deployed the changed web services before trying to
update the references?
--
John Saunders [MVP]
Also, have you built and deployed the changed web services before trying to
update the references? Yes, I build the service then run it test and test it
prior to 'updating' it in the web app.

What are your web references pointing to? The .asmx files, the .wsdl files,

Quote:

Originally Posted by

or .asmx?WSDL? When I add the web reference via the IDE, its adding the
.disco, disomap, and .wsdl file.


the reference in the web.config file is pointing to the .asmx file, but
shouldn't it point to the wsdl file?

I just got put on this project last week, so everything was already setup by
the lead developer on this project, and I'm fixing things as I go, and I
noticed that as I was fixing the web service and trying to access it via the
web app.

"John Saunders [MVP]" <john.saunders at trizetto.comwrote in message
news:uG1K43z4HHA.3916@.TK2MSFTNGP02.phx.gbl...

Quote:

Originally Posted by

"Mike" <Mike@.community.nospam.comwrote in message
news:O9I2Vxz4HHA.3940@.TK2MSFTNGP05.phx.gbl...
I have a web app that is referencing several web services. When I make a
change to a web service (add, modify a method), I have to 'Add Web
Reference' for the changes to take affect. If I do 'Update web reference'
the web app does not see the web service changes.
>
The web services are on the same box as I'm developing on, the .wsdl files
are pointing to the correct location, but the changes aren't happening
unless I do 'Add Web Reference'.
>
>
Does anyone have or had this same issue? If so how did you resolve it?
>
----
What are your web references pointing to? The .asmx files, the .wsdl
files, or .asmx?WSDL?
>
Also, have you built and deployed the changed web services before trying
to update the references?
--
John Saunders [MVP]
>


"Mike" <Mike@.community.nospam.comwrote in message
news:uusC$9z4HHA.4676@.TK2MSFTNGP05.phx.gbl...

Quote:

Originally Posted by

Also, have you built and deployed the changed web services before trying
to
update the references? Yes, I build the service then run it test and test
it prior to 'updating' it in the web app.
>
What are your web references pointing to? The .asmx files, the .wsdl
files,

Quote:

Originally Posted by

>or .asmx?WSDL? When I add the web reference via the IDE, its adding the
>.disco, disomap, and .wsdl file.


the reference in the web.config file is pointing to the .asmx file, but
shouldn't it point to the wsdl file?


The web.config should point to the .asmx, since that is the URL that will be
used at runtime. I was asking what you see in the Properties of the web
reference itself.

Another thing I thought of is how are you running the web service? You want
to make sure that the web reference is referring to the exact same service
that you've deployed.

For instance, one problem I've had is when the web service was running on a
dynamic port through the Visual Studio.Net internal web server, when my web
reference has been pointing to a fixed location within an IIS web site. This
fits the pattern you posted about: when you do an Add Web Reference, you are
pointing to the real, updated server. When you change it and do an update,
the updated service is running in the internal server, but your web
reference is still pointing to the original, unchanged service.

At design-time, the web reference URL is used to retrieve the WSDL file
which is used to create the proxy classes. At run-time, it is used to talk
to the real service. The trick is to notice when these two are not both
talking to the same service.
--
John Saunders [MVP]

web service running on same thread

Hi,

I have 2 web services (WS1 and WS2). The sessionstate of WS1 is InProc and
the sessionState of WS2 is Off. WS1 is calling a web method on WS2 from 2
different threads (i.e. WS1 triggered from 2 different sessions on different
browsers) simultaneously. However, the called web method on WS2 is running
on the same thread. Is it possible to make the web method on WS2 to run on
different threads?

thanks.

JosephHi Joseph,

Thank you for using Microsoft NewsGroup Service. Based on your description,
you'd like to make a certain WebMethod to execute in different thread when
it is called by different requests? Is my understanding of your problem
correct?

Generally the WebMethod in ASP.NET webservice are all executed in a certain
Thread. The thread is not a ThreadPoolThread. So if you check the ThreadID
each time you called the webmethod, the ID is the same one. Also, there
isn't any attribute or property that can directly change or set this
feature. As for your situation, you want the second webmethod (called by
another stateful webmethod) run in multithread, would you please provide me
more information about the requirement of your program. Maybe we can look
for some other means to deal with it.
Also if you have any other questions on it , please feel free to let me
know.

Steven Cheng
Microsoft Online Support

Get Secure! www.microsoft.com/security
(This posting is provided "AS IS", with no warranties, and confers no
rights.)
Hi Joseph,

Have you had a chance to check out my preceding suggestion? If you have any
problem, please feel free to let me know.

Steven Cheng
Microsoft Online Support

Get Secure! www.microsoft.com/security
(This posting is provided "AS IS", with no warranties, and confers no
rights.)

Web Service Session trouble :(

hi guys,
I've a couple of web services.
The first one authenticates a user, and saves the principal in the session
object.
The second one authorizes after reading the user data from the session.
Up to now, those two worked wonderfully, and we've had no problems with
them. but now, we're using NUnit to build some tests for the services, and a
C# class as the test. It first makes a call to the login service (which
succeeds) and then to the other service, which fails because there is no
current user principal in the session !
I though it was because the two service stubs were in different namespaces.
But I can't help that, VS.NET won't let you add two web references with the
same namespace name.
Does anybody know what might be going on here ?
Cheers,
Angel
O:]Angelos Karantzalis wrote:
> hi guys,
> I've a couple of web services.
> The first one authenticates a user, and saves the principal in the
> session object.
> The second one authorizes after reading the user data from the
> session.
> Up to now, those two worked wonderfully, and we've had no problems
> with them. but now, we're using NUnit to build some tests for the
> services, and a C# class as the test. It first makes a call to the
> login service (which succeeds) and then to the other service, which
> fails because there is no current user principal in the session !
> I though it was because the two service stubs were in different
> namespaces. But I can't help that, VS.NET won't let you add two web
> references with the same namespace name.
> Does anybody know what might be going on here ?
> Cheers,
> Angel
> O:]
Sessions work with cookies. Usually when you call a webservice from
some client, cookies are ignored!
You need to add a place to store those cookies: a CookieContainer.
First create one, then add it to the webservice calls that should work
with the same session.
Hans Kesting
i assume the web services are in the same vdir, if this is true, then
sessions will be shared - namespace does not matter.
you will also have to add support for the session cookie to your nunit code.
as the unit tests run in seperate domain, you will also need some way to
pass the session id from call1 to call2 (globals will not work)
you might want to have a predefined session id used by unit tests, then the
second caller can call a mocker of the authenication call to get the test
session id.
unless you are writing an acceptance test, i would not use the web service.
I would have unit tests call the modules directly, and supply a mocker for
the web service proxy.
-- bruce (sqlwork.com)
"Angelos Karantzalis" <akarantzalis@.yahoo.com> wrote in message
news:uS5ON4mxEHA.3572@.TK2MSFTNGP10.phx.gbl...
| hi guys,
|
| I've a couple of web services.
|
| The first one authenticates a user, and saves the principal in the session
| object.
| The second one authorizes after reading the user data from the session.
|
| Up to now, those two worked wonderfully, and we've had no problems with
| them. but now, we're using NUnit to build some tests for the services, and
a
| C# class as the test. It first makes a call to the login service (which
| succeeds) and then to the other service, which fails because there is no
| current user principal in the session !
|
| I though it was because the two service stubs were in different
namespaces.
| But I can't help that, VS.NET won't let you add two web references with
the
| same namespace name.
|
| Does anybody know what might be going on here ?
|
| Cheers,
| Angel
| O:]
|
|
> Sessions work with cookies. Usually when you call a webservice from
> some client, cookies are ignored!
> You need to add a place to store those cookies: a CookieContainer.
> First create one, then add it to the webservice calls that should work
> with the same session.
> Hans Kesting
>
Thanks Hans, that more or less what I'd figured. Could you point me to some
info on how to add a CookieContainer to the web service stubs ?
Cheers,
Angel
O;]

Web Service Session trouble :(

hi guys,

I've a couple of web services.

The first one authenticates a user, and saves the principal in the session
object.
The second one authorizes after reading the user data from the session.

Up to now, those two worked wonderfully, and we've had no problems with
them. but now, we're using NUnit to build some tests for the services, and a
C# class as the test. It first makes a call to the login service (which
succeeds) and then to the other service, which fails because there is no
current user principal in the session !

I though it was because the two service stubs were in different namespaces.
But I can't help that, VS.NET won't let you add two web references with the
same namespace name.

Does anybody know what might be going on here ?

Cheers,
Angel
O:]Angelos Karantzalis wrote:
> hi guys,
> I've a couple of web services.
> The first one authenticates a user, and saves the principal in the
> session object.
> The second one authorizes after reading the user data from the
> session.
> Up to now, those two worked wonderfully, and we've had no problems
> with them. but now, we're using NUnit to build some tests for the
> services, and a C# class as the test. It first makes a call to the
> login service (which succeeds) and then to the other service, which
> fails because there is no current user principal in the session !
> I though it was because the two service stubs were in different
> namespaces. But I can't help that, VS.NET won't let you add two web
> references with the same namespace name.
> Does anybody know what might be going on here ?
> Cheers,
> Angel
> O:]

Sessions work with cookies. Usually when you call a webservice from
some client, cookies are ignored!
You need to add a place to store those cookies: a CookieContainer.
First create one, then add it to the webservice calls that should work
with the same session.

Hans Kesting
i assume the web services are in the same vdir, if this is true, then
sessions will be shared - namespace does not matter.

you will also have to add support for the session cookie to your nunit code.
as the unit tests run in seperate domain, you will also need some way to
pass the session id from call1 to call2 (globals will not work)

you might want to have a predefined session id used by unit tests, then the
second caller can call a mocker of the authenication call to get the test
session id.

unless you are writing an acceptance test, i would not use the web service.
I would have unit tests call the modules directly, and supply a mocker for
the web service proxy.

-- bruce (sqlwork.com)

"Angelos Karantzalis" <akarantzalis@.yahoo.com> wrote in message
news:uS5ON4mxEHA.3572@.TK2MSFTNGP10.phx.gbl...
| hi guys,
|
| I've a couple of web services.
|
| The first one authenticates a user, and saves the principal in the session
| object.
| The second one authorizes after reading the user data from the session.
|
| Up to now, those two worked wonderfully, and we've had no problems with
| them. but now, we're using NUnit to build some tests for the services, and
a
| C# class as the test. It first makes a call to the login service (which
| succeeds) and then to the other service, which fails because there is no
| current user principal in the session !
|
| I though it was because the two service stubs were in different
namespaces.
| But I can't help that, VS.NET won't let you add two web references with
the
| same namespace name.
|
| Does anybody know what might be going on here ?
|
| Cheers,
| Angel
| O:]
|
|
> Sessions work with cookies. Usually when you call a webservice from
> some client, cookies are ignored!
> You need to add a place to store those cookies: a CookieContainer.
> First create one, then add it to the webservice calls that should work
> with the same session.
> Hans Kesting

Thanks Hans, that more or less what I'd figured. Could you point me to some
info on how to add a CookieContainer to the web service stubs ?

Cheers,
Angel
O;]

Web Service Tutorial with Real Example

Hi.

Is there a place where I can learn about web services using ASP 2.0? Most of the .NET web services tutorials that I was able to find seem to only cover ASP 1.1

Any web service tutorial with some functional example will be really helpful.

Thanks.

http://quickstart.developerfusion.co.uk/quickstart/webservices/

http://msdn2.microsoft.com/en-us/library/aa479043.aspx


Hallo

I suggest a good starting point would be taking a look at the following websites:

http://www.webservicex.net/WCF/default.aspx

http://www.webservicelist.com/

Hope this helps!



I found Philip Miseldine's article "Use Amazon Web Services in ASP.NET" - www.sitepoint.com/article/amazon-web-services-asp-net , simple, interesting & practical. It shows how you can consume Amazon's E-Commerce Service(ECS) to query their catalog with Visual Web Developer 2005 Express.