Greg,

The code that you gave seems like it would work...only I'm not sure how I can 
reformat the result before it gets sent back to the soap client.  For instance, 
I have a function that simply builds a string containing XML and returns that.  
I wrap this function in a class.  The constructor for this class creates an 
instance of SOAP_Server (from the PEAR SOAP package).  This object is passed 
$this (the class I created to wrap my function) and the service method is 
called from the SOAP_Server class.  After I call the service method, the 
processing is taken care of and the SOAP package calls my function with the 
correct parameters and returns that to the client.  The only place that I would 
really have control over the value getting returned is inside my function.  I 
don't think the conversion of the chars is happening here.  Does PHP 
automatically convert special HTML chars?  If so, is there a way to stop it 
from doing this?  

In my other message, I wasn't really asking for people who have used something 
other than SOAP for returning XML but I was asking if anyone has used an 
implementation of SOAP for PHP other than the one in the PEAR library.  I know 
that there is nusoap and that php has some soap functions that can be compiled 
in, perhaps one of these implementations is better?


The only thing else I can think of is that the PEAR SOAP libraries are doing 
the conversion on the data before it sends it to the client.  Perhaps there is 
a way to tell it to stop this behavior.

Thanks.


-------------------------
Doug Jones
Co-Op Web Developer


-----Original Message-----
From: Greg Beaver [mailto:[EMAIL PROTECTED]
Sent: Wednesday, December 29, 2004 1:37 AM
To: Jones, Douglas 1
Subject: Re: help with PEAR and SOAP [offlist]


Douglas 1 Jones wrote:
> Hello,
> 
> I have the SOAP PEAR package set up correctly to the point where I can send a 
> request and get a response.  However, my web service is designed to return 
> XML back to the caller.  When I do this, all of the tags have their "<" and 
> ">" converted to &lt; and &gt;.  I have spent much time searching the web for 
> an answer to this, but have come up empty handed.  If anyone knows how to 
> solve this that would be great.  Also, if anyone has experience writing a web 
> service in PHP that returns XML I am open to suggestions of approaches other 
> than using the PEAR SOAP package.

Before digging too deeply, be sure you try doing a reverse 
html_specialchars() on the result and see if that doesn't fix your problem.

Something like:
<?php
$tr = get_html_translation_table(HTML_SPECIALCHARS);
$result = strtr($result, $tr);
?>

As for alternatives to SOAP, perhaps an offlist discussion would work 
better as it doesn't really have anything to do with PHP until you start 
implementing it :).  What kind of information does the web service provide?

Greg

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to