Ouuh sorry I missed that single .class file... but anyway, if all of the xsb stuff is on the runtime class path (i. e. the directories containing it all) this is OK. I preferred to pack this all together as a JAR and add it to the JAR zoo of the application.
But that problem solved, now the constructors. The generated XyzStub class is the "user-friendly" frontend of all generated stuff. For "standard" scenarios this will do, and it has some additional constructors allowing you to add additional configuration besides the endpoint. I think this is merely a guess what may be needed in usual scenarios -- but in the simplest cases, you should be done simply using the constructor taking the endpoint only. In my case I needed additional configuration, and that forced me to use a "neighbour" class of XyzStub -- Xyz. This class provides some additional functionality to set up Options. I needed this to prevent the generated code to use chunked transfer, which usually is allowed to use, but was not in ma case. Not that helpful maybe, but the existing constructors should work if provided with useful non-null arguments. (but whats useful at the end...) hth, --cg > -----Original Message----- > From: [email protected] [mailto:[email protected]] > Sent: Friday, October 09, 2009 7:31 AM > To: [email protected]; [email protected] > Subject: RE: Cannot load SchemaTypeSystem > > Awesome Michael, > > That did the job, in my case I had to copy it to the build directory as it > is a web app but it worked perfectly. Now though I encountered a lovely > surprise, a NullPointerException thrown by one of the generated stubs, > specifically this line: > > _messageContext.getTransportOut().getSender().cleanup(_messageContext); > > I will add some log statements in here but I am guessing it is > _messageContext. I now the stub had various constructors and for some of > these if you only provide the end point it sets the other, which I believe > is this _messageContext to null, not sure why those constructors exist > then > if you should not really be using them, or am I missing something? > > -- > Kind Regards > Schalk Neethling > > -----Original Message----- > From: FRYARS, Michael [mailto:[email protected]] > Sent: 08 October 2009 10:06 PM > To: [email protected] > Subject: Re: Cannot load SchemaTypeSystem > > In among all those .xsb files you'll find a single .class file, and this > .class must be available at runtime. [Note: XMLBeans generates the > .class directly, it doesn't generate a .java and then have it compiled] > > I saw the problem you describe when running JUnit tests which used an > axis2-generated SOAP client. The AAR deployed in the axis2 WAR was fine. > But the (eclipse) project that held the tests didn't have this XMLBeans > .class file in the 'bin' directory. It was present in the 'resource' > directory, which was the target directory for XMLBeans generated source, > but it wasn't copied to the bin directory and so wasn't available to the > test client at runtime. Simply copying it across to the bin directory > solved the problem. > > Regards, > > > Michael > > > [email protected] a écrit : > > Hi there Christian, > > > > I did find the resource folder with stacks of .xsb files on. I added > this > to > > the sources in the build path in Eclipse as well as to the Output... > tab. > > However, I still get the problem, any ideas as to where else I need to > set > > something? Maybe something to do with Tomcat? Thanks for your help. > > > > -- > > Kind Regards > > Schalk Neethling > > > > -----Original Message----- > > From: Christian Gosch [mailto:[email protected]] > > Sent: 08 October 2009 02:13 PM > > To: axis-user > > Subject: RE: Cannot load SchemaTypeSystem > > > > XMLbeans does not only generate classes, but lots of additional > > binaries, which must be presesnt on the classpath. > > > > Look through your output folder, and you will find an additional folder > > with this stuff. > > > > Add it to your runtime classpath, and you may be done :-) > > > > --cg > > > > > >> -----Original Message----- > >> From: [email protected] [mailto:[email protected]] > >> Sent: Thursday, October 08, 2009 12:29 PM > >> To: [email protected] > >> Subject: Cannot load SchemaTypeSystem > >> > >> Hi there, > >> > >> I finally got Axis2 to generate the appropriate stubs etc for me, > >> > > finally > > > >> having to use the command line tool, and I chose XMLBeans as my data > >> binding > >> solution as I have worked with it before and found it real easy to > >> > > use. > > > >> After having to hunt around for some jar files I can finally run a > >> > > servlet > > > >> to test out the generated code. > >> > >> I start of the servlet with the following: > >> GetPointsByRadiusDocumentImpl pointsByRadius = new > >> GetPointsByRadiusDocumentImpl(GetPointsByRadiusDocument.type); > >> > >> However, when running the servlet I get the exception mentioned above > >> > > i.e. > > > >> java.lang.RuntimeException: Cannot load SchemaTypeSystem. Unable to > >> > > load > > > >> class with name > >> > >> > > schemaorg_apache_xmlbeans.system.sEFB7B44E94FC7E3BBFB970E23CA0512F.TypeS > > ys > > > >> te > >> mHolder. Make sure the generated binary files are on the classpath. > >> > >> Any help will be much appreciated. > >> > >> Thanks! > >> Schalk > >> > >> AfriGIS e-mail facility may not be used for the distribution of chain > >> letters or offensive email. AfriGIS hereby distances itself from and > >> accepts no liability for the unauthorized use of its e-mail facility > >> > > or > > > >> the sending of e-mail communications for other than strictly business > >> purposes. AfriGIS furthermore disclaims liability for any unauthorized > >> instruction for which permission was not granted. Required as per Sec > >> > > 50 > > > >> Companies Act 61 of 1973 Afrigis Pty LTD Reg No 1997/0067/1607. > >> > >> > >> > >> > >> > >> > > > > > > AfriGIS e-mail facility may not be used for the distribution of chain > > letters or offensive email. AfriGIS hereby distances itself from and > accepts > > no liability for the unauthorized use of its e-mail facility or the > sending > > of e-mail communications for other than strictly business purposes. > AfriGIS > > furthermore disclaims liability for any unauthorized instruction for > which > > permission was not granted. Required as per Sec 50 Companies Act 61 of > 1973 > > Afrigis Pty LTD Reg No 1997/0067/1607. > > > > AfriGIS e-mail facility may not be used for the distribution of chain > letters or offensive email. AfriGIS hereby distances itself from and > accepts > no liability for the unauthorized use of its e-mail facility or the > sending > of e-mail communications for other than strictly business purposes. > AfriGIS > furthermore disclaims liability for any unauthorized instruction for which > permission was not granted. Required as per Sec 50 Companies Act 61 of > 1973 > Afrigis Pty LTD Reg No 1997/0067/1607. > > > > > AfriGIS e-mail facility may not be used for the distribution of chain > letters or offensive email. AfriGIS hereby distances itself from and > accepts > no liability for the unauthorized use of its e-mail facility or the > sending > of e-mail communications for other than strictly business purposes. > AfriGIS > furthermore disclaims liability for any unauthorized instruction for which > permission was not granted. Required as per Sec 50 Companies Act 61 of > 1973 > Afrigis Pty LTD Reg No 1997/0067/1607. > > AfriGIS e-mail facility may not be used for the distribution of chain > letters or offensive email. AfriGIS hereby distances itself from and > accepts no liability for the unauthorized use of its e-mail facility or > the sending of e-mail communications for other than strictly business > purposes. AfriGIS furthermore disclaims liability for any unauthorized > instruction for which permission was not granted. Required as per Sec 50 > Companies Act 61 of 1973 Afrigis Pty LTD Reg No 1997/0067/1607. > > > !DSPAM:4acecac3326661207593268! > >
