使用SAP Java IDoc类库解析XML格式的IDoc [英] Parsing an IDoc in XML format using SAP Java IDoc Class Library
问题描述
在未与SAP连接的系统中,我收到了XML格式的IDoc(如果客户主人有任何重要性 - DEBMAS07)。
In a system not connected with SAP I am receiving an IDoc in XML format (if of any importance a Customer Master - DEBMAS07).
1。是否可以使用Java IDoc类库(sapidoc3.jar)读取此XML文档而无需连接到SAP系统?
1. Is it possible to read this XML document using the Java IDoc Class Library (sapidoc3.jar) WITHOUT a connection to the SAP system?
2 。是否可以使用Java IDoc类库(sapidoc3.jar)生成XML格式的IDoc 而无需连接到SAP系统?
2. Is it possible to generate an IDoc in XML format using Java IDoc Class Library (sapidoc3.jar) WITHOUT a connection to the SAP system?
我没有' t找到了关于如何做到这一点的任何明确的例子,如何处理这个clases,以及我发现的示例正在使用需要连接到SAP的类。
I haven't found any clear examples on how to do this, how to work this this clases, and the examples I've found are using classes that require a connection to SAP.
推荐答案
如果没有相应的IDoc元数据,则无法将XML数据解释为SAP IDoc。没有这个IDoc元数据,IDoc-XML文档只是一些层次结构的字符串。
Without the respective IDoc meta data you cannot interpret the XML data as an SAP IDoc. Without having this IDoc meta data, the IDoc-XML document is just some hierarchically structured bunch of strings.
并且SAP Java IDoc类库获得的唯一方法是IDoc元数据是从某个SAP系统查询它 - 至少这对JIDocLib的当前版本3.0.12有效。不幸的是,你的两个问题的答案都是:否。
And the only way for the SAP Java IDoc Class Library to get the IDoc meta data is to query it from some SAP System - at least this is valid for the current version 3.0.12 of the JIDocLib. So the answer to both of your questions is unfortunately: NO.
当然,您可以使用标准XML解析器解析IDoc-XML像任何其他任意XML文档一样。
Of course, you can parse the IDoc-XML with a standard XML parser like any other arbitrary XML document.
这篇关于使用SAP Java IDoc类库解析XML格式的IDoc的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!