Re: Is it possible to change a parameter element?
Figured it out.
class MSSoapClient extends SoapClient {
function __doRequest($request, $location, $action, $version) {
$namespace = "http://www.portalfiscal.inf.br/nfe/wsdl/NfeRecepcao2";
$request = preg_replace('/<ns1:(\w+)/', '<$1
xmlns="'.$namespace.'"', $request);
$request = preg_replace('/<ns1:(\w+)/', '<$1', $request);
$request = str_replace(array('/ns1:', 'xmlns:ns1="'.$namespace.'"'),
array('/', ''), $request);
return parent::__doRequest($request, $location, $action, $version);
}
}
$client = new MSSoapClient(...);
Good luck!
-vatertime
Jos&eacute; Ricardo wrote:
>
> Hi folks, I have tried many ways to generate parameters (arrays and
> Objects), but none of them worked.
>
> I have a WS parameter (in the body of my envelope) which is being
> generated like this:
>
> <ns1:nfeDadosMsg>
>
> But I need it to be generated like this:
>
> <nfeDadosMsg xmlns="http://www.portalfiscal.inf.br/nfe/wsdl/NfeRecepcao2">
>
> Is it possible? How can I do it?
>
> I'd really appreciate your help.
>
> Thanks in advance,
>
> ZÃ Ricardo
>
> --
> PHP Soap Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>
>
>
--
View this message in context: http://old.nabble.com/Is-it-possible-to-change-a-parameter-element--tp29964264p30077474.html
Sent from the Php - Soap mailing list archive at Nabble.com.
--
PHP Soap Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
[PHP Home]
[PHP Users]
[Kernel Newbies]
[PHP Database]
[Yosemite]