Web Service issue when HTTP Post disabled - Printable Version +- Micro Focus QTP (UFT) Forums (https://www.learnqtp.com/forums) +-- Forum: Micro Focus UFT (earlier known as QTP) (https://www.learnqtp.com/forums/Forum-Micro-Focus-UFT-earlier-known-as-QTP) +--- Forum: VB Scripting/Descriptive Programming (https://www.learnqtp.com/forums/Forum-VB-Scripting-Descriptive-Programming) +--- Thread: Web Service issue when HTTP Post disabled (/Thread-Web-Service-issue-when-HTTP-Post-disabled) |
Web Service issue when HTTP Post disabled - NeilJester - 06-12-2010 Hey guys, I am new to this forum and have been working with QTP for about 7 months now. I have encountered a situation where I have used the Web Services Wizard to try and test a web service that has the HTTP-GET and HTTP-POST messaging protocols disabled because of security. Therefore when I try to invoke a PutMessage method on my webservice to send my XML string, I am getting the following error message: The PutMessage operation call failed. The .NET Framework 2.0 WSE 3.0 toolkit returned the following error: Soap error: Message: Server was unable to process request. ---> Object reference not set to an instance of an object. Line (10): Code: "PutMessage = WebService(Desc1, Desc2, Desc3).PutMessage(xmlStr)". The code I am using to attempt to send my xml string to the webserver is below: 'Note WebService Info was changed for this forum to be confidential: Code: Set xmlDoc = XMLUtil.CreateXML() I'm not sure what to do at this point. I have tested the XML via one of our development tools for the web service and it submits ok so I know the XML file is correct. Does anyone know how to configure/code the webservice call in vb script so that the PutMessage method will accept and process the XML string. (Note I also tried this without using the xmlStr = xmlDoc.ToString, and simply used the xmlDoc to pass into PutMessage) Any help would be appreciated. RE: Web Service issue when HTTP Post disabled - Saket - 06-15-2010 It seems this could be authentication issue, if you try to do it using the wizard, does it completes? if not at what point you are getting the error in the wizard? also try to load the asmx in your IE - abc123.testserver.com/STransport_2003_12.asmx. do you see the invoke form there? RE: Web Service issue when HTTP Post disabled - NeilJester - 06-15-2010 Saket, thank's so much for your response. When I use the wizard this is what is produced: ' STransport_2003_12 Web service object steps WebService("STransport_2003_12Service").PutMessage XMLWarehouse("UnsupportedType") I did set the service name and port correctly as well as the WSDL, so I'm not sure why I got the result above. Unfortunately I did paste the asmx into IE and it does not display an invoke when I select the PutMessage operation. The PutMessage operation does display "The test form is only available for requests from the local machine. " This is due to the fact that http Post is disabled on the web service. Is there anything else you could think of that I could try, or any other information I could send you that would help? RE: Web Service issue when HTTP Post disabled - Saket - 06-16-2010 I Got it, very sorry that i did not noticed '.com' in your earlier post, I assumed you are running your web service under test on the same machine only. if HTTP-GET and POST is disabled for a Webservice, it will not be possible to invoke Web services that use HTTP POST requests from applications using HTML based test form. You will have to get this enabled in order to test this webservice I would advice to test on a developement server not on production. |