SOAP works with xml via soapui but not with PHP

0

My query is as follows: I need to consume a Web Service type SOAP, but it is consumed without any problem by SOAPui, but when trying to consume it by PHP, it responds that one of the values is not valid or is not recognized as a value.

This is the xml of the web service to be consumed:

<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:open="http://www.openuri.org/">
 <soapenv:Header/>
  <soapenv:Body>
  <open:registroPersona>
     <!--Optional:-->
     <open:pStrEntidad>1002</open:pStrEntidad>
     <!--Optional:-->
     <open:pStrUser>WSpruebitas</open:pStrUser>
     <!--Optional:-->
     <open:pStrPass>A12345678**pq*</open:pStrPass>
     <!--Optional:-->
     <open:pStrDatos>{
         “nombre”:”ROBERTO”,
         “apellido”:”ROCA”,
         “documento”:”E45236583”,
         “ciudad”:”BOGOTA”
      }</open:pStrDatos>
    </open:registroPersona>
 </soapenv:Body>
 </soapenv:Envelope>

And this is the code by which services should be consumed by PHP:

public function CreatePerson (Request $ request)     {

        ini_set('soap.wsdl_cache', '3');
        $client = new SoapClient('https://serviciosWSDLcom.co/WSWebServicesWeb/AdministracionCentral.jws?WSDL');

        $params=array(
                    'pStrEntidad'=>'1002',
                    'pStrUser'=>'WSpruebitas',
                    'pStrPass'=>'A12345678**pq*',
                    'pStrDatos' => array(
                        'nombre'=>'ROBERTO',
                        'apellido'=>'ROCA',
                        'documento'=>'E45236583',
                        'ciudad'=>'BOGOTA'
                    )
                );

        $result = $client->registroPersona(array($params));          
        $resultado = json_decode($result->registroPersonaResult);
       return $resultado;

    }    

The problem is that by the SOAPui this is consumed normally but when doing it by PHP the WS responds that the pStrEntity is not a valid value

    
asked by ALVARO ROBERTO BACARREZA ARZAB 17.09.2018 в 00:08
source

0 answers