From: Ken H. <ke...@ro...> - 2006-01-30 20:12:55
|
I have been attempting to get this going on a windows 2000 server running IIS/PHP (tried both PHP 4 and 5) and the latest nusoap download. I keep getting a wsdl error on the page however and possibly it is something easy that I am NOT doing. the server file is this: <?php /************************************************************** * Description: * Creates a simple SOAP Server (server.php). **************************************************************/ // includes nusoap classes require_once('nusoap/lib/nusoap.php'); require_once('SOAP_AffiliateHelper.php'); $GLOBALS['AFFILIATE_DEBUG'] = false; // create server $l_oServer = new soap_server(); // wsdl generation $l_oServer->debug_flag=false; $l_oServer->configureWSDL('BjamAff', 'urn: BjamAff'); $l_oServer->wsdl->schemaTargetNamespace = 'http://aff.bjammin.net/ soap/BjamAff'; $l_oServer]->register('testBjamAff', array('test_me' => 'xsd:string'), array('return'=>'xsd:boolean'), $l_oServer->wsdl- >schemaTargetNamespace); $HTTP_RAW_POST_DATA = isset($HTTP_RAW_POST_DATA) ? $HTTP_RAW_POST_DATA : ''; $l_oServer->service($HTTP_RAW_POST_DATA); ?> and this runs fine on a linux server however on IIS i get this response on the browser when calling; http://aff.bjammin.net/soap/SOAP_SERVER.php?wsdl This page contains the following errors: error on line 4 at column 6: XML declaration allowed only at the start of the document Below is a rendering of the page up to the first error. and a view of the source gives me; <?xml version="1.0" encoding="ISO-8859-1"?> <definitions 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/" xmlns:tns="urn:BjamAff" xmlns:soap="http://schemas.xmlsoap.org/wsdl/ soap/" xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/" xmlns="http:// schemas.xmlsoap.org/wsdl/" targetNamespace="urn:BjamAff"> <types><xsd:schema targetNamespace="urn:BjamAff" > <xsd:import namespace="http://schemas.xmlsoap.org/soap/encoding/" /> <xsd:import namespace="http://schemas.xmlsoap.org/wsdl/" /> </xsd:schema> </types> <message name="testBjamAffdRequest"><part name="affiliate_id" type="xsd:string" /></message> <message name="testBjamAffdResponse"><part name="return" type="xsd:boolean" /></message> <portType name="BjamAffPortType"><operation name="testBjamAffd"><input message="tns:testBjamAffdRequest"/><output message="tns:testBjamAffdResponse"/></operation></portType> <binding name="BjamAffBinding" type="tns:BjamAffPortType"><soap:binding style="rpc" transport="http://schemas.xmlsoap.org/soap/http"/><operation name="testBjamAffd"><soap:operation soapAction="http:// aff.bjammin.net/soap/server.php/testBjamAffd" style="rpc"/ ><input><soap:body use="encoded" namespace="http://aff.bjammin.net/ BjamAff" encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"/></ input><output><soap:body use="encoded" namespace="http:// aff.bjammin.net/BjamAff" encodingStyle="http://schemas.xmlsoap.org/ soap/encoding/"/></output></operation></binding> <service name="BjamAff"><port name="BjamAffPort" binding="tns:BjamAffBinding"><soap:address location="http:// aff.bjammin.net/soap/server.php"/></port></service> </definitions> the particulars of the actual web address have been changed because it is a closed system however, has anyone ran into a similar problem running on a windows terminal system? As i said i can take this code and dump it onto a linux server and POOF no problem so I am hoping it is a configuration of sorts that i know nothing about. btw I am from the land of unix/linux and apache, not IIS. php does run and i can get an info page, etc. so this has to be something the the XML interpreting (??) thanks in advance, ken; |