Skip to content
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

SOAP ENVELOPE 1.2 #14

Open
victorgp89 opened this issue Nov 22, 2017 · 20 comments
Open

SOAP ENVELOPE 1.2 #14

victorgp89 opened this issue Nov 22, 2017 · 20 comments

Comments

@victorgp89
Copy link

Hi,

It's posible changes de namespace of soap-envelope?
WebService required:
<SOAP:Envelope xmlns:SOAP="http://schemas.xmlsoap.org/soap/envelope/">

But library put me:
<SOAP:Envelope xmlns:SOAP="http://www.w3.org/2003/05/soap-envelope">

@goetas
Copy link
Member

goetas commented Nov 22, 2017

it depends on your soap implementation. Soap versions are not just namespace changes, there are many other underlying differences. here you can find an overview.

Actually the client supports both and the ose of one vs the other is defined by your wsdl schema

@goetas goetas closed this as completed Nov 22, 2017
@victorgp89
Copy link
Author

And it's posible to change the version in my implementation of your soap client?

The remot wsdl has this headboard:

<wsdl:definitions xmlns:s="http://www.w3.org/2001/XMLSchema" xmlns:soap12="http://schemas.xmlsoap.org/wsdl/soap12/" xmlns:http="http://schemas.xmlsoap.org/wsdl/http/" xmlns:mime="http://schemas.xmlsoap.org/wsdl/mime/" xmlns:tns="http://www.opentravel.org/OTA/2003/05" xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/" xmlns:tm="http://microsoft.com/wsdl/mime/textMatching/" xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/" xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/" **targetNamespace="http://www.opentravel.org/OTA/2003/05"**>

@goetas
Copy link
Member

goetas commented Nov 22, 2017

apparently your server also supports both. you should have also two "ports" section where you can choose which one to use

@victorgp89
Copy link
Author

Yes, sorry for the incovenients but yes, they jave two "ports" sections.

<wsdl:binding name="OTAReceiveServiceSoap" type="tns:OTAReceiveServiceSoap">...</wsdl:binding>
<wsdl:binding name="OTAReceiveServiceSoap12" type="tns:OTAReceiveServiceSoap">...</wsdl:binding>

In client Factory try this:
$service = $this->getSoapService($wsdl, 'OTAReceiveServiceSoap12', 'OTAReceiveService');

But the message is still not correct in the construction

<SOAP:Envelope xmlns:SOAP="**http://www.w3.org/2003/05/soap-envelope**">
SOAP:Body
<ns-77e106cb:OTA_HotelRatePlanRQ xmlns:ns-77e106cb="http://www.opentravel.org/OTA/2003/05" Version="0">
ns-77e106cb:POS
ns-77e106cb:Source
<ns-77e106cb:RequestorID ID="IGM" Type="1" MessagePassword="IGM123">
<ns-77e106cb:CompanyName Code="C" CodeContext="556"/>
</ns-77e106cb:RequestorID>
</ns-77e106cb:Source>
</ns-77e106cb:POS>
ns-77e106cb:RatePlans
ns-77e106cb:RatePlan
<ns-77e106cb:DateRange Start="2017-11-22" End="2017-11-22"/>
ns-77e106cb:RatePlanCandidates
<ns-77e106cb:RatePlanCandidate AvailRatesOnlyInd="true">
ns-77e106cb:HotelRefs
<ns-77e106cb:HotelRef HotelCode="54394"/>
</ns-77e106cb:HotelRefs>
</ns-77e106cb:RatePlanCandidate>
</ns-77e106cb:RatePlanCandidates>
</ns-77e106cb:RatePlan>
</ns-77e106cb:RatePlans>
</ns-77e106cb:OTA_HotelRatePlanRQ>
</SOAP:Body>
</SOAP:Envelope>

@goetas
Copy link
Member

goetas commented Nov 22, 2017

Hmmm.. can you share your config.yml ?

@victorgp89
Copy link
Author

victorgp89 commented Nov 22, 2017

soap_client: ~

xsd2php:
  namespaces:
    'http://www.opentravel.org/OTA/2003/05': 'Igm\Synergy\Models\OTA'
  destinations_php:
    'Igm\Synergy\Models\OTA': src/Models/OTA
  destinations_jms:
    'Igm\Synergy\Models\OTA': metadata/OTA
wsdl2php:
  metadata:
    'http://vendor-ctrip.fws.ctripqa.com/Hotel/OTAReceive/OTAReceiveService.asmx?wsdl': ~

@goetas goetas changed the title SOAP ENVELOPE SOAP ENVELOPE 1.2 Nov 22, 2017
@goetas
Copy link
Member

goetas commented Nov 22, 2017

Unfortunately looking at the code, the 1.2 support is not complete and there are many configuration mappings that are not complete.
Apparently is required a lot of work to solve it 😢

@goetas goetas reopened this Nov 22, 2017
@goetas
Copy link
Member

goetas commented Nov 22, 2017

Re opeing it

@goetas
Copy link
Member

goetas commented Nov 22, 2017

All this v0.1.3...master commits are unreleased

@victorgp89
Copy link
Author

OK, so I understand that doing these commits will not solve the problem, will it?

If not, I could try to help you.

@goetas
Copy link
Member

goetas commented Nov 22, 2017

the commits add the 1.2 support but is not configured properly.
Is necessary to play a lot with this and this in order to configure and run it correctly.

@victorgp89
Copy link
Author

Ok, I will try to I'm going to try to keep an eye on him. I would like to be able to fix it because I have implemented your soapclient in our company for communication with different hoteliers

@goetas
Copy link
Member

goetas commented Nov 22, 2017

I have implemented your soapclient in our company for communication with different hoteliers

initially this lib was build exactly for OTA 😄

@victorgp89
Copy link
Author

Any suggestions for which section to start looking at in order to resolve the conflict?

@goetas
Copy link
Member

goetas commented Nov 23, 2017

Is necessary to play a lot with this and this in order to configure and run it correctly.

@victorgp89
Copy link
Author

But would it be necessary to modify the wsdlReader true?

@goetas
Copy link
Member

goetas commented Nov 23, 2017

from what I can see should be good as it is

@victorgp89
Copy link
Author

The 'path_generator' in SoapClientExtension is new argument in config.yml.
The 'problem' must be in the creation of the envelopes of the metadata, right?
It is a bit complex to understand the root of the problem in the construction of headers.
Again, I'm sorry for the inconvenience. But it's a project that interests me a lot.

@victorgp89
Copy link
Author

I changed the version of your library wsdl2php:

"require-dev": {
"goetas-webservices/wsdl2php": "^0.3"
},

I generated the metadata and clases again.
And it seems that now the xml is generate correctly:

<SOAP:Envelope xmlns:**SOAP="http://schemas.xmlsoap.org/soap/envelope/"**>
SOAP:Body
<ns-77e106cb:OTA_HotelRatePlanRQ xmlns:ns-77e106cb="http://www.opentravel.org/OTA/2003/05" Version="0">
ns-77e106cb:POS
ns-77e106cb:Source
<ns-77e106cb:RequestorID ID="IGM" Type="1" MessagePassword="IGM123">
<ns-77e106cb:CompanyName Code="C" CodeContext="556"/>
</ns-77e106cb:RequestorID>
</ns-77e106cb:Source>
</ns-77e106cb:POS>
ns-77e106cb:RatePlans
ns-77e106cb:RatePlan
<ns-77e106cb:DateRange Start="2017-11-24" End="2017-11-24"/>
ns-77e106cb:RatePlanCandidates
<ns-77e106cb:RatePlanCandidate AvailRatesOnlyInd="true">
ns-77e106cb:HotelRefs
<ns-77e106cb:HotelRef HotelCode="54394"/>
</ns-77e106cb:HotelRefs>
</ns-77e106cb:RatePlanCandidate>
</ns-77e106cb:RatePlanCandidates>
</ns-77e106cb:RatePlan>
</ns-77e106cb:RatePlans>
</ns-77e106cb:OTA_HotelRatePlanRQ>
</SOAP:Body>
</SOAP:Envelope>

@goetas
Copy link
Member

goetas commented Nov 27, 2017

nice to hear that it worked

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants