on 01-30-2006 5:21 PM
Hi,
I don't know if this is correct place for this question.
It's possibile to call Sap Web Service using asp page and SOAP?
I need to call sap rfc without using Dcom connector or .net proxy.
What's the right way to develop this?
Thanks
yes you can do it? any RFC FM can be consumed as webservice from your asp page .
You need the WSDL file for the webservice and the following is the pattern for the location of the WSDL file.
http://<WASSERVER>.<DOMAIN>.com:<PORT>/sap/bc/soap/wsdl11?services=<rfc fm name>&sap-client=<client no>
Regards
Raja
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Thanks a lot. I have already try to call http://....//wsdl11?service=. from my asp page but I am not successful to istantiate sap rfc. I receive web service sap response but I am not successful to reach the rfc. I need a valid asp code to do this. I try to search to different forums. Does not exist sap documentation,tutorial, web site about this where I can found asp code?
Thanks
asp code in sap documentation, you wont get it.
check out these links for code sample.
http://www.15seconds.com/issue/020117.htm
http://www.aspfree.com/c/a/ASP/Consuming-a-WSDL-Webservice-from-ASP/
Regards
Raja
Reward helpful answers by clicking the radiobutton
Hi,
Have also a look at
http://www.codeproject.com/aspnet/AspAspNetSessionBridge.asp
Don't look at the subject but on how things are done.
Btw are you usinge WebAS 6.4 or 6.2. The way things needs to be retrieved are different. Pls check
/people/thomas.jung3/blog/2004/11/15/bsp-150-a-developer146s-journal-part-xiii-developing-abap-webservices
for this.
Eddy
Hi,
I have already read that article but I am only successful to call webservice and not my RFC included.
That article describe how to call webservice but not how to "istantiate" RFC to get specific result whit specific input parameters.
I am successful to call a webservice but if I want to call,from my asp page, for example, RFC_READ_TABLE(param1, param2) and get the result? What's I must to do?
Ok from ASP page you want to call RFC and not call RFC as webservice.
check out this code, it may be of help to you.
<html>
<head>
<meta http-equiv="Content-Language" content="en-us">
<title>RFC Example - THUSRINFO</title>
<script language="VBScript">
sub get_cust_data()
dim fns
set fns = createobject("SAP.Functions")
fns.logfilename = "my_log.txt"
fns.loglevel = 6
dim conn
set conn = fns.connection
msgbox(hi)
msgbox(document.myf.t1.value)
conn.ApplicationServer = "server name or IP address"
conn.System = "DEV"
conn.user = document.myf.t1.value
conn.password = document.myf.t2.value
conn.Client = "021"
conn.Language = "E"
conn.tracelevel = 6
if conn.logon(0, true) <> true then
exit sub
end if
dim myfunct
set myfunc = fns.add("THUSRINFO")
result = myfunc.Call
the_exception = myfunc.exception
dim users
if result = true then
set users = myfunc.tables.item("USR_TABL")
document.write "Table USR_TABL, " & users.rowcount & " rows"
document.write "<table border=1>"
document.write "<tr>"
document.write "<td>BNAME</td>"
document.write "<td>MANDT</td>"
document.write "<td>TCODE</td>"
document.write "<td>TERM</td>"
document.write "<td>ZEIT</td>"
document.write "<td>HOSTADR</td>"
document.write "<td>RFC TYPE</td>"
document.write "</tr>"
for each user in users.Rows
document.write "<tr>"
document.write "<tr>"
document.write "<td>"
document.write trim(user("BNAME"))
document.write "</td>"
document.write "<td>"
document.write trim(user("MANDT"))
document.write "</td>"
document.write "<td> "
document.write trim(user("TCODE"))
document.write "</td>"
document.write "<td> "
document.write trim(user("TERM"))
document.write "</td>"
document.write "<td>"
document.write trim(user("ZEIT"))
document.write "</td>"
document.write "<td>"
document.write trim(user("HOSTADR"))
document.write "</td>"
document.write "<td> "
document.write trim(user("RFC_TYPE"))
document.write "</td>"
next
document.write "</table>"
set users = nothing
end if
fns.connection.logoff
Set fns = nothing
Set conn = nothing
end sub
</script>
</head>
<body>
<form method="POST" name="myf">
User Id <input type="text" name="T1" size="20"></p>
<p>Password<input type="password" name="T2" size="20"></p>
<p> </p>
<p><input type="button" value="Submit" onclick="get_cust_data()" name="B1"><input type="reset" value="Reset" name="B2"></p>
</form>
</body>
</html>
Regards
Raja
if thats the case, i have already mentioed about the WSDL file for ABAP webservice.
in your asp page you need to create a client proxy using the wsdl and use the client to consume webservice. follow the links provided by eddy and others. Its really a asp question on how to consume webservice and its no different in calling ABAP webservice.
Regards
Raja
Reward the helpful asnwers by cliking the radiobutton in the answers (below the name of the person who answered it)
Thats the way of saying thanks in SDN
User | Count |
---|---|
86 | |
10 | |
10 | |
10 | |
7 | |
6 | |
6 | |
5 | |
5 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.