users@jax-ws.java.net

knowns Issues with JAX-WS and apt and multiples services using parameterStyle=SOAPBinding.ParameterStyle.BARE ?

From: Henri Gomez <henri.gomez_at_gmail.com>
Date: Tue, 20 Mar 2007 18:06:00 +0100

Hi to all,

I've got an eclipse project where I defined many Services like this :

ReferentialService .java

package com.mycorp.soa.referential.services;

@WebService(targetNamespace="http://www.mycorp.com/soa/referential/services/v1/",
name = "ReferentialService", serviceName = "ReferentialService")
@SOAPBinding(style=SOAPBinding.Style.DOCUMENT,
use=SOAPBinding.Use.LITERAL,
parameterStyle=SOAPBinding.ParameterStyle.BARE)
public class ReferentialService {

        /***
         * @param tracker
         * @param criteria
         * @return
         * @throws ReferentialException
         */
         @WebMethod(action="getListType")
    @WebResult(name="types")
        public TypeValeurParCodeResponse getListType(
                        @WebParam(name = "tracker", header = true) Tracker tracker,
                        @WebParam(name = "pager") Pager pager
                        ) throws ReferentialException
        {
...
       }
}

....

ValorService .java

package com.mycorp.soa.valor.services;


@WebService(targetNamespace="http://www.mycorp.com/soa/valor/services/v1/",
name = "ValorService", serviceName = "ValorService")
@SOAPBinding(style=SOAPBinding.Style.DOCUMENT,
use=SOAPBinding.Use.LITERAL,
parameterStyle=SOAPBinding.ParameterStyle.BARE)
public class ValorService
{
        /***
         * Retourne une liste de codifications
     *
         * @param tracker
         * @param CodificationsRequest
         * @return CodificationsResponse
         * @throws ValorException
         */
         @WebMethod(action="getCodes")
    @WebResult(name="codes")
        public CodificationsResponse getCodes(
                        @WebParam(name = "tracker", header = true) Tracker tracker,
                        @WebParam(name = "codificationsRequest") CodificationsRequest request
                        ) throws ValorException
        {
       }
}


When I used parameterStyle=SOAPBinding.ParameterStyle.WRAPPED for both
Service, it worked without any problem.

Now that I switched to parameterStyle=SOAPBinding.ParameterStyle.BARE,
I get apt errors unless I exclude valor or referential (like this ..)

                <apt fork="true" debug="${debug}" verbose="${verbose}"
destdir="${build.classes.dir}" sourcedestdir="${build.classes.dir}"
sourcepath="${basedir}/src">
                        <classpath>
                                <path refid="jaxws.classpath" />
                                <pathelement location="${basedir}/src" />
                        </classpath>
                        <option key="r" value="${build.dir}" />
                        <source dir="${basedir}/src">
                                <include name="**/*.java" />
                                <exclude name="**/referential/**" />
                        </source>
                </apt>

                <apt fork="true" debug="${debug}" verbose="${verbose}"
destdir="${build.classes.dir}" sourcedestdir="${build.classes.dir}"
sourcepath="${basedir}/src">
                        <classpath>
                                <path refid="jaxws.classpath" />
                                <pathelement location="${basedir}/src" />
                        </classpath>
                        <option key="r" value="${build.dir}" />
                        <source dir="${basedir}/src">
                                <include name="**/*.java" />
                                <exclude name="**/valor/**" />
                        </source>
                </apt>

This hack didn't help me when under Eclipse where I couldn't tuned the
annotation generation. Also I wonder why I should exclude referential
or valor when using SOAPBinding.ParameterStyle.BARE since I didn't
have to do before ?

Did someone else encoutered such problem or had an idea ?

I'm using (JAX-WS RI 2.1-02/02/2007 03:56 AM(vivekp)-FCS)


thanks for you help