Thanks, I did find one at www.soapclient.com that I used had to change the names space some but I will have to find one I can input the information and see what it generates.. Thanks for your help
On Nov 5, 3:55 am, "[email protected]" <[email protected]> wrote: > Hi Miles, > > I'm sorry my knowledge of VB/.NET is limited. But I would recommend that you > use any pre-build Desktop Soap Client to test the SOAP functions, for > examplehttp://ditchnet.org/soapclient/is quite handy and it prints also > the raw XML that it sends and receives. > > Sebastian > > 2010/11/5 HMiles <[email protected]> > > > > > Sebastian, Thanks for the reply, > > > The getsessionID is the only call that is made with no parameter. > > the comment for "no parameters required is actually commente out and > > serves no purpuse. > > > I am sending the sid recieved from getsession and the username and > > password to the loginuser method. > > these are the lines of code that control that: > > > > & " <ns2:SID>"&sid&"</ns2:SID>" _ > > > > & " > > <ns2:username>admin</ns2:username>" > > > > _ > > > > & " <ns2:userpass>PASSWORD</ns2:userpass>" > > _ > > > > & " </ns2:loginUser>" _ > > You can run the code at this url:http://www.harvest4Christ.net/test6.asp > > > it will show you the codes being returned.. i.e. the session_id and > > error code return from loginuser.. dont show the username and > > password but they are hardcoded in. I appreciate your lookin at this > > > Miles > > > On Nov 4, 1:04 pm, "[email protected]" <[email protected]> > > wrote: > > > Hi Miles, > > > > I am no expert in .NET or VB but it looks like you are calling the > > methods > > > without parameters. > > > > That is also why it throws the Exception. > > > > Sebastian > > > > 2010/11/4 HMiles <[email protected]> > > > > > I have successfully written my first SOAP client in and I can get the > > > > session_id and parse it. However when I am sending the loginuser > > > > request I recieve and error -10 Not able to find username even though > > > > it is hardcoded within the soap request. The error code comes back is > > > > null. My Code is included for the soap request: and error handler: > > > > > I am submittig this here because it is not vb specific: > > > > > sub getSessionID > > > > Dim objXMLHTTP : set objXMLHTTP = Server.CreateObject("Msxml2.XMLHTTP. > > > > 3.0") > > > > Dim strRequest, strResult, strFunction, strURL, strNamespace, > > > > bXMLLoadError > > > > > 'URL to SOAP namespace and connection URL > > > > strNamespace = "UserService" > > > > strURL = "http://localhost:5080/openmeetings/services/UserService/ > > > > getSession" > > > > > 'function you want to call > > > > strFunction = "getSession" > > > > 'strFunction = "test" 'no parameters required > > > > > strRequest ="<?xml version=""1.0"" encoding=""utf-8"" > > > > standalone=""no""?>" _ > > > > & "<SOAP-ENV:Envelope xmlns:SOAP-ENV=""http://www.w3.org/2003/05/soap- > > > > envelope"" xmlns:SOAP-ENC=""http://schemas.xmlsoap.org/soap/ > > > > encoding/ <http://schemas.xmlsoap.org/soap/%0Aencoding/>""" _ > > > > & " xmlns:wsdl=""http://schemas.xmlsoap.org/wsdl/"" > > > > xmlns:ns2=""http://services.axis.openmeetings.org""" _ > > > > & " xmlns:ns1=""http://basic.beans.data.app.openmeetings.org/ > > > > xsd"" xmlns:wsaw=""http://www.w3.org/2006/05/addressing/wsdl""" _ > > > > & " xmlns:http=""http://schemas.xmlsoap.org/wsdl/http/"" > > > > xmlns:ns0=""http://basic.beans.hibernate.app.openmeetings.org/xsd""" _ > > > > & " xmlns:xs=""http://www.w3.org/2001/XMLSchema"" > > > > xmlns:mime=""http://schemas.xmlsoap.org/wsdl/mime/"" > > > > xmlns:soap=""http://schemas.xmlsoap.org/wsdl/soap/""" _ > > > > & " xmlns:soap12=""http://schemas.xmlsoap.org/wsdl/soap12/"" > > > > xmlns:xsi=""http://www.w3.org/2001/XMLSchema-instance"" > > > > xmlns:xsd=""http://www.w3.org/2001/XMLSchema"">" _ > > > > & " <SOAP-ENV:Body>" _ > > > > & " <m:" & strFunction & " xmlns:m=""" & strNamespace & """>" _ > > > > & " </m:" & strFunction & ">" _ > > > > & " </SOAP-ENV:Body>" _ > > > > & "</SOAP-ENV:Envelope>" > > > > > objXMLHTTP.open "post", "" & strURL & "", False > > > > > objXMLHTTP.setRequestHeader "Content-Type", "text/xml; charset=utf-8" > > > > objXMLHTTP.setRequestHeader "Content-Length", Len(strRequest) > > > > 'objXMLHTTP.setRequestHeader "SOAPAction", "http:// > > > > 216.161.170.249:5080/openmeetings/services/UserService/getSession" > > > > > 'send the request and capture the result > > > > objXMLHTTP.send(strRequest) > > > > If objXMLHTTP.Status = 200 Then > > > > strResult = objXMLHTTP.responseText > > > > response.write strResult > > > > session("sid") = mid(strResult,495,32) > > > > 'response.write "sid = "&session("sid")&"<BR>" > > > > bXMLLoadError = False > > > > Else > > > > Response.Write("<font color=""red"">Page Error: Could not load XML > > > > from remote server</font><br>") 'Show error message > > > > bXMLLoadError = True > > > > End If > > > > If objXMLHTTP.status = 200 Then > > > > If Not objXMLHTTP.responseXML Is Nothing And _ > > > > Not objXMLHTTP.responseXML.documentElement Is Nothing And _ > > > > objXMLHTTP.responseXML.parseError.errorCode <> 0 Then > > > > Set ResponseXML = objXMLHTTP.responseXML > > > > WellFormed = True > > > > Else > > > > Set ResponseXML = Server.CreateObject("Msxml2.DOMDocument.3.0") > > > > ResponseXML.async = False > > > > WellFormed = ResponseXML.load(objXMLHTTP.responseStream) > > > > End If > > > > If WellFormed Then > > > > ' Response.Write "<p>Got XML document with " & _ > > > > ' ResponseXML.getElementsByTagName("*").length & _ > > > > ' " elements</p>" & VbCrLf > > > > '***************added by Me ********************** > > > > Dim str > > > > str = "" > > > > Set objNodeList = ResponseXML.getElementsByTagName("*") > > > > For i = 0 To (objNodeList.length - 1) > > > > str = objNodeList.Item(i).xml & vbCrLf > > > > if i = 7 then > > > > sessionid = mid(str,87,32) > > > > session("sid")= sessionid > > > > response.write "<BR>sessionid = "&sessionid&"<BR>" > > > > end if > > > > 'response.write i&" = "&str &"<BR>" > > > > Next > > > > Else > > > > Response.Write "<p>Parsing failed: " & _ > > > > ResponseXML.parseError.reason & _ > > > > "</p>" & VbCrLf > > > > End If > > > > Else > > > > Response.Write "<p>HTTP status: " & _ > > > > objXMLHTTP.status & " " & _ > > > > objXMLHTTP.statusText & _ > > > > "</p>" & VbCrLf > > > > End If > > > > > Set objXMLHTTP = nothing > > > > set ResponseXML = nothing > > > > call loginUser > > > > end sub > > > > "" RETURNS THE SID CORRECTLY > > > > > sub loginUser() > > > > dim sid > > > > Dim objXMLHTTP : set objXMLHTTP = Server.CreateObject("Msxml2.XMLHTTP. > > > > 3.0") > > > > Dim strRequest, strResult, strFunction, strURL, strNamespace > > > > sid = session("sid") > > > > 'URL to SOAP namespace and connection URL > > > > strNamespace = "UserService" > > > > strURL = "http://216.161.170.249:5080/openmeetings/services/ > > > > UserService/loginUser" > > > > > 'function you want to call > > > > strFunction = "loginUser" > > > > 'strFunction = "test" 'no parameters required > > > > > strRequest ="<?xml version=""1.0"" encoding=""utf-8"" > > > > standalone=""no""?>" _ > > > > & "<SOAP-ENV:Envelope xmlns:SOAP-ENV=""http:// > > > > services.axis.openmeetings.org"" xmlns:SOAP-ENC=""http:// > > > > schemas.xmlsoap.org/soap/encoding/""" _ > > > > & " xmlns:wsdl=""http://schemas.xmlsoap.org/wsdl/"" > > > > xmlns:ns2=""http://services.axis.openmeetings.org""" _ > > > > & " xmlns:ns1=""http://basic.beans.data.app.openmeetings.org/ > > > > xsd"" xmlns:wsaw=""http://www.w3.org/2006/05/addressing/wsdl""" _ > > > > & " xmlns:http=""http://schemas.xmlsoap.org/wsdl/http/"" > > > > xmlns:ns0=""http://basic.beans.hibernate.app.openmeetings.org/xsd""" _ > > > > & " xmlns:xs=""http://www.w3.org/2001/XMLSchema"" > > > > xmlns:mime=""http://schemas.xmlsoap.org/wsdl/mime/"" > > > > xmlns:soap=""http://schemas.xmlsoap.org/wsdl/soap/""" _ > > > > & " xmlns:soap12=""http://schemas.xmlsoap.org/wsdl/soap12/"" > > > > xmlns:xsi=""http://www.w3.org/2001/XMLSchema-instance"" > > > > xmlns:xsd=""http://www.w3.org/2001/XMLSchema"">" _ > > > > & " <SOAP-ENV:Body>" _ > > > > & " <ns2:loginUser xmlns:ns2=""http:// > > > > services.axis.openmeetings.org"">" _ > > > > & " <ns2:SID>"&sid&"</ns2:SID>" _ > > > > & " > > <ns2:username>admin</ns2:username>" > > > > _ > > > > & " <ns2:userpass>PASSWORD</ns2:userpass>" > > _ > > > > & " </ns2:loginUser>" _ > > > > & " </SOAP-ENV:Body>" _ > > > > & "</SOAP-ENV:Envelope>" > > > > > objXMLHTTP.open "post", "" & strURL & "", False > > > > > objXMLHTTP.setRequestHeader "Content-Type", "text/xml; charset=utf-8" > > > > objXMLHTTP.setRequestHeader "Content-Length", Len(strRequest) > > > > 'objXMLHTTP.setRequestHeader "SOAPAction", "http://localhost:5080/ > > > > openmeetings/services/UserService/loginUser< > >http://localhost:5080/%0Aopenmeetings/services/UserService/loginUser> > > > > " > > > > > 'send the request and capture the result > > > > objXMLHTTP.send(strRequest) > > > > strResult = objXMLHTTP.responseText > > > > txt =strResult > > > > if txt <> "1" then > > > > session("errid") = txt > > > > response.write "<p>Login Failed: error = "&txt&"<br>" > > > > call getErrorByCode > > > > else > > > > Response.write "<br><BR>Login sucessful strresponse = " & txt &"<BR>" > > > > end if > > > > 'added to get response > > > > If objXMLHTTP.status = 200 Then > > > > If Not objXMLHTTP.responseXML Is Nothing And _ > > > > Not objXMLHTTP.responseXML.documentElement Is Nothing And _ > > > > objXMLHTTP.responseXML.parseError.errorCode <> 0 Then > > > > Set ResponseXML = objXMLHTTP.responseXML > > > > WellFormed = True > > > > Else > > > > Set ResponseXML = Server.CreateObject("Msxml2.DOMDocument.3.0") > > > > ResponseXML.async = False > > > > WellFormed = ResponseXML.load(objXMLHTTP.responseStream) > > > > End If > > > > If WellFormed Then > > > > Response.Write "<p>Got XML document with " & _ > > > > ResponseXML.getElementsByTagName("*").length & _ > > > > " elements</p>" & VbCrLf > > > > > Dim str2 > > ... > > read more »- Hide quoted text - > > - Show quoted text - -- You received this message because you are subscribed to the Google Groups "OpenMeetings User" group. To post to this group, send email to [email protected]. To unsubscribe from this group, send email to [email protected]. For more options, visit this group at http://groups.google.com/group/openmeetings-user?hl=en.
