Ver Mensaje Individual
  #2 (permalink)  
Antiguo 21/12/2015, 17:04
Avatar de Ferdinand1945
Ferdinand1945
 
Fecha de Ingreso: noviembre-2010
Ubicación: Estocolmo
Mensajes: 62
Antigüedad: 13 años, 5 meses
Puntos: 1
Respuesta: SOAP objeto y parametros

me respondo ami mismo para quien lo necesite en el futuro:

Código PHP:
<html>
  <head>
  <meta charset="utf-8">
    <style>
      .wrapper {
      width: 300px;
        padding: 21px;
      }
    </style>
  </head>
  <body>
    <div class="wrapper">
<?php
$pm 

'<soapenv:Envelope encoding="UTF-8" xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:ucor="http://xxxxx.com/schemas/xxOrderRequest/">
   <soapenv:Header/>
   <soapenv:Body>
      <identityCheck identifier="701-1813" version="2.2" worksites="?">
         <customer>
            <userId>xxxx</userId>
            <password>xxx</password>
            
         </customer>
      </identityCheck>
   </soapenv:Body>
</soapenv:Envelope>'
//aca iria en realidad el link a un xml externo (preferentemente)

$soap_do curl_init();
curl_setopt($soap_doCURLOPT_URL,'https://xxxxx.com/XXSoapWeb/services/ucOrders2' );
curl_setopt($soap_doCURLOPT_CONNECTTIMEOUT10);
curl_setopt($soap_doCURLOPT_TIMEOUT,        10);
curl_setopt($soap_doCURLOPT_RETURNTRANSFERtrue);
curl_setopt($soap_doCURLOPT_SSL_VERIFYPEERfalse);
curl_setopt($soap_doCURLOPT_SSL_VERIFYHOSTfalse);
curl_setopt($soap_doCURLOPT_POST,           true );
curl_setopt($soap_doCURLOPT_POSTFIELDS,    $pm);
curl_setopt($soap_doCURLOPT_HTTPHEADER,     array('Content-Type: text/xml; charset=utf-8''Content-Length: '.strlen($pm) ));
//curl_setopt($soap_do, CURLOPT_USERPWD, $user . ":" . $password);

$result curl_exec($soap_do);
$err curl_error($soap_do);
//$your_xml_response = $result;
//$clean_xml = str_ireplace(['SOAP-ENV:', 'SOAP:'], '', $your_xml_response);
//$xml = simplexml_load_string($clean_xml);
echo '<pre>';print_r($result);exit;

?>
      </div>
    </body>
  </html>
Espero que les sirva tanto como me sirvio ami cuando lo escribi xD