Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Nodes parameters with namespace? #56

Open
AbrilMontaldo opened this issue Nov 3, 2022 · 1 comment
Open

Nodes parameters with namespace? #56

AbrilMontaldo opened this issue Nov 3, 2022 · 1 comment

Comments

@AbrilMontaldo
Copy link

AbrilMontaldo commented Nov 3, 2022

This is my wsdl

<soapenv:Envelope
    xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/"
    xmlns:alt="http://aaa.com/"
    xmlns:req="http://bbb.com"
    xmlns:req1="http://ccc.com/"
>
   <soapenv:Header/>
   <soapenv:Body>
      <alt:altaDeDeudas>
         <!--Optional:-->
         <requerimientoAltaDeDeudas>
            <req:cabecera>
               <idRequerimiento>?</idRequerimiento>
               <ipCliente>?</ipCliente>
               <timeStamp>?</timeStamp>
               <idEntidad>?</idEntidad>
               <canal>?</canal>
            </req:cabecera>
            <req1:ente>?</req1:ente>
            <req1:usuario>?</req1:usuario>
         </requerimientoAltaDeDeudas>
      </alt:altaDeDeudas>
   </soapenv:Body>
</soapenv:Envelope>

And this is my code so far

$client = Soap::to($wsdl)
                ->withHeaders($wsseHeader)
                ->withOptions([
                    'trace'      => true,
                    'proxy_host'     => $proxyHost,
                    'proxy_port'     => $proxyPort,
                ])
                ->trace();

$body = Soap::node([])
    ->body([
        'requerimientoAltaDeDeudas' => Soap::node([])
            ->body([
                'cabecera' => Soap::node([])->body([
                    "idRequerimiento" => "aa",
                    "ipCliente" => $params['ip'],
                    "timeStamp" => "", 
                    "idEntidad" => "",
                    "canal" => "",
                ]),
                'ente' => '',
                'usuario' => '', 
            ])
    ]);

$response = $client->altaDeDeudas($body);

But i get an error saying that element are expected as <{http://aaa.ar/}cabecera>, <{..}ente> .... . How can i define those namespaces/schemas on every node?

@rico
Copy link

rico commented Mar 20, 2023

Same question here ...

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants