Skip to content

Trouble with prefix in writer #187

Description

@vrobin95

Hi,

I am tring to get the next configuration, without any prefix:

<GetValuation xmlns="http://www.eurotax.com/webservices/">

According to the documentation I wrote:

$writer->write([
      '{http://www.eurotax.com/webservices/}GetValuation' => $parameters
]);
//result: <x1:GetValuation xmlns:x1="http://www.eurotax.com/webservices/">

So, I added the next configuration:

$this->sabreService->namespaceMap['http://www.eurotax.com/webservices/'] =  '';

And here is the result I got:

<GetValuation>

What am I doing wrong ? Thank you for your help


edit:
The next configuration seems strange too:

$this->sabreService->namespaceMap['http://www.eurotax.com/webservices/'] =  'test';
//with the same $writer as previously
$writer->write([
      '{http://www.eurotax.com/webservices/}GetValuation' => $parameters
]);

It removes the xmlns attribute and gives me:

<test:GetValuation>

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions