From: Sylvain M. <sma...@gm...> - 2005-10-29 17:34:56
|
i write 2 files. 1 - the last version who works (with complextype definition into wsdl) http://tracker.sylvek.homelinux.net/BETA/timetracker.php 2 - the version with array of object support (doesn't work) http://tracker.sylvek.homelinux.net/BETA/timetracker-notwork.php WSDL2JAVA works with version 1 but not with version 2 (errors in previous m= ail). my client test in php works with version 1 but return nothing with version = 2 :'( Thanks Scott for your help! 2005/10/29, Sylvain Maucourt <sma...@gm...>: > i'll try to capture the network information. > right. > > 1st step. > i create only complextype. launch WSDL2JAVA who create to me the > objects class. Great .. but it was not an array of objects only > object. > but i want to recieve array of objects... i looks for internet and i > found this page: > http://sourceforge.net/mailarchive/forum.php?thread_id=3D8665676&forum_id= =3D12929 > > 2nd step. > i create new complextypes. > ex: > > -------------------- > $server->wsdl->addComplexType( > 'Customer', > 'complexType', > 'array', > 'all', > '', > array( > 'id' =3D> array('name'=3D>'id', 'type'=3D>'xsd:string'), > 'name_customer' =3D> array('name'=3D>'name_customer', 'type'= =3D>'xsd:string'), > 'url' =3D> array('name'=3D>'url', 'type'=3D>'xsd:string'), > 'codeimg' =3D> array('name'=3D>'codeimg', 'type'=3D>'xsd:strin= g'), > 'doc' =3D> array('name'=3D>'doc', 'type'=3D>'xsd:string') > ) > ); > > $server->wsdl->addComplexType( > 'Customers', > 'complexType', > 'array', > '', > 'SOAP-ENC:Array', > array(), > array( > array('ref' =3D> 'SOAP-ENC:arrayType', > 'wsdl:arrayType' =3D> 'tns:Customer[]') > ), > 'tns:Customers' > ); > > function listCustomers($randomid) { > if(checkAuth($randomid)) { > $resultat =3D array(); > global $db; > $sql =3D "select name_customer,id,url,codeimg,doc from Cu= stomers_list > where status=3D1"; > $db->query($sql); > while ($row=3D$db->fetch_assoc()) { > array_push($resultat,$row); > } > return $resultat; > } else { > return new soapval('return', 'xsd:string', "false"); > } > } > $server->register('listCustomers', > array('randomid' =3D> 'xsd:string'), > array('return' =3D> 'tns:Customers'), > 'urn:TimeTracker', > 'urn:TimeTracker#listCustomers', > 'rpc', > 'encoded', > 'Liste des clients' > ); > -------------------- > and i cross my fingers and launch WSDL2JAVA.. but i recieve this error: > -------------------- > java.io.IOException: Type > {http://tracker.sylvek.homelinux.net/soap/TimeTracker}Projects is > referenced but not defined. > at org.apache.axis.wsdl.symbolTable.SymbolTable.checkForUndefined= (SymbolTable.java:663) > at org.apache.axis.wsdl.symbolTable.SymbolTable.add(SymbolTable.j= ava:543) > at org.apache.axis.wsdl.symbolTable.SymbolTable.populate(SymbolTa= ble.java:516) > at org.apache.axis.wsdl.symbolTable.SymbolTable.populate(SymbolTa= ble.java:493) > at org.apache.axis.wsdl.gen.Parser$WSDLRunnable.run(Parser.java:3= 60) > at java.lang.Thread.run(Unknown Source) > -------------------- > "http://tracker.sylvek.homelinux.net/soap/TimeTracker"?? but it's doesn't= exist. > i watch my WDSL file > (http://tracker.sylvek.homelinux.net/BETA/timetracker.php?wsdl) .. and > i see: > -------------------- > - > <definitions targetNamespace=3D"http://tracker.sylvek.homelinux.n= et/soap/TimeTracker"> > - > <types> > - > <xsd:schema targetNamespace=3D"http://tracker.sylvek.homelinux.ne= t/soap/TimeTracker"> > <xsd:import namespace=3D"http://schemas.xmlsoap.org/soap/encoding/"/> > -------------------- > that's normal?! > > 2005/10/29, Scott Nichol <sni...@sc...>: > > >>>>> > > i update my wsdl (http://tracker.sylvek.homelinux.net/BETA/timetracker.= php?wsdl) > > i write a axis (java) client which works perfectly with simple data > > (auth method) but i'm lost now with complexe data (listCustomers > > method).. WSDL2JAVA don't works :-| > > <<<<< > > > > Please be more specific. What error message do you get from wsdl2java?= The .NET wsdl tool (10/29/2005 12:47 EDT) gives these errors: > > > > Error: Unable to import binding 'TimeTrackerBinding' from namespace 'ur= n:TimeTracker'. > > - Unable to import operation 'listProjects'. > > - The datatype 'Projects' is missing. > > > > >>>> > > and when i try something about complex type i recieve error: > > "org.xml.sax.SAXException: Bad envelope tag: br" > > <<<< > > > > It would be very useful to capture the network information using, for e= xample, tcpdump on Linux or Network Monitor on Windows. > > > > Scott Nichol > > > > > > > > ------------------------------------------------------- > > This SF.Net email is sponsored by the JBoss Inc. > > Get Certified Today * Register for a JBoss Training Course > > Free Certification Exam for All Training Attendees Through End of 2005 > > Visit http://www.jboss.com/services/certification for more information > > _______________________________________________ > > Nusoap-general mailing list > > Nus...@li... > > https://lists.sourceforge.net/lists/listinfo/nusoap-general > > > > > -- > Sylvain Maucourt > sma...@gm... > -- Sylvain Maucourt sma...@gm... |