2009年2月2日星期一

Re: [fw-webservices] SoapFault exception: [Sender] looks like we got no XML document

Sounds like your client isn't sending a valid request for some reason.  what does "getLastRequest()" say?

On Mon, Feb 2, 2009 at 4:32 PM, Waigani <jesse.meek@otago.ac.nz> wrote:

Next exception: SoapFault exception: [Sender] Invalid XML.

The Code:

   public function clientAction(){
       $client = new Zend_Soap_Client('http://myhome/wsdl/webprofile.wsdl',
array(
           'compression' => SOAP_COMPRESSION_ACCEPT | SOAP_COMPRESSION_GZIP
| 5));
       try {
           $result = $client->communityService('username');
       }catch (Exception $exception){
       }
       $lastResponse = $client->getLastResponse();
       $this->_helper->viewRenderer->setNeverRender();
   }

$exception = "SoapFault exception: [Sender] Invalid XML … "

$lastResponse = string(269) "<?xml version="1.0" encoding="UTF-8"?>
<SOAP-ENV:Envelope
xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/"><SOAP-ENV:Body><SOAP-ENV:Fault><faultcode>Sender</faultcode><faultstring>Invalid
XML</faultstring></SOAP-ENV:Fault></SOAP-ENV:Body></SOAP-ENV:Envelope>
"







A.J. Brown-3 wrote:
>
> No worries :)  Glad I could help!
>
> On Mon, Feb 2, 2009 at 4:09 PM, Jesse Meek <jesse.meek@otago.ac.nz> wrote:
>
>> Ah ah! Its my Auth plugin redirecting the request. Thanks A.J. Brown :)
>>
>> On 3/02/2009, at 11:49 AM, A.J. Brown wrote:
>>
>> Last time I ran into this error, it's because an exception was being
>> thrown
>> on the server side.  I had to debug the code to figure out what was being
>> returned.  Try catching the SoapFault, then calling the lastResponse()
>> message on your soap client and see what's going on.
>>
>> On Mon, Feb 2, 2009 at 3:41 PM, Waigani <jesse.meek@otago.ac.nz> wrote:
>>
>>>
>>> I'm getting the following error from Zend_Soap_Client: SoapFault
>>> exception:
>>> [Sender] looks like we got no XML document. Code:
>>>
>>> //The server
>>>    public function indexAction()
>>>    {
>>>        $server = new Zend_Soap_Server('wsdl/webprofile.wsdl');
>>>        $server->setClass('Profile_Web');
>>>        $server->handle();
>>>        Zend_Layout::getMvcInstance()->disableLayout();
>>>        $this->_helper->viewRenderer->setNeverRender();
>>>    }
>>>
>>> //The client
>>>    public function clientAction(){
>>>        $client = new
>>> Zend_Soap_Client('http://myhome/wsdl/webprofile.wsdl
>>> ',
>>> array(
>>>                'compression' => SOAP_COMPRESSION_ACCEPT |
>>> SOAP_COMPRESSION_GZIP |
>>> 5));
>>>        $result = $client->communityService('username');
>>>        $this->_helper->viewRenderer->setNeverRender();
>>>    }
>>>
>>> Wsdl works fine ($client->getFunctions() works fine), there is no while
>>> space before <?php in the served class. I've hit a dead end :(
>>> --
>>> View this message in context:
>>> http://www.nabble.com/SoapFault-exception%3A--Sender--looks-like-we-got-no-XML-document-tp21800185p21800185.html
>>> Sent from the Zend Web Services mailing list archive at Nabble.com.
>>>
>>>
>>
>>
>> --
>> A.J. Brown
>> web | http://ajbrown.org
>> phone | (937) 660-3969
>>
>>
>> Jesse Meek
>> The Framework Project, Chief Developer
>> Division of Health Sciences
>> University of Otago
>> Dunedin
>>
>> Tel: + 64 3 479 8076
>> Email: jesse.meek@otago.ac.nz
>> Web: www.otago.ac.nz/healthsciences
>>
>>
>>
>>
>>
>
>
> --
> A.J. Brown
> web | http://ajbrown.org
> phone | (937) 660-3969
>
>

--
View this message in context: http://www.nabble.com/SoapFault-exception%3A--Sender--looks-like-we-got-no-XML-document-tp21800185p21800987.html
Sent from the Zend Web Services mailing list archive at Nabble.com.




--
A.J. Brown
web | http://ajbrown.org
phone | (937) 660-3969

没有评论: