goetas-webservices / soap-client-demo

Demo project for https://github.com/goetas-webservices/soap-client
5 stars 7 forks source link

SERIALIZER #6

Closed victorgp89 closed 6 years ago

victorgp89 commented 6 years ago

If we receive an xml request, is it possible to use the serializer only with xsd? without metadata and wsdl?

Like: $ this-> serializer-> deserialize ((string) $ request-> getRawBody (), $ class, 'xml');

Thanks for advance

goetas commented 6 years ago

no, metadata are fundamental. maybe http://php.net/manual/en/function.simplexml-load-string.php is what you need...?

victorgp89 commented 6 years ago

Yes, But you have an example of how to create metadata only with xsd.

Something like this: "scripts": { "build": "xsd2php convert:php '/var/www/synergy/synergyserver/include/ota/OTA_HotelAvail*.xsd' --ns-map='http://www.opentravel.org/OTA/2003/05;Igm/Synergy/Models/OTA1/2007B/' --ns-dest='Igm/Synergy/Models/OTA1/2007B/;src/Mercurio/OTA/V2007B'" }

I'm returning an error of this type: There are no commands defined in the "convert" namespace.

goetas commented 6 years ago

metadata can be created from xsd or from wsdl

victorgp89 commented 6 years ago

Yes for sure,

That's why I generated the following config.yml.

image

Execute: vendor/bin/xsd2php convert config/test.yml /var/www/igm_client/include/ota/OTA_HotelResRQ.xsd

image

But I've this issue: Unable to determine location to save PHP class 'Mercurio\OTA\2007B\AcceptablePaymentCardsInfoType'

I don't understand why.

victorgp89 commented 6 years ago

Sorry, It's my fault. Linux use back slash . So sorry.

goetas commented 6 years ago

ok, then closing