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.
We were trying to work on developing an STS service using Netbeans (7.1) and I observed a few issues. The server used was GF 3.1.2. 1. the web.xml of the generated STS service contains the name of the Provider as a servlet class in addition to the MexEndPoint: <servlet> <servlet-name>MySTSService</servlet-name> <servlet-class>MySTSService</servlet-class> <load-on-startup>0</load-on-startup> </servlet> <servlet-mapping> <servlet-name>MySTSService</servlet-name> <url-pattern>/MySTSService</url-pattern> </servlet-mapping> <servlet> <servlet-name>com.sun.xml.ws.mex.server.MEXEndpoint</servlet-name> <servlet-class>com.sun.xml.ws.mex.server.MEXEndpoint</servlet-class> <load-on-startup>0</load-on-startup> </servlet> <servlet-mapping> <servlet-name>com.sun.xml.ws.mex.server.MEXEndpoint</servlet-name> <url-pattern>/SampleSTSService/mex</url-pattern> </servlet-mapping> As a result, on deployment, the following error is thrown: [#|2012-03-02T17:05:04.536+0530|SEVERE|glassfish3.1.2|javax.enterprise.system.tools.admin.org.glassfish.deployment.admin|_ThreadID=17;_ThreadName=Thread-2;|Exception while loading the app : java.lang.IllegalStateException: ContainerBase.addChild: start: org.apache.catalina.LifecycleException: org.apache.catalina.LifecycleException: java.lang.ClassCastException: NewSTSWizard cannot be cast to javax.servlet.Servlet|#] 2. On trying to remove the servlet element related to the Provider, still the error is thrown for the MexEndpoint class. Only the following servlet mappings (obtained from a metro ws-trust sample test case) seems to work (deploy fine): <listener> <listener-class>com.sun.xml.ws.transport.http.servlet.WSServletContextListener</listener-class> </listener> <servlet> <servlet-name>sts</servlet-name> <display-name>sts</display-name> <description>JAX-WS endpoint - sts</description> <servlet-class>com.sun.xml.ws.transport.http.servlet.WSServlet</servlet-class> <load-on-startup>1</load-on-startup> </servlet> <servlet-mapping> <servlet-name>sts</servlet-name> <url-pattern>/sts</url-pattern> </servlet-mapping> <servlet-mapping> <servlet-name>sts</servlet-name> <url-pattern>/sts/mex</url-pattern> </servlet-mapping> 3. On proceeding with the web.xml mentioned in [2] and deploying the app, the wsdl that is present in src/conf/xml-resources/.../servicename.wsdl does not seem to be copied in the final war to the right location mentioned (WEB-INF/wsdl/servicename.wsdl) on a clean/build. As a result the wsdl is not accessible from the deployed service. 4. I also tried to copy the wsdl to the right location mentioned in [3] to the war file and redeploy. However on trying to access the service from the browser, a new error is thrown: [#|2012-03-01T17:45:56.367+0530|SEVERE|glassfish3.1.2|javax.enterprise.system.tools.admin.org.glassfish.deployment.admin|_ThreadID=17;_ThreadName=Thread-2;|Exception while loading the app : java.lang.IllegalStateException: ContainerBase.addChild: start: org.apache.catalina.LifecycleException: org.apache.catalina.LifecycleException: javax.servlet.ServletException: com.sun.xml.ws.transport.http.servlet.WSServletException: WSSERVLET11: failed to parse runtime descriptor: javax.xml.ws.WebServiceException: WSDL jndi:/server/MySTSServiceService/WEB-INF/wsdl/MySTSServiceService.wsdl has the following services [{http://tempuri.org/}MySTSServiceService] but not . Maybe you forgot to specify a serviceName and/or targetNamespace in @WebService/@WebServiceProvider?|#] This is not clear since the serviceName and the targetNamespace are specified in the Provider: @WebServiceProvider(serviceName = "SampleSTSService", portName = "ISampleSTSService_Port", targetNamespace = "http://tempuri.org/", wsdlLocation = "WEB-INF/wsdl/SampleSTS/SampleSTSService.wsdl")
This is quite important issue as it makes the metro feature useless. Bumping priority to P2.
Reproduced with both 7.1.2 dev and 7.2 dev. I have no idea did it ever work at all.
See also issue #180759.
It seemed to have worked before: http://java.net/jira/browse/GLASSFISH-10339 This issue was resolved in v3. This is just a part of the problem that is re-appearing in the current scenario.
web-main#412ec71790ab I've fixed the web.xml and sun-jaxws.xml files. The resulting application could be successfully deployed with these changes. Unfortunately I'm not an expert in WSIT area and I cannot affirm that resulting application works as expected. Please verify. WSDL file is available in a standard way : application_url?wsdl. You don't need to search it in some other place.
Currently this bug completely blocks my project which use Metro with NetBeans. Is there anyway that I can get fixed version as soon as possible?
Currently this bug completely blocks my project which use Metro with NetBeans. Do we have workaround for this issue?
Correction for generated WSDL file name: web-main#a8f7455be657
Integrated into 'main-golden', will be available in build *201205110400* on http://bits.netbeans.org/dev/nightly/ (upload may still be in progress) Changeset: http://hg.netbeans.org/main-golden/rev/a8f7455be657 User: Denis Anisimov <ads@netbeans.org> Log: Fix for BZ#210144 - STS wizard generates incorrect web.xml. Correct generated WSDL file name.
Verified in NetBeans IDE Dev (Build 201205140400). Please, integrate to release71_fixes branch. My test case - create web project with GlassFish server - create new file "Web Services|Secure Token Service (STS)" - deploy project - check http://localhost:8080/WebApplication6/NewSTSWizardService is accessible
Integrated into release71_fixes: http://hg.netbeans.org/releases/rev/b20ed9fa324d
Integrated into 'releases', will be available in build *201205151102* or newer. Wait for official and publicly available build. Changeset: http://hg.netbeans.org/releases/rev/b20ed9fa324d User: Denis Anisimov <ads@netbeans.org> Log: Fix for BZ#210144 - STS wizard generates incorrect web.xml ( 71patch3 ).