Uploaded image for project: 'Tools (JBoss Tools)'
  1. Tools (JBoss Tools)
  2. JBIDE-6731

cannot create bottom-up ws with ws-cxf

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Obsolete
    • Icon: Major Major
    • LATER
    • 3.1.0.GA
    • webservices
    • None
    • Hide

      Create a dynamic web project called TestWSProject
      File -> New -> Other...
      select Class, press Next
      package: test, Name: Person, press Finish
      replace code in the editor with:

      package test;

      public class Person {

      private String login;
      private int age;

      public Person()

      { this("BartSimpson", 12); }

      public Person(String login, int age)

      { this.login = login; this.age = age; }

      public String getLogin()

      { return login; }

      public void setLogin(String login)

      { this.login = login; }

      public int getAge()

      { return age; }

      public void setAge(int age)

      { this.age = age; }

      }

      File -> New -> Other...
      select Class, press Next
      package: test.ws, Name: Echo, press Finish
      replace code in the editor with:

      package test.ws;

      import javax.jws.WebService;
      import test.Person;

      @WebService
      public class Echo {

      public Person echo(Person p)

      { return p; }

      public Person test()

      { return new Person(); }

      }

      File -> New -> Other...
      select Web Services -> Web Service, press Next
      Web service type: Bottom Up Java bean Web Service
      Set the slider for the web service to Deploy Service position
      Service implementation: test.ws.Echo
      Server: set to tested runtime
      Web Service Runtime: JBossWS
      Service Project: TestWSProject
      Service EAR Project: TestWSProjectEAR
      Finish the wizard - at this moment you should get the error

      Show
      Create a dynamic web project called TestWSProject File -> New -> Other... select Class, press Next package: test, Name: Person, press Finish replace code in the editor with: package test; public class Person { private String login; private int age; public Person() { this("BartSimpson", 12); } public Person(String login, int age) { this.login = login; this.age = age; } public String getLogin() { return login; } public void setLogin(String login) { this.login = login; } public int getAge() { return age; } public void setAge(int age) { this.age = age; } } File -> New -> Other... select Class, press Next package: test.ws, Name: Echo, press Finish replace code in the editor with: package test.ws; import javax.jws.WebService; import test.Person; @WebService public class Echo { public Person echo(Person p) { return p; } public Person test() { return new Person(); } } File -> New -> Other... select Web Services -> Web Service, press Next Web service type: Bottom Up Java bean Web Service Set the slider for the web service to Deploy Service position Service implementation: test.ws.Echo Server: set to tested runtime Web Service Runtime: JBossWS Service Project: TestWSProject Service EAR Project: TestWSProjectEAR Finish the wizard - at this moment you should get the error
    • Hide

      When you get the error, click OK and then click Finish again. This time it will finish successfully.

      Show
      When you get the error, click OK and then click Finish again. This time it will finish successfully.

      I get an error when trying to created a web service:
      Failed to Generate Web Service code, please check the log for more details.

      The details show:
      Failed to Generate Web Service code, please check the log for more details
      ...
      java2ws - Apache CXF 2.2.6

      /Users/rasp/jbossqa/workspace-eap/TestWSProject/src/test/ws/jaxws/Echo.java:23: cannot find symbol
      symbol : class Person
      location: package test
      private test.Person arg0;
      ^
      /Users/rasp/jbossqa/workspace-eap/TestWSProject/src/test/ws/jaxws/Echo.java:25: cannot find symbol
      symbol : class Person
      location: package test
      public test.Person getArg0() {
      ^
      ...

      This only happens when the selected runtime has ws-cxf installed. See the steps to reproduce.

            Unassigned Unassigned
            exd-mmalina Martin Malina
            Votes:
            0 Vote for this issue
            Watchers:
            7 Start watching this issue

              Created:
              Updated:
              Resolved: