У меня xslt маппинг из сообщения А в сообщение Б. вторым я создал графический маппинг из Б в Б.
RuntimeException when executing application mapping program com/sap/xi/tf/_arProduct_description2HTML_; Details: com.sap.aii.mappingtool.tf7.IllegalInstanceException; Cannot create target element /ns0:setProductItems. Values missing in queue context. Target XSD requires a value for this element, but the target-field mapping does not create one. Check whether the XML instance is valid for the source XSD, and whether the target-field mapping fulfils the requirement of the target XSD
Мне не приходилось раньше делать такие каскадные мапинги. Что я делаю не так?
10:10:17 Start of test
Creating mapping sequence with 2 steps.
Creating step 0.
Creating step 1.
Start executing mapping sequence with 2 steps.
Executing mapping step 0
Call XSLT processor with stylsheet 20150922/ARTMAS05_2_arProducts.xsl.
Returned form XSLT processor.
XSLT transformation: 20150922/ARTMAS05_2_arProducts.xsl completed with 0 warning(s).
Mapping step 0 has been executed.
Executing mapping step 1
Message Mapping arProduct_description2HTML |
http://www.ххх.ru/interfaces/istore/sap not compiled. Starting compilation...
Compilation of arProduct_description2HTML successful
Loaded class com.sap.xi.tf._arProduct_description2HTML_
Message Mapping arProduct_description2HTML |
http://www.ххх.ru/interfaces/istore/sap not compiled. Starting compilation...
Compilation of arProduct_description2HTML successful
Loaded class com.sap.xi.tf._arProduct_description2HTML_$MT$InnerLibsList
Message Mapping arProduct_description2HTML |
http://www.ххх.ru/interfaces/istore/sap not compiled. Starting compilation...
Compilation of arProduct_description2HTML successful
Loaded class com.sap.xi.tf._arProduct_description2HTML_$MT$InnerParamsList
Call method execute of the application Java mapping com.sap.xi.tf._arProduct_description2HTML_
*** START APPLICATION TRACE ***
Document start
*** END APPLICATION TRACE ***
RuntimeException during appliction Java mapping com/sap/xi/tf/_arProduct_description2HTML_
com.sap.aii.mappingtool.tf7.IllegalInstanceException: Cannot create target element /ns0:setProductItems. Values missing in queue context. Target XSD requires a value for this element, but the target-field mapping does not create one. Check whether the XML instance is valid for the source XSD, and whether the target-field mapping fulfils the requirement of the target XSD at com.sap.aii.mappingtool.tf7.AMappingProgram.processNode(AMappingProgram.java:375) at com.sap.aii.mappingtool.tf7.AMappingProgram.start(AMappingProgram.java:512) at com.sap.aii.mappingtool.tf7.Transformer.start(Transformer.java:142) at com.sap.aii.mappingtool.tf7.AMappingProgram.transform(AMappingProgram.java:644) at com.sap.aii.ib.server.mapping.execution.JavaMapping.executeStep(JavaMapping.java:92) at com.sap.aii.ib.server.mapping.execution.Mapping.execute(Mapping.java:60) at com.sap.aii.ib.server.mapping.execution.SequenceMapping.executeStep(SequenceMapping.java:40) at com.sap.aii.ib.server.mapping.execution.Mapping.execute(Mapping.java:60) at com.sap.aii.ib.server.mapping.execution.MappingHandler.map(MappingHandler.java:87) at com.sap.aii.ib.server.mapping.execution.MappingHandler.map(MappingHandler.java:54) at com.sap.aii.ibrep.server.mapping.rt.MappingHandlerAdapter.run(MappingHandlerAdapter.java:139) at com.sap.aii.ibrep.server.mapping.exec.ExecuteIfMapCommand.execute(ExecuteIfMapCommand.java:33) at com.sap.aii.ib.server.mapping.exec.CommandManager.execute(CommandManager.java:43) at com.sap.aii.ibrep.server.mapping.ServerMapService.execute(ServerMapService.java:40) at com.sap.aii.ibrep.server.mapping.MapServiceBean.execute(MapServiceBean.java:40) at sun.reflect.GeneratedMethodAccessor1592.invoke(Unknown Source) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) at java.lang.reflect.Method.invoke(Method.java:592) at com.sap.engine.services.ejb3.runtime.impl.RequestInvocationContext.proceedFinal(RequestInvocationContext.java:43) at com.sap.engine.services.ejb3.runtime.impl.AbstractInvocationContext.proceed(AbstractInvocationContext.java:166) at com.sap.engine.services.ejb3.runtime.impl.Interceptors_StatesTransition.invoke(Interceptors_StatesTransition.java:19) at com.sap.engine.services.ejb3.runtime.impl.AbstractInvocationContext.proceed(AbstractInvocationContext.java:179) at com.sap.engine.services.ejb3.runtime.impl.Interceptors_Resource.invoke(Interceptors_Resource.java:74) at com.sap.engine.services.ejb3.runtime.impl.AbstractInvocationContext.proceed(AbstractInvocationContext.java:179) at com.sap.engine.services.ejb3.runtime.impl.Interceptors_Transaction.doWorkWithAttribute(Interceptors_Transaction.java:38) at com.sap.engine.services.ejb3.runtime.impl.Interceptors_Transaction.invoke(Interceptors_Transaction.java:22) at com.sap.engine.services.ejb3.runtime.impl.AbstractInvocationContext.proceed(AbstractInvocationContext.java:179) at com.sap.engine.services.ejb3.runtime.impl.AbstractInvocationContext.proceed(AbstractInvocationContext.java:191) at com.sap.engine.services.ejb3.runtime.impl.Interceptors_StatelessInstanceGetter.invoke(Interceptors_StatelessInstanceGetter.java:23) at com.sap.engine.services.ejb3.runtime.impl.AbstractInvocationContext.proceed(AbstractInvocationContext.java:179) at com.sap.engine.services.ejb3.runtime.impl.Interceptors_SecurityCheck.invoke(Interceptors_SecurityCheck.java:21) at com.sap.engine.services.ejb3.runtime.impl.AbstractInvocationContext.proceed(AbstractInvocationContext.java:179) at com.sap.engine.services.ejb3.runtime.impl.Interceptors_ExceptionTracer.invoke(Interceptors_ExceptionTracer.java:16) at com.sap.engine.services.ejb3.runtime.impl.AbstractInvocationContext.proceed(AbstractInvocationContext.java:179) at com.sap.engine.services.ejb3.runtime.impl.DefaultInvocationChainsManager.startChain(DefaultInvocationChainsManager.java:133) at com.sap.engine.services.ejb3.runtime.impl.DefaultEJBProxyInvocationHandler.invoke(DefaultEJBProxyInvocationHandler.java:164) at com.sun.proxy.$Proxy1013.execute(Unknown Source) at sun.reflect.GeneratedMethodAccessor1591.invoke(Unknown Source) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) at java.lang.reflect.Method.invoke(Method.java:592) at com.sap.engine.services.rmi_p4.P4DynamicSkeleton.dispatch(P4DynamicSkeleton.java:234) at com.sap.engine.services.rmi_p4.DispatchImpl._runInternal(DispatchImpl.java:358) at com.sap.engine.services.rmi_p4.server.ServerDispatchImpl.run(ServerDispatchImpl.java:70) at com.sap.engine.services.rmi_p4.P4Message.process(P4Message.java:62) at com.sap.engine.services.rmi_p4.P4Message.execute(P4Message.java:37) at com.sap.engine.services.cross.fca.FCAConnectorImpl.executeRequest(FCAConnectorImpl.java:900) at com.sap.engine.services.rmi_p4.P4Message.process(P4Message.java:53) at com.sap.engine.services.cross.fca.MessageReader.run(MessageReader.java:58) at com.sap.engine.core.thread.execution.Executable.run(Executable.java:108) at com.sap.engine.core.thread.execution.CentralExecutor$SingleThread.run(CentralExecutor.java:304)
10:10:20 End of test
Если запускаю только первый шаг - он проходит успешно и создает всю нужную структуру
<?xml version="1.0" encoding="UTF-8"?><ns1:setProductItems xmlns:ns1="http://www.ххх.ru:443/"><ns1:arProduct><ns1:arProductEl><ns1:code>000000000001000570</ns1:code><ns1:name>Шляпа Шампания текстиль с узкими полями блестящая крошка в ассортименте Н87468 </ns1:name><ns1:short_name>@ OVO Discovery Блинница антип покр220м1</ns1:short_name><ns1:active_from>20100304</ns1:active_from><ns1:active_to>99991231</ns1:active_to><ns1:section>17010203V</ns1:section><ns1:sort>100</ns1:sort><ns1:price_band>01</ns1:price_band><ns1:brand>SKOVO</ns1:brand><ns1:attr_new/><ns1:article>РАПФВЫОЛ</ns1:article><ns1:announce>Блинница SCOVO Discovery СД-039 антипригарное покрытие алюминий 22см </ns1:announce><ns1:description><p>Просто текст длинный, который не уместился в строку страницы просто текст длинный, который не уместился в строку страницы <p>Новая строка с форматом по умолчанию <p ALIGN=JUSTIFY>В просто длинный текст с выравниванием по ширине. Это не заметно если строка меньше ширины экрана <p ALIGN=CENTER>С С выравниванием по центру <p><B>Выделено</> <p ALIGN=left>L с выравниванием по левому краю <p ALIGN=left><U>U Подчеркнуто</> <br/>Обычный текст - после разрыва строки /<p ALIGN=JUSTIFY>В просто длинный текст с выравниванием по ширине. Это не заметно если строка меньше ширины экрана Вот тут начинается продолжение вывода с форматированием по ширине. Вот такой вот пример . </ns1:description><ns1:props><ns1:ArrayOfPropEl><ns1:name>COLOR</ns1:name><ns1:value>Красный</ns1:value></ns1:ArrayOfPropEl><ns1:ArrayOfPropEl><ns1:name>GENDER</ns1:name><ns1:value>мужчина</ns1:value></ns1:ArrayOfPropEl><ns1:ArrayOfPropEl><ns1:name>PICTURE_DESIGN</ns1:name><ns1:value>Полосы</ns1:value></ns1:ArrayOfPropEl><ns1:ArrayOfPropEl><ns1:name>PACKAGE_TYPE</ns1:name><ns1:value>Чемодан</ns1:value></ns1:ArrayOfPropEl></ns1:props><ns1:measures><ns1:ArrayOfMeasureEl><ns1:primary>-1</ns1:primary><ns1:numerator>25</ns1:numerator><ns1:denumerator>1</ns1:denumerator><ns1:title>M</ns1:title><ns1:titleIso>MTR</ns1:titleIso><ns1:height>0.000</ns1:height><ns1:length>0.000</ns1:length><ns1:volume>0.000</ns1:volume><ns1:weight>0.000</ns1:weight><ns1:width>0.000</ns1:width></ns1:ArrayOfMeasureEl><ns1:ArrayOfMeasureEl><ns1:primary>1</ns1:primary><ns1:numerator>1</ns1:numerator><ns1:denumerator>1</ns1:denumerator><ns1:title>ST</ns1:title><ns1:titleIso>PCE</ns1:titleIso><ns1:height>0.000</ns1:height><ns1:length>0.000</ns1:length><ns1:volume>0.017</ns1:volume><ns1:weight>3.817</ns1:weight><ns1:width>0.000</ns1:width></ns1:ArrayOfMeasureEl><ns1:ArrayOfMeasureEl><ns1:primary>-1</ns1:primary><ns1:numerator>1</ns1:numerator><ns1:denumerator>1</ns1:denumerator><ns1:title>ZVN</ns1:title><ns1:titleIso>ZVN</ns1:titleIso><ns1:height>0.000</ns1:height><ns1:length>0.000</ns1:length><ns1:volume>0.017</ns1:volume><ns1:weight>3.900</ns1:weight><ns1:width>0.000</ns1:width></ns1:ArrayOfMeasureEl><ns1:ArrayOfMeasureEl><ns1:primary>-1</ns1:primary><ns1:numerator>12</ns1:numerator><ns1:denumerator>1</ns1:denumerator><ns1:title>ZVS</ns1:title><ns1:titleIso>ZVS</ns1:titleIso><ns1:height>0.000</ns1:height><ns1:length>0.000</ns1:length><ns1:volume>0.017</ns1:volume><ns1:weight>4.800</ns1:weight><ns1:width>0.000</ns1:width></ns1:ArrayOfMeasureEl></ns1:measures><ns1:barcodes><ns1:ArrayOfBarcodeEl><ns1:primary>-1</ns1:primary><ns1:barcode>4607028555619</ns1:barcode></ns1:ArrayOfBarcodeEl><ns1:ArrayOfBarcodeEl><ns1:primary>1</ns1:primary><ns1:barcode>4607153314310</ns1:barcode></ns1:ArrayOfBarcodeEl></ns1:barcodes></ns1:arProductEl></ns1:arProduct></ns1:setProductItems>