1 Reply Latest reply on Feb 25, 2005 6:46 PM by garyg

    can't generate WSDL

    garyg

      This is my first web app so hoping someone can guide me here. What I don't understand is how the OrderIF_Service.java file is found. I said in my config.xml file because I *think* I wanted the SEI (my OrderIF_Service.java) read and generate the WSDL file.

      This is what I have so far ...

      --- build.xml










      --- OrderIF_Service.java

      public interface OrderIF_Service extends java.rmi.Remote
      {

      public String getOrder(String order) throws java.rmi.RemoteException;
      }

      --- config.xml

      <?xml version="1.0" encoding="UTF-8"?>









      ---

      And even though I'm getting this error below, I have the feeling I'm doing much more wrong.

      compilews:
      [wscompile] class javax.xml.rpc.holders.Holder not found.
      [wscompile] at com.sun.xml.rpc.processor.modeler.rmi.RmiModeler.(RmiModeler.java:142)
      [wscompile] at com.sun.xml.rpc.processor.config.RmiModelInfo.getModeler(RmiModelInfo.java:64)
      [wscompile] at com.sun.xml.rpc.processor.config.ModelInfo.buildModel(ModelInfo.java:88)
      [wscompile] at com.sun.xml.rpc.processor.Processor.runModeler(Processor.java:63)
      [wscompile] at com.sun.xml.rpc.tools.wscompile.CompileTool.run(CompileTool.java:714)
      [wscompile] at com.sun.xml.rpc.util.ToolBase.run(ToolBase.java:43)
      [wscompile] at com.sun.xml.rpc.tools.ant.Wscompile.execute(Wscompile.java:746)
      [wscompile] at org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:275)
      [wscompile] at org.apache.tools.ant.Task.perform(Task.java:364)
      [wscompile] at org.apache.tools.ant.Target.execute(Target.java:341)
      [wscompile] at org.apache.tools.ant.Target.performTasks(Target.java:369)
      [wscompile] at org.apache.tools.ant.Project.executeTarget(Project.java:1214)[wscompile] at org.apache.tools.ant.Project.executeTargets(Project.java:1062)
      [wscompile] at org.apache.tools.ant.Main.runBuild(Main.java:673)
      [wscompile] at org.apache.tools.ant.Main.startAnt(Main.java:188)
      [wscompile] at org.apache.tools.ant.launch.Launcher.run(Launcher.java:196)
      [wscompile] at org.apache.tools.ant.launch.Launcher.main(Launcher.java:55)
      [wscompile] error: class javax.xml.rpc.holders.Holder not found.

      [wscompile] error: -import requires a WSDL-based configuration file

      [wscompile] Command invoked: wscompile -d /home/me/projects/myTest/build/classes -import -keep -Xprintstacktrace /home/me/projects/myTest/etc/config.xml -classpath /home/me/projects/myTest/${classpath.jwsdp}

        • 1. Re: can't generate WSDL
          garyg

          Didn't seem to post correctly and I should have posted as code, so here are the code blocks again.

          Here's my build.xml ...

           <taskdef name="wscompile" classname="com.sun.xml.rpc.tools.ant.Wscompile">
           <classpath refid="classpath.jwsdp"/>
           </taskdef>
          
           <target name="compilews">
           <wscompile
           keep="true"
           import="true"
           base="${proj.temp}/classes"
           xPrintStackTrace="true"
           verbose="false"
           classpath="${classpath.jwsdp}"
           config="${proj.etc}/config.xml">
           </wscompile>
           </target>
          

          This is my OrderIF_Service.java ...
          public interface OrderIF_Service extends java.rmi.Remote
          {
          
           public String getOrder(String order) throws java.rmi.RemoteException;
          }
          

          And this is what I have in my config.xml file ...
          
          <?xml version="1.0" encoding="UTF-8"?>
          <configuration xmlns="http://java.sun.com/xml/ns/jax-rpc/ri/config">
          
           <service name="OrderIF_Service"
           targetNamespace="http://localhost.org/wsdl"
           typeNamespace="http://localhost.org/types"
           packageName="stub_tie_generator_test">
          
           <interface name="stub_tie_generator_test.TimeIF"
           servantName="stub_tie_generator_test.TimeImpl"/>
           </service>
          
          </configuration>