Specify “different” Envolpe header Tag in NuSOAP

SteveB

New Member
want to use nuSoap to connect to a SOAP webservice.The problem is that I have not being able to generate my onw soap:Envelope specification like the following (This is what I expect):\[code\]<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:cor="http://www.xxxxxxxx.cl/CorpGR/" xmlns:head="http://www.xxxxxxxx.cl/common/HeaderRequest" xmlns:cor1="http://www.xxxxxxxx.cl/PX000014/CorpGR_ConsultarRequest"> <soapenv:Header> <cor:headerRequest> <head:transaccion> <head:fechaHora>2012-06-27T10:00:00</head:fechaHora> <head:idT>0</head:idT> <head:sistema>ET</head:sistema> </head:transaccion> </cor:headerRequest> </soapenv:Header> <soapenv:Body> <cor:Consultar> <reqObtenerCalle> <cor1:GlsComuna>TOCOPILLA</cor1:GlsComuna> <cor1:GlsCalle>BA</cor1:GlsCalle> </reqObtenerCalle> </cor:Consulta> </soapenv:Body></soapenv:Envelope>\[/code\]I used the following, but generates a tag instead:\[code\]$request = array('cor:Consultar' => array( 'reqObtenerCalle' => array( 'cor1:GlsComuna' => 'TOCOPILLA', 'cor1:GlsCalle' => 'BA' ) ) );$soapClient = new soapclient("http://xxxxxx:9003/GeoReferencia?wsdl", false);$soapClient->setHeaders(' <cor:headerRequest> <head:transaccion> <head:fechaHora>2012-06-27T10:00:00</head:fechaHora> <head:idTransaccionNegocio>0</head:idTransaccionNegocio> <head:sistema>ED</head:sistema> </head:transaccion> </cor:headerRequest>'); $result = $soapClient->call("ConsultarCalles", $request);\[/code\]How can I generate a header like the one specified above using NuSoap?
 
Back
Top