
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
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

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
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

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
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);


- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
Hi,
what type of response do you have from your request? HTTP 500 Internal Server Error with "Action Mismatch" indication?
Let me know,
Lorenzo

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
Hi Loranzo,
Actually I received below when adding my request in "SOAPAction" and kept wsdl format in SOAPEnvelope
Action.c(4): <?xml version='1.0' ?>\n
Action.c(4): <env:Envelope xmlns:env='http://schemas.xmlsoap.org/soap/envelope/'>\n
Action.c(4): <env:Body>\n
Action.c(4): <env:Fault>\n
Action.c(4): <faultstring>Internal Error</faultstring>\n
Action.c(4): </env:Fault>\n
Action.c(4): </env:Body>\n
Action.c(4): </env:Envelope>\n
let me know if you have any other recommendation


- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
Hi,
if you have already insert a "SOAPAction" header (before web_rest() or web_custom_request() functions), can you try to modify your XML request as below?
"<soap:Envelope xmlns:soap=\"http://www.w3.org/2003/05/soap-envelope\" …\">"
"<soap:Header xmlns:wsa=\"http://www.w3.org/2005/08/addressing\">"
"<wsa:Action>http://yourServiceSchema</wsa:Action>"
"<ser:culture>IT-it</ser:culture>"
… "</soap:Header>"
You should try to add a <wsa:Action> tag and valorize that with the Soap Schema of your service (you can see it with a test with SoapUI, you can read it on "Raw" view).
Let us know if this can help you,
Lorenzo

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
Hi loranzo ,
Could you clarify more as my script is structured as below and both cases are generated an internal error
also I didn't use web_rest() or web_custom_request() functions before soap_request("StepName=SOAPRequest",) mentioned
First case : adding Soap_resqt step which include below
a.soap envelop which including the service request input
b.sap action tag is empty
Second case : adding Soap_resqt step which include below
a.soap envelop which include wsdl structure data like : (
<wsdl:definitions xmlns:soap=\"http://schemas.xmlsoap.org/wsdl/soap/\"
targetNamespace=\"http://example\" xmlns:tns=\"http:example\">"
b.sap action tag which include service request input
below is an example
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);
your comments is appreciated


- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
Hi,
have you tried to test your request with another tool like SoapUI? Can you tell us how is the "raw" format of your request?
Thanks,
Lorenzo

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
Hi loranzo ,
Yes, I tried importing wsdl and it works fine without problem, but once I tried importing as I mentioned before give me the errors attached for LR12.6 and wsdl is not loaded with LR 2020
Example Request:
<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:V1="http://schema/Common">
<soapenv:Header>
<V1:YU soap:mustUnderstand="0">
<V1:UM>
<V1:MesDT>
<V1:Timestamp>2020-08-17T09:30:40</V1:Timestamp>
<V1:CID>ytwaff32-10fd-41c2-8f23-9d65560bd09e</V1:CID>
</V1:UM>
<V1:DB>
<V1:From>
<V1:dpe="X">12</V1:dpe>
<V1:name>Example</V1:name>
</V1:From>
</V1:DB>
</soapenv:Header>
<soapenv:Body>
<V1:Rq>
<V1:Type>xml</V1:Type>
<V1:AsynCID>ytwaff32-10fd-41c2-8f23-9d65560bd09e</V1:AsynCID>
<V1:Attachment>id:000000</V1:Attachment>
</V1:Rq>
</soapenv:Body>
</soapenv:Envelope>
Please note that the attachment is the MTOM file that is included in SoapUI

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
Hi,
Did you set the proxy in the Connection Settings when you were importing the wsdl?
Regarding SOAPRequest, I recommend to compare the request by analyzers like Fiddler/Wireshark

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
Hi Fei,
Unfortunately, it didn't work as well after the analysis required to import wsdl file and we revert back to the previous attached error


- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
Hi,
in add to the suggestion by Fei Gao, can you try a web_rest() or web_custom_request() with a function as below? Pay attention on <wsa:Action> tag: you should found the SOAP schema endpoint with a SoapUI test (view raw, so you can see all the details of your SOAP request).
web_rest("Example",
"URL=http://0.0.0.0:0/example",
"Method=POST",
"EncType=raw",
"Snapshot=t1.inf",
"Body="
"<soapenv:Envelope xmlv1:soapenv=\"http://schemas.xmlsoap.org/soap/envelope/\">"
"<soapenv:Header>"
"<wsa:Action>http://schemas.meniga.com/pathToYourService</wsa:Action>"
"<v1:Messaging soap:mustUnderstand=\"0\">"
"<v1:UserMessage>"
"<v1:MessageInfo>"
"<v1:MessageId>w2331231-10f0-00xc2-8f23-00e3360bd004</v1:MessageId>"
"</v1:MessageInfo>"
"<v1:Info>"
"<v1:From>"
...
"</soapenv:Header>"
"<soapenv:Body>"
...
HEADERS,
"Name=UserHandlerName", "Value=LrWsAttachmentsHandler", ENDHEADER,
LAST);
Have a nice day,
Lorenzo