This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

DEVELOPERS FORUM - get error response, "Missing root item", when i try web service.

jetlo - Thursday, June 24, 2010 4:02 AM:

Dear Expert, 
I’m try the Microsoft XMLHTTP Object example by Aras training material (as follow codes), get a response msg like illustrate 2.jpg. (the Chinese text mean is “missing root item” in the illustrate)
And now the content value as 1.jpg in http.send(soap) ,what wrong with my code. Could any one help me?
 
 
Dim innovatorServer As String : innovatorServer = "localhost/.../InnovatorServer.aspx"
        Dim database As String : database = "CoatingPLM20100610"
        Dim loginName As String : loginName = "admin"
        Dim password As String : password = "607920b64fe136f9ab2389e371852af2" 'MD5hash of the password
        Dim soapStart As String : soapStart = "<SOAP-ENV:Envelope xmlns:SOAP-ENV='schemas.xmlsoap.org/.../' encodingStyle='schemas.xmlsoap.org/.../'><SOAP-ENV:Body>"
        Dim soapEnd As String : soapEnd = "</SOAP-ENV:Body></SOAP-ENV:Envelope>"
        Dim soapAction As String : soapAction = "ApplyItem"
        Dim body As String : body = "<Item type='User' action='get' select='login_name'/>"
        Dim soap As String : soap = soapStart & "<" & soapAction & " xmlns:m='www.aras-corp.com/'>" & body & "</" & soapAction & ">" & soapEnd
        Dim http : http = CreateObject("Msxml2.ServerXMLHTTP")
        http.open("POST", innovatorServer, False)
        http.setRequestHeader("SOAPaction", soapAction)
        http.setRequestHeader("AUTHUSER", loginName)
        http.setRequestHeader("AUTHPASSWORD", password)
        http.setRequestHeader("DATABASE", database)
        http.send(soap)
 
        Dim response : response = http.responseText
        Dim responseDom : responseDom = CreateObject("microsoft.xmldom")
        responseDom.loadXML(response)
        Dim userItems : userItems = responseDom.selectNodes("//Item[@type='User']")
        'Wscript.Echo("Number of users: " & userItems.Length)
        soapAction = "logoff"
        body = "logoff"
        soap = soapStart & "<" & soapAction & " xmlns:m='www.aras-corp.com/'>" & _
        body & "</" & soapAction & ">" & soapEnd
        http.open("POST", innovatorServer, False)
        http.setRequestHeader("SOAPaction", soapAction)
        http.setRequestHeader("AUTHUSER", loginName)
        http.setRequestHeader("AUTHPASSWORD", password)
        http.setRequestHeader("DATABASE", database)
        http.send(soap)
 
Best regards,
Jet Lo
 


jetlo - Thursday, June 24, 2010 4:04 AM:

other information,

My environment : innovator 9.1.0 SP6

 

Jet Lo