load($xml_file)) die("Unable to find $xml_file "); if(!$xml_dom->schemaValidate($xsd_file)) //die('Schema does not match XML file!'); {$def="JJerror"; return $def; } if($xml_dom->schemaValidate($xsd_file)) { $path_xml = "activityWrite.xml"; $xml_obj = new DomDocument; if (!$xml_obj->load($path_xml)) { print " XML $path_xml not loaded into DOM Document
"; } $def = $xml_obj->saveXML(); // converts DOM Document into String (with tags) return $def; } else { $stringError = "error in code somewhere"; return $stringError; } } $soap = new SoapServer('info.wsdl'); $soap->addFunction('getInfo'); $soap->handle(); ?>