eli411
asked on
Web Service
I am new to C#.net web service and have a short project that I needed to take input url with a parameter like SessionId then pull the user info from our database and redirect that to third party server.
For an example:
User input http://localhost/creditcard?SessionId=bd2df925-8ef0-43b6-aa51-f5f396439da1
and my code will redirect that to
https://www.thirdparty.com/creditcard/test.do?account_number=1234
I have coded the web service and it takes the session id and output with xml url. I needed to take the session id directly from the browser and redirecting that to the
https://www.thirdparty.com/creditcard/test.do?account_number=1234
following are the coding
DataHelper.cs
Service1.asmx.cs
For an example:
User input http://localhost/creditcard?SessionId=bd2df925-8ef0-43b6-aa51-f5f396439da1
and my code will redirect that to
https://www.thirdparty.com/creditcard/test.do?account_number=1234
I have coded the web service and it takes the session id and output with xml url. I needed to take the session id directly from the browser and redirecting that to the
https://www.thirdparty.com/creditcard/test.do?account_number=1234
following are the coding
DataHelper.cs
Service1.asmx.cs
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
hi
creating a web service is very easy
open your visual studio 2008and select new project
then select a type to be web service
after that you will see a page called service1.asmx
with an example function hello word
now let me show u one code
see the following
http://www.codeproject.com/Articles/337535/Understanding-the-Basics-of-Web-Service-in-ASP-NET
http://www.codeproject.com/Articles/1231/ASP-NET-Web-Service
creating a web service is very easy
open your visual studio 2008and select new project
then select a type to be web service
after that you will see a page called service1.asmx
with an example function hello word
now let me show u one code
<WebMethod()> _
Public Function MyFirstWS( ByVal Parm As String ) As String
' here this function accept a parameter of type string and return a string value
'here write you code
dim x as string="123"
return x
end function
' now in your web form project go to your project then right click and click add web 'reference
'put the url of the webservice and add it
'then call the method and pass ur parameter
'
see the following
http://www.codeproject.com/Articles/337535/Understanding-the-Basics-of-Web-Service-in-ASP-NET
http://www.codeproject.com/Articles/1231/ASP-NET-Web-Service
ASKER
I transfered the code by using Web Form! The web service is not for what I needed afterall! I will still give out point to those who helped!
ASKER
any samples will helped! I had been searching the web for the last couple days and still have not find my solution.