3 Replies Latest reply on Feb 2, 2005 1:57 PM by Ryan

    DataHandler jaxrpc mapping

    James Richardson Newbie


      I'm on the last bit of deployment for a 1.4 type webservices deployment. I've got through the webservices.xml, the wscompile, etc.

      My bean almost deploys now, but its failing with

      [JavaWsdlMapping] Cannot find jaxrpc-mapping for type: {http://java.sun.com/jax-rpc-ri/internal}datahandler

      I realise that this is not particularly interoperable, but thats out of my hands.

      I would really appreciate any help you might give!

      I'm planning to write up how I got this far in the Wiki, once I can get it working!



      My method looks like:

      public DataHandler getXXX(XXXFilter filter)

      I'm using wscompile to generate the wsdl, and xdoclet to generate the jaxrpcmapping and webservice.xml, using custom templates

      The jaxrpcmapping looks like:

      <java-wsdl-mapping xmlns="http://java.sun.com/xml/ns/j2ee"
       xsi:schemaLocation="http://java.sun.com/xml/ns/j2ee http://www.ibm.com/webservices/xsd/j2ee_jaxrpc_mapping_1_1.xsd"
       <!-- This file auto generated by Xdoclet Custom Template jaxrpc-mapping-xml.xdt -->
       <!-- Template Version: $Id$ -->

        • 1. Re: DataHandler jaxrpc mapping
          Thomas Diesler Master

          Try to use wscompile to generate jaxrpc-mapping.xml

          DataHandler is not a valid JAXRPC return type, i.e there is no standard mapping for it.

          • 2. Re: DataHandler jaxrpc mapping
            Georg Hallingstrom Newbie


            How do you use wsconfig to generate the jaxrpc mapping file then...? There is one argument "mapping" but when I insert that into the my ant task I just get an exception that "mapping" is not a valid argument...


            • 3. Re: DataHandler jaxrpc mapping
              Ryan Newbie

              If you search the forums, I've posted a message about this problem:


              My solution was to just write the task into the ant build file without using the tag. My ant task looks as the following:
              (Ignore the mkdirs)

              <target name="wscompile" description="Generates WSDL and JAXRPC mapping file" depends="compile">
               <mkdir dir="${build.web.service.home}"/>
               <mkdir dir="${build.web.service.generated.home}"/>
               <mkdir dir="${build.web.service.wsdl.home}"/>
               <java classname="com.sun.xml.rpc.tools.wscompile.Main" fork="yes" dir=".">
               <classpath refid="compile.classpath"/>
               <arg line='-d "${build.web.service.wsdl.home}"' />
               <arg line="-define" />
               <arg line="-features:documentliteral" />
               <arg line='-mapping "${build.web.service.wsdl.home}/${jaxrpc.mapping.file}"'/>
               <arg line="-verbose" />
               <arg line='-classpath "${build.classes.home}"' />
               <arg line='"${config.home}/${config.file}"' />

              This circumvents the problems you're seeing from using the wscompile ant task.