Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Web Service issue when HTTP Post disabled
#1
Solved: 11 Years, 4 Months, 3 Weeks ago Exclamation 
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()
xmlDoc.LoadFile("C:\Test_Automation\CMX_App2.xml")
xmlStr = xmlDoc.ToString

Desc1 = "wsdl:=http://abc123.testserver.com/STransport_2003_12.asmx?wsdl"
Desc2 = "service:=STransport_2003_12"
Desc3 = "port:=STransport_2003_12"


PutMessage = WebService(Desc1, Desc2, Desc3).PutMessage(xmlStr)

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.
Reply
#2
Solved: 11 Years, 4 Months, 3 Weeks ago
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?

Reply
#3
Solved: 11 Years, 4 Months, 3 Weeks ago
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?
Reply
#4
Solved: 11 Years, 4 Months, 3 Weeks ago
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.

Reply


Possibly Related Threads…
Thread Author Replies Views Last Post
  Is VBScripting disabled in Office 365 update? soumyarani 0 1,553 12-19-2020, 12:37 PM
Last Post: soumyarani
  How To pick up the particular mail in Post Login Gmail page and click on Checkbox akhandesh 0 2,871 12-02-2013, 01:35 PM
Last Post: akhandesh
  Disabled Webelement is showing up as Visible =True in GUI Spy Shwethareddy 3 3,903 11-07-2012, 02:45 PM
Last Post: Ankesh
  Speed issues on script execution (First Post) martinshort 4 3,364 07-03-2012, 03:02 PM
Last Post: martinshort
  ContextMenu item disabled Powerbuilder Phread 1 4,205 05-24-2012, 10:15 AM
Last Post: Shridevi.Salagare

Forum Jump:


Users browsing this thread: 1 Guest(s)