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

Fare_PricePNRWithBookingClass 7.3 SOAP-ERROR #57

Closed
icaroce opened this issue Mar 30, 2017 · 14 comments
Closed

Fare_PricePNRWithBookingClass 7.3 SOAP-ERROR #57

icaroce opened this issue Mar 30, 2017 · 14 comments

Comments

@icaroce
Copy link

icaroce commented Mar 30, 2017

Hey.

When try to call Fare_PricePNRWithBookingClass i have this result.

PHP Fatal error: SOAP-ERROR: Encoding: object has no 'overrideInformation' property in C:\www\ccoa2\vendor\amabnl\amadeus-ws-client\src\Amadeus\Client\Session\Handler\Base.php on line 254

    $pricingResponse = $amadeus->client->farePricePnrWithBookingClass(
        new FarePricePnrWithBookingClassOptions([
            'overrideOptions' => [
                FarePricePnrWithBookingClassOptions::OVERRIDE_FARETYPE_PUB,
                FarePricePnrWithBookingClassOptions::OVERRIDE_FARETYPE_CORPUNI,
                'DO',
            ],
            'pricingsFareBasis' => [
                new FareBasis([
                    'fareBasisCode' => 'CTRIPN2',
                    'references' => [
                        new PaxSegRef([
                            'reference' => 1,
                            'type' => PaxSegRef::TYPE_SEGMENT
                        ]),
                        new PaxSegRef([
                            'reference' => 1,
                            'type' => PaxSegRef::TYPE_PASSENGER
                        ])
                    ]
                ])
            ]
        ])
    );
@DerMika
Copy link
Collaborator

DerMika commented Mar 31, 2017

Which version of Fare_PricePNRWithBookingClass do you have in your WSDL?

@icaroce
Copy link
Author

icaroce commented Mar 31, 2017

Fare_PricePNRWithBookingClass_07_3_1A

@DerMika
Copy link
Collaborator

DerMika commented Mar 31, 2017

Oh boy, that's an old one. I'll try to see if I can reproduce the issue.

@DerMika DerMika added the bug label Mar 31, 2017
@DerMika DerMika changed the title Fare_PricePNRWithBookingClass SOAP-ERROR Fare_PricePNRWithBookingClass 7.3 SOAP-ERROR Mar 31, 2017
@icaroce
Copy link
Author

icaroce commented Mar 31, 2017

[2017-03-30 21:43:43] RequestResponseLogs.ERROR: SOAPFAULT while sending message Fare_PricePNRWithBookingClass: SOAP-ERROR: Encoding: object has no 'overrideInformation' property code: 0 at C:\www\ccoa2\vendor\amabnl\amadeus-ws-client\src\Amadeus\Client\Session\Handler\Base.php line 254:  #0 C:\www\ccoa2\vendor\amabnl\amadeus-ws-client\src\Amadeus\Client\Session\Handler\Base.php(254): SoapClient->__call('Fare_PricePNRWi...', Array) #1 C:\www\ccoa2\vendor\amabnl\amadeus-ws-client\src\Amadeus\Client.php(1030): Amadeus\Client\Session\Handler\Base->sendMessage('Fare_PricePNRWi...', Object(Amadeus\Client\Struct\Fare\PricePNRWithBookingClass13), Array) #2 C:\www\ccoa2\vendor\amabnl\amadeus-ws-client\src\Amadeus\Client.php(561): Amadeus\Client->callMessage('Fare_PricePNRWi...', Object(Amadeus\Client\RequestOptions\FarePricePnrWithBookingClassOptions), Array) #3 C:\www\ccoa2\routes\web.php(388): Amadeus\Client->farePricePnrWithBookingClass(Object(Amadeus\Client\RequestOptions\FarePricePnrWithBookingClassOptions)) #4 C:\www\ccoa2\vendor\laravel\framework\src\Illuminate\Routing\Route.php(189): App\Providers\RouteServiceProvider->{closure}() #5 C:\www\ccoa2\vendor\laravel\framework\src\Illuminate\Routing\Route.php(163): Illuminate\Routing\Route->runCallable() #6 C:\www\ccoa2\vendor\laravel\framework\src\Illuminate\Routing\Router.php(559): Illuminate\Routing\Route->run() #7 C:\www\ccoa2\vendor\laravel\framework\src\Illuminate\Routing\Pipeline.php(30): Illuminate\Routing\Router->Illuminate\Routing\{closure}(Object(Illuminate\Http\Request)) #8 C:\www\ccoa2\vendor\laravel\framework\src\Illuminate\Routing\Middleware\SubstituteBindings.php(41): Illuminate\Routing\Pipeline->Illuminate\Routing\{closure}(Object(Illuminate\Http\Request)) #9 C:\www\ccoa2\vendor\laravel\framework\src\Illuminate\Pipeline\Pipeline.php(148): Illuminate\Routing\Middleware\SubstituteBindings->handle(Object(Illuminate\Http\Request), Object(Closure)) #10 C:\www\ccoa2\vendor\laravel\framework\src\Illuminate\Routing\Pipeline.php(53): Illuminate\Pipeline\Pipeline->Illuminate\Pipeline\{closure}(Object(Illuminate\Http\Request)) #11 C:\www\ccoa2\vendor\laravel\framework\src\Illuminate\Foundation\Http\Middleware\VerifyCsrfToken.php(65): Illuminate\Routing\Pipeline->Illuminate\Routing\{closure}(Object(Illuminate\Http\Request)) #12 C:\www\ccoa2\vendor\laravel\framework\src\Illuminate\Pipeline\Pipeline.php(148): Illuminate\Foundation\Http\Middleware\VerifyCsrfToken->handle(Object(Illuminate\Http\Request), Object(Closure)) #13 C:\www\ccoa2\vendor\laravel\framework\src\Illuminate\Routing\Pipeline.php(53): Illuminate\Pipeline\Pipeline->Illuminate\Pipeline\{closure}(Object(Illuminate\Http\Request)) #14 C:\www\ccoa2\vendor\laravel\framework\src\Illuminate\View\Middleware\ShareErrorsFromSession.php(49): Illuminate\Routing\Pipeline->Illuminate\Routing\{closure}(Object(Illuminate\Http\Request)) #15 C:\www\ccoa2\vendor\laravel\framework\src\Illuminate\Pipeline\Pipeline.php(148): Illuminate\View\Middleware\ShareErrorsFromSession->handle(Object(Illuminate\Http\Request), Object(Closure)) #16 C:\www\ccoa2\vendor\laravel\framework\src\Illuminate\Routing\Pipeline.php(53): Illuminate\Pipeline\Pipeline->Illuminate\Pipeline\{closure}(Object(Illuminate\Http\Request)) #17 C:\www\ccoa2\vendor\laravel\framework\src\Illuminate\Session\Middleware\StartSession.php(64): Illuminate\Routing\Pipeline->Illuminate\Routing\{closure}(Object(Illuminate\Http\Request)) #18 C:\www\ccoa2\vendor\laravel\framework\src\Illuminate\Pipeline\Pipeline.php(148): Illuminate\Session\Middleware\StartSession->handle(Object(Illuminate\Http\Request), Object(Closure)) #19 C:\www\ccoa2\vendor\laravel\framework\src\Illuminate\Routing\Pipeline.php(53): Illuminate\Pipeline\Pipeline->Illuminate\Pipeline\{closure}(Object(Illuminate\Http\Request)) #20 C:\www\ccoa2\vendor\laravel\framework\src\Illuminate\Cookie\Middleware\AddQueuedCookiesToResponse.php(37): Illuminate\Routing\Pipeline->Illuminate\Routing\{closure}(Object(Illuminate\Http\Request)) #21 C:\www\ccoa2\vendor\laravel\framework\src\Illuminate\Pipeline\Pipeline.php(148): Illuminate\Cookie\Middleware\AddQueuedCookiesToResponse->handle(Object(Illuminate\Http\Request), Object(Closure)) #22 C:\www\ccoa2\vendor\laravel\framework\src\Illuminate\Routing\Pipeline.php(53): Illuminate\Pipeline\Pipeline->Illuminate\Pipeline\{closure}(Object(Illuminate\Http\Request)) #23 C:\www\ccoa2\vendor\laravel\framework\src\Illuminate\Cookie\Middleware\EncryptCookies.php(59): Illuminate\Routing\Pipeline->Illuminate\Routing\{closure}(Object(Illuminate\Http\Request)) #24 C:\www\ccoa2\vendor\laravel\framework\src\Illuminate\Pipeline\Pipeline.php(148): Illuminate\Cookie\Middleware\EncryptCookies->handle(Object(Illuminate\Http\Request), Object(Closure)) #25 C:\www\ccoa2\vendor\laravel\framework\src\Illuminate\Routing\Pipeline.php(53): Illuminate\Pipeline\Pipeline->Illuminate\Pipeline\{closure}(Object(Illuminate\Http\Request)) #26 C:\www\ccoa2\app\Http\Middleware\VerifyBrowser.php(25): Illuminate\Routing\Pipeline->Illuminate\Routing\{closure}(Object(Illuminate\Http\Request)) #27 C:\www\ccoa2\vendor\laravel\framework\src\Illuminate\Pipeline\Pipeline.php(148): App\Http\Middleware\VerifyBrowser->handle(Object(Illuminate\Http\Request), Object(Closure)) #28 C:\www\ccoa2\vendor\laravel\framework\src\Illuminate\Routing\Pipeline.php(53): Illuminate\Pipeline\Pipeline->Illuminate\Pipeline\{closure}(Object(Illuminate\Http\Request)) #29 C:\www\ccoa2\vendor\laravel\framework\src\Illuminate\Pipeline\Pipeline.php(102): Illuminate\Routing\Pipeline->Illuminate\Routing\{closure}(Object(Illuminate\Http\Request)) #30 C:\www\ccoa2\vendor\laravel\framework\src\Illuminate\Routing\Router.php(561): Illuminate\Pipeline\Pipeline->then(Object(Closure)) #31 C:\www\ccoa2\vendor\laravel\framework\src\Illuminate\Routing\Router.php(520): Illuminate\Routing\Router->runRouteWithinStack(Object(Illuminate\Routing\Route), Object(Illuminate\Http\Request)) #32 C:\www\ccoa2\vendor\laravel\framework\src\Illuminate\Routing\Router.php(498): Illuminate\Routing\Router->dispatchToRoute(Object(Illuminate\Http\Request)) #33 C:\www\ccoa2\vendor\laravel\framework\src\Illuminate\Foundation\Http\Kernel.php(174): Illuminate\Routing\Router->dispatch(Object(Illuminate\Http\Request)) #34 C:\www\ccoa2\vendor\laravel\framework\src\Illuminate\Routing\Pipeline.php(30): Illuminate\Foundation\Http\Kernel->Illuminate\Foundation\Http\{closure}(Object(Illuminate\Http\Request)) #35 C:\www\ccoa2\vendor\laravel\framework\src\Illuminate\Foundation\Http\Middleware\CheckForMaintenanceMode.php(46): Illuminate\Routing\Pipeline->Illuminate\Routing\{closure}(Object(Illuminate\Http\Request)) #36 C:\www\ccoa2\vendor\laravel\framework\src\Illuminate\Pipeline\Pipeline.php(148): Illuminate\Foundation\Http\Middleware\CheckForMaintenanceMode->handle(Object(Illuminate\Http\Request), Object(Closure)) #37 C:\www\ccoa2\vendor\laravel\framework\src\Illuminate\Routing\Pipeline.php(53): Illuminate\Pipeline\Pipeline->Illuminate\Pipeline\{closure}(Object(Illuminate\Http\Request)) #38 C:\www\ccoa2\vendor\laravel\framework\src\Illuminate\Pipeline\Pipeline.php(102): Illuminate\Routing\Pipeline->Illuminate\Routing\{closure}(Object(Illuminate\Http\Request)) #39 C:\www\ccoa2\vendor\laravel\framework\src\Illuminate\Foundation\Http\Kernel.php(149): Illuminate\Pipeline\Pipeline->then(Object(Closure)) #40 C:\www\ccoa2\vendor\laravel\framework\src\Illuminate\Foundation\Http\Kernel.php(116): Illuminate\Foundation\Http\Kernel->sendRequestThroughRouter(Object(Illuminate\Http\Request)) #41 C:\www\ccoa2\public\index.php(53): Illuminate\Foundation\Http\Kernel->handle(Object(Illuminate\Http\Request)) #42 {main} [] []
[2017-03-30 21:43:43] RequestResponseLogs.INFO: Called Fare_PricePNRWithBookingClass with request:  [] []

@icaroce
Copy link
Author

icaroce commented Apr 10, 2017

Looking xsd file we can see the message.

A property of which this error refers is that it?

        <xs:element name="overrideInformation">
          <xs:complexType>
            <xs:sequence>
              <xs:element name="attributeDetails" maxOccurs="30">
                <xs:complexType>
                  <xs:sequence>
                    <xs:element name="attributeType">
                      <xs:simpleType>
                        <xs:restriction base="xs:string">
                          <xs:annotation>
                            <xs:documentation xml:lang="en">Format limitations: an..3</xs:documentation>
                          </xs:annotation>
                          <xs:minLength value="1" />
                          <xs:maxLength value="3" />
                        </xs:restriction>
                      </xs:simpleType>
                    </xs:element>
                    <xs:element name="attributeDescription" minOccurs="0">
                      <xs:simpleType>
                        <xs:restriction base="xs:string">
                          <xs:annotation>
                            <xs:documentation xml:lang="en">Format limitations: an..100</xs:documentation>
                          </xs:annotation>
                          <xs:minLength value="1" />
                          <xs:maxLength value="100" />
                        </xs:restriction>
                      </xs:simpleType>
                    </xs:element>
                  </xs:sequence>
                </xs:complexType>
              </xs:element>
            </xs:sequence>
          </xs:complexType>
        </xs:element>

@icaroce
Copy link
Author

icaroce commented Apr 10, 2017

I figured out what's going on.

The library is identified xsd with version 13 and not 12.

        if ($version < 13) {
            return new Struct\Fare\PricePNRWithBookingClass12($requestOptions);
        } else {
            return new Struct\Fare\PricePNRWithBookingClass13($requestOptions);
        }

Is returning false with "7.3". Maybe use int instead string.

@DerMika
Copy link
Collaborator

DerMika commented Apr 11, 2017

Well, I've just tried reproducing this issue, and I'm unable to do so.

Can you tell me which version of PHP you're running and on what OS?

Also, can you maybe privately send me your WSDL so that I can try to reproduce the issue?

@icaroce
Copy link
Author

icaroce commented Apr 11, 2017

Win Server 2012R2+PHP7.0.7

@DerMika
Copy link
Collaborator

DerMika commented Apr 12, 2017

So, I've tried reproducing on a windows platform and PHP 7.0, but I'm not able to do so.

I've now pushed a fix where both values are explicitly converted to floats before comparing. Can you please test by switching your composer.json to use dev-master and doing a composer update?

@DerMika DerMika added the bug label Apr 12, 2017
@icaroce
Copy link
Author

icaroce commented Apr 12, 2017

Works!!
image

@DerMika
Copy link
Collaborator

DerMika commented Apr 12, 2017

OK, that's a relief! But I see another problem in your screenshot, the library doesn't recognize the error message, so I have work again :)

@DerMika
Copy link
Collaborator

DerMika commented Apr 12, 2017

Can you please do another composer update and do the same test again? The result object should now have status: "ERR".

DerMika added a commit that referenced this issue Apr 12, 2017
@icaroce
Copy link
Author

icaroce commented Apr 12, 2017

image

Now we've Error.

@DerMika
Copy link
Collaborator

DerMika commented Apr 12, 2017

Great, sounds like that's fixed then.

Thanks for your help, and sorry it took so long to fix.

@DerMika DerMika closed this as completed Apr 12, 2017
@DerMika DerMika added this to the 1.4.0 milestone Nov 6, 2017
atomy pushed a commit to mlamm/amadeus-ws-client that referenced this issue Nov 26, 2018
…MC-152-create-jira-release-version-on-build to master

* commit '9a842f64f22476eddc59ffa1a093242205e42ed4':
  FMC-152 - creating jira-release on jenkins build
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