-
-
Notifications
You must be signed in to change notification settings - Fork 28
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
Adding xmlns:xsi XMLSchema-instance #36
Comments
I would like to achieve this: <?xml version="1.0" ?>
<Person xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<Name>Fred</Name>
<HomeAddress xsi:type="USAddressType">
<Line1>234 Lancaseter Av</Line1>
<Line2>SmallsVille</Line2>
<State>Florida</State>
<Zipcode>34543</Zipcode>
</HomeAddress>
</Person> https://www.liquid-technologies.com/xml-schema-tutorial/xsd-extending-types |
From the readme of this project:
Im not sure if the XMLSchema-instance usage you are tying is WS-I and document/literal style compliant |
I found a solution which works for me: https://github.com/schmittjoh/serializer/issues/433#issuecomment-324246156. $serializer = SoapContainerBuilder::createSerializerBuilderFromContainer($container, null, SoapClientContainer::getMetadataDir());
$serializer->configureListeners(function(EventDispatcher $handlerBuilder) {
$jmsXsi = new JmsXsiTypeSubscriber(
[
'namespace' => 'http://schemas.datacontract.org/...',
'type' => 'DummyType',
'class' => DummyType::class,
], [
//...
]
);
$handlerBuilder->addSubscriber($jmsXsi);
});
$serializer = $serializer->build(); Any advice is welcome. |
Well, it might work... but you did not answer to my previous comment:
|
I'm affraid it's not. It is RPC/encoded, so "Although it is legal WSDL, RPC/encoded is not WS-I compliant." |
Hi,
I would like to port my SoapClient code to goetas-webservices but I'm running a problem where the server requires xsi:type attribute on the record.
How can I add these type attributes to the generated xml request?
Thanks,
Karoly
The text was updated successfully, but these errors were encountered: