We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
I'm consuming a Soap server that has some fields declared as xs:anyType.
xs:anyType
There's a note in xsd2php README.md about how to declare custom handlers for those types, but I can't get them to work with soap-client.
Could you provide a short example to make it work ? How to register a custom JMS Serializer handler inside soap client container ?
The text was updated successfully, but these errors were encountered:
I ended up to write this handler
class SerializerMixedSubscribingHandler implements SubscribingHandlerInterface { public static function getSubscribingMethods() { return array( array( 'direction' => GraphNavigatorInterface::DIRECTION_DESERIALIZATION, 'format' => 'xml', 'type' => 'mixed', 'method' => 'deserializeMixedType' ), array( 'direction' => GraphNavigatorInterface::DIRECTION_SERIALIZATION, 'format' => 'xml', 'type' => 'mixed', 'method' => 'serializeMixedType' ) ); } public function serializeMixedType(XmlSerializationVisitor $visitor, $data, array $type, Context $context) { return $visitor->visitSimpleString(strval($data), $type); } public function deserializeMixedType(XmlDeserializationVisitor $visitor, $data, array $type) { return strval($visitor->getResult($data)); } }
And registered in when creating the soap client, by using the callback function.
$serializer = SoapContainerBuilder::createSerializerBuilderFromContainer($container, function ($handler) { /** @var HandlerRegistryInterface $handler */ $handler->registerSubscribingHandler(new SerializerMixedSubscribingHandler()); }, $projectDir) ->build();
Sorry, something went wrong.
No branches or pull requests
I'm consuming a Soap server that has some fields declared as
xs:anyType
.There's a note in xsd2php README.md about how to declare custom handlers for those types, but I can't get them to work with soap-client.
Could you provide a short example to make it work ? How to register a custom JMS Serializer handler inside soap client container ?
The text was updated successfully, but these errors were encountered: