Ok thanks Sebastian, But today I am having a problem with the SoapGateway. Instead of returning 1 for loginuser soap method I am getting a -35 user already exist in organization for the Admin account. Did something change in the routines that I have missed, do I need to upgrade to 1.6? I have written Classic ASP Subs for all the Soap Gateway methods.. and had them working last friday I started integrating them into my application and I started getting the above error. As the admin user shold already exist the error does not make sense to Me.
Miles On Nov 11, 2:51 am, "[email protected]" <[email protected]> wrote: > Hi Miles, > > well I don't think you are the last classic ASP programer, but maybe its > becoming a rare species :) > > I've added it to the > wiki:http://code.google.com/p/openmeetings/wiki/SoapSamples > > If you have more to add, let me know and I set you up as wiki editor. > > Sebastian > > 2010/11/11 HMiles <[email protected]> > > > > > Sebastian, > > > Thanks for your help. I finally figured it all out and here is a > > working soap client for vbscript and classic asp for your community. > > > getsession: > > > <% > > dim sid > > 'sid = session("sid") > > Set oXmlHTTP = CreateObject("Microsoft.XMLHTTP") > > oXmlHTTP.Open "POST", "http://216.161.170.249:5080/openmeetings/ > > services/UserService?WSDL<http://216.161.170.249:5080/openmeetings/%0Aservices/UserService?WSDL>", > > False > > > oXmlHTTP.setRequestHeader "Content-Type", "application/soap+xml; > > charset=utf-8" > > oXmlHTTP.setRequestHeader "SOAPAction", "http://localhost:5080/ > > openmeetings/services/getSession" > > > SOAPRequest = _ > > "<?xml version=""1.0"" encoding=""utf-8""?>" & _ > > "<soap12:Envelope xmlns:xsi=""http://www.w3.org/2001/XMLSchema- > > instance"" xmlns:xsd=""http://www.w3.org/2001/XMLSchema"" > > xmlns:soap12=""http://www.w3.org/2003/05/soap-envelope"">" & _ > > "<soap12:Body>" & _ > > "<ns2:getSession xmlns:ns2=""http:// > > services.axis.openmeetings.org"">"& _ > > "</ns2:getSession></soap12:Body>" & _ > > "</soap12:Envelope>" > > > oXmlHTTP.send SOAPRequest > > strResult = oXmlHTTP.responseText > > 'response.write strResult > > > If oXmlHTTP.status = 200 Then > > If Not oXmlHTTP.responseXML Is Nothing And _ > > Not oXmlHTTP.responseXML.documentElement Is Nothing And _ > > oXmlHTTP.responseXML.parseError.errorCode <> 0 Then > > Set ResponseXML = oXmlHTTP.responseXML > > WellFormed = True > > > Else > > Set ResponseXML = Server.CreateObject("Msxml2.DOMDocument.3.0") > > ResponseXML.async = False > > WellFormed = ResponseXML.load(oXmlHTTP.responseStream) > > > 'getResponse and determine next action > > > Set objLst = ResponseXML.getElementsByTagName("*") > > > Set objNodeList = ResponseXML.getElementsByTagName("*") > > For i = 0 To (objNodeList.length - 1) > > If objNodeList.item(i).nodeName = "ax218:session_id" Then > > > SID = objNodeList.Item(i).text & vbCrLf > > session("SID")= SID > > 'response.write "sid= "&sid&"<BR>" > > Exit For > > End If > > > Next > > End If > > > End IF > > %> > > > loginUser: > > > <% > > dim sid > > sid = session("sid") > > Set oXmlHTTP = CreateObject("Microsoft.XMLHTTP") > > oXmlHTTP.Open "POST", "http://216.161.170.249:5080/openmeetings/ > > services/UserService?WSDL<http://216.161.170.249:5080/openmeetings/%0Aservices/UserService?WSDL>", > > False > > > oXmlHTTP.setRequestHeader "Content-Type", "application/soap+xml; > > charset=utf-8" > > oXmlHTTP.setRequestHeader "SOAPAction", "http://localhost5080/ > > openmeetings/services/UserService/loginUser" > > > SOAPRequest = _ > > "<?xml version=""1.0"" encoding=""utf-8""?>" & _ > > "<soap12:Envelope xmlns:xsi=""http://www.w3.org/2001/XMLSchema- > > instance"" xmlns:xsd=""http://www.w3.org/2001/XMLSchema"" > > xmlns:soap12=""http://www.w3.org/2003/05/soap-envelope"">" & _ > > "<soap12:Body>" & _ > > "<ns2:loginUser xmlns:ns2=""http://services.axis.openmeetings.org"">"& > > _ > > "<ns2:SID>"&sid&"</ns2:SID>"& _ > > "<ns2:username>admin</ns2:username>"& _ > > "<ns2:userpass>xxxxxxxxxx</ns2:userpass>"& _ > > "</ns2:loginUser></soap12:Body>" & _ > > "</soap12:Envelope>" > > > oXmlHTTP.send SOAPRequest > > strResult = oXmlHTTP.responseText > > 'response.write strResult > > > If oXmlHTTP.status = 200 Then > > If Not oXmlHTTP.responseXML Is Nothing And _ > > Not oXmlHTTP.responseXML.documentElement Is Nothing And _ > > oXmlHTTP.responseXML.parseError.errorCode <> 0 Then > > Set ResponseXML = oXmlHTTP.responseXML > > WellFormed = True > > > Else > > Set ResponseXML = Server.CreateObject("Msxml2.DOMDocument.3.0") > > ResponseXML.async = False > > WellFormed = ResponseXML.load(oXmlHTTP.responseStream) > > > 'getResponse and determine next action > > > Set objLst = ResponseXML.getElementsByTagName("*") > > > Set objNodeList = ResponseXML.getElementsByTagName("*") > > For i = 0 To (objNodeList.length - 1) > > If objNodeList.item(i).nodeName = "ns:return" Then > > > strResponse = objNodeList.Item(i).text & vbCrLf > > session("strResponse")= strResponse > > Exit For > > End If > > > Next > > End If > > > If strResponse <> 1 then > > nexturl= "omgetErrorbyTypeSGmethod.asp?Err="&strResponse > > response.redirect(nexturl) > > End if > > > End IF > > %> > > > setuserobjectandgeneratehash for direct login > > > <% > > dim sid > > sid = session("sid") > > Set oXmlHTTP = CreateObject("Microsoft.XMLHTTP") > > oXmlHTTP.Open "POST", "http://localhost:5080/openmeetings/services/ > > UserService?WSDL<http://localhost:5080/openmeetings/services/%0AUserService?WSDL>", > > False > > > oXmlHTTP.setRequestHeader "Content-Type", "application/soap+xml; > > charset=utf-8" > > oXmlHTTP.setRequestHeader "SOAPAction", "http://216.161.170.249:5080/ > > openmeetings/services/UserService/setUserObjectAndGenerateRoomHash<http://216.161.170.249:5080/%0Aopenmeetings/services/UserService/setU...> > > " > > > SOAPRequest = _ > > "<?xml version=""1.0"" encoding=""utf-8""?>" & _ > > "<soap12:Envelope xmlns:xsi=""http://www.w3.org/2001/XMLSchema- > > instance"" xmlns:xsd=""http://www.w3.org/2001/XMLSchema"" > > xmlns:soap12=""http://www.w3.org/2003/05/soap-envelope"">" & _ > > "<soap12:Body>" & _ > > "<ns2:setUserObjectAndGenerateRoomHash xmlns:ns2=""http:// > > services.axis.openmeetings.org"">"& _ > > "<ns2:SID>"&sid&"</ns2:SID>"& _ > > "<ns2:username>test</ns2:username>"& _ > > "<ns2:firstname>demo</ns2:firstname>"& _ > > "<ns2:lastname>user</ns2:lastname>"& _ > > "<ns2:profilePictureUrl />"& _ > > "<ns2:profilePictureUrl />"& _ > > "<ns2:email>"&stremail&"</ns2:email>"& _ > > "<ns2:externalUserId />"& _ > > "<ns2:externalUserType />"& _ > > "<ns2:room_id>1</ns2:room_id>"& _ > > "<ns2:becomeModeratorAsInt>1</ns2:becomeModeratorAsInt>"& _ > > "<ns2:showAudioVideoTestAsInt>1</ns2:showAudioVideoTestAsInt>"& _ > > "</ns2:setUserObjectAndGenerateRoomHash></soap12:Body>" & _ > > "</soap12:Envelope>" > > > oXmlHTTP.send SOAPRequest > > strResult = oXmlHTTP.responseText > > response.write strResult > > > If oXmlHTTP.status = 200 Then > > If Not oXmlHTTP.responseXML Is Nothing And _ > > Not oXmlHTTP.responseXML.documentElement Is Nothing And _ > > oXmlHTTP.responseXML.parseError.errorCode <> 0 Then > > Set ResponseXML = oXmlHTTP.responseXML > > WellFormed = True > > > Else > > Set ResponseXML = Server.CreateObject("Msxml2.DOMDocument.3.0") > > ResponseXML.async = False > > WellFormed = ResponseXML.load(oXmlHTTP.responseStream) > > > 'getResponse and determine next action > > > Set objLst = ResponseXML.getElementsByTagName("*") > > > Set objNodeList = ResponseXML.getElementsByTagName("*") > > For i = 0 To (objNodeList.length - 1) > > If objNodeList.item(i).nodeName = "ns:return" Then > > > strroomHashby = objNodeList.Item(i).text & vbCrLf > > session("strroomHASH")= strroomHASH > > Exit For > > End If > > > Next > > End If > > > End IF > > %> > > > Perhaps it will help someone in the future. LOL or perhaps I am the > > only classic asp programmer left in the world. > > > Miles > > On Nov 9, 1:33 am, "[email protected]" <[email protected]> > > wrote: > > > Miles, > > > > the return value -10 is only thrown if the user cannot be found. > > > > From the source Code: > > > > String hql = "SELECT c from Users AS c " + > > > "WHERE " + > > > "(c.login LIKE :userOrEmail OR c.adresses.email LIKE > > > :userOrEmail ) " + > > > "AND c.deleted != :deleted"; > > > > Object idf = HibernateUtil.createSession(); > > > Session session = HibernateUtil.getSession(); > > > Transaction tx = session.beginTransaction(); > > > > Query query = session.createQuery(hql); > > > query.setString("userOrEmail", userOrEmail); > > > query.setString("deleted", "true"); > > > > List<Users> ll = query.list(); > > > > tx.commit(); > > > HibernateUtil.closeSession(idf); > > > > log.debug("debug SIZE: " + ll.size()); > > > > if (ll.size()==0) { > > > return new Long(-10); > > > .... > > > > As you can see something is definitely wrong with the account that you > > pass > > > or the params never reach the server the way you expect it. > > > > Sebastian > > > > 2010/11/9 HMiles <[email protected]> > > > > > I continue to be unsecussful at accessing openmeting using the > > > > soapgatewaymethod. > > > > Here is my raw http header and my raw xml that is sent "captured by > > > > using wireshark". Please can someone see what I am diong wroing? > > > > > GET /test/OMLoginUserSGMethod.asp HTTP/1.1 > > > > > Accept: image/gif, image/jpeg, image/pjpeg, image/pjpeg, application/x- > > > > shockwave-flash, application/vnd.ms-excel, application/vnd.ms- > > > > powerpoint, application/msword, application/x-ms-application, > > > > application/x-ms-xbap, application/vnd.ms-xpsdocument, application/xaml > > > > +xml, */* > > > > > Accept-Language: en-us > > > > > User-Agent: Mozilla/4.0 (compatible; MSIE 7.0; Windows NT 5.1; Trident/ > > > > 4.0; FunWebProducts; .NET CLR 1.1.4322; InfoPath.1; .NET CLR > > > > 3.0.04506.648; .NET CLR 3.5.21022; .NET CLR 2.0.50727; .NET CLR > > > > 3.0.4506.2152; .NET CLR 3.5.30729; OfficeLiveConnector.1.3; > > > > OfficeLivePatch.0.0; yie8; AskTB5.6) > > > > > Accept-Encoding: gzip, deflate > > > > > Host:www.harvest4christ.net > > > > > Connection: Keep-Alive > > > > > Cookie: __qca=P0-1395927947-1288360127109; > > > > ASPSESSIONIDQQTTAQRA=FOODEBKDDDEJKJJBFOMDNECA; > > > > ASPSESSIONIDSSSTBQRB=NAINFCODIBHKDNLLNLKJNPII; > > > > ASPSESSIONIDQQRTAQQB=MINDDEBAONHCDBOODDNGDOMG > > > > > HTTP/1.1 200 OK > > > > > Date: Mon, 08 Nov 2010 22:52:09 > > ... > > 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.
