How can I remove xsi:type from SoapVar?

741 views Asked by At

In PHP, SoapVar adds xsi:type with either content type or our manually chosen type.

$soapVar = new SoapVar('Foo', null);
// <TagName xsi:type="xsd:string">Foo</TagName>

$soapVar = new SoapVar('Foo', null, 'MyType');
// <TagName xsi:type="MyType">Foo</TagName>

Can I skip xsi:type entirely? I have a problem with missing Struct type in my 3rd party WSDL, so I'd like to skip xsi:type, as it's not needed. I don't want to set it manually to some mockup neither.

I tried to set it to emptyish value, but it behave just like skipped parameter, giving xsi:type automatically by value type. I know there is XSD_ANYXML const that makes me able to pass any raw XML, but it's not what I need.

Please advise.

0

There are 0 answers