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.

Bug 159404 - The JAX-RPC option in new web service client wizard of Maven2 project doesn't work
Summary: The JAX-RPC option in new web service client wizard of Maven2 project doesn't...
Status: VERIFIED FIXED
Alias: None
Product: webservices
Classification: Unclassified
Component: JAX-RPC (show other bugs)
Version: 6.x
Hardware: All All
: P1 blocker (vote)
Assignee: Milan Kuchtiak
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2009-03-02 05:29 UTC by rdelaplante
Modified: 2010-04-06 13:59 UTC (History)
3 users (show)

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description rdelaplante 2009-03-02 05:29:29 UTC
I downloaded NB 6.7 M2 onto OpenSolaris 2008 11 with JDK 6u10.  I deleted the ergnonomics1 directory to make Maven
support work, then created a new web project.  Next I right clicked the project and selected new Web Service Client.  At
the bottom of the screen I changed a dropdown list from JAX-WS to JAX-RPC.  It told me that I need to have the JAX-RPC
support plugin installed.   I closed the window, installed the JAX-RPC plugin from the plugins manager then tried again.
 It still complains that I need the JAX-RPC plugin.  I restarted the IDE and tried again. Same problem.  Now I'm
wondering if I need to add a Maven2 plugin to my POM?  If yes, the wizard should do that for me.

I marked as P1 because there is no workaround that I know of, and the feature does not work.
Comment 1 rdelaplante 2009-03-02 05:31:57 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.  
Comment 2 Milan Kuchtiak 2009-03-02 12:48:40 UTC
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. 
Comment 3 rdelaplante 2009-03-02 13:49:01 UTC
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/
Comment 4 Milan Kuchtiak 2009-03-02 16:49:46 UTC
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.
Comment 5 rdelaplante 2009-03-02 17:18:04 UTC
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. 
Comment 6 Milan Kuchtiak 2009-03-04 13:32:10 UTC
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


Comment 7 Quality Engineering 2009-03-06 09:20:37 UTC
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
Comment 8 rdelaplante 2009-03-06 19:04:50 UTC
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. 
Comment 9 rdelaplante 2009-03-06 19:12:20 UTC
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;
}
Comment 10 Milan Kuchtiak 2009-03-09 09:34:21 UTC
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.
Comment 11 Jaroslav Pospisil 2010-04-06 13:59:18 UTC
v.