Problems with soapclient SOAP-ERROR: Encoding: object has not 'catalogRequest' property

0

Greetings

I am trying to communicate to a SOAP server via php with SoapClient but I get the following error:

  

SOAP-ERROR: Encoding: object has not 'catalogRequest' property

        $servicio = 'https://servicioswebqa.axa.com.mx:9104/BancsAPIWebservices/SecureBancsWS?WSDL';
        $parametros = array();
        $parametros['Username'] = 'MXS00101494A';
        $parametros['Password'] = '*********';

        $cliente = new SoapClient($servicio,$parametros);

        try 
        {
            $p = array('catalogueName' => 'Sexo',
                        'agentCode' => 'AGT00027641',
                        'participationPercentage' => 0,
                        'cessionPercentage' => 0 );

            $results = $cliente->getCatalogueDetails($p);
            var_dump($results);

        }catch (SoapFault $e) {
            echo $e->getMessage();  
        }

I am something new in SOAP I would appreciate it if you could give me a course that I am doing wrong or if I am missing some information in what is failing

Doing tests with SoapUi this is the request:

<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:web="http://webservices" xmlns:ban="http://www.tcs.com/BancsAPIWebservices/BancsAPIWebservices">
   <soapenv:Header/>
   <soapenv:Body>
      <web:getCatalogueDetails>
         <ban:catalogueRequest>
            <catalogue>
               <catalogueName>Sexo</catalogueName>
            </catalogue>
            <agentInfo>
               <agentCode>AGT00027641</agentCode>
               <participationPercentage>0</participationPercentage>
               <cessionPercentage>0</cessionPercentage>
            </agentInfo>
         </ban:catalogueRequest>
      </web:getCatalogueDetails>
   </soapenv:Body>
</soapenv:Envelope> 

and this is what brings me back:

<env:Envelope xmlns:env="http://schemas.xmlsoap.org/soap/envelope/">
   <env:Header/>
   <env:Body>
      <m:getCatalogueDetailsResponse xmlns:m="http://webservices">
         <ban:catalogueResponse xmlns:ban="http://www.tcs.com/BancsAPIWebservices/BancsAPIWebservices">
            <catalogueDetails>
               <catalogueName>Sexo</catalogueName>
               <description>Sexo</description>
               <domainList>
                  <itemCode>F</itemCode>
                  <itemValue>Mujer</itemValue>
               </domainList>
               <domainList>
                  <itemCode>M</itemCode>
                  <itemValue>Hombre</itemValue>
               </domainList>
            </catalogueDetails>
            <errorDetails>
               <errorCode>0</errorCode>
               <errorMessage>SUCCESS</errorMessage>
            </errorDetails>
         </ban:catalogueResponse>
      </m:getCatalogueDetailsResponse>
   </env:Body>
</env:Envelope>

Thank you for your attention

    
asked by Esteban Flores 18.12.2017 в 18:31
source

0 answers