473,378 Members | 1,110 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,378 software developers and data experts.

Consuming .NET Webservice from classic ASP

I am trying to consuming a .NET web service from a standard (classic)
ASP, but having not so much luck as I dont have much experience about
SOAP.

Here is the webservice url: http://test.webservices.superbreak.c...pEndpoint.asmx

I have been advised that i need to use this through MSSOAP Toolkit or
through soap envelope.

Could someone advise about some coding pattern to access this service?

Thanks!

arno
Oct 24 '08 #1
2 4784
ar*******@yahoo.com wrote:
I am trying to consuming a .NET web service from a standard (classic)
ASP, but having not so much luck as I dont have much experience about
SOAP.

Here is the webservice url:
http://test.webservices.superbreak.c...pEndpoint.asmx

I have been advised that i need to use this through MSSOAP Toolkit or
through soap envelope.

Could someone advise about some coding pattern to access this service?
Plug your subject line into google - you will see several articles from
4guysfromRolla about this.

--
Microsoft MVP - ASP/ASP.NET - 2004-2007
Please reply to the newsgroup. This email account is my spam trap so I
don't check it very often. If you must reply off-line, then remove the
"NO SPAM"
Oct 25 '08 #2
Hope this help
--------------------------

first of nothing
capture the packets and see inside (whith a windows cd tool)
or for example Ip-Tools

once you know the pattern (the SOAP message)
you will able to put the data in its right place
in the next code, assign your pattern to the "txt" variable

for example the Soap message that i consume is:
<?xml version=""1.0"" encoding=""UTF-8"" standalone=""no""?>
<SOAP-ENV:Envelope
xmlns:SOAPSDK1="http://www.w3.org/2001/XMLSchema"
xmlns:SOAPSDK1="http://www.w3.org/2001/XMLSchema-instance"
xmlns:SOAPSDK1="http://schemas.xmlsoap.org/soap/encoding/"
xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" >
<SOAP-ENV:Body
SOAP-ENV:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/">
<SOAPSDK1:getSessionInfo xmlns:SOAPSDK1="http://webservices.myService">
<hash>JJEHEII</hash>
</SOAPSDK1:getSessionInfo>
</SOAP-ENV:Body>
</SOAP-ENV:Envelope>

the capture is the hard part
but when you have the soap message,
you can sure that will no problems
(this works for any webservice .net, or others)

KS
--------------------------

function GetSessionInfo(hash)
dim txt

txt= "<?xml version=""1.0"" encoding=""UTF-8"" standalone=""no""?><SOAP-ENV:Envelope
xmlns:SOAPSDK1=""http://www.w3.org/2001/XMLSchema""
xmlns:SOAPSDK1=""http://www.w3.org/2001/XMLSchema-instance""
xmlns:SOAPSDK1=""http://schemas.xmlsoap.org/soap/encoding/""
xmlns:SOAP-ENV=""http://schemas.xmlsoap.org/soap/envelope/""><SOAP-ENV:Body
SOAP-ENV:encodingStyle=""http://schemas.xmlsoap.org/soap/encoding/""><SOAPSDK4:getSessionI
nfo xmlns:SOAPSDK1=""http://webservice.myService""><hash>" &_
hash &_
"</hash></SOAPSDK1:getSessionInfo></SOAP-ENV:Body></SOAP-ENV:Envelope>"

dim wsuri, ohttp, node, odom
wsuri = "http://x.x.x.x:8080/axis/services/SessionPool"
Set ohttp = Server.CreateObject("MSXML2.ServerXMLHTTP")
ohttp.Open "POST", wsuri, False
ohttp.setRequestHeader "Man", "POST " & wsuri & " HTTP/1.1"
ohttp.setRequestHeader "Host", "x.x.x.x:8080"
ohttp.setRequestHeader "Content-Type", "text/xml; charset=utf-8"
ohttp.setRequestHeader "SOAPAction", "getSessionInfo"
ohttp.send(txt)

Set odom =Server.CreateObject("MSXML2.DOMDocument")
odom.loadxml( ohttp.responseText )
odom.loadxml( odom.lastChild.text )

dim ret_id, ret_tipo
ret_id= odom.firstChild.firstChild.text
ret_tipo= odom.firstChild.lastChild.text

GetSessionInfo= ret_id

Set ohttp = Nothing
Set odom = Nothing
end function

--------------------------

<ar*******@yahoo.comescribió en el mensaje
news:73**********************************@t54g2000 hsg.googlegroups.com...
| I am trying to consuming a .NET web service from a standard (classic)
| ASP, but having not so much luck as I dont have much experience about
| SOAP.
|
| Here is the webservice url: http://test.webservices.superbreak.c...pEndpoint.asmx
|
| I have been advised that i need to use this through MSSOAP Toolkit or
| through soap envelope.
|
| Could someone advise about some coding pattern to access this service?
|
| Thanks!
|
| arno
|
|
| ---
| avast! Antivirus: Inbound message clean.
| Virus Database (VPS): 081029-0, 29/10/2008
| Tested on: 30/10/2008 11:06:37 a.m.
| avast! - copyright (c) 1988-2008 ALWIL Software.
| http://www.avast.com
|
|
|

---
avast! Antivirus: Outbound message clean.
Virus Database (VPS): 081029-0, 29/10/2008
Tested on: 30/10/2008 11:23:36 a.m.
avast! - copyright (c) 1988-2008 ALWIL Software.
http://www.avast.com

Oct 30 '08 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

2
by: mkosca01 | last post by:
Hello, I have recently downloaded and installed the Soap Toolkit 3.0 from microsoft. I have successfully created the example web service DocSample1 and am able to run this from the command line...
3
by: Matt D | last post by:
I've got two web services that use the same data types and that clients will have to consume. I read the msdn article on sharing types...
0
by: Jessard | last post by:
Hi all, I am trying to consuming a .NET web service from a standard (classic) ASP page. I have come across a few articles which describe that it can be done as follows (after installing the...
0
by: kamig | last post by:
Hi! Scenario: Consuming my webService in a windows application give denied acces! Explanation: I have to say a moveTo fn. which move one file/dir from one drive to another, <authorization>
0
by: plmanikandan | last post by:
I need to develop a application to consume a webservice. For consuming web service i tried a example in Consuming a Web Service in C# in http://www.csharphelp.com.But i am uanble to use that...
4
by: MarkusJNZ | last post by:
Hi, I am trying to pass an number from a classic asp webpage to a .NET webservice. Because my C# webservice expects an integer and classic ASP uses variants I keep getting problems with object...
5
by: Preben Zacho | last post by:
Anyone that has a link or description that simply as possible shows how to add a web reference to a class library in C# and consuming it? TIA PZ
0
jeffbroodwar
by: jeffbroodwar | last post by:
hi, i need help about consuming webservice created in java with vb6. i've created the webservice in netbeans with sun java server bundle and used MS Soap toolkit 3.0 on the client side. i've...
4
by: Boni | last post by:
I want consuming a webserivce trough a proxy. I use this code. myService s = new myService (); System.Net.WebProxy proxyObject = new System.Net.WebProxy("http://proxyhost:8080"); s.Proxy =...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
by: ryjfgjl | last post by:
In our work, we often need to import Excel data into databases (such as MySQL, SQL Server, Oracle) for data analysis and processing. Usually, we use database tools like Navicat or the Excel import...
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.