Beehive
  1. Beehive
  2. BEEHIVE-600

Document Literal Wrapped webservice missing methods in wsdl

    Details

    • Type: Bug Bug
    • Status: Open
    • Priority: Major Major
    • Resolution: Unresolved
    • Affects Version/s: V1Alpha, V1Beta, v1m1
    • Fix Version/s: None
    • Component/s: Web Services (181)
    • Labels:
      None
    • Environment:
      N/A

      Description

      This bug might be related to Beehive-599.

      A webservice deployed through Beehive generated a wsdl that is missing methods for wrapped types.

      For example, generated wsdl contains:

      <complexType name="Employee">
      <sequence>
      <element name="value" nillable="true" type="impl:Employee"/>
      </sequence>
      </complexType>

      What is expected by TCK:

      <xs:complexType name="Employee">
      <xs:sequence>
      <xs:element name="Name" type="java1:Name"/>
      <xs:element name="Dept" type="java1:Department"/>
      <xs:element name="Salary" type="java1:Salary"/>
      <xs:element name="Address" type="java1:Address"/>
      <xs:element name="Title" type="xs:string"/>
      <xs:element name="Type" type="xs:int"/>
      </xs:sequence>

      The webservice in question is:

      package com.bea.ts.tests.complex.doclit.wrap;

      import com.bea.ts.tests.utils.*;
      import com.bea.ts.tests.utils.holders.*;

      import javax.jws.WebMethod;
      import javax.jws.WebParam;
      import javax.jws.WebService;
      import javax.jws.soap.SOAPBinding;

      @WebService
      @SOAPBinding(style=SOAPBinding.Style.DOCUMENT, use=SOAPBinding.Use.LITERAL, parameterStyle=SOAPBinding.ParameterStyle.WRAPPED)
      public class ComplexDocLitWrapWebService {

      @WebMethod
      public int changeName(@WebParam(name="changename", header=true, mode=WebParam.Mode.INOUT) EmployeeHolder employeeHolder) throws NameException

      { Employee employee = employeeHolder.value; Name oldName = employee.getName(); Name newName = new Name(oldName.getLastName(), oldName.getFirstName()); employee.setName(newName); return 0; }

      @WebMethod
      public boolean changeDepartment(@WebParam(name="changedepartment", header=true, mode=WebParam.Mode.INOUT) EmployeeHolder employeeHolder) throws DepartmentException

      { Employee employee = employeeHolder.value; Department department = new Department("Docs", "NY"); employee.setDept(department); return true; }

      @WebMethod
      public double changeSalary(@WebParam(name="changesalary", header=true, mode=WebParam.Mode.INOUT) EmployeeHolder employeeHolder) throws SalaryException

      { Employee employee = employeeHolder.value; Salary oldSalary = employee.getSalary(); Salary newSalary = new Salary(oldSalary.getSalary() + 5000, oldSalary.getBonusPercentage() + 5); employee.setSalary(newSalary); return 0.0; }

      @WebMethod
      public float changeAddress(@WebParam(name="changeaddress", header=true, mode=WebParam.Mode.INOUT) EmployeeHolder employeeHolder) throws AddressException

      { Employee employee = employeeHolder.value; Address oldAddress = employee.getAddress(); Address newAddress = new Address(oldAddress.getEmail(), oldAddress.getPhone(), oldAddress.getStreet(), oldAddress.getCity(), oldAddress.getState(), "99999", oldAddress.getCountry()); employee.setAddress(newAddress); return 0.0f; }

      /*
      @WebMethod
      public String[] changeTitle(@WebParam(name="changetitle", header=true, mode=WebParam.Mode.INOUT) EmployeeHolder employeeHolder) throws TitleException {
      Employee employee = employeeHolder.value;
      String oldTitle = employee.getTitle();
      String newTitle = "Senior " + oldTitle;
      employee.setTitle(newTitle);
      String[] wrapresult =

      {"change", "successful"}

      ;
      return wrapresult;
      }

      @WebMethod
      public List changeType(@WebParam(name="changetype", header=true, mode=WebParam.Mode.INOUT) EmployeeHolder employeeHolder) throws TypeException

      { Employee employee = employeeHolder.value; int oldType = employee.getType(); int newType = (oldType + 1) % 3; employee.setType(newType); return new ArrayList(); }

      */

      @WebMethod
      public Employee returnEmployee(@WebParam(name="returnemployee", mode=WebParam.Mode.IN) Employee employee)

      { return employee; }

      @WebMethod
      public Employee returnEmployeeHeader(@WebParam(name="returnemployeeheader", header=true, mode=WebParam.Mode.IN) Employee employee) { return employee; }

      @WebMethod
      public int newEmployee(@WebParam(name="newemployee", header=true, mode=WebParam.Mode.OUT) EmployeeHolder employeeHolder)

      { Name name = new Name("J2EE", "User"); Department dept = new Department("Eng", "SF"); Salary salary = new Salary(100000, 15); Address address = new Address("j2eeuser@bea.com", "415-123-4567", "Montgomery Street", "SF", "CA", "94104", "U.S."); String title = "Senior Software Engineer"; int type = EmployeeType.PERMANENT; Employee employee = new Employee(name, dept, salary, address, title, type); employeeHolder.value = employee; return 0; }

      @WebMethod
      public int throwNameException(int foo) throws NameException

      { throw new NameException(); }

      @WebMethod
      public int throwDepartmentException(int foo) throws DepartmentException

      { throw new DepartmentException(); }

      @WebMethod
      public int throwSalaryException(int foo) throws SalaryException

      { throw new SalaryException(); }

      @WebMethod
      public int throwAddressException(int foo) throws AddressException

      { throw new AddressException(); }

      @WebMethod
      public int throwTitleException(int foo) throws TitleException

      { throw new TitleException(); }

      @WebMethod
      public int throwTypeException(int foo) throws TypeException

      { throw new TypeException(); }

      }

      1. JIRA.zip
        3 kB
        Xibin Zeng
      2. BEEHIVE-600-wsmRepro.tar
        50 kB
        Jeremiah Johnson
      3. BEEHIVE-600-wsmRepro.tar
        40 kB
        Jeremiah Johnson
      4. BEEHIVE-600-repro-01.tar
        40 kB
        Jeremiah Johnson

        Activity

        Hide
        Eddie O'Neil added a comment -

        Daryoush, another WSM issue. I've fixed this one up (converted it into a bug) and passed it along.

        If anyone else wants to step in and help fix WSM issues, feel free to grab this one!

        Show
        Eddie O'Neil added a comment - Daryoush, another WSM issue. I've fixed this one up (converted it into a bug) and passed it along. If anyone else wants to step in and help fix WSM issues, feel free to grab this one!
        Hide
        daryoush mehrtash added a comment -

        Xibin,

        To be able to duplicate this bug I would need the types that the JWS depends on.

        Please attack the jws along with the support types to this bug. The following classes and any other classes that they include should be attached to this bug.

        Employee,Name,Department,Salary,Address

        There is also the sample:

        http://localhost:8080/wsm-samplesWS/web/complex/DocumentLiteralWrappedSample.jws?wsdl

        That is very much similar to this JWS, which does seem to work for me; there might be something different on the types that are used in this web service.

        Daryoush

        Show
        daryoush mehrtash added a comment - Xibin, To be able to duplicate this bug I would need the types that the JWS depends on. Please attack the jws along with the support types to this bug. The following classes and any other classes that they include should be attached to this bug. Employee,Name,Department,Salary,Address There is also the sample: http://localhost:8080/wsm-samplesWS/web/complex/DocumentLiteralWrappedSample.jws?wsdl That is very much similar to this JWS, which does seem to work for me; there might be something different on the types that are used in this web service. Daryoush
        Hide
        daryoush mehrtash added a comment -

        I have looked into this bug, the problem is the WSDL that is generated from holders that are in headers is not correct. I have to update to the new Axis and then try to debug this further.

        Show
        daryoush mehrtash added a comment - I have looked into this bug, the problem is the WSDL that is generated from holders that are in headers is not correct. I have to update to the new Axis and then try to debug this further.
        Hide
        daryoush mehrtash added a comment -

        We stil have this problem with upgraded Axis. There seems to be a bug in Axis in generating WSDL for header types. It doesn't seem to recognize holders.

        This bug should not be a show stopper for the V1 release. We need to try to fix this after the V1 release.

        Show
        daryoush mehrtash added a comment - We stil have this problem with upgraded Axis. There seems to be a bug in Axis in generating WSDL for header types. It doesn't seem to recognize holders. This bug should not be a show stopper for the V1 release. We need to try to fix this after the V1 release.
        Hide
        Jeremiah Johnson added a comment -

        I am working on making a more clear repro. This will give you an idea of what is going wrong. Untar into some directory and then do the following:
        cd BEEHIVE-600
        ant -f beehive-wsm/WEB-INF/src/build.xml build war
        mv BEEHIVE-600.war $CATALINA_HOME/webapps
        http://localhost:8080/BEEHIVE-600/

        Note that this script assumes that you have a Beehive distribution at BEEHIVE_HOME. At the Web page, there are 4 links - 3 are good and the forth is bad. Below the bad link is XML showing what is there and what is expected.

        Show
        Jeremiah Johnson added a comment - I am working on making a more clear repro. This will give you an idea of what is going wrong. Untar into some directory and then do the following: cd BEEHIVE-600 ant -f beehive-wsm/WEB-INF/src/build.xml build war mv BEEHIVE-600 .war $CATALINA_HOME/webapps http://localhost:8080/BEEHIVE-600/ Note that this script assumes that you have a Beehive distribution at BEEHIVE_HOME. At the Web page, there are 4 links - 3 are good and the forth is bad. Below the bad link is XML showing what is there and what is expected.
        Hide
        Jeremiah Johnson added a comment -

        Replacing the previous repro attachment to add some more detail.

        Show
        Jeremiah Johnson added a comment - Replacing the previous repro attachment to add some more detail.
        Hide
        Jeremiah Johnson added a comment -

        I assumed that my own attachments would overwrite old ones when I reused a name. Since that doesn't happen, then here is the preferred attachment for you to use - BEEHIVE-600-repro-01.tar is the place to start.

        Show
        Jeremiah Johnson added a comment - I assumed that my own attachments would overwrite old ones when I reused a name. Since that doesn't happen, then here is the preferred attachment for you to use - BEEHIVE-600 -repro-01.tar is the place to start.

          People

          • Assignee:
            Unassigned
            Reporter:
            Xibin Zeng
          • Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

            • Created:
              Updated:

              Development