xsd2php
xsd2php copied to clipboard
SOAP_HEADERS
Hi,
I've a question, When I receive a petition with soap wrap, the serializer extracts them correctly but when I generate a response like:
And serialize the response: $serializer = $model->getSerializer(); $xmlMessage = $serializer->serialize($response, 'xml');
It not add the soap wrap:
<?xml version="1.0" encoding="UTF-8"?>
<OTA_HotelResRS xmlns="http://www.opentravel.org/OTA/2003/05">
<HotelReservations>
<HotelReservation>
<ResGlobalInfo>
<HotelReservationIDs>
<HotelReservationID ResID_Type="502" ResID_Value="103502"/>
<HotelReservationID ResID_Type="501" ResID_Value="6423533777"/>
</HotelReservationIDs>
</ResGlobalInfo>
</HotelReservation>
</HotelReservations>
</OTA_HotelResRS>
It's possible to add this headers?
Many thanks for advance.
You should have a look to https://github.com/goetas-webservices/soap-client if you need to deal with soap
(but thats a different story :smiley: )
But they only want to attach me with xml and I've to response with OTA with SoapEnvelope without having wsdl in between. What solutions could I get? Is for OTA_HotelResRS.
2018-06-19 10:10 GMT+02:00 Asmir Mustafic [email protected]:
You should have a look to https://github.com/goetas- webservices/soap-client if you need to deal with soap
— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/goetas-webservices/xsd2php/issues/65#issuecomment-398313156, or mute the thread https://github.com/notifications/unsubscribe-auth/AIqbpJ92EEVIj65l3n3XOhtyY8KAfsTSks5t-LHkgaJpZM4UtB-V .
For example with add some information manually in SoapContainer:
'HotelCheckInNotif' => array(
'action' => 'http://www.opentravel.org/OTA/2003/05/HotelCheckInNotif',
'style' => 'document',
'version' => '1.1',
'name' => 'HotelCheckInNotif',
'method' => 'hotelCheckInNotif',
'input' => array(
'message_fqcn' =>
'Igm\\Synergy\\Definitions\\OTA\\SoapEnvelope\\Messages\\HotelCheckInNotifInput',
'headers_fqcn' =>
'Igm\\Synergy\\Definitions\\OTA\\SoapEnvelope\\Headers\\HotelCheckInNotifInput',
'part_fqcn' =>
'Igm\\Synergy\\Definitions\\OTA\\SoapParts\\HotelCheckInNotifInput',
'parts' => array(
'request' => 'OTAHotelResCheckInNotifRQ',
),
),
'output' => array(
'message_fqcn' =>
'Igm\\Synergy\\Definitions\\OTA\\SoapEnvelope\\Messages\\HotelCheckInNotifOutput',
'headers_fqcn' =>
'Igm\\Synergy\\Definitions\\OTA\\SoapEnvelope\\Headers\\HotelCheckInNotifOutput',
'part_fqcn' =>
'Igm\\Synergy\\Definitions\\OTA\\SoapParts\\HotelCheckInNotifOutput',
'parts' => array(
'hotelCheckInNotifResult' => 'OTAHotelResCheckInNotifRS',
),
),
'fault' => array(
),
And add some fields in metadata?
2018-06-19 10:19 GMT+02:00 Victor Galvez Pages [email protected]:
But they only want to attach me with xml and I've to response with OTA with SoapEnvelope without having wsdl in between. What solutions could I get? Is for OTA_HotelResRS.
2018-06-19 10:10 GMT+02:00 Asmir Mustafic [email protected]:
You should have a look to https://github.com/goetas-webs ervices/soap-client if you need to deal with soap
— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/goetas-webservices/xsd2php/issues/65#issuecomment-398313156, or mute the thread https://github.com/notifications/unsubscribe-auth/AIqbpJ92EEVIj65l3n3XOhtyY8KAfsTSks5t-LHkgaJpZM4UtB-V .
Maybe just manually wrapping the XML into a soap envelope...? it is not elegant but might work...
And which one would you recommend?
2018-06-19 10:34 GMT+02:00 Asmir Mustafic [email protected]:
Maybe just manually wrapping the XML into a soap envelope...? it is not elegant but might work...
— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/goetas-webservices/xsd2php/issues/65#issuecomment-398320088, or mute the thread https://github.com/notifications/unsubscribe-auth/AIqbpE26D7QAP0PdbASWA4rx9LedjKDzks5t-LeogaJpZM4UtB-V .
something as:
$xmlMessage = $serializer->serialize($response, 'xml');
echo '<soap....>' . $xmlMessage .'</soap....>';