• Post Reply Bookmark Topic Watch Topic
  • New Topic

Axis2 Code Generator

 
Louis Johnson
Greenhorn
Posts: 2
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi all

I have used the WSDL2Java tool that is bundled with the Axis2 to try and generate client stub class and call back handler class for a web service that I need to invoke.

I did this by running the following command:



This produces the two java source files I was expecting, one ServiceStub.java and one CallbackHandler.java

When I import the two java source files into NetBeans I have lots of compile errors in ServiceStub relating to classes not being defined as abstract and not overriding abstract methods.

Can anyone advise if I have done something wrong when using the Axis2 code generator to result in these errors? I can fix the errors by implementing all abstract methods, or by making the referenced classes abstract but I am not sure if this is correct.

Many thanks

 
prasenjitkumar das
Greenhorn
Posts: 14
  • Likes 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
HI Louis,

Based on the below command , it seems the approach is correct one . It should have generated build.xml file, which contains the instructions for Ant to compile the generated classes . For some IDEs e.g Eclipse has wizards to create a JAVA project from Existing Ant build file . I usually create/import projects like this while resolves all the dependencies , libraries , jars etc . I believe you need not implement any abstract methods . I have no experience with NetBeans but found something from this forum https://forums.netbeans.org/post-39274.html . Hope this helps .

For future reference you can also use -u option which will unpack all the inner classes in Stub . It helps if you have many XML types . You can also follow https://axis.apache.org/axis2/java/core/docs/userguide-creatingclients.html#choosingclient .


Thanks ,
Prasenjit
 
Louis Johnson
Greenhorn
Posts: 2
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi Prasenjit,

I didn't have the same problem when generating the code via ant task. I'm not sure why, but it solved the problem so I have just stuck with that solution!

Thanks for your help

Regards,

Louis
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!