Showing posts with label xml. Show all posts
Showing posts with label xml. Show all posts

Wednesday, March 28, 2012

Web Service

I want to write webservice which would just get output from stored procedure (=XML) and send it as XML out. And true is that I realy don't know how to do that. I'm not sure if output from webservice will be string or sthing else.It is easy way to make a Web Service.
1. First , Create a Web Application. such like "http://localhost/webService"
2. Second, Add a new service from solution: Add New Item, select "Web Service", such like: WebService1.asmx.

3. In this page, default has a function, you need to uncomment it.

[WebMethod]
public string HelloWorld()
{
return "Hello World"; // You can return your XML format string. What you returned is just what the client will get.
}

4. You can make your function and return what you want.
5. Set this file as start page, then build it.
6. Run and test it.

7. In client side, such like WinForm, you need add a web reference. On project's references, right click mouse, in popup menu, select "Add Web Reference";

8. Type the web site and page file , such like : http://localhost/webService/WebService1.asmx, then click "go"

9. In "Web Reference Name", put the name you like to name it,such like: "myWebService", then OK.

10. In a WinForm Page, call web server and see what you get.
the code like this:
myWebService.Service1 service = new myWebService.Service1();
string result = service.HelloWorld();
If your response is a XML file, the result string will be the XML string.

Web Service & SQL Server Authentication

Hi there

I have this weird problem. I created a Web Service that extracts data from the SQL Server and then return it as a XML document.

The problem is when the Web Service gets to the code to open the Connection to the server it gives this error.

System.Data.SqlClient.SqlException: Login failed for user '(null)'. Reason: Not associated with a trusted SQL Server connection.

Now my Win32 application works just fine, using the same code. Thus I believe the problem might be the settings of IIS.

But unfortunately I don't even know where to start looking.

Some help would really be appreciated.

Thanx in advanceIf you are trying to open a connection via sql server authentication (note: not windows), you need to grant access to that account in your db. If you are using windows authentication, you need to grant access to the asp.net account.
Sorry misread

Monday, March 26, 2012

web service and Flash MX professional

I created a simple .NET web service which selects data from a SQL server database and returns XML. Now I would like to bind a drop down component from flash mx professional to this webservice. Every time I try to add the web service to my flash project I get an error:

Flash was unable to find any Web Services from the following URL:
http://www.madisontitle.com/webservice1/service1.asmx/GetCats
what have i done wrong. if you go to that link it returns the xml that i need. do i need to do something to make the webservice public?

PLEASE HELP!
thanks.try just loading the xml to an xml object in flash and then working with it. I don't know though I have never worked with any of the components in flash. Although I'm looking forward to using them in mx 2004 because it has full .net support. It has a flash version of most DataControls in the framework and so on.
I want to do it with a webservice, because i have other things i will need to do, like pass parameters..
What i need to know is, when creating a web service do i need to do anything to make it accessible to the public?
As far as I know you add the WebService attribute and make properties public. I have never built a web service but the examples I read seem pretty straight forward you basicly just add the attribute in the right places. Sorry thats all I know.

Thursday, March 22, 2012

Web service that is able to receive a xml "POST" and process it

Hello all,

I was wondering if someone can point me to a tutorial that show me how
I can set up a web service that can listen for me to send a POST from a
client? like so

Client sends http POST to http://www.mysite.com/processTheRequest. The
data being sent across is XML like so "<request><data>alot of text data
that I will manipulate and save to the sql database</data></request>"

the serverside should have some function to receive this data.

receiveData(object sender, events e)
{
manipulate the data and respond to the post with
"<response>success</response>"
}Jay,

That's what a webservice does by default. Just create the webservice method
and have it accept an xml parameter. XML is easily converted to and from a
dataset which is safe for sending in a webservice (data must be
serializable). In .NET 2.0 DataTables are also serializable. So you could do
something like this:

<WebMethod()> _
Public Sub XMLAcceptor(ByVal xmlDataset As Data.DataSet)

End Sub

--
Sincerely,

S. Justin Gengo, MCP
Web Developer / Programmer

www.aboutfortunate.com

"Out of chaos comes order."
Nietzsche
"Jay" <jderuyck@.gmail.com> wrote in message
news:1139503956.390268.91830@.g44g2000cwa.googlegro ups.com...
> Hello all,
> I was wondering if someone can point me to a tutorial that show me how
> I can set up a web service that can listen for me to send a POST from a
> client? like so
> Client sends http POST to http://www.mysite.com/processTheRequest. The
> data being sent across is XML like so "<request><data>alot of text data
> that I will manipulate and save to the sql database</data></request>"
>
> the serverside should have some function to receive this data.
> receiveData(object sender, events e)
> {
> manipulate the data and respond to the post with
> "<response>success</response>"
> }
what if I wanted to send xmldata as a string (that is formated in xml),
receive this string and do a

xmlDocument.Load(xmldata);

any examples or step by step tutorials?
Jay,

You may certainly send the xml as a string just use ByVal xmlString As
String instead of the dataset.

Then load the string into an xml document like this:

xmldoc.LoadXml(sXML)

After that there are plenty of examples like this (do a google search on
"asp.net xmldoc" to see plenty more):

http://www.aspfaqs.com/aspfaqs/ShowFAQ.asp?FAQID=213

--
Sincerely,

S. Justin Gengo, MCP
Web Developer / Programmer

www.aboutfortunate.com

"Out of chaos comes order."
Nietzsche
"Jay" <jderuyck@.gmail.com> wrote in message
news:1139506155.033256.203260@.g43g2000cwa.googlegr oups.com...
> what if I wanted to send xmldata as a string (that is formated in xml),
> receive this string and do a
> xmlDocument.Load(xmldata);
>
> any examples or step by step tutorials?
so I get to the point where I created a web service and it comes up to
this page when I push play. I can also click on jaytest and it will
take me to an invoke page... but when I try to send a transaction from
another application(that I have sent thousands of WebRequest Post to
our linux jboss server) it does not work.

--
The following operations are supported. For a formal definition, please
review the Service Description.

JayTest

HelloWorld
----

SERVICE DECRIPTION CONTENT
------------------
<?xml version="1.0" encoding="utf-8" ?>
- <wsdl:definitions xmlns:http="http://schemas.xmlsoap.org/wsdl/http/"
xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/"
xmlns:s="http://www.w3.org/2001/XMLSchema"
xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/"
xmlns:tns="http://www.jaystest.com"
xmlns:tm="http://microsoft.com/wsdl/mime/textMatching/"
xmlns:mime="http://schemas.xmlsoap.org/wsdl/mime/"
targetNamespace="http://www.jaystest.com"
xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/">
- <wsdl:types>
- <s:schema elementFormDefault="qualified"
targetNamespace="http://www.jaystest.com">
- <s:element name="HelloWorld">
<s:complexType />
</s:element>
- <s:element name="HelloWorldResponse">
- <s:complexType>
- <s:sequence>
<s:element minOccurs="0" maxOccurs="1" name="HelloWorldResult"
type="s:string" />
</s:sequence>
</s:complexType>
</s:element>
- <s:element name="JayTest">
- <s:complexType>
- <s:sequence>
<s:element minOccurs="0" maxOccurs="1" name="strMyName"
type="s:string" />
</s:sequence>
</s:complexType>
</s:element>
- <s:element name="JayTestResponse">
- <s:complexType>
- <s:sequence>
<s:element minOccurs="0" maxOccurs="1" name="JayTestResult"
type="s:string" />
</s:sequence>
</s:complexType>
</s:element>
</s:schema>
</wsdl:types>
- <wsdl:message name="HelloWorldSoapIn">
<wsdl:part name="parameters" element="tns:HelloWorld" />
</wsdl:message>
- <wsdl:message name="HelloWorldSoapOut">
<wsdl:part name="parameters" element="tns:HelloWorldResponse" />
</wsdl:message>
- <wsdl:message name="JayTestSoapIn">
<wsdl:part name="parameters" element="tns:JayTest" />
</wsdl:message>
- <wsdl:message name="JayTestSoapOut">
<wsdl:part name="parameters" element="tns:JayTestResponse" />
</wsdl:message>
- <wsdl:portType name="Service1Soap">
- <wsdl:operation name="HelloWorld">
<wsdl:input message="tns:HelloWorldSoapIn" />
<wsdl:output message="tns:HelloWorldSoapOut" />
</wsdl:operation>
- <wsdl:operation name="JayTest">
<wsdl:input message="tns:JayTestSoapIn" />
<wsdl:output message="tns:JayTestSoapOut" />
</wsdl:operation>
</wsdl:portType>
- <wsdl:binding name="Service1Soap" type="tns:Service1Soap">
<soap:binding transport="http://schemas.xmlsoap.org/soap/http"
style="document" />
- <wsdl:operation name="HelloWorld">
<soap:operation soapAction="http://www.jaystest.com/HelloWorld"
style="document" />
- <wsdl:input>
<soap:body use="literal" />
</wsdl:input>
- <wsdl:output>
<soap:body use="literal" />
</wsdl:output>
</wsdl:operation>
- <wsdl:operation name="JayTest">
<soap:operation soapAction="http://www.jaystest.com/JayTest"
style="document" />
- <wsdl:input>
<soap:body use="literal" />
</wsdl:input>
- <wsdl:output>
<soap:body use="literal" />
</wsdl:output>
</wsdl:operation>
</wsdl:binding>
- <wsdl:service name="Service1">
<documentation xmlns="http://schemas.xmlsoap.org/wsdl/" />
- <wsdl:port name="Service1Soap" binding="tns:Service1Soap">
<soap:address
location="http://localhost/WebServiceTest/Service1.asmx" />
</wsdl:port>
</wsdl:service>
</wsdl:definitions>
------------------

Web service that is able to receive a xml "POST" and process it

Hello all,
I was wondering if someone can point me to a tutorial that show me how
I can set up a web service that can listen for me to send a POST from a
client? like so
Client sends http POST to http://www.mysite.com/processTheRequest. The
data being sent across is XML like so "<request><data>alot of text data
that I will manipulate and save to the sql database</data></request>"
the serverside should have some function to receive this data.
receiveData(object sender, events e)
{
manipulate the data and respond to the post with
"<response>success</response>"
}Jay,
That's what a webservice does by default. Just create the webservice method
and have it accept an xml parameter. XML is easily converted to and from a
dataset which is safe for sending in a webservice (data must be
serializable). In .NET 2.0 DataTables are also serializable. So you could do
something like this:
<WebMethod()> _
Public Sub XMLAcceptor(ByVal xmlDataset As Data.DataSet)
End Sub
Sincerely,
S. Justin Gengo, MCP
Web Developer / Programmer
www.aboutfortunate.com
"Out of chaos comes order."
Nietzsche
"Jay" <jderuyck@.gmail.com> wrote in message
news:1139503956.390268.91830@.g44g2000cwa.googlegroups.com...
> Hello all,
> I was wondering if someone can point me to a tutorial that show me how
> I can set up a web service that can listen for me to send a POST from a
> client? like so
> Client sends http POST to http://www.mysite.com/processTheRequest. The
> data being sent across is XML like so "<request><data>alot of text data
> that I will manipulate and save to the sql database</data></request>"
>
> the serverside should have some function to receive this data.
> receiveData(object sender, events e)
> {
> manipulate the data and respond to the post with
> "<response>success</response>"
> }
>
what if I wanted to send xmldata as a string (that is formated in xml),
receive this string and do a
xmlDocument.Load(xmldata);
any examples or step by step tutorials?
Jay,
You may certainly send the xml as a string just use ByVal xmlString As
String instead of the dataset.
Then load the string into an xml document like this:
xmldoc.LoadXml(sXML)
After that there are plenty of examples like this (do a google search on
"asp.net xmldoc" to see plenty more):
http://www.aspfaqs.com/aspfaqs/ShowFAQ.asp?FAQID=213
Sincerely,
S. Justin Gengo, MCP
Web Developer / Programmer
www.aboutfortunate.com
"Out of chaos comes order."
Nietzsche
"Jay" <jderuyck@.gmail.com> wrote in message
news:1139506155.033256.203260@.g43g2000cwa.googlegroups.com...
> what if I wanted to send xmldata as a string (that is formated in xml),
> receive this string and do a
> xmlDocument.Load(xmldata);
>
> any examples or step by step tutorials?
>
so I get to the point where I created a web service and it comes up to
this page when I push play. I can also click on jaytest and it will
take me to an invoke page... but when I try to send a transaction from
another application(that I have sent thousands of WebRequest Post to
our linux jboss server) it does not work.
The following operations are supported. For a formal definition, please
review the Service Description.
JayTest
HelloWorld
--
SERVICE DECRIPTION CONTENT
---
<?xml version="1.0" encoding="utf-8" ?>
- <wsdl:definitions xmlns:http="http://schemas.xmlsoap.org/wsdl/http/"
xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/"
xmlns:s="http://www.w3.org/2001/XMLSchema"
xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/"
xmlns:tns="http://www.jaystest.com"
xmlns:tm="http://microsoft.com/wsdl/mime/textMatching/"
xmlns:mime="http://schemas.xmlsoap.org/wsdl/mime/"
targetNamespace="http://www.jaystest.com"
xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/">
- <wsdl:types>
- <s:schema elementFormDefault="qualified"
targetNamespace="http://www.jaystest.com">
- <s:element name="HelloWorld">
<s:complexType />
</s:element>
- <s:element name="HelloWorldResponse">
- <s:complexType>
- <s:sequence>
<s:element minOccurs="0" maxOccurs="1" name="HelloWorldResult"
type="s:string" />
</s:sequence>
</s:complexType>
</s:element>
- <s:element name="JayTest">
- <s:complexType>
- <s:sequence>
<s:element minOccurs="0" maxOccurs="1" name="strMyName"
type="s:string" />
</s:sequence>
</s:complexType>
</s:element>
- <s:element name="JayTestResponse">
- <s:complexType>
- <s:sequence>
<s:element minOccurs="0" maxOccurs="1" name="JayTestResult"
type="s:string" />
</s:sequence>
</s:complexType>
</s:element>
</s:schema>
</wsdl:types>
- <wsdl:message name="HelloWorldSoapIn">
<wsdl:part name="parameters" element="tns:HelloWorld" />
</wsdl:message>
- <wsdl:message name="HelloWorldSoapOut">
<wsdl:part name="parameters" element="tns:HelloWorldResponse" />
</wsdl:message>
- <wsdl:message name="JayTestSoapIn">
<wsdl:part name="parameters" element="tns:JayTest" />
</wsdl:message>
- <wsdl:message name="JayTestSoapOut">
<wsdl:part name="parameters" element="tns:JayTestResponse" />
</wsdl:message>
- <wsdl:portType name="Service1Soap">
- <wsdl:operation name="HelloWorld">
<wsdl:input message="tns:HelloWorldSoapIn" />
<wsdl:output message="tns:HelloWorldSoapOut" />
</wsdl:operation>
- <wsdl:operation name="JayTest">
<wsdl:input message="tns:JayTestSoapIn" />
<wsdl:output message="tns:JayTestSoapOut" />
</wsdl:operation>
</wsdl:portType>
- <wsdl:binding name="Service1Soap" type="tns:Service1Soap">
<soap:binding transport="http://schemas.xmlsoap.org/soap/http"
style="document" />
- <wsdl:operation name="HelloWorld">
<soap:operation soapAction="http://www.jaystest.com/HelloWorld"
style="document" />
- <wsdl:input>
<soap:body use="literal" />
</wsdl:input>
- <wsdl:output>
<soap:body use="literal" />
</wsdl:output>
</wsdl:operation>
- <wsdl:operation name="JayTest">
<soap:operation soapAction="http://www.jaystest.com/JayTest"
style="document" />
- <wsdl:input>
<soap:body use="literal" />
</wsdl:input>
- <wsdl:output>
<soap:body use="literal" />
</wsdl:output>
</wsdl:operation>
</wsdl:binding>
- <wsdl:service name="Service1">
<documentation xmlns="http://schemas.xmlsoap.org/wsdl/" />
- <wsdl:port name="Service1Soap" binding="tns:Service1Soap">
<soap:address
location="http://localhost/WebServiceTest/Service1.asmx" />
</wsdl:port>
</wsdl:service>
</wsdl:definitions>
---

Web Service throws 401 Error when consumed

I have written a web service to return information from the database. This
works and the data is returned in XML format from the database and displayed
on the web page as well when this web service called getsampledata is
invoked. Now I create a web page and created a webservice using the web
reference technique in the VS .NET to consume this web service. The web
page (application), web server, web service and database are on the same
box. Here is where my problems start. I keep getting this error message
reproduced here.

System.Net.WebException: The request failed with HTTP status 401: Access
Denied. at
System.Web.Services.Protocols.SoapHttpClientProtoc ol.ReadResponse(SoapClient
Message message, WebResponse response, Stream responseStream, Boolean
asyncCall) at
System.Web.Services.Protocols.SoapHttpClientProtoc ol.Invoke(String
methodName, Object[] parameters) at
WebPageWebServiceTest.HPSD.Service1.GetSampleData( ) in
C:\Inetpub\wwwroot\WebPageWebServiceTest\Web
References\HPSD\Reference.cs:line 40 at
WebPageWebServiceTest.WebForm1.Button1_Click(Objec t sender, EventArgs e) in
c:\inetpub\wwwroot\webpagewebservicetest\webform1. aspx.cs:line 69

Name of the web page trying to consume the webservice =
WebPageWebServiceTest
Name of the webservice HPSD.Service1.GetSampleData().

I have played around with the web config file and have the following working
web.conifg parameters
<authentication mode="None" /
<identity impersonate="true" /
Same parameters on both the web.config files ie on the web service and web
page(application). The database has aspnet configured as a user. The
following line is the connection string details on the webservice

sqlConnectionString="Provider=SQLOLEDB.1;integratedsecurity=SSPI;Persis t
Security Info=False;Initial Catalog=XXX_DEV;Data Source=XXXX;

I just am not able to get past the error noted above.

I am wondering if anyone else has run into this problem. Any pointers/tips
much appreciated.

Thanks

SanjayDo you have anonymous access turned on for your web application? Here is a
knowledge base article that addresses this situation and may help:

http://support.microsoft.com/defaul...kb;en-us;811318

--
Chris Jackson
Software Engineer
Microsoft MVP - Windows Shell/UI
Windows XP Associate Expert
--
More people read the newsgroups than read my email.
Reply to the newsgroup for a faster response.
(Control-G using Outlook Express)
--

"Sanjay" <sanjay@.hp.com> wrote in message
news:3fb96917$1@.usenet01.boi.hp.com...
> I have written a web service to return information from the database. This
> works and the data is returned in XML format from the database and
displayed
> on the web page as well when this web service called getsampledata is
> invoked. Now I create a web page and created a webservice using the web
> reference technique in the VS .NET to consume this web service. The web
> page (application), web server, web service and database are on the same
> box. Here is where my problems start. I keep getting this error message
> reproduced here.
> System.Net.WebException: The request failed with HTTP status 401: Access
> Denied. at
System.Web.Services.Protocols.SoapHttpClientProtoc ol.ReadResponse(SoapClient
> Message message, WebResponse response, Stream responseStream, Boolean
> asyncCall) at
> System.Web.Services.Protocols.SoapHttpClientProtoc ol.Invoke(String
> methodName, Object[] parameters) at
> WebPageWebServiceTest.HPSD.Service1.GetSampleData( ) in
> C:\Inetpub\wwwroot\WebPageWebServiceTest\Web
> References\HPSD\Reference.cs:line 40 at
> WebPageWebServiceTest.WebForm1.Button1_Click(Objec t sender, EventArgs e)
in
> c:\inetpub\wwwroot\webpagewebservicetest\webform1. aspx.cs:line 69
> Name of the web page trying to consume the webservice =
> WebPageWebServiceTest
> Name of the webservice HPSD.Service1.GetSampleData().
>
> I have played around with the web config file and have the following
working
> web.conifg parameters
> <authentication mode="None" />
> <identity impersonate="true" />
> Same parameters on both the web.config files ie on the web service and
web
> page(application). The database has aspnet configured as a user. The
> following line is the connection string details on the webservice
> sqlConnectionString="Provider=SQLOLEDB.1;integratedsecurity=SSPI;Persis t
> Security Info=False;Initial Catalog=XXX_DEV;Data Source=XXXX;
> I just am not able to get past the error noted above.
> I am wondering if anyone else has run into this problem. Any
pointers/tips
> much appreciated.
> Thanks
> Sanjay
Thank you Chris
That took care of that problem. Really apprecate your help.
Now to figure out how to get the xml data out of the dataset and bind to the
datagrid.
Thanks again.
Sanjay

"Chris Jackson" <chrisjATmvpsDOTorgNOSPAM> wrote in message
news:%23R%23yaMerDHA.3180@.TK2MSFTNGP11.phx.gbl...
> Do you have anonymous access turned on for your web application? Here is a
> knowledge base article that addresses this situation and may help:
> http://support.microsoft.com/defaul...kb;en-us;811318
>
> --
> Chris Jackson
> Software Engineer
> Microsoft MVP - Windows Shell/UI
> Windows XP Associate Expert
> --
> More people read the newsgroups than read my email.
> Reply to the newsgroup for a faster response.
> (Control-G using Outlook Express)
> --
> "Sanjay" <sanjay@.hp.com> wrote in message
> news:3fb96917$1@.usenet01.boi.hp.com...
> > I have written a web service to return information from the database.
This
> > works and the data is returned in XML format from the database and
> displayed
> > on the web page as well when this web service called getsampledata is
> > invoked. Now I create a web page and created a webservice using the
web
> > reference technique in the VS .NET to consume this web service. The
web
> > page (application), web server, web service and database are on the
same
> > box. Here is where my problems start. I keep getting this error message
> > reproduced here.
> > System.Net.WebException: The request failed with HTTP status 401:
Access
> > Denied. at
System.Web.Services.Protocols.SoapHttpClientProtoc ol.ReadResponse(SoapClient
> > Message message, WebResponse response, Stream responseStream, Boolean
> > asyncCall) at
> > System.Web.Services.Protocols.SoapHttpClientProtoc ol.Invoke(String
> > methodName, Object[] parameters) at
> > WebPageWebServiceTest.HPSD.Service1.GetSampleData( ) in
> > C:\Inetpub\wwwroot\WebPageWebServiceTest\Web
> > References\HPSD\Reference.cs:line 40 at
> > WebPageWebServiceTest.WebForm1.Button1_Click(Objec t sender, EventArgs e)
> in
> > c:\inetpub\wwwroot\webpagewebservicetest\webform1. aspx.cs:line 69
> > Name of the web page trying to consume the webservice =
> > WebPageWebServiceTest
> > Name of the webservice HPSD.Service1.GetSampleData().
> > I have played around with the web config file and have the following
> working
> > web.conifg parameters
> > <authentication mode="None" />
> > <identity impersonate="true" />
> > Same parameters on both the web.config files ie on the web service and
> web
> > page(application). The database has aspnet configured as a user. The
> > following line is the connection string details on the webservice
> > sqlConnectionString="Provider=SQLOLEDB.1;integratedsecurity=SSPI;Persis t
> > Security Info=False;Initial Catalog=XXX_DEV;Data Source=XXXX;
> > I just am not able to get past the error noted above.
> > I am wondering if anyone else has run into this problem. Any
> pointers/tips
> > much appreciated.
> > Thanks
> > Sanjay
You can bind to any class that supports the IEnumerable interface:

dataGrid.DataSource = dataSet;
dataGrid.DataBind();

--
Chris Jackson
Software Engineer
Microsoft MVP - Windows Shell/UI
Windows XP Associate Expert
--
More people read the newsgroups than read my email.
Reply to the newsgroup for a faster response.
(Control-G using Outlook Express)
--

"Sanjay" <sanjay@.hp.com> wrote in message
news:3fbaa330@.usenet01.boi.hp.com...
> Thank you Chris
> That took care of that problem. Really apprecate your help.
> Now to figure out how to get the xml data out of the dataset and bind to
the
> datagrid.
> Thanks again.
> Sanjay
> "Chris Jackson" <chrisjATmvpsDOTorgNOSPAM> wrote in message
> news:%23R%23yaMerDHA.3180@.TK2MSFTNGP11.phx.gbl...
> > Do you have anonymous access turned on for your web application? Here is
a
> > knowledge base article that addresses this situation and may help:
> > http://support.microsoft.com/defaul...kb;en-us;811318
> > --
> > Chris Jackson
> > Software Engineer
> > Microsoft MVP - Windows Shell/UI
> > Windows XP Associate Expert
> > --
> > More people read the newsgroups than read my email.
> > Reply to the newsgroup for a faster response.
> > (Control-G using Outlook Express)
> > --
> > "Sanjay" <sanjay@.hp.com> wrote in message
> > news:3fb96917$1@.usenet01.boi.hp.com...
> > > I have written a web service to return information from the database.
> This
> > > works and the data is returned in XML format from the database and
> > displayed
> > > on the web page as well when this web service called getsampledata is
> > > invoked. Now I create a web page and created a webservice using the
> web
> > > reference technique in the VS .NET to consume this web service. The
> web
> > > page (application), web server, web service and database are on the
> same
> > > box. Here is where my problems start. I keep getting this error
message
> > > reproduced here.
> > > > System.Net.WebException: The request failed with HTTP status 401:
> Access
> > > Denied. at
> System.Web.Services.Protocols.SoapHttpClientProtoc ol.ReadResponse(SoapClient
> > > Message message, WebResponse response, Stream responseStream, Boolean
> > > asyncCall) at
> > > System.Web.Services.Protocols.SoapHttpClientProtoc ol.Invoke(String
> > > methodName, Object[] parameters) at
> > > WebPageWebServiceTest.HPSD.Service1.GetSampleData( ) in
> > > C:\Inetpub\wwwroot\WebPageWebServiceTest\Web
> > > References\HPSD\Reference.cs:line 40 at
> > > WebPageWebServiceTest.WebForm1.Button1_Click(Objec t sender, EventArgs
e)
> > in
> > > c:\inetpub\wwwroot\webpagewebservicetest\webform1. aspx.cs:line 69
> > > > Name of the web page trying to consume the webservice =
> > > WebPageWebServiceTest
> > > Name of the webservice HPSD.Service1.GetSampleData().
> > > > > I have played around with the web config file and have the following
> > working
> > > web.conifg parameters
> > > <authentication mode="None" />
> > > > <identity impersonate="true" />
> > > > Same parameters on both the web.config files ie on the web service
and
> > web
> > > page(application). The database has aspnet configured as a user. The
> > > following line is the connection string details on the webservice
> > sqlConnectionString="Provider=SQLOLEDB.1;integratedsecurity=SSPI;Persis t
> > > Security Info=False;Initial Catalog=XXX_DEV;Data Source=XXXX;
> > > > I just am not able to get past the error noted above.
> > > > I am wondering if anyone else has run into this problem. Any
> > pointers/tips
> > > much appreciated.
> > > > Thanks
> > > > Sanjay
> > >
Actually Chris I knew that and the web service is working now like a charm.
But thanks for the reply anyway.
Sanjay

PS I have a new question posted on this newsgroup which might 'ahem'
require your expertise/attention.

"Chris Jackson" <chrisjATmvpsDOTorgNOSPAM> wrote in message
news:%23OHVLAurDHA.2832@.TK2MSFTNGP11.phx.gbl...
> You can bind to any class that supports the IEnumerable interface:
> dataGrid.DataSource = dataSet;
> dataGrid.DataBind();
> --
> Chris Jackson
> Software Engineer
> Microsoft MVP - Windows Shell/UI
> Windows XP Associate Expert
> --
> More people read the newsgroups than read my email.
> Reply to the newsgroup for a faster response.
> (Control-G using Outlook Express)
> --
> "Sanjay" <sanjay@.hp.com> wrote in message
> news:3fbaa330@.usenet01.boi.hp.com...
> > Thank you Chris
> > That took care of that problem. Really apprecate your help.
> > Now to figure out how to get the xml data out of the dataset and bind to
> the
> > datagrid.
> > Thanks again.
> > Sanjay
> > "Chris Jackson" <chrisjATmvpsDOTorgNOSPAM> wrote in message
> > news:%23R%23yaMerDHA.3180@.TK2MSFTNGP11.phx.gbl...
> > > Do you have anonymous access turned on for your web application? Here
is
> a
> > > knowledge base article that addresses this situation and may help:
> > > > http://support.microsoft.com/defaul...kb;en-us;811318
> > > > > --
> > > Chris Jackson
> > > Software Engineer
> > > Microsoft MVP - Windows Shell/UI
> > > Windows XP Associate Expert
> > > --
> > > More people read the newsgroups than read my email.
> > > Reply to the newsgroup for a faster response.
> > > (Control-G using Outlook Express)
> > > --
> > > > "Sanjay" <sanjay@.hp.com> wrote in message
> > > news:3fb96917$1@.usenet01.boi.hp.com...
> > > > I have written a web service to return information from the
database.
> > This
> > > > works and the data is returned in XML format from the database and
> > > displayed
> > > > on the web page as well when this web service called getsampledata
is
> > > > invoked. Now I create a web page and created a webservice using
the
> > web
> > > > reference technique in the VS .NET to consume this web service.
The
> > web
> > > > page (application), web server, web service and database are on the
> > same
> > > > box. Here is where my problems start. I keep getting this error
> message
> > > > reproduced here.
> > > > > > System.Net.WebException: The request failed with HTTP status 401:
> > Access
> > > > Denied. at
> > > System.Web.Services.Protocols.SoapHttpClientProtoc ol.ReadResponse(SoapClient
> > > > Message message, WebResponse response, Stream responseStream,
Boolean
> > > > asyncCall) at
> > > > System.Web.Services.Protocols.SoapHttpClientProtoc ol.Invoke(String
> > > > methodName, Object[] parameters) at
> > > > WebPageWebServiceTest.HPSD.Service1.GetSampleData( ) in
> > > > C:\Inetpub\wwwroot\WebPageWebServiceTest\Web
> > > > References\HPSD\Reference.cs:line 40 at
> > > > WebPageWebServiceTest.WebForm1.Button1_Click(Objec t sender,
EventArgs
> e)
> > > in
> > > > c:\inetpub\wwwroot\webpagewebservicetest\webform1. aspx.cs:line 69
> > > > > > Name of the web page trying to consume the webservice =
> > > > WebPageWebServiceTest
> > > > Name of the webservice HPSD.Service1.GetSampleData().
> > > > > > > > I have played around with the web config file and have the following
> > > working
> > > > web.conifg parameters
> > > > <authentication mode="None" />
> > > > > > <identity impersonate="true" />
> > > > > > Same parameters on both the web.config files ie on the web service
> and
> > > web
> > > > page(application). The database has aspnet configured as a user. The
> > > > following line is the connection string details on the webservice
> > > > > sqlConnectionString="Provider=SQLOLEDB.1;integratedsecurity=SSPI;Persis t
> > > > Security Info=False;Initial Catalog=XXX_DEV;Data Source=XXXX;
> > > > > > I just am not able to get past the error noted above.
> > > > > > I am wondering if anyone else has run into this problem. Any
> > > pointers/tips
> > > > much appreciated.
> > > > > > Thanks
> > > > > > Sanjay
> > > > > > > >

web services

Could someone give this newbie to .net a few good business examples of
when to choose to use XML Web Services over ASP.net web pages. I don't
need code, just examples of when to think of using it. Thanks! DavHi,
http://en.wikipedia.org/wiki/Web_service
Take a look
Thanks
Masudur
On Jan 27, 11:00 am, "kress1963no...@.yahoo.com"
<kress1963no...@.yahoo.com> wrote:
> Could someone give this newbie to .net a few good business examples of
> when to choose to use XML Web Services over ASP.net web pages. I don't
> need code, just examples of when to think of using it. Thanks! Dav
When you don't any kind of user interface and your data will be used by
other web- or desktop applications. It can be for example, a stock
quote lookup, to return latest trade for any client software.
On Jan 27, 6:00 am, "kress1963no...@.yahoo.com"
<kress1963no...@.yahoo.com> wrote:
> Could someone give this newbie to .net a few good business examples of
> when to choose to use XML Web Services over ASP.net web pages. I don't
> need code, just examples of when to think of using it. Thanks! Dav
DON'T TOP POST!!
On Jan 27, 10:39 am, "Alexey Smirnov" <alexey.smir...@.gmail.com>
wrote:
> When you don't any kind of user interface and your data will be used by
> other web- or desktop applications. It can be for example, a stock
> quote lookup, to return latest trade for any client software.
> On Jan 27, 6:00 am, "kress1963no...@.yahoo.com"
>
> <kress1963no...@.yahoo.com> wrote:
In general terms according to "good ol' Don" (Don Box) a WebService
should be used when
there's a COMPUTER in need of data and NOT a USER...
Off course all this is semantics since mostly there'll be a user
looking at that data at
some point, but if there's a COMPUTER wanting to get data then use
WebServices...
.t
http://ajaxwidgets.com
Free ASP.NET Ajax Widgets NOW!
On Jan 27, 10:50 am, "Thomas Hansen" <polter...@.gmail.com> wrote:
> DON'T TOP POST!!
>
Like this? I'm using Google Groups which hide quotes and I was not
aware that the post looks bad
Sorry

Monday, March 12, 2012

web services

Could someone give this newbie to .net a few good business examples of
when to choose to use XML Web Services over ASP.net web pages. I don't
need code, just examples of when to think of using it. Thanks! DavHi,
http://en.wikipedia.org/wiki/Web_service
Take a look
Thanks
Masudur

On Jan 27, 11:00 am, "kress1963no...@.yahoo.com"
<kress1963no...@.yahoo.comwrote:

Quote:

Originally Posted by

Could someone give this newbie to .net a few good business examples of
when to choose to use XML Web Services over ASP.net web pages. I don't
need code, just examples of when to think of using it. Thanks! Dav


When you don't any kind of user interface and your data will be used by
other web- or desktop applications. It can be for example, a stock
quote lookup, to return latest trade for any client software.

On Jan 27, 6:00 am, "kress1963no...@.yahoo.com"
<kress1963no...@.yahoo.comwrote:

Quote:

Originally Posted by

Could someone give this newbie to .net a few good business examples of
when to choose to use XML Web Services over ASP.net web pages. I don't
need code, just examples of when to think of using it. Thanks! Dav


DON'T TOP POST!!

On Jan 27, 10:39 am, "Alexey Smirnov" <alexey.smir...@.gmail.com>
wrote:

Quote:

Originally Posted by

When you don't any kind of user interface and your data will be used by
other web- or desktop applications. It can be for example, a stock
quote lookup, to return latest trade for any client software.
>
On Jan 27, 6:00 am, "kress1963no...@.yahoo.com"
>
>
>
<kress1963no...@.yahoo.comwrote:

Quote:

Originally Posted by

Could someone give this newbie to .net a few good business examples of
when to choose to use XML Web Services over ASP.net web pages. I don't
need code, just examples of when to think of using it.


In general terms according to "good ol' Don" (Don Box) a WebService
should be used when
there's a COMPUTER in need of data and NOT a USER...
Off course all this is semantics since mostly there'll be a user
looking at that data at
some point, but if there's a COMPUTER wanting to get data then use
WebServices...

..t

--
http://ajaxwidgets.com
Free ASP.NET Ajax Widgets NOW!
On Jan 27, 10:50 am, "Thomas Hansen" <polter...@.gmail.comwrote:

Quote:

Originally Posted by

DON'T TOP POST!!
>


Like this? I'm using Google Groups which hide quotes and I was not
aware that the post looks bad
Sorry

Web Services and COM?

I was told that XML Web services has replaced /will replace the COM/DCOM.
Anybody could tell me why/how?
If I want to handle the remote image processing and image transfer/display
accessed from either web client or windows application client, is the web
services a good choice for doing it? If so, what is the reason to use it?

Thanks

DavudOn Thu, 04 Aug 2005 09:44:08 -0500, david
<david@.discussions.microsoft.com> wrote:

> I was told that XML Web services has replaced /will replace the COM/DCOM.
> Anybody could tell me why/how?
> If I want to handle the remote image processing and image
> transfer/display
> accessed from either web client or windows application client, is the web
> services a good choice for doing it? If so, what is the reason to use it?
> Thanks
> Davud

WebServices are a mechanism that can replace DCOM, though it is a
different architecture of course. They're used mainly for remote
server/application interaction.

Remoting is actually a purer comparison, and usually performs better, as
it is either binary or textual transfer. In fact webservices are a type
of remoting. It's just that remoting is similar to DCOM, in that only
..NET clients can talk via remoting (AFAIK); webservices are supposed to be
more open so other types of clients can interact (a diverse
environment)...

--
Craig Deelsnyder
Microsoft MVP - ASP/ASP.NET
Thank you for your comments.

It seems that XML web service is very good for text-based communication.
Can it do the communication on binary basis?

If not, how can it replace COM/DCOM?

David

"Craig Deelsnyder" wrote:

> On Thu, 04 Aug 2005 09:44:08 -0500, david
> <david@.discussions.microsoft.com> wrote:
> > I was told that XML Web services has replaced /will replace the COM/DCOM.
> > Anybody could tell me why/how?
> > If I want to handle the remote image processing and image
> > transfer/display
> > accessed from either web client or windows application client, is the web
> > services a good choice for doing it? If so, what is the reason to use it?
> > Thanks
> > Davud
> WebServices are a mechanism that can replace DCOM, though it is a
> different architecture of course. They're used mainly for remote
> server/application interaction.
> Remoting is actually a purer comparison, and usually performs better, as
> it is either binary or textual transfer. In fact webservices are a type
> of remoting. It's just that remoting is similar to DCOM, in that only
> ..NET clients can talk via remoting (AFAIK); webservices are supposed to be
> more open so other types of clients can interact (a diverse
> environment)...
> --
> Craig Deelsnyder
> Microsoft MVP - ASP/ASP.NET

Web Services and COM?

I was told that XML Web services has replaced /will replace the COM/DCOM.
Anybody could tell me why/how?
If I want to handle the remote image processing and image transfer/display
accessed from either web client or windows application client, is the web
services a good choice for doing it? If so, what is the reason to use it?
Thanks
DavudOn Thu, 04 Aug 2005 09:44:08 -0500, david
<david@.discussions.microsoft.com> wrote:

> I was told that XML Web services has replaced /will replace the COM/DCOM.
> Anybody could tell me why/how?
> If I want to handle the remote image processing and image
> transfer/display
> accessed from either web client or windows application client, is the web
> services a good choice for doing it? If so, what is the reason to use it?
> Thanks
> Davud
WebServices are a mechanism that can replace DCOM, though it is a
different architecture of course. They're used mainly for remote
server/application interaction.
Remoting is actually a purer comparison, and usually performs better, as
it is either binary or textual transfer. In fact webservices are a type
of remoting. It's just that remoting is similar to DCOM, in that only
.NET clients can talk via remoting (AFAIK); webservices are supposed to be
more open so other types of clients can interact (a diverse
environment)...
Craig Deelsnyder
Microsoft MVP - ASP/ASP.NET
Thank you for your comments.
It seems that XML web service is very good for text-based communication.
Can it do the communication on binary basis?
If not, how can it replace COM/DCOM?
David
"Craig Deelsnyder" wrote:

> On Thu, 04 Aug 2005 09:44:08 -0500, david
> <david@.discussions.microsoft.com> wrote:
>
> WebServices are a mechanism that can replace DCOM, though it is a
> different architecture of course. They're used mainly for remote
> server/application interaction.
> Remoting is actually a purer comparison, and usually performs better, as
> it is either binary or textual transfer. In fact webservices are a type
> of remoting. It's just that remoting is similar to DCOM, in that only
> ..NET clients can talk via remoting (AFAIK); webservices are supposed to b
e
> more open so other types of clients can interact (a diverse
> environment)...
> --
> Craig Deelsnyder
> Microsoft MVP - ASP/ASP.NET
>

Web services and XML

I am new to ASP.net and C# but I am looking to start gathering requirements for my small personal project of creating my movie database. Eventually I want to have a feature where you can do a search for a movie and have it pull specific data from an external source. I was interested in IMDB but I can't find any web service or XML info on it. Does anyone have any recommendations for web services or if there is a website that lists available webservices from the internet?

--
Chuck DiRaimondiThis site:
http://www.trynt.com/trynt-movie-imdb-api/
is one of a number of results I got by searching google on "IMDB API"
Peter
--
Co-founder, Eggheadcafe.com developer portal:
http://www.eggheadcafe.com
UnBlog:
http://petesbloggerama.blogspot.com
"Chuck DiRaimondi" wrote:

Quote:

Originally Posted by

I am new to ASP.net and C# but I am looking to start gathering requirements for my small personal project of creating my movie database. Eventually I want to have a feature where you can do a search for a movie and have it pull specific data from an external source. I was interested in IMDB but I can't find any web service or XML info on it. Does anyone have any recommendations for web services or if there is a website that lists available webservices from the internet?
>
--
Chuck DiRaimondi

Web services and XML

I am new to ASP.net and C# but I am looking to start gathering requirements
for my small personal project of creating my movie database. Eventually I wa
nt to have a feature where you can do a search for a movie and have it pull
specific data from an external source. I was interested in IMDB but I can't
find any web service or XML info on it. Does anyone have any recommendations
for web services or if there is a website that lists available webservices
from the internet?
--
Chuck DiRaimondiThis site:
http://www.trynt.com/trynt-movie-imdb-api/
is one of a number of results I got by searching google on "IMDB API"
Peter
--
Co-founder, Eggheadcafe.com developer portal:
http://www.eggheadcafe.com
UnBlog:
http://petesbloggerama.blogspot.com
"Chuck DiRaimondi" wrote:

> I am new to ASP.net and C# but I am looking to start gathering requirements for my
small personal project of creating my movie database. Eventually I want to have a f
eature where you can do a search for a movie and have it pull specific data from an
ext
ernal source. I was interested in IMDB but I can't find any web service or XML info on it.
Does anyone have any recommendations for web services or if there is a website that lists a
vailable webservices from the internet?
> --
> Chuck DiRaimondi