SitePoint Sponsor |
|
User Tag List
Results 1 to 2 of 2
-
Nov 3, 2009, 04:05 #1
- Join Date
- Nov 2007
- Posts
- 74
- Mentioned
- 0 Post(s)
- Tagged
- 0 Thread(s)
php + soap service (can't return xml)
Im working with a soap client, and just wanted to make a simple soap service for helping me develop the client (debug purpose, and speeding up development inhouse).
I don't need an wsdl, and I don't think I want to go through the process of making one since the xml to be returned is complex and big, and part of a big specification... and my wsdl skills are practically none existing.
I've tried nusoap, but I can swap to anything else as long as I can:
- get the request (I'll later need to parse it, and get some stuff from it)
- return an soap envelope containing an big xml fragment in the body.
- If i for some reason later need to elaborate on the service it would be nice to have something to start playing with...
It seems that nusoap IS PARSING the xml to be returned, and create a weird xml tag from it, and then takes the xml and add it as plain text to a return tag.
Result - the xml in the soapbody, is plain tekst and is escaped, so its practically no longer xml.
And I don't want to add sillycode to the client in order to "fix" it.
Code:<return xsi:type="xsd:string">
Code:require_once("../lib/nusoap.php"); $server = new soap_server(); $server->register('ArtifactResolve'); function ArtifactResolve( $data ) { $xml = 'in here is a complex xml document, but it get escaped'; return $xml; }
-
Nov 12, 2009, 03:22 #2
Using Zend_SOAP makes your life easy. Also there is no need to build wsdl of your own. A Quick start here
Bookmarks