Error with a SOAP message through ReadyAPI

286 Views Asked by At

I have sent the SOAP message below however i'm getting an error. I have amended the headers, i'm not sure if this is the impact:

    <soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:wsse="http://schema.uk.experian.com/wsu" xmlns:wsu="http://schema.uk.experian.com/wsu" xmlns:ns="http://schema.uk.experian.com/eih/2011/03" xmlns:eih="http://schema.uk.experian.com/eih/2011/03/EIHHeader" xmlns:qas="http://schema.uk.experian.com/eih/2011/03/QAS">
   <soapenv:Header/>
   <wsse:Security>
      <wsu:Timestamp wsu:Id="Timestamp-2b27a32b-ca9c-4405-b377-4444f63c8f29">
         <wsu:Created>2018-11-29T16:36:54Z</wsu:Created>
         <wsu:Expires>2018-11-29T16:41:54Z</wsu:Expires>
      </wsu:Timestamp>
      <wsse:BinarySecurityToken ValueType="ExperianWASP" EncodingType="wsse:Base64Binary" wsu:Id="SecurityToken-f64439f9-c12c-4d09-ac3d-fc478ad19775">${TokenServiceSoap LoginWithCertificate-LoginWithCertificate Request#Response#declare namespace ns1='http://www.uk.experian.com/WASP/'; //ns1:LoginWithCertificateResponse[1]/ns1:LoginWithCertificateResult[1]}</wsse:BinarySecurityToken>
   </wsse:Security>
  <soapenv:Header>
   <soapenv:Body>
      <ns:ExecuteQASearch>
         <eih:EIHHeader>
            <eih:ClientUser>Hampshire</eih:ClientUser>
            <eih:ReferenceId>8060be46-1510-4095-b2f3-f4a5a9527dc0</eih:ReferenceId>
         </eih:EIHHeader>
         <qas:QASearch Language="">
            <qas:Country>GBR</qas:Country>
            <qas:Engine Flatten="true" Intensity="" PromptSet="" Threshold="" Timeout="">Singleline</qas:Engine>
            <!--Optional:-->
            <qas:Layout>experian</qas:Layout>
            <qas:Search>LL55 4YF</qas:Search>
         </qas:QASearch>
      </ns:ExecuteQASearch>
   </soapenv:Body>
</soapenv:Envelope>

The below error is displayed

    <soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/">
   <soap:Body>
      <soap:Fault>
         <faultcode>soap:Server</faultcode>
         <faultstring>freemarker.core.InvalidReferenceException: Expression client_user is undefined on line 10, column 52 in fault-list.xml.</faultstring>
      </soap:Fault>
   </soap:Body>
</soap:Envelope>
2

There are 2 best solutions below

0
On

There is not much to go on here, but my best guess would be that the serviceoperation uses some sort of user authentication, and you havn't provided the necessary data.

This may be implemented in different ways. You may need to add the info in the header section. You may need to add HTTP headers. You may need to choose one of the options in the AUTH pane in your Soap Request Teststep.

1
On

Your XML is not valid. Header tag is closed first and open later.

line 2

 <soapenv:Header/>

should be

 <soapenv:Header>

and line 10

<soapenv:Header>

should be

</soapenv:Header>

enter image description here