MarshalToBytes throws for "<" and ">"

(Doc ID 1644995.1)

Last updated on APRIL 14, 2014

Applies to:

Oracle Java CAPS Enterprise Service Bus - Version R6 U1 and later
Information in this document applies to any platform.


When we use following (1) XSD file with minOccurs="0" maxOccurs="1000" for an element's definition to create an OTD, if xml does not contain "<"and ">", the marshalToBytes in following (2) JCD works fine.

However, when xml contains "<" or ">", marshalToBytes will throw following (3) Exception.

(1) XSD file

<?xml version="1.0" encoding="UTF-8"?>
<schema xmlns="">
    <element name="Root">
                <element name="ABP00100">
                            <element name="ABP00200" minOccurs="0" maxOccurs="1000"/>

(2) JCD
 String xml ="<Root><ABP00100><ABP00200>test<test>test</ABP00200></ABP00100></Root>";
 test_Root_1.unmarshalFromString( xml );
 byte[] data1 = test_Root_1.marshalToBytes();

(3) Exception  XmlLexer.init() failed. Unexpected character. position = 0, fragment='test<test>test'
        at xsd.test_793328304.Root.marshal(xsd.test_793328304.Root:992)
        at xsd.test_793328304.Root.marshalToBytes(xsd.test_793328304.Root:963)
        at CAPSProject1.Collaboration_1.start(CAPSProject1.Collaboration_1:30)


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