0 Replies Latest reply on May 12, 2008 10:21 AM by 666705

    Cannot use inner class as a method parameter of service endpoint impl class

    666705
      Do you have a same problem with me?

      I try to implement web service with EJB3 style but it fail when deploying step. It raise an exception "cannot find symbol symbol", especailly on inner class. i wonder with the same code but deploy web service as POJO style(web application),it work fine.

      I use wsimport tool for generating all artifact java code from wsdl. The generated service porttype class has a service method in wrapping style and one of input parameter is inner class because JAXB generated an anonymous complex type as a inner class of parent complex type.

      Eg.
           <xsd:element name="echoConcat">
      <xsd:complexType>
      <xsd:sequence>
      <xsd:element name="messages">
      <xsd:complexType>
      <xsd:sequence>
      <xsd:element name="sub-message" maxOccurs="unbounded" type="xsd:string"/>
      </xsd:sequence>
      </xsd:complexType>
      </xsd:element>
      </xsd:sequence>
      </xsd:complexType>
      </xsd:element>
      The class of element messages is inner class of EchoConcat class of element echoConcat.

      it's fine, if i don't use an anonymous complex type.
      Eg.
      <xsd:element name="echoConcat">
      <xsd:complexType>
      <xsd:sequence>
      <xsd:element name="messages" type="testEchoService:messagesT">
      </xsd:element>
      </xsd:sequence>
      </xsd:complexType>
      </xsd:element>

      <xsd:complexType name="messagesT">
      <xsd:sequence>
      <xsd:element name="sub-message" maxOccurs="unbounded" type="xsd:string"/>
      </xsd:sequence>
      </xsd:complexType>

      I think, it's a bug.