I figured out!!! The problem wasn't cakephp, it was a component for generating XML called minixml, the cause of the error was that the classes withing minixml contained break lines like this:
<?php ... ?> "breakline" "breakline" "breakline" therefore putting the extra breaklines in the soap response. On Sep 21, 3:09 pm, deivid <[EMAIL PROTECTED]> wrote: > Right now I'm implementing a soap server using php4 and nusoap (I know > there is a soap class in php5), and I have "hacked" the file > nusoap.php > > The problem is that for some reason the response comes with some > linebreaks, and that is giving me this error (because the soap client > expects "<?xml" instead of "\n\n..."): > ------------------------------------- > XML error parsing SOAP payload on line 3: xml processing instruction > not at start of external entity > ------------------------------------- > > This is a response from a non-cake server: > -------------------------------------- > HTTP/1.1 200 OK > ... > Content-Type: text/xml; charset=ISO-8859-1 > > <?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/"><SOAP-ENV:Body><ns1:helloResponse > xmlns:ns1="http://tempuri.org"><return xsi:type="xsd:string">Hello, > David</return></ns1:helloResponse></SOAP-ENV:Body></SOAP-ENV:Envelope> > -------------------------------------- > > And this if from my cake server: > -------------------------------------- > HTTP/1.1 200 OK > ... > Content-Length: 523 > Connection: close > Content-Type: text/xml; charset=ISO-8859-1 > > <?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/"><SOAP-ENV:Body><ns1:helloResponse > xmlns:ns1="http://tempuri.org"><return xsi:type="xsd:string">Hello don > David</return></ns1:helloResponse></SOAP-ENV:Body></SOAP-ENV:Envelope> > -------------------------------------- > > Notice that after the line "Content-Type: text/xml; > charset=ISO-8859-1" there are 3 line jumps instead of just one > > The code that is the same in the two servers, for that particular > printing is: > -------------------------------------- > reset($this->outgoing_headers); > foreach($this->outgoing_headers as $hdr){ > header($hdr, false); > } > > print $payload; > -------------------------------------- > > Any ideas? --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Cake PHP" group. To post to this group, send email to [email protected] To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/cake-php?hl=en -~----------~----~----~----~------~----~------~--~---
