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

    DataHandler jaxrpc mapping

    James Richardson Newbie

      Hi,

      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!

      Thanks.

      James




      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"
       xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
       xsi:schemaLocation="http://java.sun.com/xml/ns/j2ee http://www.ibm.com/webservices/xsd/j2ee_jaxrpc_mapping_1_1.xsd"
       version="1.1">
      
       <!-- This file auto generated by Xdoclet Custom Template jaxrpc-mapping-xml.xdt -->
       <!-- Template Version: $Id$ -->
      
       <package-mapping>
       <package-type>com.xx.es.ins.harness.ejb.inssoap</package-type>
       <namespaceURI>urn-com-xx-es-ins-harness-ejb-inssoap</namespaceURI>
       </package-mapping>
      </java-wsdl-mapping>
      


        • 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

            Hello...

            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...

            /Georg

            • 3. Re: DataHandler jaxrpc mapping
              Ryan Newbie

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

              http://www.jboss.org/index.html?module=bb&op=viewtopic&t=57446

              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}"' />
               </java>
               </target>
              
              


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