From: Pablo F. <pa...@pa...> - 2003-12-21 07:10:21
|
Uhm, Scott I tested the .php with the corrections (Also creatign a new one) and in the .cs I get: // WARNING: Could not generate operation Administrator. Referenced type 'urn:Administrator:ArrayOfstring' not found :( What could be happening? Thanks!, pablo El s=E1b, 20-12-2003 a las 23:51, Scott Nichol escribi=F3: > Here is my advice: do not use 'http://soapinterop.org/' as your service n= amespace and 'http://soapinterop.org/xsd/' as your schema namespace. First= , these are already "well-known" and you are actually extending an existing= definition. Second, it is easier to get valid WSDL if these two namespace= s are the same. >=20 > Also, you should qualify "standard" types that come from the XSD spec. >=20 > Here is my suggestion for modified code. I have verified that .NET wsdl.= exe will read this. >=20 > <?php > require_once('nusoap.php'); >=20 > /* fix SCRIPTNAME -> SCRIPT_NAME here */ > $soap_site =3D 'http://'.$_SERVER["SERVER_NAME"].$_SERVER["SCRIPT_NAME"]; >=20 > $soap =3D new soap_server(); > /* more changes start here */ > $soap->configureWSDL('Administrator','urn:Administrator'); > $soap->wsdl->addComplexType('ArrayOfstring', > 'complexType', > 'array', > '', > 'SOAP-ENC:Array', > array(), > array(array('ref'=3D>'SOAP-ENC:arrayType','wsdl:arrayType= '=3D>'xsd:string[]')), > 'xsd:string'); >=20 > $soap->register('Administrator', > array('user' =3D> 'tns:ArrayOfstring'), > array('return' =3D> 'tns:ArrayOfstring'), > 'urn:Administrator', > 'urn:Administrator/Administrator'); > /* changes end here */ > function Administrator($user) { > =20 > $blocks =3D array(); >=20 > $blocks[0]["name"] =3D "Links"; > $blocks[1]["name"] =3D "Surveys"; >=20 > return $blocks; > } >=20 > /* this is required for many PHP configurations */ > $HTTP_RAW_POST_DATA =3D isset($HTTP_RAW_POST_DATA) ? $HTTP_RAW_POST_DATA = : ''; > $soap->service($HTTP_RAW_POST_DATA); >=20 > ?> >=20 > Scott Nichol >=20 > Do not send e-mail directly to this e-mail address, > because it is filtered to accept only mail from > specific mail lists. > ----- Original Message -----=20 > From: "Pablo Fischer" <pa...@pa...> > To: "Scott Nichol" <sni...@sc...> > Cc: <nus...@li...> > Sent: Saturday, December 20, 2003 11:54 PM > Subject: Re: [Nusoap-general] String Arrays in WSDL >=20 >=20 > Hi and thanks for the answer! >=20 > Yeah, the code is here: > http://www.pablo.com.mx/files/admon.phps >=20 > And yes, I'm using the lastest version. >=20 > Thanks! >=20 > El s=E1b, 20-12-2003 a las 21:59, Scott Nichol escribi=F3: > > .NET and NuSOAP interop fine in the way you are attempting. If you can= post full code for your service, perhaps someone can find the specific lin= e(s) of code causing the problem. > >=20 > > Also, what version of nusoap.php are you using? > >=20 > > Scott Nichol > >=20 > > Do not send e-mail directly to this e-mail address, > > because it is filtered to accept only mail from > > specific mail lists. > > ----- Original Message -----=20 > > From: "Pablo Fischer" <pa...@pa...> > > To: <nus...@li...> > > Sent: Saturday, December 20, 2003 5:52 AM > > Subject: [Nusoap-general] String Arrays in WSDL > >=20 > >=20 > > > Hi! > > >=20 > > > I'm new in nusoap and I'm testing some things to decide what classes = I'm > > > going to use for SOAP, so.. the first ones :) > > >=20 > > > I'm developing in Mono (C#) and creating the webservices in php, I ca= n > > > create simple swebservices.. but.. what happens with arrays?, I'm > > > planning to use lot of arrays in my webservice, so looking In google = I > > > Found this one: > > >=20 > > > $server->wsdl->addComplexType( > > > 'ArrayOfstring', > > > 'complexType', > > > 'array', > > > '', > > > 'SOAP-ENC:Array', > > > array(), =20 > > > array(array('ref'=3D>'SOAP-ENC:arrayType','wsdl:arrayType'=3D>'string= []')), > > > 'xsd:string'); > > >=20 > > > All is ok, I declare it in the 'method' that I register, but.. when I > > > run > > >=20 > > > wsdl http://site/file.php, the same.. all is ok.. but looking the .cs > > > code I found, this: > > >=20 > > > WARNING: Could not generate operation echoStringArray. Referenced typ= e > > > 'http://soapinterop.org/:ArrayOfstring' not found > > >=20 > > > And I'm creating it.. how I registered the method?, like this: > > > $server->register('echoStringArray', > > > array('inputStringArray'=3D>'tns:ArrayOfstring'), > > > array('return'=3D>'tns:ArrayOfstring'), > > > 'http://soapinterop.org/'); > > > and the function is just a simple > > > function echoStringArray($inputStringArray){ > > > return $inputStringArray; > > > } > > >=20 > > > Thanks! and merry christmas! > > > Pablo > > > --=20 > > > Pablo Fischer Sandoval (pablo [arroba/at] pablo.com.mx) > > > http://www.pablo.com.mx > > > http://www.debianmexico.org > > > GPG FingerTip: 3D49 4CB8 8951 F2CA 8131 AF7C D1B9 1FB9 6B11 810C > > > Firma URL: http://www.pablo.com.mx/firmagpg.txt > > >=20 > > >=20 > > >=20 > > > ------------------------------------------------------- > > > This SF.net email is sponsored by: IBM Linux Tutorials. > > > Become an expert in LINUX or just sharpen your skills. Sign up for I= BM's > > > Free Linux Tutorials. Learn everything from the bash shell to sys ad= min. > > > Click now! http://ads.osdn.com/?ad_id=3D1278&alloc_id=3D3371&op=3Dcli= ck > > > _______________________________________________ > > > Nusoap-general mailing list > > > Nus...@li... > > > https://lists.sourceforge.net/lists/listinfo/nusoap-general > > >=20 > >=20 > >=20 > > ------------------------------------------------------- > > This SF.net email is sponsored by: IBM Linux Tutorials. > > Become an expert in LINUX or just sharpen your skills. Sign up for IBM= 's > > Free Linux Tutorials. Learn everything from the bash shell to sys admi= n. > > Click now! http://ads.osdn.com/?ad_id=1278&alloc_id371&op=CCk > > _______________________________________________ > > Nusoap-general mailing list > > Nus...@li... > > https://lists.sourceforge.net/lists/listinfo/nusoap-general --=20 Pablo Fischer Sandoval (pablo [arroba/at] pablo.com.mx) http://www.pablo.com.mx http://www.debianmexico.org GPG FingerTip: 3D49 4CB8 8951 F2CA 8131 AF7C D1B9 1FB9 6B11 810C Firma URL: http://www.pablo.com.mx/firmagpg.txt |