2 Replies Latest reply on Mar 16, 2009 6:36 AM by surajit_surajit.choudhury

    Problem with example wsdl-first in Eclipse

    surajit_surajit.choudhury

      Has anybody else had problems moving the wsdl-first example from the ServiceMix distribution to Eclipse? When I try to build with maven, I get an error, because the wsdl file is being looked up at the wrong place:

       

      -


       

      -


      Building An example JSR-181 Service Unit

          task-segment:

      -


      clean:clean

      Deleting directory D:\Surajit_Docs\workspace34\wsdl-first\wsdl-first-jsr181-su\target

      xfire:wsgen {execution: default}

      Executing XFire WsGen task with url: file:/D:/Surajit_Docs/workspace34/wsdl-first/src/main/resources/person.wsdl

      -


      BUILD ERROR

      -


      command execution failed

       

      Embedded error: java.io.IOException: Could not find resource 'file:/D:/Surajit_Docs/workspace34/wsdl-first/src/main/resources/pe

      rson.wsdl

      -


      Trace

      org.apache.maven.lifecycle.LifecycleExecutionException: command execution failed

              at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoals(DefaultLifecycleExecutor.java:583)

              at ...

      (Launcher.java:430)

              at org.codehaus.classworlds.Launcher.main(Launcher.java:375)

      Caused by: org.apache.maven.plugin.MojoExecutionException: command execution failed

              at org.apache.servicemix.maven.plugin.xfire.WsgenMojo.exec

              ... 16 more

      Caused by: java.io.IOException: Could not find resource 'file:/D:/Surajit_Docs/workspace34/wsdl-first/src/main/resources/person.

      wsdl

              at org.codehaus.xfire.gen.WsGenTask.execute(WsGenTask.java:72)

              at org.apache.servicemix.maven.plugin.xfire.WsgenMojo.exec(WsgenMojo.java:190)

              ... 19 more

      Caused by: java.io.IOException: Could not find resource 'file:/D:/Surajit_Docs/workspace34/wsdl-first/src/main/resources/person.wsdl

              at org.codehaus.xfire.util.Resolver.(Resolver.java:56)

              at org.codehaus.xfire.gen.Wsdl11Generator.generate(Wsdl11Generator.java:112)

              at org.codehaus.xfire.gen.WsGenTask.execute(WsGenTask.java:68)

              ... 20 more

       

      -


      The wsdl file is at one level lower.

       

      Thanks,

      Surajit.

        • 1. Re: Problem with example wsdl-first in Eclipse
          mielket

          The wsdl should indeed be in src/main/resources/person.wsdl. If you have it in a different location, then that's wrong. Out of the box it is in the right location. The wsdl location is specified in pom.xml in the xfire-maven-plugin configuration.

           

          The error you get should also occur when running mvn from command line, it is not specific to running inside Eclipse.

          • 2. Re: Problem with example wsdl-first in Eclipse
            surajit_surajit.choudhury

            Thanks for the response - the problem appeared to be due to the generated pom.xml not having {$basedir} in front of the path to person.wsdl. Once I added that to it and to the output dir and changed the profile to what was in the supplied example, the example worked.

            (Now to get it to work in a http-soap-consumer example, since I tried that initially and had problems.)