History | Log In     View a printable version of the current page.  
Issue Details (XML | Word | Printable)

Key: XFIRE-69
Type: Bug Bug
Status: Resolved Resolved
Resolution: Fixed
Priority: Critical Critical
Assignee: Dan Diephouse
Reporter: Jason Carreira
Votes: 0
Watchers: 0
Operations

If you were logged in you would be able to see more operations.
XFire

Xfire JDK5 annotations don't work as shown in the example

Created: 02/May/05 03:43 PM   Updated: 02/May/05 10:37 PM
Component/s: Annotations
Affects Version/s: 1.0-M4
Fix Version/s: 1.0-M5

Time Tracking:
Not Specified

Environment: JDK% build 1.5.0_02-b09


 Description  « Hide
The examples as shown don't work:

@WebService(name = "EchoService", targetNamespace = "http://www.openuri.org/2004/04/HelloWorld")

this won't work because in the AnnotationServiceFactory, it does this:

if (webServiceAnnotation.getEndpointInterface() != null)
{
try
{
endpointInterface = loadClass(webServiceAnnotation.getEndpointInterface());
...

the problem is that, in the Annotation class, the default for endpointInterface is "", so if you leave it empty, it won't be null.

After supplying an endpointInterface (and hoping it could be the plain interface my Service bean implemented, without annotations), I got this:

java.lang.NullPointerException
at org.codehaus.xfire.annotations.AnnotationServiceFactory.createServiceNamespace(AnnotationServiceFactory.java:169)
at org.codehaus.xfire.annotations.AnnotationServiceFactory.create(AnnotationServiceFactory.java:103)
at org.codehaus.xfire.service.object.ObjectServiceFactory.create(ObjectServiceFactory.java:97)
at org.codehaus.xfire.annotations.AnnotationServiceFactory.create(AnnotationServiceFactory.java:63)

the problem is that it assumes it can get an annotation from the interface (which I wish could be the other way around). Ok, so I point the endpointInterface at my same implementation class, and try again. The problem now is that it can't create a service name for me if none is provided (it should probably use the "name") so I can't access the service, even though it's created.

So what I end up having to specify is this:

@WebService (
name = "OrgQueryService",
serviceName = "OrqQueryService",
targetNamespace = "http://www.eplus.org/Organization",
endpointInterface = "com.eplus.app.service.export.orgquery.OrgQueryServiceImpl"
)
public class OrgQueryServiceImpl implements OrgQueryService {

which is considerably more than in the example.



 All   Comments   Work Log   Change History      Sort Order: Ascending order - Click to sort in descending order
Dan Diephouse - 02/May/05 10:37 PM
This is fixed in CVS already. You can download and compile or wait until M5. FYI - CVS will probably be in flux for another week while we finish out the new service model, but it should still work.