Please use the Apache issue tracking system for new NetBeans issues (https://issues.apache.org/jira/projects/NETBEANS0/issues) !!
Bug 109642 - Testing an imported Web Service throws IllegalAnnotationException
Testing an imported Web Service throws IllegalAnnotationException
Status: RESOLVED FIXED
Product: obsolete
Classification: Unclassified
Component: visualweb
6.x
PC Windows XP
: P1 (vote)
: 6.x
Assigned To: Quy Nguyen
issues@obsolete
FAST:POC:INTERNAL FAST:PROJECT:MSOA F...
:
: 109369 111087 (view as bug list)
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2007-07-13 13:44 UTC by dante
Modified: 2008-01-24 14:08 UTC (History)
0 users

See Also:
Issue Type: DEFECT
:


Attachments
Iported WSDL (4.19 KB, application/octet-stream)
2007-07-13 13:45 UTC, dante
Details
Abort Exception (7.56 KB, application/octet-stream)
2007-07-20 16:39 UTC, dante
Details
WSDL Causing Abort Exception (12.75 KB, text/xml)
2007-07-20 16:40 UTC, dante
Details
WSDL Causing Duplicate Services (9.87 KB, text/xml)
2007-07-20 16:40 UTC, dante
Details
Web Service Duplicate Definition (19.01 KB, application/octet-stream)
2007-07-20 16:41 UTC, dante
Details
Test Parameters Issue (11.71 KB, application/octet-stream)
2007-07-20 16:41 UTC, dante
Details
Test Parameters Issue 070723 (11.15 KB, application/octet-stream)
2007-07-23 15:15 UTC, dante
Details
ServiceManager WSDL To Import 070723 (8.64 KB, text/xml)
2007-07-23 15:16 UTC, dante
Details
AppsInstalledByUser.wsdl (3.44 KB, text/xml)
2007-07-24 11:47 UTC, dante
Details
Java Studio Creator Test WS Method (12.29 KB, application/octet-stream)
2007-07-24 11:48 UTC, dante
Details
Visual Web Test WS Method (10.51 KB, application/octet-stream)
2007-07-24 11:49 UTC, dante
Details

Note You need to log in before you can comment on or make changes to this bug.
Description dante 2007-07-13 13:44:27 UTC
Having imported the attached wsdl file attempting to Test the methods throws the exception below. This is a follow on
from case 109369.


com.sun.xml.internal.bind.v2.runtime.IllegalAnnotationsException: 2 counts of IllegalAnnotationExceptions
There's no ObjectFactory with an @XmlElementDecl for the element {urn:wsdl:sierra:msoa:servicesRequest}icon.
	this problem is related to the following location:
		at protected javax.xml.bind.JAXBElement websvc.ServiceDTO.icon
		at websvc.ServiceDTO
		at protected java.util.List websvc.GetAllServicesResponseComplexType.service
		at websvc.GetAllServicesResponseComplexType
There's no ObjectFactory with an @XmlElementDecl for the element {urn:wsdl:sierra:msoa:servicesRequest}status.
	this problem is related to the following location:
		at protected javax.xml.bind.JAXBElement websvc.ServiceDTO.status
		at websvc.ServiceDTO
		at protected java.util.List websvc.GetAllServicesResponseComplexType.service
		at websvc.GetAllServicesResponseComplexType

	at com.sun.xml.internal.bind.v2.runtime.IllegalAnnotationsException$Builder.check(IllegalAnnotationsException.java:66)
	at com.sun.xml.internal.bind.v2.runtime.JAXBContextImpl.getTypeInfoSet(JAXBContextImpl.java:361)
	at com.sun.xml.internal.bind.v2.runtime.JAXBContextImpl.<init>(JAXBContextImpl.java:217)
	at com.sun.xml.internal.bind.v2.ContextFactory.createContext(ContextFactory.java:76)
	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
	at java.lang.reflect.Method.invoke(Method.java:597)
	at com.sun.xml.internal.bind.api.JAXBRIContext.newInstance(JAXBRIContext.java:76)
	at com.sun.xml.internal.ws.model.RuntimeModel$1.run(RuntimeModel.java:196)
	at java.security.AccessController.doPrivileged(Native Method)
	at com.sun.xml.internal.ws.model.RuntimeModel.createJAXBContext(RuntimeModel.java:193)
	at com.sun.xml.internal.ws.model.RuntimeModel.postProcess(RuntimeModel.java:79)
	at com.sun.xml.internal.ws.modeler.RuntimeModeler.buildRuntimeModel(RuntimeModeler.java:255)
	at com.sun.xml.internal.ws.client.ServiceContextBuilder.processAnnotations(ServiceContextBuilder.java:119)
	at com.sun.xml.internal.ws.client.ServiceContextBuilder.completeServiceContext(ServiceContextBuilder.java:87)
	at com.sun.xml.internal.ws.client.WSServiceDelegate.processServiceContext(WSServiceDelegate.java:136)
	at com.sun.xml.internal.ws.client.WSServiceDelegate.createEndpointIFBaseProxy(WSServiceDelegate.java:288)
	at com.sun.xml.internal.ws.client.WSServiceDelegate.getPort(WSServiceDelegate.java:174)
	at javax.xml.ws.Service.getPort(Service.java:94)
	at websvc.GetAllServicesService.getGetAllServicesPort(GetAllServicesService.java:51)
	at websvc.GetAllServicesPortClient.<init>(GetAllServicesPortClient.java:17)
	at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
	at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:39)
	at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:27)
	at java.lang.reflect.Constructor.newInstance(Constructor.java:513)
	at java.lang.Class.newInstance0(Class.java:355)
	at java.lang.Class.newInstance(Class.java:308)
	at org.netbeans.modules.visualweb.websvcmgr.ui.ReflectionHelper.callMethodWithParams(ReflectionHelper.java:300)
	at org.netbeans.modules.visualweb.websvcmgr.ui.TestWebServiceMethodDlg$MethodTask.run(TestWebServiceMethodDlg.java:1011)
	at java.lang.Thread.run(Thread.java:619)
Caused: javax.xml.ws.WebServiceException
	at com.sun.xml.internal.ws.model.RuntimeModel.createJAXBContext(RuntimeModel.java:201)
	at com.sun.xml.internal.ws.model.RuntimeModel.postProcess(RuntimeModel.java:79)
	at com.sun.xml.internal.ws.modeler.RuntimeModeler.buildRuntimeModel(RuntimeModeler.java:255)
	at com.sun.xml.internal.ws.client.ServiceContextBuilder.processAnnotations(ServiceContextBuilder.java:119)
	at com.sun.xml.internal.ws.client.ServiceContextBuilder.completeServiceContext(ServiceContextBuilder.java:87)
	at com.sun.xml.internal.ws.client.WSServiceDelegate.processServiceContext(WSServiceDelegate.java:136)
	at com.sun.xml.internal.ws.client.WSServiceDelegate.createEndpointIFBaseProxy(WSServiceDelegate.java:288)
	at com.sun.xml.internal.ws.client.WSServiceDelegate.getPort(WSServiceDelegate.java:174)
	at javax.xml.ws.Service.getPort(Service.java:94)
	at websvc.GetAllServicesService.getGetAllServicesPort(GetAllServicesService.java:51)
	at websvc.GetAllServicesPortClient.<init>(GetAllServicesPortClient.java:17)
	at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
	at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:39)
	at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:27)
	at java.lang.reflect.Constructor.newInstance(Constructor.java:513)
	at java.lang.Class.newInstance0(Class.java:355)
	at java.lang.Class.newInstance(Class.java:308)
	at org.netbeans.modules.visualweb.websvcmgr.ui.ReflectionHelper.callMethodWithParams(ReflectionHelper.java:300)
	at org.netbeans.modules.visualweb.websvcmgr.ui.TestWebServiceMethodDlg$MethodTask.run(TestWebServiceMethodDlg.java:1011)
[catch] at java.lang.Thread.run(Thread.java:619)
Comment 1 dante 2007-07-13 13:45:53 UTC
Created attachment 45064 [details]
Iported WSDL
Comment 2 Quy Nguyen 2007-07-16 19:22:49 UTC
*** Issue 109369 has been marked as a duplicate of this issue. ***
Comment 3 Roman Mostyka 2007-07-17 15:09:08 UTC
What JDK version do You use? Is this issue reproducible with JDK 1.6.0_01?
Comment 4 dante 2007-07-17 15:46:25 UTC
I am running:

java version "1.6.0_01"
Java(TM) SE Runtime Environment (build 1.6.0_01-b06)
Java HotSpot(TM) Client VM (build 1.6.0_01-b06, mixed mode, sharing)
Comment 5 Quy Nguyen 2007-07-20 01:16:16 UTC
This looks like it may be a bug in the jaxb-generated ObjectFactory class.

https://jaxb.dev.java.net/issues/show_bug.cgi?id=367
Comment 6 Roman Mostyka 2007-07-20 11:37:50 UTC
Try to download latest nightly build (at least after 07/19/2007) and check if this issue still reproducible. There were
some fixes and now this issue also can be fixed.
Comment 7 dante 2007-07-20 16:37:38 UTC
Downloaded the OpenESB Build from 19th:

Product Version: NetBeans IDE Dev (Build 200707171200) 
Java: 1.6.0_01; Java HotSpot(TM) Client VM 1.6.0_01-b06 
System: Windows XP version 5.1 running on x86; Cp1252; en_GB (nb)

Although with this build the original Exception is not thrown the Test functionality is still not functional and a
number of other issues appear as described below.

1) When executing a test the inbound parameter is not correctly defined in the dialog box, see attachment
WSTestParameterIssue, instead of the complex element input it provides a simple string. The result is that a
NullPointerException is thrown.

2) When importing the attached ServiceManager-CausesDuplicateService.wsdl the operations are duplicated for each port
definition and the result can be seen in the attachement WebServiceDuplicateDefinition.png.

3) Modifying the WSDL to try and resolve 2 by defining multiple bindings, see attachment
ServiceManager-CausesAbortException.wsdl, causes an AbortException during import and this can be seen in attachment
AbortException.png.

Both the WSDL files mentioned above validate using the WSDL editor supplied with the Enterprise Pack and the second
version was originall built using that tool.

Comment 8 dante 2007-07-20 16:39:11 UTC
Created attachment 45449 [details]
Abort Exception
Comment 9 dante 2007-07-20 16:40:07 UTC
Created attachment 45452 [details]
WSDL Causing Abort Exception
Comment 10 dante 2007-07-20 16:40:38 UTC
Created attachment 45453 [details]
WSDL Causing Duplicate Services
Comment 11 dante 2007-07-20 16:41:13 UTC
Created attachment 45454 [details]
Web Service Duplicate Definition
Comment 12 dante 2007-07-20 16:41:42 UTC
Created attachment 45455 [details]
Test Parameters Issue
Comment 13 dante 2007-07-23 15:14:20 UTC
I have tested this with the following build :

Product Version: NetBeans IDE Dev (Build 200707221200) 
Java: 1.5.0_12; Java HotSpot(TM) Client VM 1.5.0_12-b04 System: 
Windows XP version 5.1 running on x86; Cp1252; en_GB (nb)

It now no longer throws the IllegalAnnotationException instead we have the issue that when the test dialog is display I
am unable to specify the inbound parameters; see Attachment TestParameterIssue-070723.png. I suspect that is is due to
them being defined as a complex type because the value is just has the name of the complex type class. Selecting this
just allows me to edit the name as a string rather than expanding the type to its component parts. The WSDL used is
attached as ServiceManager-070723.wsdl.

Although the Exception has been resolved I am still unable to test the Web Services.
Comment 14 dante 2007-07-23 15:15:35 UTC
Created attachment 45526 [details]
Test Parameters Issue 070723
Comment 15 dante 2007-07-23 15:16:15 UTC
Created attachment 45527 [details]
ServiceManager WSDL To Import 070723
Comment 16 Quy Nguyen 2007-07-24 08:33:34 UTC
I reverted the change that caused the empty object to be generated, which was not a String, but I'm not sure how you
were able to bind the properties of the parameter.  The dialog implementation does not handle these types of objects in
an intelligent manner (same as in Creator 2u1).  
Comment 17 dante 2007-07-24 10:59:42 UTC
This functionality did work in JSC. I have attached the following 3 files:

1) JavaStudioCreatorTestWSMethod - This shows how I would expect the test method to work and did work in JSC U1.
2) VisualWebTestWSMethod - This show the Visual Web implementation of the test dialog
3) AppsInstallByUser.wsdl - WSDL Operation being tested.

As you can see between 1 & 2 the JSC test dialog allows you to enter the simple types for the complex structure, I
assume by simply expanding it. What I need is the same ability in Visual Web.
Comment 18 dante 2007-07-24 11:47:58 UTC
Created attachment 45575 [details]
AppsInstalledByUser.wsdl
Comment 19 dante 2007-07-24 11:48:30 UTC
Created attachment 45576 [details]
Java Studio Creator Test WS Method
Comment 20 dante 2007-07-24 11:49:59 UTC
Created attachment 45577 [details]
Visual Web Test WS Method
Comment 21 Quy Nguyen 2007-07-26 18:55:02 UTC
*** Issue 111087 has been marked as a duplicate of this issue. ***
Comment 22 Quy Nguyen 2007-07-27 22:49:07 UTC
The WSDL modeler that we use has changed and does not appear to model types sufficiently.  To fix this issue, we need to
use rewrite the dialog to use Java reflection to find the complex type properties.
Comment 23 Quy Nguyen 2007-08-21 00:57:08 UTC
Fixed the issue with the parameters not being expandable as expected.  The parameter types that should work properly now
are: wsimport generated xml types, Holders, arrays, java Collections/Lists, JAXBElement, primitive types.

The original problem in the issue description should be fixed, although the user may have to either switch to JDK 1.5 or
copy the jars under $installdir/java1/modules/ext/jaxws21/api to $javahome/jre/lib/endorsed due to potential clashes
between JAX-WS 2.1 and the JDK's JAX-WS 2.0 libraries.

Checking in src/org/netbeans/modules/visualweb/websvcmgr/codegen/DataProviderJavaMethod.java;
/cvs/visualweb/websvcmgr/src/org/netbeans/modules/visualweb/websvcmgr/codegen/DataProviderJavaMethod.java,v  <-- 
DataProviderJavaMethod.java
new revision: 1.2; previous revision: 1.1
done
Checking in src/org/netbeans/modules/visualweb/websvcmgr/codegen/WrapperClientWriter.java;
/cvs/visualweb/websvcmgr/src/org/netbeans/modules/visualweb/websvcmgr/codegen/WrapperClientWriter.java,v  <-- 
WrapperClientWriter.java
new revision: 1.12; previous revision: 1.11
done
Checking in src/org/netbeans/modules/visualweb/websvcmgr/ui/ArrayTypeTreeNode.java;
/cvs/visualweb/websvcmgr/src/org/netbeans/modules/visualweb/websvcmgr/ui/ArrayTypeTreeNode.java,v  <-- 
ArrayTypeTreeNode.java
new revision: 1.4; previous revision: 1.3
done
Checking in src/org/netbeans/modules/visualweb/websvcmgr/ui/HolderTypeTreeNode.java;
/cvs/visualweb/websvcmgr/src/org/netbeans/modules/visualweb/websvcmgr/ui/HolderTypeTreeNode.java,v  <-- 
HolderTypeTreeNode.java
new revision: 1.5; previous revision: 1.4
done
RCS file: /cvs/visualweb/websvcmgr/src/org/netbeans/modules/visualweb/websvcmgr/ui/JAXBElementTreeNode.java,v
done
Checking in src/org/netbeans/modules/visualweb/websvcmgr/ui/JAXBElementTreeNode.java;
/cvs/visualweb/websvcmgr/src/org/netbeans/modules/visualweb/websvcmgr/ui/JAXBElementTreeNode.java,v  <-- 
JAXBElementTreeNode.java
initial revision: 1.1
done
RCS file: /cvs/visualweb/websvcmgr/src/org/netbeans/modules/visualweb/websvcmgr/ui/ListTypeTreeNode.java,v
done
Checking in src/org/netbeans/modules/visualweb/websvcmgr/ui/ListTypeTreeNode.java;
/cvs/visualweb/websvcmgr/src/org/netbeans/modules/visualweb/websvcmgr/ui/ListTypeTreeNode.java,v  <--  ListTypeTreeNode.java
initial revision: 1.1
done
Removing src/org/netbeans/modules/visualweb/websvcmgr/ui/NodeData.java;
/cvs/visualweb/websvcmgr/src/org/netbeans/modules/visualweb/websvcmgr/ui/NodeData.java,v  <--  NodeData.java
new revision: delete; previous revision: 1.3
done
RCS file: /cvs/visualweb/websvcmgr/src/org/netbeans/modules/visualweb/websvcmgr/ui/NodeHelper.java,v
done
Checking in src/org/netbeans/modules/visualweb/websvcmgr/ui/NodeHelper.java;
/cvs/visualweb/websvcmgr/src/org/netbeans/modules/visualweb/websvcmgr/ui/NodeHelper.java,v  <--  NodeHelper.java
initial revision: 1.1
done
Checking in src/org/netbeans/modules/visualweb/websvcmgr/ui/ReflectionHelper.java;
/cvs/visualweb/websvcmgr/src/org/netbeans/modules/visualweb/websvcmgr/ui/ReflectionHelper.java,v  <--  ReflectionHelper.java
new revision: 1.4; previous revision: 1.3
done
Checking in src/org/netbeans/modules/visualweb/websvcmgr/ui/ResultCellEditor.java;
/cvs/visualweb/websvcmgr/src/org/netbeans/modules/visualweb/websvcmgr/ui/ResultCellEditor.java,v  <--  ResultCellEditor.java
new revision: 1.2; previous revision: 1.1
done
Removing src/org/netbeans/modules/visualweb/websvcmgr/ui/ResultNodeData.java;
/cvs/visualweb/websvcmgr/src/org/netbeans/modules/visualweb/websvcmgr/ui/ResultNodeData.java,v  <--  ResultNodeData.java
new revision: delete; previous revision: 1.3
done
Checking in src/org/netbeans/modules/visualweb/websvcmgr/ui/ResultRowModel.java;

/cvs/visualweb/websvcmgr/src/org/netbeans/modules/visualweb/websvcmgr/ui/ResultRowModel.java,v  <--  ResultRowModel.java
new revision: 1.2; previous revision: 1.1
done
Checking in src/org/netbeans/modules/visualweb/websvcmgr/ui/StructureTypeTreeNode.java;
/cvs/visualweb/websvcmgr/src/org/netbeans/modules/visualweb/websvcmgr/ui/StructureTypeTreeNode.java,v  <-- 
StructureTypeTreeNode.java
new revision: 1.5; previous revision: 1.4
done
Checking in src/org/netbeans/modules/visualweb/websvcmgr/ui/TestWebServiceMethodDlg.java;
/cvs/visualweb/websvcmgr/src/org/netbeans/modules/visualweb/websvcmgr/ui/TestWebServiceMethodDlg.java,v  <-- 
TestWebServiceMethodDlg.java
new revision: 1.8; previous revision: 1.7
done
Checking in src/org/netbeans/modules/visualweb/websvcmgr/ui/TypeCellEditor.java;

/cvs/visualweb/websvcmgr/src/org/netbeans/modules/visualweb/websvcmgr/ui/TypeCellEditor.java,v  <--  TypeCellEditor.java
new revision: 1.2; previous revision: 1.1
done
Checking in src/org/netbeans/modules/visualweb/websvcmgr/ui/TypeDataProvider.jav
a;
/cvs/visualweb/websvcmgr/src/org/netbeans/modules/visualweb/websvcmgr/ui/TypeDataProvider.java,v  <--  TypeDataProvider.java
new revision: 1.2; previous revision: 1.1
done
Checking in src/org/netbeans/modules/visualweb/websvcmgr/ui/TypeNodeData.java;
/cvs/visualweb/websvcmgr/src/org/netbeans/modules/visualweb/websvcmgr/ui/TypeNodeData.java,v  <--  TypeNodeData.java
new revision: 1.4; previous revision: 1.3
done
Checking in src/org/netbeans/modules/visualweb/websvcmgr/ui/TypeRowModel.java;
/cvs/visualweb/websvcmgr/src/org/netbeans/modules/visualweb/websvcmgr/ui/TypeRowModel.java,v  <--  TypeRowModel.java
new revision: 1.2; previous revision: 1.1
done
Checking in src/org/netbeans/modules/visualweb/websvcmgr/util/Util.java;
/cvs/visualweb/websvcmgr/src/org/netbeans/modules/visualweb/websvcmgr/util/Util.java,v  <--  Util.java
new revision: 1.9; previous revision: 1.8
done


By use of this website, you agree to the NetBeans Policies and Terms of Use. © 2014, Oracle Corporation and/or its affiliates. Sponsored by Oracle logo