Aishwariya Bhav Absent Member.
Absent Member.
1661 views

web_service_call soap error when using SOAPHeader with wsa: SOAP header Action was not understood

Issue with web_service_call when using SOAPHeader with addressing (wsa) namespace elements: Soap error: Message:SOAP header Action was not understood.

 

The web_service_call in my script has a custom header that looks like this (URL has been modified to mask the actual host/service names):

 

"SOAPHeader=<SoapHeader xmlns:wsa=\"http://www.w3.org/2005/08/addressing\" xmlns:soap=\"http://www.w3.org/2003/05/soap-envelope\">"
            "<wsa:Action soap:mustUnderstand=\"1\">http://host.com/serviceurl/action</wsa:Action>"
            "<wsa:To soap:mustUnderstand=\"1\">http://perfepkbsvcs/EpHoldingsManagementService/EPHoldingsManagementService_2014_10_01.svc</wsa:To></SoapHeader>",

 

---

The service call requres the explicit To and Action elements in the header and it works when used with soapui and other utilities.

 

It works here as well, that is LR is able to replay the step and fetch the correct soap response from the server.

However, I see this error in the extended replay log and the output arguments were not saved to the parameters.

 

Action.c(3): Error Exceptions:
Action.c(3): System.Exception: Soap error:
Message:SOAP header Action was not understood.
at Mercury.LR.LrWsNetClient.ProxyCreator.InvokeMethod(String sMethod, IWSMethodParameters mParams, String sAsyncEvent)
at Mercury.LR.LrWsNetClient.NetReplay.InvokeMethod(String sMethod, IWSMethodParameters mParams, String sAsyncEvent)
Action.c(3): <CENTER><STRONG><FONT COLOR=#FF0031>Failed to retrieve output arguments/checkpoints - SOAP fault occurred</FONT></STRONG></CENTER>

 

Is the soapheader format correct for how to specify the wsa and soap namespace when we need to explicitly call the Action and To attributes in the header?

 

thanks,

Aish

0 Likes
2 Replies
Absent Member.. ssawale Absent Member..
Absent Member..

Re: web_service_call soap error when using SOAPHeader with wsa: SOAP header Action was not understoo

Instead of using Web_service_call and importing from WSDL , did you try using raw soap_request with web_add_header

 

Generally to make any changes you need to use UI instead of changing direct code. Try creating test case again and just use UI to get the results, don't do any changes to code and see it works.

 

 

Tnx!

0 Likes
Absent Member.. RManiac Absent Member..
Absent Member..

Re: web_service_call soap error when using SOAPHeader with wsa: SOAP header Action was not understoo

I have a similar issue where in my SOAP request is failing

I keep getting errors as SoapHeader and ws un recogonized

 

web_service_call("StepName=GetTranscriptAndTasks", 
        "SOAPMethod=TranscriptAndTaskService|TranscriptAndTaskServiceSoap|"
        "GetTranscriptAndTasks", 
        "SOAPHeader=<SoapHeader>" 
        "<wsa:Action xmlns:wsa=\"http://schemas.xmlsoap.org/ws/2004/08/addressing\">http://www.host.com/Webservices/TranscriptAndTask/GetTranscriptAndTasks</wsa:Action>"
        "<wsa:MessageID>urn:uuid:xcvcxcvxxcvvcxcv</wsa:MessageID><wsa:ReplyTo><wsa:Address>http://schemas.xmlsoap.org/ws/2004/08/addressing/role/anonymous</wsa:Address>
        "</wsa:ReplyTo><wsa:To>https://host/Service.asmx</wsa:To><wsse:Security soap:mustUnderstand=\"1\">"
        "<wsse:UsernameToken>"
        "<wsse:Username>host/\wsadmin</wsse:Username>"
        "<wsse:Password>Password</wsse:Password>"
        "</wsse:UsernameToken>"
          "</wsse:Security></SoapHeader>",
        "Service=TranscriptAndTaskService", 
        "Snapshot=t4.inf", 
        "ResponseParam=response", 
        BEGIN_ARGUMENTS, 
        "xml:request=<request><Request corpName=\"loadtest2014\"><User id=\""
        "d2Hnd5Dgvg\"><RequestTypes><Inbox /><Transcript inprogressOnly=\""
        "false\" pageNumber=\"1\" /><Task pendingTasksOnly=\"false\" /></"
        "RequestTypes></User></Request></request>", 
        END_ARGUMENTS, 
        BEGIN_RESULT, 
        END_RESULT, 
        LAST);

Rajeshwar
0 Likes
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.