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

        No work has yet been logged on this issue.

          People

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

            Dates

            • Created:
              Updated:

              Development