Forum Discussion

lkremer's avatar
Occasional Contributor
12 years ago

Web services sample code fails

Hi, I'm about to create a web service and started with the official sample code:

It fails at the fourth line:

CodeCollaborator client = (CodeCollaborator) factory.create();

It throws a NullPointerException:

at java.lang.Class.isAssignableFrom(Native Method)

Has anyone managed to compile the sample code?

Are there other examples which could be guideline for the first steps?


1 Reply

  • lkremer's avatar
    Occasional Contributor

    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!