if you generate the code with wsdl2java tool you can use the build.xml file generated to generate service easily.
thanks, Amila. On Wed, Jun 25, 2008 at 12:00 AM, Andrew Clegg <[EMAIL PROTECTED]> wrote: > I've figured it out. For posterity: > > I was following the deployment instructions in Kent Ka Iok Tong's book > Developing Web Services With Apache Axis2, which doesn't cover aar > files, and instead just tells you to deploy your services by copying > the build directory into the repository. > > While this seems to work happily enough for simple ADB services, it > doesn't seem to work for XMLBeans -- the schemaorg_apache_xmlbeans > tree is tucked away inside the resources directory so Axis2 can't find > it. When I followed the deployment instructions in the Advanced User > Guide it all came together. > > Hopefully this followup will help someone else avoid the same mistake... > > Andrew. > > 2008/6/24 Andrew Clegg <[EMAIL PROTECTED]>: > > Afternoon all, > > > > I'm trying to get some XMLBeans-based service stubs in place and I'm > > hitting an odd problem which I can't find any reference to via Google. > > > > The services deploy to the server fine, with no error messages, and I > > can see them in http://localhost:8080/axis2/services/ and view the > > WSDLs. Everything looks okay. > > > > The built-in Version service works okay, but whenever I try to run one > > of mine (e.g. via SoapUI), I get a response like this: > > > > > > <soapenv:Envelope xmlns:soapenv=" > http://schemas.xmlsoap.org/soap/envelope/"> > > <soapenv:Body> > > <soapenv:Fault> > > <faultcode>soapenv:Server</faultcode> > > <faultstring>Could not initialize class > > info.cathdb.ws.types.TestEchoDocument</faultstring> > > <detail/> > > </soapenv:Fault> > > </soapenv:Body> > > </soapenv:Envelope> > > > > > > (This is for a service called Test with a TestEcho operation, the > > classic 'hello world' for request/response services.) > > > > I have checked in my repository and TestEchoDocument.class is exactly > > where it should be, in info.cathdb.ws.types, having compiled with no > > errors. > > > > The Java code in TestSkeleton.java looks like this: > > > > > > public info.cathdb.ws.types.TestEchoResponseDocument TestEcho( > > info.cathdb.ws.types.TestEchoDocument testEcho0) { > > TestEchoResponseDocument rDoc = > > TestEchoResponseDocument.Factory.newInstance(); > > TestEchoResponse r = rDoc.addNewTestEchoResponse(); > > r.setOutputText( testEcho0.getTestEcho().getInputText() ); > > return rDoc; > > } > > > > > > Please let me know if I'm doing something completely wrong! I can post > > the WSDL and XSD (or the relevant parts) if that would help. > > > > Also, on a related note, if I change the TestEcho method to throw back > > an exception instead, the text of the exception isn't reflected in the > > soap message returned. It just says: > > > > > > <soapenv:Envelope xmlns:soapenv=" > http://schemas.xmlsoap.org/soap/envelope/"> > > <soapenv:Body> > > <soapenv:Fault> > > <faultcode>soapenv:Server</faultcode> > > <faultstring>unknown</faultstring> > > <detail/> > > </soapenv:Fault> > > </soapenv:Body> > > </soapenv:Envelope> > > > > > > Is there a way to have Axis2 pass the exception text back to the > > client? This would be quite helpful for debugging. > > > > Thanks in advance for any suggestions, and sorry if any of these > > questions have obvious answers, I'm a complete Axis newbie. > > > > Cheers, > > > > Andrew. > > > > --------------------------------------------------------------------- > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > > -- Amila Suriarachchi, WSO2 Inc.
