Soap Call Error

This is a discussion on Soap Call Error within the PHP General forums, part of the PHP Programming Forums category; Hello Guys, I have been getting a wierd soap exception lately [faultstring] => looks like we got no XML document [...


Go Back   Usenet Forums > PHP Programming Forums > PHP General

FAQ Members List Calendar Search Today's Posts Mark Forums Read
  #1 (permalink)  
Old 07-17-2008
VamVan
 
Posts: n/a
Default Soap Call Error

Hello Guys,

I have been getting a wierd soap exception lately


[faultstring] => looks like we got no XML document
[faultcode] => Client
[faultcodens] => http://schemas.xmlsoap.org/soap/envelope/

What does that mean? The call gets properly called and it does what it needs
to do, but the response xml is always a $fault? Did anyone have this
problem? I am using php 5.2.6 for the info.

and below is my method...

private function createThread($userID, $applianceTitle,
$applianceDetails_link){
// Define Client
try {
$client = new SoapClient($this->createThreadWSDL, array("trace" =>
1
));
} catch(SoapFault $fault) {
return "";
}

// Define Input array
$params = array(
'subject'=> $applianceTitle,
'body' => $applianceDetails_link,
'communityID' => $this->parentCommunityID,
'userID' => $userID
);

//Make the Call
try {
$result = $client->__soapCall('createThread',
array('parameters'=>$params), NULL, $this->header);
return $result;
} catch (SoapFault $fault){
return $fault;
}
}

Thanks

Reply With Quote
  #2 (permalink)  
Old 07-17-2008
Jason Norwood-Young
 
Posts: n/a
Default Re: [PHP] Soap Call Error


On Wed, 2008-07-16 at 17:44 -0700, VamVan wrote:
> Hello Guys,
>
> I have been getting a wierd soap exception lately
>
>
> [faultstring] => looks like we got no XML document
> [faultcode] => Client
> [faultcodens] => http://schemas.xmlsoap.org/soap/envelope/
>
> What does that mean? The call gets properly called and it does what it needs
> to do, but the response xml is always a $fault? Did anyone have this
> problem? I am using php 5.2.6 for the info.


This is usually a malformed XML document - I had the problem recently
when fetching an XML document that wasn't complete (no </xml>). Check
what you're *actually* getting with something like:

} catch(SoapFault $exception) {
$request_xml = $client->__getLastRequestHeaders() .
$client->__getLastRequest();
$response_xml = $client->__getLastResponseHeaders() .
$client->__getLastResponse();
print "Response:".$response_xml;
print "Request:".$request_xml;
print $exception;
}

Reply With Quote
  #3 (permalink)  
Old 07-17-2008
VamVan
 
Posts: n/a
Default Re: [PHP] Soap Call Error

I tried that this is what i get


Response:HTTP/1.1 200 OK
Date: Thu, 17 Jul 2008 18:27:23 GMT
Server: Apache/2.2.6 (Unix)
Set-Cookie: JSESSIONID=DF4D15B8D0A0610B4832C3A708874672; Path=/
Keep-Alive: timeout=5, max=100
Connection: Keep-Alive
Transfer-Encoding: chunked
Content-Type: multipart/related; type="application/xop+xml"; start="<
soap.xml@xfire.codehaus.org>"; start-info="text/xml";
boundary="----=_Part_281_1620393832.1216319243198"

------=_Part_281_1620393832.1216319243198
Content-Type: application/xop+xml; charset=UTF-8; type="text/xml"
Content-Transfer-Encoding: 8bit
Content-ID: <soap.xml@xfire.codehaus.org>

<--=_Part_281_1620393832.1216319243198--
Request:POST /rpc/soap/ForumService HTTP/1.1
Host: xxxxxxxxxxxx
Connection: Keep-Alive
User-Agent: PHP-SOAP/5.2.0
Content-Type: text/xml; charset=utf-8
SOAPAction: ""
Content-Length: 850soap:Envelope xmlns:soap="
http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsd="
http://www.w3.org/2001/XMLSchema" xmlns:xsi="
http://www.w3.org/2001/XMLSchema-instance"><soap:Body><createThreadResponse
xmlns="http://jivesoftware.com/webservices"><out xmlns="
http://jivesoftware.com/webservices"><ID xmlns="
http://webservices.community.jivesoftware.com">xxxxxx</ID><communityID
xmlns="http://webservices.community.jivesoftware.com">xxxxx</communityID><creationDate
xmlns="http://webservices.community.jivesoftware.com">xxxx-07-17T11:27:23.078-07:00</creationDate><latestMessageID
xmlns="http://webservices.community.jivesoftware.com">xxxxx</latestMessageID><messageCount
xmlns="http://webservices.community.jivesoftware.com">1</messageCount><moderationValue
xmlns="http://webservices.community.jivesoftware.com">1</moderationValue><modificationDate
xmlns="http://webservices.community.jivesoftware.com">2008-07-17T11:27:23.078-07:00</modificationDate><name
xmlns="http://webservices.community.jivesoftware.com">new appliance
108</name><objectType
xmlns="http://webservices.community.jivesoftware.com">0</objectType><rootMessage
xmlns="http://webservices.community.jivesoftware.com"><ID>989430 </ID><anonymous>false</anonymous><attachmentCount>0</attachmentCount><body>hello</body><communityID>2352</communityID><communityIndex>1538</communityIndex><creationDate>2008-07-17T11:27:23.078-07:00</creationDate><forumThreadID>155479</forumThreadID><imageCount>0</imageCount><moderationValue>1</moderationValue><modificationDate>2008-07-17T11:27:23.078-07:00</modificationDate><parentMessageID>0</parentMessageID><subject>new
appliance
108</subject><unfilteredBody>hello</unfilteredBody><unfilteredSubject>new
appliance
108</unfilteredSubject><user><ID>135558</ID><creationDate>2006-05-10T11:55:27.114-07:00</creationDate><email>asdadasd</email><emailVisible>false</emailVisible><modificationDate>2006-05-10T11:55:27.114-07:00</modificationDate><name>
</name><nameVisible>true</nameVisible><password xsi:nil="true"
/><passwordHash></passwordHash><username>xxxx
xxxx</username></user></rootMessage></out></createThreadResponse></soap:Body></soap:Envelope>
----

<?xml version="1.0" encoding="UTF-8"?>
<SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/"
xmlns:ns1="http://jivesoftware.com/webservices" xmlns:ns2="
http://docs.oasis-open.org/wss/2004/...secext-1.0.xsd
"><SOAP-ENV:Header>
<wsse:Security xmlns:wsse="
http://docs.oasis-open.org/wss/2004/...secext-1.0.xsd
">
<wsse:UsernameToken>
<wsse:Username>xxxxxxx</wsse:Username>
<wsse:Password>xxxxx</wsse:Password>
</wsse:UsernameToken>
</wsse:Security>
</SOAP-ENV:Header><SOAP-ENV:Body><ns1:createThread><ns1:subject>new
appliance
108</ns1:subject><ns1:body>hello</ns1:body><ns1:communityID>xxxxx</ns1:communityID><ns1:userID></ns1:userID></ns1:createThread></SOAP-ENV:Body></SOAP-ENV:Envelope>


I dont know what can I infer from this. I still get the same error.



On Wed, Jul 16, 2008 at 11:26 PM, Jason Norwood-Young <
jason@freespeechpub.co.za> wrote:

>
> On Wed, 2008-07-16 at 17:44 -0700, VamVan wrote:
> > Hello Guys,
> >
> > I have been getting a wierd soap exception lately
> >
> >
> > [faultstring] => looks like we got no XML document
> > [faultcode] => Client
> > [faultcodens] => http://schemas.xmlsoap.org/soap/envelope/
> >
> > What does that mean? The call gets properly called and it does what it

> needs
> > to do, but the response xml is always a $fault? Did anyone have this
> > problem? I am using php 5.2.6 for the info.

>
> This is usually a malformed XML document - I had the problem recently
> when fetching an XML document that wasn't complete (no </xml>). Check
> what you're *actually* getting with something like:
>
> } catch(SoapFault $exception) {
> $request_xml = $client->__getLastRequestHeaders() .
> $client->__getLastRequest();
> $response_xml = $client->__getLastResponseHeaders() .
> $client->__getLastResponse();
> print "Response:".$response_xml;
> print "Request:".$request_xml;
> print $exception;
> }
>
>


Reply With Quote
Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are Off
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On



All times are GMT +1. The time now is 09:13 AM.


Powered by vBulletin® Version 3.7.3
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO 3.0.0