Forum Discussion

gurmeet_kaur's avatar
gurmeet_kaur
Occasional Contributor
12 years ago

Error : Member not found in create SOAP request

Hi Guys,



Following method is given in the smartbear's help to create SOAP request: 

Set WebServiceInfo=WebServices.CreateWebServiceInfo(URL,ServiceName,SoapVersion)

 Set RequestObj = ServiceInfo.PrepareRequestObject(MethodName)



RequestObj.Item = 5

RequestObj.MaxVolume = 30



    Set RequestXml = ServiceInfo.PrepareRequest(MethodName, RequestObj)


    Set XmlHttpRequest = CreateObject("MSXML2.XMLHTTP.3.0")

   

  ' Create a Header element and insert it into the request

    Set Root = RequestXml.documentElement

    Set HeaderElement = RequestXml.createElement("s:Header")

   

   Set HeaderNode = Root.insertBefore(HeaderElement, Root.childNodes.item(0))

   

   ' Send the created SOAP request to the web service

   Call XmlHttpRequest.open("POST", "myserver/webservice?wsdl", False)

   Call XmlHttpRequest.send(RequestXml)



I am trying to use the same method but got the following responseXML:

<s:Envelope xmlns:s="http://schemas.xmlsoap.org/soap/envelope/"><s:Body><s:Fault><faultcode xmlns:a="http://schemas.microsoft.com/ws/2005/05/addressing/none">a:ActionNotSupported</faultcode><faultstring xml:lang="en-US">The message with Action '' cannot be processed at the receiver, due to a ContractFilter mismatch at the EndpointDispatcher. This may be because of either a contract mismatch (mismatched Actions between sender and receiver) or a binding/security mismatch between the sender and the receiver.  Check that sender and receiver have the same contract and the same binding (including security requirements, e.g. Message, Transport, None).</faultstring></s:Fault></s:Body></s:Envelope>



Now, I tried to debug the code as well and at runtime i can see the readystate as 4 (which means the operation is complete). and the responseXML at runtime is same as shown above.

Then also the other values while debugging are :

in XmlHttpRequest :

on readystatechange - Error : Member not found

responsebody - Error : Unspecified error

responsestream - Error : Unspecified error

responsetext - Error : Unspecified error



Now, in XmlHttpRequest.responseXml show the following :

xml : (blank)

ondataavailable - Error : Member not found

onreadystatechange - Error : Member not found

ontransformnode - Error : Member not found



There are lots of fields as well but error appears in these and few others.

All above error are just before Sending the Request.....

Also, just after the step : Call XmlHttpRequest.send(RequestXml)



state in XmlHttpRequest is : 500

statusText = Internal Server Error



Can anyone help me if I am missing anything OR how to resolve the issue?


  • AlexKaras's avatar
    AlexKaras
    Champion Level 3
    Hi,



    Error 500 makes me think that the request was issued by TestComplete but caused error on the web server.

    My suggestion will be to use some web debugger (Fiddler or WireShark, for example) and record request sent by TestComplete to the server.

    Having recorded request, you may examine it and: a) either find what is incorrect in the request by yourself and then decide how the test code should be corrected, or b) talk to developers and ask them to consult you on what might be wrong with the given request.



    The good idea may be also to talk to web server admin and ask him to check web server logs (and/or system event logs) which might contain additional information from web server/web service.