0
I have a wsdl that returns to me all the information necessary for consumption. It is a corporate system and I need to access the part related to searching for a flight itinerary, to fill a search engine airline tickets.
The functions I can access normally, even I got back. However, when trying to access a method (searched with __getTypes) always returns me the error "Function x is not a Valid method for this service".
Part of the code I need to access:
<schema xmlns="http://www.w3.org/2001/XMLSchema" targetNamespace="urn:br.tur.advance.etkt.ws.bean">
<import namespace="urn:br.tur.advance.etkt.ws.service"/>
<import namespace="http://xml.apache.org/xml-soap"/>
<import namespace="http://bean.ws.etkt.advance.tur.br"/>
<import namespace="http://schemas.xmlsoap.org/soap/encoding/"/>
<complexType name="ItineraryBean">
<sequence>
<element name="airlineCode" nillable="true" type="xsd:string"/>
<element name="arrTime" nillable="true" type="xsd:string"/>
<element name="date" nillable="true" type="xsd:string"/>
<element name="depTime" nillable="true" type="xsd:string"/>
<element name="destination" nillable="true" type="xsd:string"/>
<element name="flightNumber" nillable="true" type="xsd:string"/>
<element name="origin" nillable="true" type="xsd:string"/>
<element name="seatClass" nillable="true" type="xsd:string"/>
<element name="tarifBase" nillable="true" type="xsd:string"/>
</sequence>
</complexType> ...
I tried with Curl (which seems unlikely) and the PHP Soap Client class and always returns the same error. I saw in some forums that it would be necessary to use the Stdclass but I have no idea how to put into practice.
I also tried to access this way, in which Itinerarybean is the method I need to fill out to return airline ticket offers.
$tickets = $client -> ItineraryBean(array('arrTime'=>'25/06/2018', 'date'=>'', 'depTime'=>'30/06/2018', 'destination'=>'POA', 'origin'=>'GRU'));
Any suggestions?
ItineraryBean
is a complexType and not a method. As the name well states,__getTypes
returns WSDL types and not methods/functions. For functions, use__getFunctions()
– Gabriel Heming
@Gabrielheming I can’t access this complexType? Because I need it, the functions I got normally.
– Raabe Sampaio
Complextype is not an access, it is the definition of a type, exactly like a class. Just define a data format, which properties and the type of each property. The type may be an input and/or output of a method, but it is not a method. Look in the WSDL and you can find out which method uses this type.
– Gabriel Heming
@Gabrielheming I’m looking for Itinerarybean, right? There’s another complexType that calls it... If complexType is the definition of a type, then I can’t do anything with it either?
– Raabe Sampaio
Exact. If it is in another type, you should check where this new type is being used. And so on.
– Gabriel Heming