Code Monkey home page Code Monkey logo

Comments (6)

DerMika avatar DerMika commented on June 7, 2024 1

Ok, I found what went wrong with your security authenticate: there is an error in the documentation in the authentication parameters. I'm going to fix it now...

from amadeus-ws-client.

DerMika avatar DerMika commented on June 7, 2024 1

So the problem was that the Security_Authenticate message uses authentication params defined at the Amadeus\Client\Params::$authParams level, but the documentation shows that authentication should be provided at Amadeus\Client\Params\SessionHandlerParams::$authParams level.

Doing so resulted in empty authentication parameters in the Client, which resulted in a Security_Authenticate with empty parameters. This is what you experienced.

I've now fixed:

  • the documentation to set the auth params at the correct level
  • the loading of params so that it doesn't matter at which level you define authentication parameters, both will work.

from amadeus-ws-client.

icaroce avatar icaroce commented on June 7, 2024

I had forgotten the $client->securityAuthenticate()
But when I did the request is empty.

<?xml version="1.0" encoding="UTF-8"?>
<SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" xmlns:ns1="http://xml.amadeus.com/VLSSLQ_06_1_1A">
    <SOAP-ENV:Body>
        <ns1:Security_Authenticate>
            <ns1:userIdentifier>
                <ns1:originIdentification>
                    <ns1:sourceOffice/>
                </ns1:originIdentification>
                <ns1:originatorTypeCode/>
                <ns1:originator/>
            </ns1:userIdentifier>
            <ns1:dutyCode>
                <ns1:dutyCodeDetails>
                    <ns1:referenceQualifier>DUT</ns1:referenceQualifier>
                    <ns1:referenceIdentifier/>
                </ns1:dutyCodeDetails>
            </ns1:dutyCode>
            <ns1:systemDetails>
                <ns1:organizationDetails>
                    <ns1:organizationId/>
                </ns1:organizationDetails>
            </ns1:systemDetails>
            <ns1:passwordInfo>
                <ns1:dataLength/>
                <ns1:dataType>E</ns1:dataType>
                <ns1:binaryData/>
            </ns1:passwordInfo>
        </ns1:Security_Authenticate>
    </SOAP-ENV:Body>
</SOAP-ENV:Envelope>
<?xml version="1.0" encoding="UTF-8"?>
<soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/">
    <soap:Header xmlns="http://webservices.amadeus.com/definitions">
        <SessionId>015S216GJ3|1</SessionId>
    </soap:Header>
    <soap:Body>
        <soap:Fault xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/">
            <faultcode>soap:Client</faultcode>
            <faultstring>18|Presentation|Fusion DSC found an exception !\n
                \tMissing Mandatory tag :\n
                \tExpected element: userIdentifier\n
                \tCurrent position in buffer: &lt;ns1:dutyCode&gt;&lt;ns1:dutyCodeDet\n
                \tLast 15 characters before error: y_Authenticate&gt;
            </faultstring>
            <faultactor>SI:APA</faultactor>
        </soap:Fault>
    </soap:Body>
</soap:Envelope>

from amadeus-ws-client.

DerMika avatar DerMika commented on June 7, 2024

Hi,

The thing that's going wrong is you provide an Array to the Amadeus\Client\Params::$authParams, while it should be an instance of Amadeus\Client\Params\AuthParams.

The result is that the Authentication parameters are not picked up properly. That's why you're sending an empty Security_Authenticate.

I realize that this is not very intuitive, and in the future I'd like to be able to provide one big nested Array for Client instantiation, but that's work in progress.

Please let me know if that fixes your problem.

from amadeus-ws-client.

icaroce avatar icaroce commented on June 7, 2024

Now works great. :)

from amadeus-ws-client.

icaroce avatar icaroce commented on June 7, 2024

Thanks for your help.

from amadeus-ws-client.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.