Web services sample code fails
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-19-2013
07:16 PM
02-19-2013
07:16 PM
Web services sample code fails
Hi, I'm about to create a web service and started with the official sample code: http://support.smartbear.com/viewarticle/25688/
It fails at the fourth line:
CodeCollaborator client = (CodeCollaborator) factory.create();
It throws a NullPointerException:
Has anyone managed to compile the sample code?
Are there other examples which could be guideline for the first steps?
Thanks!
It fails at the fourth line:
CodeCollaborator client = (CodeCollaborator) factory.create();
It throws a NullPointerException:
java.lang.NullPointerException
at java.lang.Class.isAssignableFrom(Native Method)
at org.apache.cxf.jaxws.support.JaxWsServiceConfiguration.isWebMethod(JaxWsServiceConfiguration.java:166)
Has anyone managed to compile the sample code?
Are there other examples which could be guideline for the first steps?
Thanks!
1 REPLY 1
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-19-2013
10:18 PM
02-19-2013
10:18 PM
Solved!
First I generated the classes with wsdl2java, but there were errors, so I tried to add the web service with Eclipse. It aslo generated the classes, and with that there were no errors in the sample with the exceptions thrown.
Now I re-generated the classes with wsdl2java and they differ from the ones which were created by Eclipe. Then I fixed the exception type problems, and now it runs!
First I generated the classes with wsdl2java, but there were errors, so I tried to add the web service with Eclipse. It aslo generated the classes, and with that there were no errors in the sample with the exceptions thrown.
Now I re-generated the classes with wsdl2java and they differ from the ones which were created by Eclipe. Then I fixed the exception type problems, and now it runs!
