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.
Summary: | The JAX-RPC option in new web service client wizard of Maven2 project doesn't work | ||
---|---|---|---|
Product: | webservices | Reporter: | rdelaplante <rdelaplante> |
Component: | JAX-RPC | Assignee: | Milan Kuchtiak <mkuchtiak> |
Status: | VERIFIED FIXED | ||
Severity: | blocker | CC: | anebuzelsky, mgrebac, pjiricka |
Priority: | P1 | ||
Version: | 6.x | ||
Hardware: | All | ||
OS: | All | ||
Issue Type: | DEFECT | Exception Reporter: |
Description
rdelaplante
2009-03-02 05:29:29 UTC
If you're not planning to fix this right away, please tell me how I can use a JAX-RPC client in a Maven2 project. I was hoping NB 6.7 would show me how (changes to POM?), and I'm currently stuck. Nobody seems to know how to do it in Maven2 without calling out to ant tasks. The JAX-RPC option should be disabled. There is no plan to implement JAX-RPC support for NB 6.7, since there is no JAX-RPC:wscompile maven plugin. Please consider the workaround that several people have suggested on mailing lists to me: using Maven's antrun plugin to call an ant script that does JAX-RPC work. The links people suggested I look at are: http://www.jroller.com/gmazza/entry/creating_a_soap_client_with (step 4) http://maven.apache.org/plugins/maven-antrun-plugin/ The first link uses the "official" jaxws.maven.plugin actually used in Maven JAX-WS support. The maven.antrun plugin isn't a typical Maven plugin. It's just an ability to run Ant tasks from within Maven 2. Netbeans doesn't prevent anybody to use maven.antrun, however, there isn't planned any support for this. For 6.7, I think, we'll only disable JAX-RPC option in WS wizards for Maven projects. I know that the links do not show how to do JAX-RPC in Maven, they were just for ideas on how Maven could call out to ant to do JAX-RPC support. Regular NetBeans projects are ant based so Sun already knows how to do JAX-RPC support with ant. Create a build.xml with only the JAX-RPC related things, then make the Maven support add this file into the project along with additional configuration in POM to call out to the ant script. I know, it's somehow doable what you're writing, but it isn't much conceptual. The best would be to have a "standard" Maven plugin for JAX-RPC, then we could support it. The antrun plugin is just a tool to run ant script in Maven. If you think, we have to support antrun, please report an enhancement. Fixed for now. The JAX-RPC option is now disabled in Maven projects: http://hg.netbeans.org/main?cmd=changeset;node=7e2a945b4528 http://hg.netbeans.org/main?cmd=changeset;node=04ac5649ea76 Integrated into 'main-golden', will be available in build *200903060201* on http://bits.netbeans.org/dev/nightly/ (upload may still be in progress) Changeset: http://hg.netbeans.org/main/rev/7e2a945b4528 User: mkuchtiak@netbeans.org Log: #159404: disable JAX-RPC option in WS Client wizards FYI I was able to get JAX-RPC client working in Maven2 without Ant. Maybe Sun can consider undoing this "fix" and use the following to support JAX-RPC clients in the Maven2 web service client wizard: <dependency> <groupId>org.apache.axis</groupId> <artifactId>axis</artifactId> <version>1.4</version> <scope>compile</scope> </dependency> <dependency> <groupId>org.apache.axis</groupId> <artifactId>axis-jaxrpc</artifactId> <version>1.4</version> <scope>compile</scope> </dependency> <dependency> <groupId>commons-discovery</groupId> <artifactId>commons-discovery</artifactId> <version>0.4</version> <scope>compile</scope> </dependency> <dependency> <groupId>wsdl4j</groupId> <artifactId>wsdl4j</artifactId> <version>1.6.2</version> <scope>compile</scope> </dependency> <plugin> <groupId>org.codehaus.mojo</groupId> <artifactId>axistools-maven-plugin</artifactId> <version>1.3</version> <executions> <execution> <goals> <goal>wsdl2java</goal> </goals> </execution> </executions> <configuration> <packageSpace>com.mycompany.service.client</packageSpace> <sourceDirectory>src/main/resources/META-INF/wsdl</sourceDirectory> <outputDirectory>target/generated-sources/wsdl2java</outputDirectory> </configuration> </plugin> I works well. I forgot to paste sample client code that uses the generated sources for "MyService": private MyServiceSEI getMyServicePort() throws ServiceException { MyServiceLocator locator = new MyServiceLocator(); MyServiceSEI port; Stub stub; port = locator.getMyServiceSEIPort(); // OPTIONALLY configure URL and HTTP BASIC authentication stub = (Stub) port; stub._setProperty(Stub.ENDPOINT_ADDRESS_PROPERTY, "http://hostname/ContextRoot/ServicePort"); stub._setProperty(Stub.USERNAME_PROPERTY, "user"); stub._setProperty(Stub.PASSWORD_PROPERTY, "secret"); return port; } Thank You. Yes, this is an Axis wsdl2java tool that was converted to Maven "axistools-maven-plugin" plugin. Something similar would be useful for SUN's JAX-RPC wscompile tool. Adding M.Grebac to CC. v. |