I’m using the xCBL 4.0 Schema to create Records in SAP BC 4.6.
I use an XSD which includes several elements, so i have to decide which is the root element for the record. Some of the elements in that XSD work fine, but some throw the following exception:
Could not use that DTD or XML Document.
java.lang.reflect.InvocationTargetException: StackOverflowError
Any suggestions how to solve the problem?
Thanks,
Michael
PS: Maybe it is interesting to know, that the namespaces and there schemas are created, but not the record.
Schema that works:
\schema\org\xcbl\path_delim\schemas\ xcbl\v4_0\ordermanagement\v1_0\ ordermanagement.xsd (root node “OrderStatusResult”)
I had to modify the core.xsd so that SAP BC could find the typedefinitions [ATTACH]91[/ATTACH]
\schema\org\xcbl\path_delim\ schemas\xcbl\v4_0\core\core.xsd
I attempted to create a doc type from the Order element inside the ordermanagement.xsd using Developer / IS 6.5.
com.wm.util.LocalizedException: [ISC.0082.9106] Complex type PackageReferenceType {rrn:org.xcbl:schemas/xcbl/v4_0/core/core.xsd} is recursive.
webMethods Integration Server does not support creating a document type from an XSD with a recursive complex type.
As the error message states, IS does not support creating doc types from XSD’s containing recursive complex types.[/i]
[ISC.0082.9106]As you can see from line 18 in the schema fragment below, the element PackageReferenceType contains a recursive definition. You could modify this to remove the self-reference to get past this issue. Since this is an optional element (minOccurs=0) you could just remove it in this case.[/i]
[ISC.0082.9106]<xsd:complexType name=“PackageReferenceType”> xsd:annotation xsd:documentationprovides a reference for the packaging of the item.</xsd:documentation>
</xsd:annotation> xsd:sequence
<xsd:element name=“Quantity” type=“QuantityType” minOccurs=“0”> xsd:annotation xsd:documentationis the quantity of the item in the referenced package, or the quantity of the item
per package, depending on the use.</xsd:documentation>
</xsd:annotation>
</xsd:element>
<xsd:element name=“PackageIDReference” type=“xsd:int”> xsd:annotation xsd:documentationreferences the package ID of the package containing the item
found in the PackageDetail element. </xsd:documentation>
</xsd:annotation>
</xsd:element>
<xsd:element name=“PackageReference” type=“PackageReferenceType” minOccurs=“0”> xsd:annotation xsd:documentationprovides a reference for the packaging of the item.</xsd:documentation>
</xsd:annotation>
</xsd:element>
</xsd:sequence>
</xsd:complexType> [/i]
[ISC.0082.9106]BTW, PackageDetailType is also recursive. Suggest you check with WM on how best to work with XCBL from SAP BC.
I maybe found another recursive definition in CharacteristicAttributeType.xsd
I changed the PackageReferenceType and PackageDetailType by cutting out the recursive calls and now it works
I got a kind of ‘StackOverflowError’ while using the ‘pub.xml:documentToXmlString’ service. I found out that this was because of a recursive document type existing in the input given to document of the above service.