Unable to use XMLBean as instance variable in webservice complex types

(Doc ID 1286822.1)

Last updated on JUNE 09, 2016

Applies to:

BEA XMLBeans - Version: All and later   [Release: and later ]
Oracle Weblogic Server - Version: 10.3 and later ]
Information in this document applies to any platform.


Weblogic 8.1 (WLS) Webservice contains XMLBean as instance variable in complex type definition in the schema, which works fine.  But when trying to upgrade the Webservice to WLS 10.3 using Weblogic Workshop (WLW), the same schema does not work anymore, throwing the following error:
A java class "....." is being used as a parameter or return type that contains a property or field that is an
XmlBean "....", this is not allowed.

According to the WLS 10.3 docs here, XMLBeans are supported in WLS 10.3.

Snippets of the schema in use:
<xs:scema xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlms:tns="http://temp.openrui.org/XMLBeansWS/MySchema.xsd" targetNamespace="http://temp.openuri.org/XMLBeansWS/MySchema.xsd" elementFormDefault="qualified" attributeFormDefault="unqualified">
   <xs:complexType name="MyType">
      <xs:element name="string1" type="xs:string" minOccurs="1"/>
      <xs:element name="string2" type="xs:string" minOccurs="1"/>

The XMLBean complex type is wrapped inside a POJO as instance variable:
public class MyDTO {
   MyType myType;
  ... // the getter and setter for myType


Sign In with your My Oracle Support account

Don't have a My Oracle Support account? Click to get started

My Oracle Support provides customers with access to over a
Million Knowledge Articles and hundreds of Community platforms