XML Web service , Web form

hi i hope if u could help me in what i am making so i have a web form that does the collection of the information from the user when he hits the button this data must be sent to the xml web service but this service must deliver this data in  xml  then i read the information and insert it to the sql serevr Database could you help me becouse iam soo confused about where to start and what is the stuff to search in it iam new in the xml stuff help me pleaseeeeee
“To be incredible you must produce great work”
Visit My Blog
http://www.dotnetjunkies.com/WebLog/hussein
0
husclass
12/12/2003 3:36:07 PM
asp.net.xml-web-services 7071 articles. 0 followers. Follow

4 Replies
901 Views

Similar Articles

[PageSpeed] 15

My first question is why are you trying to do this in a web service.  The kind of post back functionality you describe is what a typical web page does.

If it has to be a web service that receives the data, I would take a look at using a technology such as what is described in a number of remote scripting articles. These would allow you to create a web service request, complete with the data in an XML format, and submit it to a web site. What happens on the web site is up to that particular site, naturally.
If this isn't enough of a starting point, provide some more specifics about what you're trying to accomplish and why and maybe we can help.

Bruce Johnson [.NET MVP]
http://www.objectsharp.com/blogs/Bruce
0
BruceJohnson
12/13/2003 3:02:06 PM
okey here is the scinario of my own it was provided to me in a test so here it is

create a customer page that allow to collect infos from users this information must be sent to an xml web service in an xml document then i parse it to take the values to insert it to sql server 2000 also i need to call a method from xml web service to return a user infos in xml document and view it in a datagrid and so on on xml from to xml web service that what i am in but i have done something i want to show you
here it is::
service

<WebMethod()> _
Public Function asd(ByVal xmlDoc As String) As String
Dim doc As New Xml.XmlDocument()
doc.Load(xmlDoc)
Dim rr As Xml.XmlElement = doc.DocumentElement
Dim nodeList As Xml.XmlNodeList = rr.GetElementsByTagName("Name")
Dim nodeAge As Xml.XmlNodeList = rr.GetElementsByTagName("Age")
Dim name As String
Dim age As String
Dim result As String
Dim fil As IO.File
Try
name = nodeList.Item(0).InnerXml
age = nodeAge.Item(0).InnerText
Dim con As New SqlClient.SqlConnection("data source=localhost;database=customers;user id=sa")
Dim command As New SqlClient.SqlCommand("addTo", con)
command.CommandType = CommandType.StoredProcedure
command.Parameters.Add("@name", name)
command.Parameters.Add("@age", age)
con.Open()
command.ExecuteNonQuery()
con.Close()
'Next
result = "Doneeeeeeee!"
Catch ex As Exception
result = ex.Message
Finally
fil.Delete(xmlDoc)
End Try
Return result
End Function

web form:::

Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
'Dim name As String = "asd"
'Dim age As String = "17"
'Dim xmlFile As String = "<customers><Name>" & name & "</Name>" & _
' "<age>" & age & "</age>" & _
' "</customers>"
Dim str As New IO.FileStream(Server.MapPath(txtName.Text + txtAge.Text & ".xml"), FileMode.CreateNew)
Dim xmlWrite As New XmlTextWriter(str, System.Text.Encoding.Unicode)
xmlWrite.WriteStartDocument()
xmlWrite.WriteStartElement("customer", "")
xmlWrite.WriteStartElement("Name")
xmlWrite.WriteString(txtName.Text)
xmlWrite.WriteEndElement()
xmlWrite.WriteStartElement("Age")
xmlWrite.WriteString(txtAge.Text)
xmlWrite.WriteEndElement()
xmlWrite.WriteEndDocument()
xmlWrite.Flush()
xmlWrite.Close()
Dim mySer As New localhost.Service1()
lblResult.Text = mySer.asd(Server.MapPath(txtName.Text + txtAge.Text & ".xml"))
End Sub

this is using fileStream what i want now is to use memorystreams not creat any xml document on the local drive
what do u think in that answer me if you have read this
“To be incredible you must produce great work”
Visit My Blog
http://www.dotnetjunkies.com/WebLog/hussein
0
husclass
12/14/2003 12:06:50 AM
Given what you just described, the use of a web service is not needed.  Instead of trying to jump through these hoops, why not just place a server-side button onto the form.  Then when the user clicks on the button, the entered data will be sent back to the server for processing.  You can perform the insert into the database then. No web service, but what you're trying to do is already readily available in plain ASP.NET.


Bruce Johnson [.NET MVP]
http://www.objectsharp.com/blogs/Bruce
0
BruceJohnson
12/14/2003 5:24:00 AM
i know that but as i have told you it is a test and it wants me to use xml web service so how could i accomplish this could you tell me please
“To be incredible you must produce great work”
Visit My Blog
http://www.dotnetjunkies.com/WebLog/hussein
0
husclass
12/14/2003 8:40:33 AM
Reply:

Similar Artilces:

xml web service --uploading the file to the xml web service
how can we upload the file in the xml web service 1.i mean what will be the return value in the proxy class 2.and how am i going to send the file to the xml web service----regards Bipul Kumar Here are some links to articles that helped us get this done: http://msdn.microsoft.com/webservices http://www.microsoft.com/downloads/details.aspx?familyid=06255a94-2635-4d29-a90c-28b282993a41&displaylang=en https://www.sys-con.com/dotnet/article.cfm?id=458 Hope this helps....

How to call a .net web service from another .net web service?
Hi all,I have developed two asp .net web services using visual studio .net 2003.I wish to call one web service from another web service.I tried adding a web reference of the web service in another web service and was able to do so.but i m not able to access the web methods provided by the web servicecould you please suggest a way to go about itExpecting quick replyThanxCharmy try to make sure that you reference it in the web reference and call it properly this is sample  [WebMethod()] public double CalcDistance(int x1, int y1, int x2, int y2) { Calculator.Service1 calc = new...

Web service in .NET from Java Web Service
Hi there,I'm pretty new to .net (although i have years of experience with the old vb 6, access 2k, as well as java)... and need some with perhaps either some syntax or something.Here is the wsdl.<wsdl:definitions targetNamespace="http://www.dynix.com/schema/book">−<wsdl:types>−<schema targetNamespace="GetBookInfoByISBN">−<complexType name="BookInfoType">−<sequence><element maxOccurs="1" minOccurs="0" name="Title" nillable="true" type="xsd:string"/><element maxOccurs=&quo...

create valid xml to send to web service based on the schema provided by web service
Problem: I have a web page which is being populated from a dataset containing multiple tables.  I now need to call a web service and send the majority of this data to be incorporate into a mainframe system.  I have been supplied with the schema that the web service will be using to validate the data.  I am new to web services and I am not sure how to take my existing dataset and transform it into an xml document that matches the schema I was provided with. There is a main schema with an element which is a custom complex type.  This custom type consists of an element whi...

.NET web services Vs Java Web Services
Hello, does anyone know of a book or good source of information that compares .NET and Java Web Services? (I would like soemthing neutral if possible). I am thinking of approaching this subject for my dissertation? Many Thanks Rob Hi Rob, Last year I had to give a powepoint presentation on Web Services. I noticed some good books at barnes and noble that discussed the subject. These books were specific to Java and discussed Web Services in a very clear fashion. They gave some elementary examples that were easy to understand. I have not yet had the pleasure of creatin .NET Web Servi...

Web Site Project: How to configure web service URL in web.config (web service defined in a referenced DLL)
I have a web site that references a business logic DLL project. In the business logic project, there is a web service defined in its app.config file something like this: <applicationSettings>  <MyNamespace.BLL.Properties.Settings>    <setting name="MyNamespace_BLL_MyServer_ServiceName" serializeAs="String">    <value>http://blah.blah.blah.asmx</value>  </setting>  </MyNamespace.BLL.Properties.Settings></applicationSettings> When the web site is published, the web ...

web web web
Name: bahadir Email: sensiz_olmuyor_t1_at_hotmail.com Product: Firefox 2 Beta 2 Summary: web web web Comments: web sayfası yapmak Browser Details: Mozilla/5.0 (Windows; U; Windows NT 5.1; tr; rv:1.8.1b2) Gecko/20060821 Firefox/2.0b2 ...

Manipulating Microsoft DNS service from web service or web form.
Hiya All,   I need to be able to update an "A record" on Microsoft DNS Service for a particular domain from a web form or web service - and have no idea where to begin. I can run the form/service on the same box running DNS service... I am looking to make a IP address updater that will update my "home" ip address if it changes (similar to what DYNDNS offers, except I have my own name servers, so that wont work for me lol). Any kick in the right direction is greatly appreciated!   Dave...

what are web services and what are the advantages of web services?
 Hello  i am new to this .net stuff and i was ask on the job interview what a web services is?and if i did not know given that i had a project ( as a project manager,  or a web developer)   what  is it? how do i start a >NET project on it? what are the main advantages is?  HOW DO I START THIS IN THE INTERVIEW>  and what basic books do i buy?   Hi There, There plenty of source on the net about webservice Definiton: http://en.wikipedia.org/wiki/Web_service http://www.codeproject.com/Purgatory/Defining_Web_Services.asp...

Calling a Web Service from a Web Service
Hello,I was looking for some feedback on calling a web service from within a web service. I've heard that it's not good practice (or not possible). I have a scenario where I think it might make some sense.Within our infrastructure, we've created a web service that handles incoming updates on the statuses of all processes. This has proven to be a good thing since it allows applications to communicate across server to make status updates. It's also used by third party developers and applications to communicate with our infrastructure.Along these lines ... we are planning to create a new compon...

Is web services a part of web Service?
  I have a question: Is web services a part of web server?? And when the client calls web service, it means that client calls web server?? Or is it a different entity in itself which communicates separately both with client and server and acts as middleware application.. I am very confused.. Can someone explain me the architecture...??? Thanks..Dont forget to click "Mark as Answer" on the post that helped you.This credits the member,earns you a point & marks your thread as Resolved so that new users will know where to search for their queries. When you build and dep...

What action by a web service requires an app to update their web reference to a Web Service
I create a web reference to a web service in my aspx web application which returns an XML object. If the owner of the web service makes a change to their object am I required to do an update web reference? What if I dont use the information from the new object? thanks Larry You should make the change only if the contract b/w the two has changed (e.g. parameters, return values), etc.-Mathew Nolton Website=www.cybral.com Email=mnolton@cybral.com Blog=weblogs.asp.net/mnolton If the web service now returns a new element and my class reference doesn't match their new class ref...

.Net Web Form & Web Service Deployment
Hi all I have written some test web services and some web form applications and deployed them to my IIS. That's fine but I now want to deploy them to my real IIS server. I have created an msi for each but the problem is I seem to only be able to deploy to the default web site. Our default web site is turned off and instead we use several other sites. Does anybody happen to if Powerbuilder 11 supports non default web sites? If not do I need to hack the msi and if so can anybody suggest a suitable tool. I have Orca but it's not very friendly. Unless of course I knew exactly w...

XML Web Service as Admin of a Store Web site
I have created an XML Web Service (WebShopManager) with the IBS Store that will serve as an Admin program. I download the Store data tables to a local client where I read, edit and then return data to the Store. The program can function as a logistic centre. Does anyone have experience with this kind of solution? Can this work in reality when we have lots of data in the tables to download? What could be a problem? I imagine this method much more flexible than the ordinary web based admin solutions. Bo Wiklund...

Web resources about - XML Web service , Web form - asp.net.xml-web-services

Public Broadcasting Service - Wikipedia, the free encyclopedia
... such as PBS NewsHour , Masterpiece , and Frontline . Since the mid-2000s, Roper polls commissioned by PBS have consistently placed the service ...

Customer service helps bakery find recipe for success. - AdelaideNow Search Search
PUTTING the customer first has been a key to the success of Bryce’s Bakery in Elizabeth, owner Ben Pacillo says.

Car crashes into BP service station in Belfield, causing major gas leak - DailyTelegraph Search Search ...
THE family petrol station owners almost killed by an out-of-control car say a “saint was watching over” them.

Customer service helps bakery find recipe for success
PUTTING the customer first has been a key to the success of Bryce’s Bakery in Elizabeth, owner Ben Pacillo says.

Terrifying crash at Sydney service station caught on camera
Three men were injured and one woman narrowly escaped injury after a car crashed into a service station on Saturday night.&nbsp;

Apple axes free iTunes Radio service, directs listeners to Beats 1 instead
... Clint Ecker) In an e-mail sent to users late Friday , Apple announced that it would be shutting down its ad-free iTunes Radio streaming service ...

Maryland groups expect big turnout at Martin Luther King Jr. Day service activities
On the eve of President Barack Obama 's first inauguration &amp;mdash; Martin Luther King Jr. Day 2009 &amp;mdash; he asked Americans to honor ...

Producer Prices Decline More Than Expected, Services Disappoint; Oil Approaches $29
... did rise, but only 0.1 percent while the year-on-year rate is down 2 tenths in the month to only plus 0.3 percent. The ex-gas ex-food ex-services ...

listen to Jarvis Cocker's all-Bowie tribute edition of "Sunday Service" BBC radio show
... Yavin) Jarvis Cocker had already paid tribute to the late David Bowie but, unsurprisingly, dedicated the entirety of this week's "Sunday Service" ...

Say goodbye to iTunes Radio — Apple's folding it into its $10 music streaming service
Apple's clearing the way for its new-ish Beats 1 radio station by making its older free streaming option, iTunes Radio, part of its $10 Apple ...

Resources last updated: 1/18/2016 5:24:48 PM