cancel
Showing results for 
Search instead for 
Did you mean: 

Problem With Java Mapping

sebastin_alvarez
Participant
0 Kudos

Hi all, I'm doing a Java Mapping.

When I test it in the Developer Studio it works fine, but when I test it from PI I have this problem.

Error: Validation error: line: 33; col: 86; @{}:fecha : Node is declared to be with simple type. It's value '2010-12-12-06:00' does not belong to the lexical space of it's type definition.

Error: Validation error: line: 46; col: 100; :TimbreFiscalDigital : Element is matched to a wildcard, whose {process contents} property is 'strict'. Top level element declaration with such an uri and name is not defined.

Error: Validation error: line: 49; col: 43; :AddendaBuzonFiscal : Element is matched to a wildcard, whose {process contents} property is 'strict'. Top level element declaration with such an uri and name is not defined.

I hope you can help me.

Regards

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Hi Alvarez,

If you see the error it is complaining about the value '2010-12-12-06:00' . Please check whether that value is allowed for that field or it has any limitations.

Regards,

---Satish

sebastin_alvarez
Participant
0 Kudos

Yes, you are right.

But, what can I do with the other two errors?

Regards

Answers (3)

Answers (3)

anupam_ghosh2
Active Contributor
0 Kudos

Hi Sebastian and Selene,

                      Working of a java mapping code depends on java version within PI. Could you please mention the version of PI you are working with? Please try compiling the code with right version of java , jar file and NWDS which is accepted by SAP-PI. After you are sure that environment of compilation matches with the SAP-PI requirement. Then you try importing the external jar file into java project. This will create class files. Compile project with all files. Finally export the project jar file ( which includes class files from external jar files) to SAP-PI. Thus within PI your code will refer for classes locally, rather than from SAP-PI. This way you might avoid this error provided you are not getting the same outside SAP-PI.  

Regards

Anupam

anupam_ghosh2
Active Contributor
0 Kudos

Hi Sebastian,

                       what is the input to the mapping? is it the payload or XML schema? This problem "Element is matched to a wildcard, whose {process contents} property is 'strict'" comes with XML schema which the current XML refers to. Try to search this line within the  XSD which the input XML refers to.

<xs:any namespace="##targetNamespace" processContents="strict"  />

processContents="strict" means there  must be a top-level declaration for the item available in XSD, or the item must have an xsi:type, and the item must be valid as appropriate.A wildcard provides for validation of attribute and element information items dependent on their namespace name, but independently of their local name. The input payload is referring to a Schema which is causing the parser to fail. In other words the data within the elements TimbreFiscalDigital and AddendaBuzonFiscal are not correct as per expectations of the XSD. Thus the payload follow the wildcard specifications mentioned in XSD.

Try analyzing the XSD that the payload refers to ,and look for <xs:any> element. Then modify the payload for the fields  TimbreFiscalDigital and AddendaBuzonFiscal.  Please refer to this link to know more about wildcard specification.

Regards

Anupam

Former Member
0 Kudos

Hi Anupam

In my case the error is:

line: 1; col: 3825; {http://www.sat.gob.mx/TimbreFiscalDigital}:TimbreFiscalDigital : Element is matched to a wildcard, whose {process contents} property is 'strict'. Top level element declaration with such an uri and name is not defined.1: line: 1; col: 4023; {http://www.fact.com.mx/schema/fx}:FactDocMX : Element is matched to a wildcard, whose {process contents} property is 'strict'. Top level element declaration with such an uri and name is not defined.

It is very similar with Sebastian's error.

But, my big doubt is:

Previously I wrote the same code in java classes outside Netwaver Developer Studio, and with the same files (XML and XSD), the classes run without problems.

 

Next, I copied this code into NWDS but the code runs with errors.

 

In both cases, I matched the same XML and XSD files.

I wonder if this problem has reference with java version, because outside NWDS I compiled the classes with jdk 7.0.01 and the engine of NWDS has jdk 4.

The NWDS version is 7.02.06

Thanks......

Former Member
0 Kudos

Hi,

Where you able to fix this problem with parsing. If so please let me know how you have fixed this error.

thanks.

SeleneMejía