Hallo,
Ich stehe zz vor einen problem was normalerweise keines sein sollte ..
ok es geht darum eine art Client/Server architekur mittels msxml zu
realieseren ..
das sollte mal das 0815 loginscript (client) sein:
<%
strResponse =
func_login("http://localhost/iis/newticket/server/s_login.asp",
request("Username"), request("Userpass"))
public function func_login(strAddyToSend, strUsername, strUserpass)
set xmlhttp = server.CreateObject("Msxml2.XMLHTTP.4.0")
xmlhttp.open "POST", strAddyToSend, False
xmlhttp.setRequestHeader "Man", POST & " " & strAddyToSend & " HTTP/1.1"
xmlhttp.setRequestHeader "MessageType", "CALL"
xmlhttp.setRequestHeader "ContentType", "text/xml"
'//
'Response.Write BuildSOAP(strUsername, strUserpass)
strSOAPToSend = BuildSOAP(strUsername, strUserpass)
'//
xmlhttp.send strSOAPToSend
If xmlhttp.Status = 200 Then
func_login = xmlhttp.responseText
Else
func_login = xmlhttp.statusText
End If
Set xmlhttp = Nothing
End Function
'-#--------------------------------------------
public Function BuildSOAP(strUsername, strUserpass)
strSOAP = "<SOAP:Envelope xmlns:SOAP=""urn:schemas-xmlsoap-org:soap.v1"">"
strSOAP = strSOAP & "<SOAP:Body>"
strSOAP = strSOAP & "<Name>LOGIN</Name>"
strSOAP = strSOAP & "<UserName>"&strUsername&"</UserName>"
strSOAP = strSOAP & "<UserPass>"&strUserpass&"</UserPass>"
strSOAP = strSOAP & "</SOAP:Body>"
strSOAP = strSOAP & "</SOAP:Envelope>"
BuildSOAP = strSOAP
end function
%>
ok und der server w�re dieser:
<%
Response.Buffer = True
Response.ContentType = "text/xml"
set objXML = server.CreateObject("Msxml2.DOMDocument.4.0")
retval = objXML.Load(request)
If retVal = true then
strName = objXML.selectSingleNode(".//Name").text
strUserName = objXML.selectSingleNode(".//UserName").text
strUserPass = objXML.selectSingleNode(".//UserPass").text
select case strname
case "LOGIN"
set objRS = CreateRS("select * from member where UserName='"&strUserName&"'
and UserPass='"&strUserPass&"'")
if objRS.eof then
Response.Write make_response(Fehler .. Eingabe nicht korrekt")
else
'ok
end if
destroyRS(objRS)
Case Else
Response.Write make_response("DIESE FUNKTION GIBT ES NICHT")
end select
else
Response.Write "<xml><response>ERROR: SOAP-Request</response>"
end if
public function make_response(strvalue)
strsoap = "<SOAP:Envelope xmlns:SOAP=""urn:schemas-xmlsoap-org:soap.v1"">"
strsoap = strSoap & "<SOAP:Body>"
strsoap = strSoap & "<response>"&strvalue&"</response>"
strsoap = strSoap & "</SOAP:Body>"
strsoap = strSoap & "</SOAP:Envelope>"
make_response = strsoap
end function
set objXML = nothing
function CreateRS(SQL)
Set dbc = Server.CreateObject("ADODB.Connection")
dbc.Mode = 3
dbc.open "DRIVER={MySQL ODBC 3.51
Driver};SERVER=localhost;DATABASE=test;UID=root;PWD=;OPTION=35"
set CreateRS = Server.CreateObject("ADODB.Recordset")
CreateRS.cursortype = 1
CreateRS.LockType = 3
CreateRS.Open sql, dbc
end function
%>
so nun zum problem ..
wenn ich auf keine datenbank zugreife funtz alles perfekt ...
aber sobald ich meine function CreateRS aufrufe bekomm ich nen SOAP error
...
funktioniert Die ado in dieser weise nicht oder hab ich irgend einen Fehler
?
das muss doch irgendwie machbar sein das ich auf ne datenbank zugreifen kann
...
ich m�chte keine DLLs verwenden darum diese L�sung als asp server ohne wsdl
erbitte hinweise
mfg Pierre
_______________________________________________
Coffeehouse Mailingliste, Postings senden an:
[EMAIL PROTECTED]
An-/Abmeldung und Suchfunktion unter:
http://www.glengamoi.com/mailman/listinfo/coffeehouse