I'm curremtly working on a project "Flight search" with SOAP and PHP. I'm new to this SOAP Technology.

I've to send the XML over POST Request and get the response:


to the URL:


Can any one please help ? I'm struggling with this. Thanks in advance.

EDIT: I'm trying the following but its getting error:

$dom_document = simplexml_load_file("availability.xml");

        $soap_client =
            new soapclient("http://xx.xxx.xx.xxx/ArzooWS/services/DOMFlightAvailability?wsdl");
        $availability = $soap_client->getAvailability($dom_document);
        echo $availability->getAvailabilityResponse;
    }catch(SoapFault $exception){
        echo $exception->getMessage();

The error i'm getting:

Notice: Trying to get property of non-object in
C:\xampp\htdocs\Flight\availability.php on line 9

Recommended Answers


It's SoapClient, NOT soapclient.

Jump to Post

It's SoapClient, NOT soapclient

I thought classnames were case-insensitive?

Jump to Post

All 8 Replies

Member Avatar

ANy chance that you could enter the url of the wsdl? We could then try to replicate the issue.

Is this a valid method call?


Don't you have to encode and escape the XML before sending?

Member Avatar

It's SoapClient, NOT soapclient

I thought classnames were case-insensitive?

commented: Indeed. +14

Oh right. Ugh... bad habit then anyway, because everything else is.

Member Avatar

I agree. That another mess with php :( CSensitivity for some things, but not others. You'd think they'd get their act together by v5.4 :) Well I suppose they break the net with that one though.

Tried with SoapClient instead of soapclient but no change on the error..

I used __getFunctions for getting the function name and it returned array(1) { [0]=> string(35) "string getAvailability(string $in0)" }

Member Avatar

OK, so you know that you have to supply a string $in0. In what format is the string expected?

Check the actual url:


And you should get all the relevant info as to how to make a valid request.
Search the tree for $in0 if present.
Passing the parameter, you may need to place it in an array though.

Thanks folks, I Got it...

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts learning and sharing knowledge.