Cadet 3rd Class
Cadet 3rd Class
61 views

LoadRunner Webservice Soaprequest

 
 

Hi Everyone

I've been having a bit of a battle with load runner 2020 and LR 12.6 in trying to get a successful response to a web service request and tried multiple ways as below 

First: I tried  to import WSDL which have a MTOM Body but getting error that WSDL is not loaded successfully. 

Second : I tried to add a soap request as below but get an internal error below sample of the structure used 

any recommendation 

 

 soap_request("StepName=SOAP Request",                                        
        "URL=http://0.0.0.0:000/example",                                        
        "SOAPEnvelope="
        "<soapenv:Envelope xmlns:soapenv=\"http://schemas.xmlsoap.org/soap/envelope/\">"
"<soapenv:Header>"
"<UserMessage>"
"<Message>"
   "<MessageId>d514215-10fd-41c2-8f23-kk6e360bd09e</MessageId>"
"</Message>"
"<Attachment>ID:000</Attachment>"
"</soapenv:Body>"
"</soapenv:Envelope>",                    
        "SOAPAction="                                           
        "ResponseParam=response",                                        
        "Snapshot=t1000002416.inf",    
"UserHandlerName=LrWsAttachmentsHandler",        
        LAST); 

-Also I tried adding request in "SOAPACTION" instead of above  and adding wsdl in SOAPEnvelope section but get same internal error 

Thanks

0 Likes
3 Replies
Micro Focus Frequent Contributor
Micro Focus Frequent Contributor

Hi Selanmo,

The soap data looks in a incorrect xml format, soapenv:Header, UserMessage and soapenv:Body are not in pairs. Please make sure the content is loyal to the original format.

Phillip

0 Likes
Cadet 3rd Class
Cadet 3rd Class

 

Hi philip,

Thanks for your reply.  please find that previous was an example of the request, I have attached another example as below as well.

Please note that WSDL and request  generates the correct response when applied in SOAP UI however is not the same for load runner

soap_request("StepName=SOAP Request",                                        
        "URL=anyexample",                                        
        "SOAPEnvelope="
        "<soapenv:Envelope xmlv1:soapenv=\"http://schemas.xmlsoap.org/soap/envelope/\">"
"<soapenv:Header>"
"<v1:Messaging soap:mustUnderstand=\"0\">"
"<v1:UserMessage>"
"<v1:MessageInfo>"
      "<v1:MessageId>w2331231-10f0-00xc2-8f23-00e3360bd004</v1:MessageId>"
"</v1:MessageInfo>"
"<v1:Info>"
    "<v1:From>"
      "<v1:Id type=\"X\">1</v1:Id>"
      "<v1:name>example</v1:name>"
    "</v1:From>"
"</v1:Info>"
"</v1:UserMessage>"
"</v1:Messaging>"
  "</soapenv:Header>"
"<soapenv:Body>"
"<v1:MsgRq>"
"<v1:FileType>xml</v1:FileType>"
"<v1:Attachment>ID:000000</v1:Attachment>"
"</v1:MsgRq>"
"</soapenv:Body>"
"</soapenv:Envelope>"                                        
        "SOAPAction=",                                        
        " ResponseParam=response",                                        
        "Snapshot=t1070040017.inf",    
"UserHandlerName=LrWsAttachmentsHandler",        
        LAST);

Admiral Admiral
Admiral

Hi, 

what type of response do you have from your request? HTTP 500 Internal Server Error with "Action Mismatch" indication? 

Let me know,

Lorenzo

The opinions expressed above are the personal opinions of the authors, not of Micro Focus. By using this site, you accept the Terms of Use and Rules of Participation. Certain versions of content ("Material") accessible here may contain branding from Hewlett-Packard Company (now HP Inc.) and Hewlett Packard Enterprise Company. As of September 1, 2017, the Material is now offered by Micro Focus, a separately owned and operated company. Any reference to the HP and Hewlett Packard Enterprise/HPE marks is historical in nature, and the HP and Hewlett Packard Enterprise/HPE marks are the property of their respective owners.