|
Re: Re: Help! "Server did not recognize the value of HTTP header SOAPAction: msg#00088php.nusoap.general
You want your client to use the WSDL the server supplies. Therefore, instead of $client = new soapclient($address) ; you want something like $client = new soapclient($wsdladdress, true); Also, since the service methods are implemented using document/literal, your "parameters" need to be wrapped in another array: $result = $client->call('DialExternalNumber', array('parameters' => $parameters)); Unfortunately, when I put together a client with these changes, my client timed out. Here is the code: <?php require_once('f:/nusoap/lib/nusoap.php'); $client = new soapclient('http://jimb-dev.cs.uiuc.edu:8080/AsteriskControlService.asmx?wsdl', true); $err = $client->getError(); if ($err) { echo '<h2>Constructor error</h2><pre>' . $err . '</pre>'; } $webSecret = 'simple'; $accountName = 'ianyap'; $outsidenumber = '12177213983'; $DialExternalNumber = array('webSecret' => $webSecret, 'accountName' => $accountName, 'outsidenumber' => $outsidenumber); $result = $client->call('DialExternalNumber', array('parameters' => $DialExternalNumber)); // Check for a fault if ($client->fault) { echo '<h2>Fault</h2><pre>'; print_r($result); echo '</pre>'; } else { // Check for errors $err = $client->getError(); if ($err) { // Display the error echo '<h2>Error</h2><pre>' . $err . '</pre>'; } else { // Display the result echo '<h2>Result</h2><pre>'; print_r($result); echo '</pre>'; } } echo '<h2>Request</h2><pre>' . htmlspecialchars($client->request, ENT_QUOTES) . '</pre>'; echo '<h2>Response</h2><pre>' . htmlspecialchars($client->response, ENT_QUOTES) . '</pre>'; echo '<h2>Debug</h2><pre>' . htmlspecialchars($client->debug_str, ENT_QUOTES) . '</pre>'; ?> Scott Nichol Do not send e-mail directly to this e-mail address, because it is filtered to accept only mail from specific mail lists. ----- Original Message ----- From: "Ian Yap" <d2army@xxxxxxxxx> To: <nusoap-general@xxxxxxxxxxxxxxxxxxxxx> Sent: Monday, April 25, 2005 8:26 PM Subject: [Nusoap-general] Re: Help! "Server did not recognize the value of HTTP header SOAPAction:" > Hi there Scott! > > Yea, I am sorry that the SOAP server went down for a > whole day, the WSDL file is finally back up: > > http://jimb-dev.cs.uiuc.edu:8080/AsteriskControlService.asmx?wsdl > > The server is running/generating on mono XSP in a > Linux environment. > > For the nusoap client, here's the segment performing > the soapclient initialization and subsequent SOAP > call: > > ........ > > $parameters = array('webSecret' => $webSecret , > 'accountName' => $accountName , > 'outsidenumber' => $outsidenumber ) > ; > > $client = new soapclient($address) ; > $err = $client->getError() ; > > $result = > $client->call('DialExternalNumber',$parameters) ; > > echo '<h2>Request</h2>'; > echo '<pre>' . htmlspecialchars($client->request, > ENT_QUOTES) . '</pre>'; > echo '<h2>Response</h2>'; > echo '<pre>' . htmlspecialchars($client->response, > ENT_QUOTES) . '</pre>'; > > ....... > > Once again, these are the outputs of the Request and > Response : > > Request > POST /AsteriskControlService.asmx?wsdl HTTP/1.0 > Host: jimb-dev.cs.uiuc.edu:8080 > User-Agent: NuSOAP/0.6.9 (1.86) > Content-Type: text/xml; charset=ISO-8859-1 > SOAPAction: "" > Content-Length: 705 > > <?xml version="1.0" > encoding="ISO-8859-1"?><SOAP-ENV:Envelope > SOAP-ENV:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" > xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" > xmlns:xsd="http://www.w3.org/2001/XMLSchema" > xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" > xmlns:SOAP-ENC="http://schemas.xmlsoap.org/soap/encoding/" > xmlns:si="http://soapinterop.org/xsd"><SOAP-ENV:Body><ns8540:DialExternalNumber > xmlns:ns8540="http://tempuri.org"><webSecret > xsi:type="xsd:string">simple</webSecret><accountName > xsi:type="xsd:string">ianyap</accountName><outsidenumber > xsi:type="xsd:string">12177213983</b> > </outsidenumber></ns8540:DialExternalNumber></SOAP-ENV:Body></SOAP-ENV:Envelope> > Response > HTTP/1.0 500 Internal Server Error > Server: Mono-XSP Server/1.0.6.99 Unix > X-Powered-By: Mono > Date: Tue, 26 Apr 2005 00:13:35 GMT > Content-Type: text/xml; charset=utf-8 > Connection: close > > <?xml version="1.0" encoding="utf-8"?><soap:Envelope > xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" > xmlns:xsd="http://www.w3.org/2001/XMLSchema" > xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/"><soap:Body><soap:Fault><faultcode>soap:Client</faultcode><faultstring>Server > did not recognize the value of HTTP header SOAPAction: > ""</faultstring></soap:Fault></soap:Body></soap:Envelope> > > Thanks in advance > > Ian > > > > ------------------------------------------------------- > SF email is sponsored by - The IT Product Guide > Read honest & candid reviews on hundreds of IT Products from real users. > Discover which products truly live up to the hype. Start reading now. > http://ads.osdn.com/?ad_id=6595&alloc_id=14396&op=click > _______________________________________________ > Nusoap-general mailing list > Nusoap-general@xxxxxxxxxxxxxxxxxxxxx > https://lists.sourceforge.net/lists/listinfo/nusoap-general > ------------------------------------------------------- SF email is sponsored by - The IT Product Guide Read honest & candid reviews on hundreds of IT Products from real users. Discover which products truly live up to the hype. Start reading now. http://ads.osdn.com/?ad_ide95&alloc_id396&op=click |
|
| <Prev in Thread] | Current Thread | [Next in Thread> |
|---|---|---|
| Previous by Date: | Re: Help! "Server did not recognize the value of HTTP header SOAPAction:": 00088, Ian Yap |
|---|---|
| Next by Date: | Proxy username and password: 00088, nusoap |
| Previous by Thread: | Re: Help! "Server did not recognize the value of HTTP header SOAPAction:"i: 00088, Ian Yap |
| Next by Thread: | Re: Re: Re: Help! "Server did not recognize the value of HTTP header SOAPAction:": 00088, Scott Nichol |
| Indexes: | [Date] [Thread] [Top] [All Lists] |
| News | FAQ | advertise |