1

Here is my request in SoapUI:

enter image description here

With SoapUI i send the request and i receive good response.

Here is my PHP code so far:

<?PHP
    $wsdl = 'https://onlinefatura.xyz/foyws/FoyOnlineApiGateWS.asmx';


    try{
        $clinet=new SoapClient($wsdl);

        $ver =array(
            "UserName"=>"USERNAME",
            "Password"=>"PASSWORD",
            "ApiKey"=>"APIKEYHERE",
            "Date"=>"2017-11-09",
        );
        $quates=$clinet->GetAddedBalanceList($ver);

        var_dump($quates);


    }

    catch(SoapFault $e)
    {
        echo $e->getMessage();
    }

When i execute the code i receive:

SOAP-ERROR: Parsing WSDL: Couldn't load from 'https://onlinefatura.xyz/foyws/FoyOnlineApiGateWS.asmx' : Premature end of data in tag html line 3

Somehow i'm doing something wrong. I'm not really sure if i made my PHP request correct.

Where is my mistake, and how the correct request should look like ?

1
  • The SOAPClient constructor takes the WSDL address, not the service description. Try https://onlinefatura.xyz/foyws/FoyOnlineApiGateWS.asmx?WSDL Commented Nov 14, 2017 at 12:43

1 Answer 1

2

With an SoapClient error like "Premature end of data in tag html" your link to the WSDL file is usually not correct.

Try this one: https://onlinefatura.xyz/foyws/FoyOnlineApiGateWS.asmx?WSDL

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.