Re: SOAP - function does not exist?

From: Date: Mon, 30 Jun 2008 15:16:13 +0000
Subject: Re: SOAP - function does not exist?
References: 1 2 3 4  Groups: php.general 
Request: Send a blank email to php-general+get-276131@lists.php.net to get a copy of this message
On Mon, Jun 30, 2008 at 11:08 AM, Will Fitch <fitchwh@gmail.com> wrote: > It doesn't look like the SOAP service at > > http://new.vehicletransportusa.com/v2/services/URS.QuoteServices.phpdoesn't > actually implement a function called "getOrderHistory". > > > > Can you verify that? > > > > *From:* Dan Joseph [mailto:dmjoseph@gmail.com] > *Sent:* Monday, June 30, 2008 9:52 AM > *To:* Will Fitch > *Cc:* PHP General List > *Subject:* Re: [PHP] SOAP - function does not exist? > > > > > > On Mon, Jun 30, 2008 at 10:48 AM, Will Fitch <fitchwh@gmail.com> wrote: > > Your WSDL is referencing a document literal service. How are you making > the > request? For instance, look at this example: > > $soap = new SoapClient('some.wsdl'); > $soap->getOrderHistory('somestring'); > > The above might not work as your document literal service (not RPC) is > looking for the data in the SOAP headers, not the body. You may have to > attach the data to the headers and use __call() rather than RPC. > > Can you provide the WSDL (as attachment please) > > > -----Original Message----- > From: Dan Joseph [mailto:dmjoseph@gmail.com] > Sent: Monday, June 30, 2008 9:43 AM > To: PHP General List > Subject: [PHP] SOAP - function does not exist? > > Hi, > > I've got a web service that I have created that. It has several functions, > here is the var_dump of __getfunctions(); > > array(11) { > [0]=> > string(52) "getQuoteResponse getQuote(getQuote $getquoterequest)" > [1]=> > string(64) "submitOrderResponse submitOrder(submitOrder > $submitorderrequest)" > [2]=> > string(64) "updateQuoteResponse updateQuote(updateQuote > $updatequoterequest)" > [3]=> > string(68) "accountLoginResponse accountLogin(accountLogin > $accountloginrequest)" > [4]=> > string(80) "accountPasswordResponse accountPassword(accountPassword > $accountpasswordrequest)" > [5]=> > string(64) "accountInfoResponse accountInfo(accountInfo > $accountinforequest)" > [6]=> > string(72) "accountUpdateResponse accountUpdate(accountUpdate > $accountupdaterequest)" > [7]=> > string(80) "getQuoteHistoryResponse getQuoteHistory(getQuoteHistory > $getquotehistoryrequest)" > [8]=> > string(80) "getQuoteDetailsResponse getQuoteDetails(getQuoteDetails > $getquotedetailsrequest)" > [9]=> > string(80) "getOrderHistoryResponse getOrderHistory(getOrderHistory > $getorderhistoryrequest)" > [10]=> > string(80) "getOrderDetailsResponse getOrderDetails(getOrderDetails > $getorderdetailsrequest)" > } > > > The response I am getting is: > > SoapFault Object > ( > [message:protected] => Function 'getOrderHistory' doesn't exist > [string:private] => > [code:protected] => 0 > [file:protected] => /home/yerkes/public_html/soap/client.php > [line:protected] => 74 > [trace:private] => Array > ( > [0] => Array > ( > [function] => __call > [class] => SoapClient > [type] => -> > [args] => Array > ( > [0] => getOrderHistory > [1] => Array > ( > [0] => Array > ( > [id] => 24 > [key] => asdlkjf > [username] => > djoseph@unitedroad.com > [startdate] => 2008-05-01 > [enddate] => 2008-05-31 > [password] => xxxxx > ) > > ) > > ) > } > > ) > > > I have gone over the wsdl countless times, and do not see anything wrong > it. Can anyone tell me where to begin trouble shooting this? I can post > code from the client and class if need be. I guess I'm mainly trying to > figure out: Does this point to a wsdl problem, or code problem? > > -- > -Dan Joseph > > www.canishosting.com - Plans start @ $1.99/month. > > "Build a man a fire, and he will be warm for the rest of the day. > Light a man on fire, and will be warm for the rest of his life." > > > Hi Will, thanks for the response. Here is the wsdl. > > I am calling the service with: > > <?php > > $client = new SoapClient( " > > http://new.vehicletransportusa.com/v2/services/URS.QuoteServices.wsdl" > ); > > $d = $client->getOrderHistory( $data ); > > ?> > > -- > -Dan Joseph > > www.canishosting.com - Plans start @ $1.99/month. > > "Build a man a fire, and he will be warm for the rest of the day. > Light a man on fire, and will be warm for the rest of his life." > Ahhh! You are right on with that! I forgot to put $ursqs->addFunction( "getOrderHistory" ); I added it, its working now. Thanks Will! -- -Dan Joseph www.canishosting.com - Plans start @ $1.99/month. "Build a man a fire, and he will be warm for the rest of the day. Light a man on fire, and will be warm for the rest of his life."

« previous php.general (#276131) next »