0 Replies Latest reply on Jul 29, 2010 7:21 AM by 592320

    complex types with single array type element, marshaling exception

      For our JAXRPC web service, we have a complex type, as follows:

      <xs:complexType name = "SomeFault">
      <xs:element name = "errorMessages" type="some:ErrorMessageWSType" minOccurs="0" maxOccurs="unbounded" />

      <xs:simpleType name = "ErrorMessageWSType">
      <xs:restriction base = "xs:NMTOKEN">
      <xs:enumeration value = "INVALID_1"/>
      <xs:enumeration value = "INVALID_2"/>
      <xs:enumeration value = "INVALID_3"/>

      We are running into Marshaling exceptions on the server side when the response/fault complex type has a single array type field.

      weblogic.wsee.codec.CodecException: Failed to encode
      com.bea.xml.XmlException: failed to find a suitable binding type for use in marshalling object "[Lnamespace.type.ErrorMessageWSType;@693767e9".  using schema type: t=SomeFault@http://namespace/SOME/v1 java type:namespace.type.ErrorMessageWSType[]

      If I change SomeFault, by adding another element, the error goes away.

      <xs:complexType name = "SomeFault">
      <xs:element name = "errorMessages" type="some:ErrorMessageWSType" maxOccurs="unbounded" />
      <xs:element name = "dummyString" type="xsd:string" minOccurs="0" />

      Am I doing something wrong during the wsdlc code generation or is this a known issue?

      <wsdlc srcWsdl="${wsdl.dir}/${wsdl.file.name}"
      packageName="${package.prefix}" type="JAXRPC">