Raphael,

    I ran into the same problem with XDoclet not generating eveything required for the jaxrpc-mapping.xml file.  So I resorted to using the wscompile task provided by Sun's Java Web Services Development Pack ( http://java.sun.com/webservices/downloads/webservicespack.html ).  I'm using jwsdp 1.6, but it looks like there is a newer 2.0 version.  Here is an ant example that shows how to use wscompile:

      <java classname="com.sun.xml.rpc.tools.wscompile.Main" fork="yes" dir=".">
         <classpath refid="class.path"/>
         <arg line='-d "${compile}"' />
         <arg line='-nd "${gen.src.dir}/${ws.dir}/META-INF/ws"' />
         <arg line='-s "${gen.src.dir}"' />
         <arg line="-gen:server"/>
         <!--<arg line="-features:documentliteral" />-->
         <arg line="-features:rpcliteral" />
         <arg line='-mapping "${gen.src.dir}/${ws.dir}/META-INF/ws/jaxrpc-mapping.xml"'/>
         <arg line="-keep" />
         <arg line="-verbose" />
         <arg line='-classpath "${compile}"'  />
         <arg line='"${src.dir}/${ws.config.dir}/config.xml"' />
      </java>

${compile}:  Is a property that defines where all of the compile classes go.
${gen.src.dir}:  Is a property that defines where all of the generated files go ( for example jaxrpc-mapping.xml )
${ws.dir}:  Is a property that defines the path of the web service.
${ws.config.dir}:  Is the path of where to find the config.xml file that defines various properties required to build your web service.

The output of the wscompile can then be used by the wseedoclet ant task to tie everything together:

       <!-- setup an xml property that I can then use to pull entries out of the config.xml -->
       <xmlproperty file="${src.dir}/${ws.dir}/resources/config.xml" semanticAttributes="true"/>

      <wseedoclet wsdlFile="wsdl/${configuration.service.name}.wsdl"
        wseeSpec="1.1"
        excludedTags="@version,@author,@todo,@deprecated"
        verbose="${verbose.mode}"
        destdir="${gen.src.dir}/${ws.dir}/META-INF/ws"
        jaxrpcMappingFile="jaxrpc-mapping.xml"
        force="${force.generation}">
       
         <packageNamespaceMapping packages="${configuration.service.packageName}" namespace="${configuration.service.targetNamespace}"/>
        
         <fileset dir="${src.dir}">
            <include name="${ws.dir}/*.java"/>
         </fileset>
        
         <deploymentdescriptor/>
      </wseedoclet>

${configuration.service.packageName}:  is an xml property I pull from the config.xml
${configuration.service.targetNamespace}:  is an xml property I pull from config.xml.

With this all complete, I had to do some manipulations to ensure everything was put into the appropriate spot.....but those manipulations are probably because of how I have my build environment setup.  So you may not have to do that.

Here is an example config.xml file:
<?xml version="1.0" encoding="ISO-8859-1"?>
<configuration xmlns="http://java.sun.com/xml/ns/jax-rpc/ri/config">
    <service name="TestWS"
        targetNamespace="http://ws.test.myapps.org"
        typeNamespace="http://
ws.test.myapps.org/types"
        packageName="org.myapps.test.ws">
            <interface
                name="org.myapps.test.ws.TestService"
                servantName="org.myapps.test.TestSessionBean">
            </interface>
    </service>
</configuration>

I hope this helps?

On a side note:  If you use wscompile it is definately going to work with Sun One!!  :)



Regards,

Jeff



Raphael Luiz Nascimento wrote:

Hi,

 

  My name is Raphael and I’m working with a xdoclet but i am have a problem in generating the jaxrpc-mapping.xml, this xml is generated by xdoclet, but doesn’t work with Sun One application, with jboss is work but with Sun one not.

 

I saw a Issue in Jira “Fully support jaxrpc-mapping schema” and i want to know with this Improvement will be fixed. At this moment just I vote for it, LLLLLLLLLL.

No more, regards Raphael Nascimento.

 

Cingo

Serviços em Tecnologia da Informação Ltda.

 

Raphael Luiz Nascimento
Analista de Sistemas

R: Xavantes, 54 - Atiradores
89203-900 Joinville, SC
Brasil

[EMAIL PROTECTED]

+55 (47)  3451-1819


 

 

 

 

 

 

 

 




Reply via email to