This Bugzilla instance is a read-only archive of historic NetBeans bug reports. To report a bug in NetBeans please follow the project's instructions for reporting issues.
-drop adsenseforsearch into a RESTful ws -build a project => ... Compiling 7 source files to C:\NetBeansProjects\HelloWorld\HelloWorld\build\web\WEB-INF\classes C:\NetBeansProjects\HelloWorld\HelloWorld\src\java\helloworld\HelloWorldResource.java:135: cannot find symbol symbol : variable siteProperties location: class helloworld.HelloWorldResource java.lang.String result = port.generateSearchBoxCode(synServiceId, country, searchType, siteProperties, searchOptions, domains, selectedDomain, searchBoxStyle, channelName); C:\NetBeansProjects\HelloWorld\HelloWorld\src\java\helloworld\HelloWorldResource.java:135: cannot find symbol symbol : variable searchOptions location: class helloworld.HelloWorldResource java.lang.String result = port.generateSearchBoxCode(synServiceId, country, searchType, siteProperties, searchOptions, domains, selectedDomain, searchBoxStyle, channelName); C:\NetBeansProjects\HelloWorld\HelloWorld\src\java\helloworld\HelloWorldResource.java:135: cannot find symbol symbol : variable domains location: class helloworld.HelloWorldResource java.lang.String result = port.generateSearchBoxCode(synServiceId, country, searchType, siteProperties, searchOptions, domains, selectedDomain, searchBoxStyle, channelName); C:\NetBeansProjects\HelloWorld\HelloWorld\src\java\helloworld\HelloWorldResource.java:135: cannot find symbol symbol : variable searchBoxStyle location: class helloworld.HelloWorldResource java.lang.String result = port.generateSearchBoxCode(synServiceId, country, searchType, siteProperties, searchOptions, domains, selectedDomain, searchBoxStyle, channelName); Note: C:\NetBeansProjects\HelloWorld\HelloWorld\src\java\org\netbeans\saas\RestResponse.java uses unchecked or unsafe operations. Note: Recompile with -Xlint:unchecked for details. 4 errors C:\NetBeansProjects\HelloWorld\HelloWorld\nbproject\build-impl.xml:392: The following error occurred while executing this line: C:\NetBeansProjects\HelloWorld\HelloWorld\nbproject\build-impl.xml:213: Compile failed; see the compiler error output for details. BUILD FAILED (total time: 1 second)
The issue is that wsdl for "Google Adsense for Search" has changed, there are additional parameters that do not conform to our code generator. ie we expect the parameter types to be type.isPrimitive() || type.equals(String.class) || Util.getValueOfMethod(type) != null || Util.getConstructorWithStringParam(type) != null; but following parameters do not conform to this. com.google.api.adsense.v2.SiteProperties siteProperties = null; com.google.api.adsense.v2.SearchOptions searchOptions = null; java.util.List domains = null; com.google.api.adsense.v2.SearchBoxStyle searchBoxStyle = null; If we relax this requirement and add the initialization statement and invoke the jaxws method there will be other exception (see attachment)
Created attachment 59257 [details] wsdl exception
Assigning to Rico, since this is JaxWS specific.
I tried generating JAXWS artifacts based on the wsdl. Service and client generation works fine, so I am convinced this has nothing to do with JAXWS. From the stack trace, it looks like an attempt to instantiate WsdlService using Class.newInstace() fails because WsdlService does not have a no-arg constructor. WsdlService is a member of the WebServiceDescriptor of the web service manager module. When the encoder.writeObject() is called on the descriptor, the exception is thrown because of this.
True, the exception stack has nothing to do with jaxws generation. Its internal saving of webservice manager descriptor. The exception has been handled properly should not be causing any problem. About the parameters siteProperties, searchOptions, domains... they are existings parameters. Only that they should not be part of query param list because of restriction in Jersey. So the issue should be fixed by uncheck and disable their query parem checkbox in the parameters dialog. I guess this is a regression from the same functionality provided by old REST plugin.
The stack is useful, now that i can see a possible fix for the exception (not related to this bug, though). Ayub/Peter, please try remove the method getModel() from WsdlServiceProxyDescriptor in websvc.saas.api. I believe it is not used. We might alse need to refactor rename setModel to setWsdlService.
*** Issue 131498 has been marked as a duplicate of this issue. ***
Fixed for 6.1
v.