on 11-30-2007 2:39 PM
Hello guys,
I was looking for an answer everywhere, but with no succes.
Problem:
I am using SAP NetWeaver BI 7.0
My interface mapping looks like this:
1 XML INPUT ---> JAVA MAPPING ---> n XML OUTPUTS
O found out, tha by setting occurence to "0..onbounded", causes, that also input is comming as "0..onbounded" xml. That I don't understant, but OK, can live with that. In runtime it looks that on the output, my xml root element is wrapped to this structure:
<b>Messages
|__Message1
|__SDS_XSD_ZPPM_POB</b>
What is frustrated problem for me, that I need to validate on the output in my Java Mapping the xml document against the schema but I always get this error:
<i>Fatal Error: com.sap.engine.lib.xml.parser.ParserException:
ERRORS :
cvc-element : element information item '/:Messages[1]' is not associated with element declaration and do not has an attribute information item among the element information item's [attributes] whose [namespace name] is identical to http://www.w3.org/2001/XMLSchema-instance and whose [local name] is type.</i>
This is the begin of the xml:
<?xml version="1.0" encoding="UTF-8"?>
<Messages xmlns="http://xxx.sk/is_xx">
<Message1>
<SDS_XSD_ZPPM_POB>
This is the begin of the schema definition:
<?xml version="1.0" encoding="UTF-8"?>
<xsd:schema targetNamespace="http://sap.com/xi/XI/SplitAndMerge" xmlns:p0="http://xxx.sk/is_xx"
xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns="http://sap.com/xi/XI/SplitAndMerge">
<xsd:element name="Messages" xmlns:p0="http://xxx.sk/is_xx">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="Message1" form="qualified">
<xsd:complexType>
<xsd:sequence>
<xsd:element ref="SDS_XSD_ZPPM_POB" minOccurs="0" maxOccurs="unbounded"
xmlns:xsd="http://www.w3.org/2001/XMLSchema" />
</xsd:sequence>
</xsd:complexType>
</xsd:element>
</xsd:sequence>
</xsd:complexType>
</xsd:element>
Without validation everything works perfect.
CAN ANYBODY HELP WITH SOME CLUE?
Thanks a lot
Rasto
Message was edited by:
Peter Guzik
Peter, have you resolved the problem?
P.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
No I didn't.
Here is the result of my fixes:
<b>XML:</b>
<?xml version="1.0" encoding="UTF-8"?>
<Messages xmlns="http://sap.com/xi/XI/SplitAndMerge">
<Message1>
<SDS_XSD_ZPPM_POB>
<pob>010</pob>
.........
<b>XSD:</b>
<?xml version="1.0" encoding="UTF-8"?>
<xsd:schema targetNamespace="http://sap.com/xi/XI/SplitAndMerge" xmlns:p0="http://xxx.sk/is_sds"
xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns="http://sap.com/xi/XI/SplitAndMerge">
<xsd:element name="Messages">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="Message1" form="qualified">
<xsd:complexType>
<xsd:sequence>
<xsd:element ref="SDS_XSD_ZPPM_POB" minOccurs="0" maxOccurs="unbounded"
xmlns:xsd="http://www.w3.org/2001/XMLSchema" />
</xsd:sequence>
<b>RESULT EXCEPTION:</b>
Fatal Error: com.sap.engine.lib.xml.parser.ParserException:
ERRORS :
cvc-element : element information item '/:Messages[1]/:Message1[1]/:SDS_XSD_ZPPM_POB[1]/:pob[1]' is not associated with element declaration and do not has an attribute information item among the element information item's [attributes] whose [namespace name] is identical to http://www.w3.org/2001/XMLSchema-instance and whose [local name] is type.
cvc-element : element information item '/:Messages[1]/:Message1[1]/:SDS_XSD_ZPPM_POB[1]' is not valid with respect to it's complex type definition..
cvc-element : element information item '/:Messages[1]/:Message1[1]' is not valid with respect to it's complex type definition..
cvc-element : element information item '/:Messages[1]' is not valid with respect to it's complex type definition..
If there is an error in xml, according this message it is impossible to find it..
In your XSD, use
<xsd:element name="<b>p0:</b>Messages">
and
<xsd:element name="<b>p0:</b>Message1">
for the elements definition.
Anyway, I think the namespace for these tags should be "http://sap.com/xi/XI/SplitAndMerge", shouldn't it? Check your XML.
Best regards,
Henrique.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Peter!
Probably your target document produced by java mapping is not correct.. Take a XML produced by your java mapping and compare it to one produced by standard mapping.. So create a sample, where you will create some "test" message mapping and it's output as a reference for comparing to your XML produced by java mapping.
Peter
p.s. ked posielas veci takto do fora, je dobre zmazat povodne namespacy.. vsetci teraz vieme, kde makas
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
86 | |
10 | |
10 | |
9 | |
7 | |
7 | |
6 | |
5 | |
4 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.