Hi! I'm using axis2 and my application calls 2 difference web services.
I've used wsdl2java to generate the classes to interact with the 2 web services. I'll call the wsdl file that describes the first web service service1.wsdl and the one that describes the second service2.wsdl. If I first run wsdl2java on service1.wsdl and then on service2.wsdl I get the following exception when trying to create a request message for service1: Caused by: java.lang.NullPointerException at org.apache.xmlbeans.impl.schema.SchemaTypeImpl.getTypeSystem(SchemaTypeImpl.java:612) at org.apache.xmlbeans.impl.schema.SchemaTypeImpl.getJavaImplClass(SchemaTypeImpl.java:1695) at org.apache.xmlbeans.impl.schema.SchemaTypeImpl.getJavaImplConstructor(SchemaTypeImpl.java:1711) at org.apache.xmlbeans.impl.schema.SchemaTypeImpl.createUnattachedNode(SchemaTypeImpl.java:1839) at org.apache.xmlbeans.impl.schema.SchemaTypeImpl.createTypeStoreUser(SchemaTypeImpl.java:1791) at org.apache.xmlbeans.impl.newstore2.Xobj.setStableType(Xobj.java:1236) at org.apache.xmlbeans.impl.newstore2.Cur.setType(Cur.java:2436) at org.apache.xmlbeans.impl.newstore2.Cur.setType(Cur.java:2421) at org.apache.xmlbeans.impl.newstore2.Locale.newInstance(Locale.java:575) at org.apache.xmlbeans.impl.newstore2.Locale.newInstance(Locale.java:559) at org.apache.xmlbeans.impl.schema.SchemaTypeLoaderBase.newInstance(SchemaTypeLoaderBase.java:190) at net.ivoa.skyPortal.SubmitDistributedQueryDocument$Factory.newInstance(SubmitDistributedQueryDocument.java:130) at net.ivoa.skyPortal.SkyPortalProxy.submitADQLQuery(SkyPortalProxy.java:66) ... 3 more If I first run wsdl2java on service2.wsdl and then on service1.wsdl, service1 works fine but I get the following exception when I try to create a message for service2: Exception in thread "main" java.lang.NullPointerException at org.apache.xmlbeans.impl.schema.SchemaTypeImpl.getTypeSystem(SchemaTypeImpl.java:612) at org.apache.xmlbeans.impl.schema.SchemaTypeImpl.getJavaImplClass(SchemaTypeImpl.java:1695) at org.apache.xmlbeans.impl.schema.SchemaTypeImpl.getJavaImplConstructor(SchemaTypeImpl.java:1711) at org.apache.xmlbeans.impl.schema.SchemaTypeImpl.createUnattachedNode(SchemaTypeImpl.java:1839) at org.apache.xmlbeans.impl.schema.SchemaTypeImpl.createTypeStoreUser(SchemaTypeImpl.java:1791) at org.apache.xmlbeans.impl.newstore2.Xobj.setStableType(Xobj.java:1236) at org.apache.xmlbeans.impl.newstore2.Cur.setType(Cur.java:2436) at org.apache.xmlbeans.impl.newstore2.Cur.setType(Cur.java:2421) at org.apache.xmlbeans.impl.newstore2.Locale.newInstance(Locale.java:575) at org.apache.xmlbeans.impl.newstore2.Locale.newInstance(Locale.java:559) at org.apache.xmlbeans.impl.schema.SchemaTypeLoaderBase.newInstance(SchemaTypeLoaderBase.java:190) at org.astrodas.ws.model.InsertMatchingAnnotationsDocument$Factory.newInstance(InsertMatchingAnnotationsDocument.java:110) at org.astrodas.ws.server.AstrodasServerSkeleton.main(AstrodasServerSkeleton.java:172) I think that the problem might occur because the schema directory is overwritten by wsdl2java in the second execution. Am I doing something wrong? Thanks! Diego