Internal XI-XML message structure.
Hi,
Is there an XSD of the internal XI-XML message?
Where can I find this?
Thanks in advance Stef Snijders
Hi Stef,
I am not clear about what you have mentioned -internal XI-XML message...
But if you are looking for the xml/xsd file of the message structure, here's the path :
Under your namespace, go to Message Mapping, on the menu just above your structure, locate SRC (Source Text View)
Or,
Go to Interface Mapping, and below there, you have the option to export your XSD file for both the structures to your system.
Rgds,
kanan
Similar Messages
-
Issue with XML namespace and Message structure
Hi All,
I am using Oracle SOA Suite 11.1.1.4. I have SOA web service application one-way messaging wherein I keep receiving messages from the third party. The issue I am facing is with the XML namespaces which conflicts with the third party's message structure. The details are as below.
Our Web-service WSDL*
<schema attributeFormDefault="unqualified" elementFormDefault="qualified"
targetNamespace="http://amb.com/cad/RealTimeService"
xmlns:cad="http://amb.com/cad/RealTimeService"
xmlns:avl="http://schemas.com/asiapac/cad/datamodel/avl/1.0.0"
xmlns:evn="http://schemas.com/asiapac/cad/datamodel/event/1.0.0"
xmlns:uni="http://schemas.com/asiapac/cad/datamodel/unit/1.0.0"
xmlns:dvt="http://schemas.com/asiapac/cad/datamodel/divert/1.0.0"
xmlns:sui="http://schemas.com/asiapac/cad/datamodel/suppinfo/1.0.0"
xmlns="http://www.w3.org/2001/XMLSchema">
<import namespace="http://schemas.com/cad/datamodel/avl/1.0.0"
schemaLocation="AvlCadSchema.xsd"/>
<import namespace="http://schemas.com/cad/datamodel/unit/1.0.0"
schemaLocation="UnitCadSchema.xsd"/>
<import namespace="http://schemas.com/cad/datamodel/event/1.0.0"
schemaLocation="EventCadSchema.xsd"/>
<import namespace="http://schemas.com/cad/datamodel/divert/1.0.0"
schemaLocation="HewsCadSchema.xsd"/>
<import namespace="http://schemas.com/cad/datamodel/suppinfo/1.0.0"
schemaLocation="SupplementalInformationCadSchema.xsd"/>
<element name="AvlAuxData" type="avl:AvlAuxData" nillable="true"/>
<element name="AgencyEvent" type="evn:AgencyEvent"/>
<element name="Diversion" type="dvt:HospitalDiversionMessage"/>
<element name="SupplementalInformation" type="sui:SupplementalInformation"/>
<element name="UnitDetail" type="uni:UnitDetail"/>
</schema>
Using SOAP UI tool a HospitalDiversionMessage Request for the above WSDL will look like*
<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:real="http://amb.com/cad/RealTimeService" xmlns:ns="http://schemas.com/cad/datamodel/divert/1.0.0">
<soapenv:Header/>
<soapenv:Body>
<*real*:Diversion>
<ns:Action>?</ns:Action>
<ns:Open>?</ns:Open>
<!--Optional:-->
<ns:Location>?</ns:Location>
<ns:Type>?</ns:Type>
<ns:SubType>?</ns:SubType>
<!--Optional:-->
<ns:ExpiryTimestamp>?</ns:ExpiryTimestamp>
<!--Optional:-->
<ns:Comment>?</ns:Comment>
<!--Optional:-->
<ns:ItemNumber>?</ns:ItemNumber>
<!--Optional:-->
<ns:Notifications>?</ns:Notifications>
<ns:CreatedTerminal>?</ns:CreatedTerminal>
<ns:CreatedTimestamp>?</ns:CreatedTimestamp>
<!--Optional:-->
<ns:ClosedBy>?</ns:ClosedBy>
<!--Optional:-->
<ns:ClosedComments>?</ns:ClosedComments>
<!--Optional:-->
<ns:ClosedTerminal>?</ns:ClosedTerminal>
<!--Optional:-->
<ns:ClosedTimestamp>?</ns:ClosedTimestamp>
</real:Diversion>
</soapenv:Body>
</soapenv:Envelope>
Now the third party sends a HospitalDiversionMessage in this format_
<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:ns0="http://amb.com/cad/RealTimeService" xmlns:ns="http://schemas.com/cad/datamodel/divert/1.0.0">
<soapenv:Header/>
<soapenv:Body>
<ns0:Diversion>
<ns0:Action>?</ns0:Action>
<ns0:Open>?</ns0:Open>
<!--Optional:-->
<ns0:Location>?</ns0:Location>
<ns0:Type>?</ns0:Type>
<ns0:SubType>?</ns0:SubType>
<!--Optional:-->
<ns0:ExpiryTimestamp>?</ns0:ExpiryTimestamp>
<!--Optional:-->
<ns0:Comment>?</ns0:Comment>
<!--Optional:-->
<ns0:ItemNumber>?</ns0:ItemNumber>
<!--Optional:-->
<ns0:Notifications>?</ns0:Notifications>
<ns0:CreatedTerminal>?</ns0:CreatedTerminal>
<ns0:CreatedTimestamp>?</ns0:CreatedTimestamp>
<!--Optional:-->
<ns0:ClosedBy>?</ns0:ClosedBy>
<!--Optional:-->
<ns0:ClosedComments>?</ns0:ClosedComments>
<!--Optional:-->
<ns0:ClosedTerminal>?</ns0:ClosedTerminal>
<!--Optional:-->
<ns0:ClosedTimestamp>?</ns0:ClosedTimestamp>
</ns0:Diversion>
</soapenv:Body>
</soapenv:Envelope>
Questions*
1) I cannot figure out how the SOAPUI tool or SOA substitutes "real" as the namespace prefix for the WSDL based HospitalDiversionMessage and what I need to do at my end to match the message structure as per what the third party needs.
2) I need ns0 namespace prefix to whole of Diversion xml element. Currently it is "real" at top Diversion element and "ns" for its children
Please suggest, I can attach the other imported XSD if need be.
Thanks
Edited by: user5108636 on Jun 13, 2011 6:55 PM
Edited by: user5108636 on Jun 13, 2011 6:57 PM
Edited by: user5108636 on Jun 13, 2011 7:02 PMQuestions
1) I cannot figure out how the SOAPUI tool or SOA substitutes "real" as the namespace prefix for the WSDL based HospitalDiversionMessage and what I need to do at my end to match the message structure as per what the third party needs.The xml namespace suffixes like real and ns0 are just references used by the XML Parsers. For that matter the "real" can be xyz as well.
You dont need to make any changes as long as the xml namespace suffixes refer to the same namespace.
If you see the first soapUI xml and the third party xml have the same namespace references and hence it is not a problem:
<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:real="*http://amb.com/cad/RealTimeService*" xmlns:ns="http://schemas.com/cad/datamodel/divert/1.0.0">
<soapenv:Header/>
<soapenv:Body>
<*real*:Diversion>
<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:ns0="*http://amb.com/cad/RealTimeService*" xmlns:ns="http://schemas.com/cad/datamodel/divert/1.0.0">
<soapenv:Header/>
<soapenv:Body>
<*ns0*:Diversion>
2) I need ns0 namespace prefix to whole of Diversion xml element. Currently it is "real" at top Diversion element and "ns" for its childrenBased on this, logically both the xmls represent the same xml message. And hence you dont need to make any changes.
Please refer to the basics of xml namespaces using the following links:
http://en.wikipedia.org/wiki/XML_namespace
http://zvon.org/comp/r/tut-Namespace.html#Pages~Introduction
Let us know if you still need clarification.
Hope this helps.
Thanks,
Patrick -
What is the payload structure has to be used for AQ to process XML messages.
Hi Experts,
We have an IBM MQ and Oracle AQ has to be be linked to that.
MQ always contains XML messages and same message will come to AQ.
Now I want to create AQ. What is the payload structure(object) has to be used for AQ to process XML messages.
Please help me.
Thanks.Hello,
using XML type data in AQ you have to define a special AQ payload type
(corresponding to MQ): QUEUE_PAYLOAD_TYPE = 'SYS.MGW_BASIC_MSG_T'.
An example template for enqueueing looks like (you have to transform
from XMLTYPE to the MGW payload type):
DECLARE
queue_options DBMS_AQ.ENQUEUE_OPTIONS_T;
message_properties DBMS_AQ.MESSAGE_PROPERTIES_T;
message_id RAW(16);
v_message SYS.XMLType;
v_clob CLOB;
v_payload SYS.MGW_BASIC_MSG_T;
v_text_body
SYS.MGW_TEXT_VALUE_T;
BEGIN
v_message := SYS.XMLType.createXML('<SAMPLE>hello world</SAMPLE>');
v_clob := v_message.GETCLOBVAL();
v_text_body := SYS.MGW_TEXT_VALUE_T( NULL, v_clob );
v_payload := SYS.MGW_BASIC_MSG_T( v_header, v_text_body, NULL );
DBMS_AQ.ENQUEUE( queue_name => 'my_queue',
enqueue_options => queue_options,
message_properties => message_properties,
payload => v_payload,
msgid => message_id);
END;
Kind regards,
WoG -
Message Mapping Nested Structure to key node in JDBC XML SQL Structure
Hello everybody,
I'm facing the next problem, I have the following nested structure
<ns0:MT_Irdoc_ArchivoNested xmlns:ns0="http://ref.pemex.com/PI/FI/ArchivoIrdoc">
<Header id_consecutivo="">
<Transaction/>
<Header2/>
<Header3/>
<Header4/>
<Header5/>
<Detail>
<Transaction/>
<Detail2/>
<Detail3/>
<Detail4/>
<Detail5/>
</Detail>
</Header>
<NombreArchivo/>
</ns0:MT_Irdoc_ArchivoNested>
as you can see, Detail is a nested Node from Header Node, and Detail is with occurrence 0...unbounded, I need to generate a SELECT XML SQL Structure as follows
<StatementName>
<dbTableName action=u201DSELECTu201D>
<table>realDbTableName</table>
<access>
<col1/>
<col2/>
<col3/>
</access>
<key1>
<col4>val4</col4>
<col5>val5</col5>
<col6>val6</col6>
</key1>
</dbTableName>
</StatementName>
now my problem is that col4 and col6 are values mapped from Header fields values, and col5 mus be mapped from Detail2 field of Detail Nested Structure, and Detail is 0...unbounded so it can contain any number of values and must included in the key structure, I tried by mapping the Detail Node to the key1 node, so it will generate n numbers of key1 nodes to include in the query, and the Detail number of nodes are not constant so I can't generate key2, key3, keyn...., so what I need is to create n numbers of instances of key1 node, but the problem is that when the mapping try to generate the second instance of key1 node it gives an error in the fields that comes from Header structure, maybe I'm trying to solve my problem wrong, could anyone give some advices or direction?, thanks in advance.
Regards,
Julio CesarJulio,
After placing the below logic in the mapping editor
Details2 > SplitByValue> col5
Right click on the Details2 node and choose Context. By Default you will see Details, because Details2 is the child of Details node. I want you to choose the Parent of Details node, I believe that would be HeaderID, am I right?
If you don't want to do that then,
Details2 ---> Remove Context > SplitByvalue> col5 will do the trick!
raj. -
Reading the XML message from Xi stored in XML format from a abap program.
Hi Gurus,
My requirement here is to read the data that will be coming from Xi from my custom abap program and updating 2 data base tables. The method is after the data mapping is done a class is generated in abap proxy in which a method is available. Inside the method i am writing the code for getting the Xi data stored as a payload message which can be seen in the transaction SXMB_MONI. My code is given below.
***begin code***
method ZII_PAYROLL_HEADER_IN~PAYROLL_HEADER_IN.
**** INSERT IMPLEMENTATION HERE **** ***
data: ln type i.
DATA: i_items TYPE TABLE OF ZPAYLOAD_WRAPPER_EMPLOYEE_REC3.
*DATA: wa_items type ZPAYLOAD_WRAPPER_EMPLOYEE_TAB5.
data: wa_items type ZPAYLOAD_WRAPPER_EMPLOYEE_REC3.
DATA:PERNR TYPE STRING.
*data: it_ZPAYLOAD_WRAPPER16 TYPE ZPAYLOAD_WRAPPER16.
I_ITEMS[] = INPUT-PAYLOAD_WRAPPER-BODY-XMLDOC-PAYROLL_PERIOD_OVERVIEW-EMPLOYEE_RECORD[].
*I_ITEMS = INPUT-payloadWrapper-Body-XMLDOC-PayrollPeriodOverview-EmployeeRecord.
describe table i_items[] lines ln.
endmethod.
**End code***
As per the logic the data stored in the XML message should be avaialble in INPUT-payloadWrapper-Body-XMLDOC-PayrollPeriodOverview-EmployeeRecord which i am assigning to a local internal table in the class.
But in my case there is no data coming in
INPUT-payloadWrapper-Body-XMLDOC-PayrollPeriodOverview-EmployeeRecord.
But i can see the data transffered from XI in the transaction SXMB_MONI->XML message->inbound message->payload.
Is there any way to read the data stored in the XML message in the transaction SXMB_MONI.
Also why the data is not coming in
INPUT-payloadWrapper-Body-XMLDOC-PayrollPeriodOverview-EmployeeRecord inside the class.
If there is any solution for this problem please post it.You can use function module SXMB_GET_MESSAGE_PAYLOAD.
Code snippet:
DATA: ls_mast TYPE sxmspmast,
ls_msgkey TYPE sxmsmkey,
lv_bin_xml TYPE xstring,
lv_str_xml TYPE string.
* select sxmspmast into ls_mast
ls_msgkey-msgid = ls_mast-msgguid.
ls_msgkey-pid = 'RECEIVER'.
CALL FUNCTION 'SXMB_GET_MESSAGE_PAYLOAD'
EXPORTING
im_msgkey = ls_msgkey
im_archive = ' '
im_version = ls_mast-vers
IMPORTING
ex_msg_bytes = lv_bin_xml
EXCEPTIONS
not_authorized = 1
no_message = 2
internal_error = 3
no_payload = 4
OTHERS = 5.
IF sy-subrc EQ 0.
lv_str_xml = cl_soap_moni_helper=>convert_xstring_to_string( xstring_in = lv_bin_xml ).
ENDIF. -
XI have to break/split XML-File into N times a XML Message
Hello,
Can anyone help with this one. I guess this is not an easy exercise but I need to solve it urgently.
XI gets a XML-file from a system.
This file has N times a element <XBT>.
Every time XI gets such a file the number of <XBT> is different.
XI haves to break this xml into N xml messages according to element ><XBT> in order to send them to Sap sequentially.
For example the following XML file have to split up into 2 xml files (the elements XBT occurs 2 times)
How can this be done?
<mt_BubaBestand>
<b><XBT></b>
<Algemeen>
<Verkooporganisatie>5000</Verkooporganisatie>
<Distributiekanaal>50</Distributiekanaal>
<Productgroep>50</Productgroep>
<Ordernummer>123123</Ordernummer>
<Verkoopgroep/>
<Documentdatum>20061207</Documentdatum>
<Medewerker_nr>e60217</Medewerker_nr>
<Medewerker_naam>Hermans</Medewerker_naam>
<CRM_nr/>
<CIFDedicated/>
<Klantgroep/>
</Algemeen>
<b></XBT></b>
<b><XBT></b>
<Algemeen>
<Verkooporganisatie>5000</Verkooporganisatie>
<Distributiekanaal>50</Distributiekanaal>
<Productgroep>50</Productgroep>
<Ordernummer>123123</Ordernummer>
<Verkoopgroep/>
<Documentdatum>20061207</Documentdatum>
<Medewerker_nr>e60217</Medewerker_nr>
<Medewerker_naam>Hermans</Medewerker_naam>
<CRM_nr/>
<CIFDedicated/>
<Klantgroep/>
</Algemeen>
<b></XBT></b>
</mt_BubaBestand>This is pretty standard procedure if you are posting these messages to R/3. As was pointed out in the weblogs above, when using IDocs you don't need to do any tricky configuration. Just make sure that your XML structure is set correctly (ie: 1 to unbounded, etc) to the limits that you want, and XI will automatically loop the mapping process for each instance of the <XBT> item that it detects in the source message. You mentioned:
<i>For example the following XML file have to split up into 2 xml files (the elements XBT occurs 2 times)</i>
Well, you don't actually split it into two XML files per say, XI just processes the source message straight to multiple IDocs using the IDoc adapter. -
Possibility to transfer additional parameters in outbound XML message
Hi,
is there any possibility to transfer additional parameters in outbound XML message using (BADI: BBP_SAPXML1_OUT_BADI).
Additional parameters are,
1. Communication Method for the Business Partner
2. R/3 Vendor # & logical system for Business Partner
3. Relationship between Business Partner Number and R/3 Vendor Number is BP GUID.
How can we extended the structure in the BADI.
Please give me qucik response.
Thanks & Regards.
SuryaLook for structure which the interface parameters are referring, there you should see some dummy structures referring to INCL_EEW* for e.g. in PO header INCL_EEW_PD_HEADER_SSF_PO. Add additional fields and pass the data accordingly.
Regards, IA -
XML document structures must start and end within the same entity
Hi there,
I'm working with a client/server application and using SaxParser for reading in xml. I get the SaxParserException: XML document structures must start and end within the same entity. I understand what that means, but it isn't applicable! The xml data being used is well-formed. I checked the well-formedness with Stylus Studio to make sure. Here's the data:
<?xml version='1.0' encoding='UTF-8'?>
<vcmessage>
<vcsource>3</vcsource>
<processevent>16</processevent>
<shape>
<llindex>0</llindex>
<shapetype>9</shapetype>
<shapeproperties>
<shapelocation>
<xcoord>54</xcoord>
<ycoord>184</ycoord>
</shapelocation>
<bounds>
<width>24</width>
<height>24</height>
</bounds>
<fgcolor>
<fgred>0</fgred>
<fggreen>0</fggreen>
<fgblue>0</fgblue>
</fgcolor>
<bgcolor>
<bgred>255</bgred>
<bggreen>255</bggreen>
<bgblue>255</bgblue>
</bgcolor>
<thickness>1</thickness>
<isfilled>false</isfilled>
</shapeproperties>
</shape>
</vcmessage>The parser generally stops around the </bgcolor> tag.
I'm using Eclypse as my IDE. I'm wondering if there's something wrong with it? Or maybe there's something wrong with the class I'm using for reading in the XML? Followng is the class.
Please advise,
Alan
package vcclient;
import java.io.*;
import org.xml.sax.*;
import org.xml.sax.helpers.*;
import javax.xml.parsers.*;
public class XMLDocumentReader extends DefaultHandler
private VCClient client = null;
private Writer out;
private String lineEnd = System.getProperty("line.separator");
private boolean haveSourceType = false;
private boolean haveUserName = false;
private boolean haveMessage = false;
private boolean haveProcessEvent = false;
private boolean haveLinkedListIndex = false;
private boolean haveOpeningShapePropertiesTag = false;
private boolean haveShapeType = false;
private boolean haveOpeningShapeLocationTag = false;
private boolean haveShapeLocation = false;
private boolean haveOpeningXCoordTag = false;
private boolean haveOpeningYCoordTag = false;
private boolean haveOpeningBoundsTag = false;
private boolean haveBoundsWidth = false;
private boolean haveBoundsHeight = false;
private boolean haveOpeningFGColorTag = false;
private boolean haveOpeningBGColorTag = false;
private boolean haveOpeningThicknessTag = false;
private boolean haveOpeningIsFilledTag = false;
private boolean haveOpeningImageDataTag = false;
private boolean haveOpeningTextDataTag = false;
private boolean haveFGRed = false;
private boolean haveFGGreen = false;
private boolean haveFGBlue = false;
private boolean haveBGRed = false;
private boolean haveBGGreen = false;
private boolean haveBGBlue = false;
private boolean haveThickness = false;
private boolean haveIsFilled = false;
private boolean haveImageData = false;
private boolean haveTextData = false;
private VCMessage vcmessage = null;
public XMLDocumentReader(VCClient value)
client = value;
vcmessage = new VCMessage();
public VCMessage getVCMessage()
return vcmessage;
public boolean haveSourceType()
return haveSourceType;
public boolean ParseXML(InputStream stream)
boolean success = false;
// Use the default (non-validating) parser
SAXParserFactory factory = SAXParserFactory.newInstance();
try
// Set up output stream
out = new OutputStreamWriter(System.out, "UTF-8");
// Parse the input
SAXParser saxParser = factory.newSAXParser();
saxParser.parse( stream, this );
success = true;
catch (SAXParseException spe)
// Error generated by the parser
System.out.println("\n** Parsing error"
+ ", line " + spe.getLineNumber()
+ ", uri " + spe.getSystemId());
System.out.println(" " + spe.getMessage() );
// Unpack the delivered exception to get the exception it contains
Exception x = spe;
if (spe.getException() != null)
x = spe.getException();
x.printStackTrace();
return success;
catch (SAXException sxe)
// Error generated by this application
// (or a parser-initialization error)
Exception x = sxe;
if (sxe.getException() != null)
x = sxe.getException();
x.printStackTrace();
return success;
catch (ParserConfigurationException pce)
// Parser with specified options can't be built
pce.printStackTrace();
return success;
catch (Throwable t)
t.printStackTrace();
return success;
return success;
public void startDocument()throws SAXException
emit("<?xml version='1.0' encoding='UTF-8'?>");
nl();
public void endDocument()throws SAXException
try {
nl();
out.flush();
} catch (IOException e) {
throw new SAXException("I/O error", e);
public void startElement(String namespaceURI,
String lName, // local name
String qName, // qualified name
Attributes attrs)throws SAXException
String eName = lName; // element name
if (eName.equals(""))
eName = qName; // namespaceAware = false
emit("<"+eName);
if (attrs != null) {
for (int i = 0; i < attrs.getLength(); i++) {
String aName = attrs.getLocalName(i); // Attr name
if (aName.equals("")) aName = attrs.getQName(i);
emit(" ");
emit(aName + "=\"" + attrs.getValue(i) + "\"");
emit(">");
if(makeStartTag(eName).equals(Constants.OPENING_SHAPEPROPERTIES))
haveOpeningShapePropertiesTag = true;
else if(makeStartTag(eName).equals(Constants.OPENING_SHAPELOCATION))
haveOpeningShapeLocationTag = true;
else if(makeStartTag(eName).equals(Constants.OPENING_BOUNDS))
haveOpeningBoundsTag = true;
else if(makeStartTag(eName).equals(Constants.OPENING_FGCOLOR))
haveOpeningFGColorTag = true;
else if(makeStartTag(eName).equals(Constants.OPENING_BGCOLOR))
haveOpeningBGColorTag = true;
else if(makeStartTag(eName).equals(Constants.OPENING_BGGREEN))
System.out.println("See BGGreen");
else if(makeStartTag(eName).equals(Constants.OPENING_BGBLUE))
System.out.println("See BGBlue");
else if(makeStartTag(eName).equals(Constants.OPENING_THICKNESS))
haveOpeningThicknessTag = true;
else if(makeStartTag(eName).equals(Constants.OPENING_ISFILLED))
haveOpeningIsFilledTag = true;
else if(makeStartTag(eName).equals(Constants.OPENING_IMAGEDATA))
haveOpeningImageDataTag = true;
else if(makeStartTag(eName).equals(Constants.OPENING_TEXTDATA))
haveOpeningTextDataTag = true;
public void endElement(String namespaceURI,
String sName, // simple name
String qName // qualified name
)throws SAXException
if(sName.equals("") && !qName.equals(""))
sName = qName;
emit("</"+sName+">");
else
emit("</"+sName+">");
if(makeEndTag(sName).equals(Constants.CLOSING_SOURCE_TYPE))
haveSourceType = true;
else if(makeEndTag(sName).equals(Constants.CLOSING_USER))
haveUserName = true;
else if(makeEndTag(sName).equals(Constants.CLOSING_MESSAGE))
haveMessage = true;
else if(makeEndTag(sName).equals(Constants.CLOSING_PROCESSEVENT))
haveProcessEvent = true;
else if(makeEndTag(sName).equals(Constants.CLOSING_LINKEDLISTINDEX))
haveLinkedListIndex = true;
else if(makeEndTag(sName).equals(Constants.CLOSING_SHAPETYPE))
haveShapeType = true;
else if(makeEndTag(sName).equals(Constants.CLOSING_SHAPELOCATION))
haveOpeningShapeLocationTag = false;
else if(makeEndTag(sName).equals(Constants.CLOSING_WIDTH))
haveBoundsWidth = true;
else if(makeEndTag(sName).equals(Constants.CLOSING_HEIGHT))
haveBoundsHeight = true;
else if(makeEndTag(sName).equals(Constants.CLOSING_BOUNDS))
haveOpeningBoundsTag = false;
else if(makeEndTag(sName).equals(Constants.CLOSING_FGRED))
haveFGRed = true;
else if(makeEndTag(sName).equals(Constants.CLOSING_FGGREEN))
haveFGGreen = true;
else if(makeEndTag(sName).equals(Constants.CLOSING_FGBLUE))
haveFGBlue = true;
else if(makeEndTag(sName).equals(Constants.CLOSING_FGCOLOR))
haveOpeningFGColorTag = false;
else if(makeEndTag(sName).equals(Constants.CLOSING_BGRED))
haveBGRed = true;
else if(makeEndTag(sName).equals(Constants.CLOSING_BGGREEN))
haveBGGreen = true;
else if(makeEndTag(sName).equals(Constants.CLOSING_BGBLUE))
System.out.println("See closing BGBlue");
haveBGBlue = true;
else if(makeEndTag(sName).equals(Constants.CLOSING_BGCOLOR))
haveOpeningBGColorTag = false;
else if(makeEndTag(sName).equals(Constants.CLOSING_THICKNESS))
System.out.println("XMLDocumentReader: Step2");
haveOpeningThicknessTag = false;
else if(makeEndTag(sName).equals(Constants.CLOSING_ISFILLED))
haveOpeningIsFilledTag = false;
else if(makeEndTag(sName).equals(Constants.CLOSING_IMAGEDATA))
haveOpeningImageDataTag = false;
else if(makeEndTag(sName).equals(Constants.CLOSING_TEXTDATA))
haveOpeningTextDataTag = false;
private String makeStartTag(String tag_name)
String start = "<";
String end = ">";
return start.concat(tag_name).concat(end);
private String makeEndTag(String tag_name)
String start = "</";
String end = ">";
return start.concat(tag_name).concat(end);
public void characters(char buf[], int offset, int len)throws SAXException
String s = new String(buf, offset, len);
if(haveSourceType == false)
if(vcmessage.getSourceType() == null)
try
if(s.equals(""))return;
int sourcetype = Integer.parseInt(s);
vcmessage.setSourceType(sourcetype);
catch(NumberFormatException nfe){}
else if(vcmessage.getSourceType() == SourceType.CHAT_SOURCE)
if(vcmessage.getSourceType() == SourceType.CHAT_SOURCE && haveUserName == false)
vcmessage.setUserName(s);
else if(vcmessage.getSourceType() == SourceType.CHAT_SOURCE && haveMessage == false)
//When the parser encounters interpreted characters like: & or <,
//then this method gets invoked more than once for the whole message.
//Therefore, we need to concatonate each portion of the message. The
//following method call automatically concatonates.
vcmessage.concatMessage(s);
else if(vcmessage.getSourceType() == SourceType.WHITEBOARD_SOURCE)
if(haveProcessEvent == false)
try
vcmessage.setProcessEvent(Integer.parseInt(s));
catch(NumberFormatException nfe){}
else if(haveLinkedListIndex == false)
try
vcmessage.setLinkedListIndex(Integer.parseInt(s));
catch(NumberFormatException nfe){}
else if(haveShapeType == false)
try
vcmessage.setShapeType(Integer.parseInt(s));
catch(NumberFormatException nfe){}
if(haveOpeningShapePropertiesTag)
if(haveOpeningShapeLocationTag)
if(haveOpeningXCoordTag)
try
vcmessage.setXCoordinate(Integer.parseInt(s));
catch(NumberFormatException nfe){}
else if(haveOpeningYCoordTag)
try
vcmessage.setYCoordinate(Integer.parseInt(s));
//reset all flags for ShapeLocation, X and Y coordinates
haveOpeningXCoordTag = false;
haveOpeningYCoordTag = false;
//haveOpeningShapeLocationTag = false;
catch(NumberFormatException nfe){}
else if(haveOpeningBoundsTag)
if(haveBoundsWidth == false)
try
vcmessage.setBoundsWidth(Integer.parseInt(s));
catch(NumberFormatException nfe){}
else if(haveBoundsHeight == false)
try
vcmessage.setBoundsHeight(Integer.parseInt(s));
//reset flag
//haveOpeningBoundsTag = false;
catch(NumberFormatException nfe){}
else if(haveOpeningFGColorTag)
if(haveFGRed == false)
try
vcmessage.setFGRed(Integer.parseInt(s));
catch(NumberFormatException nfe){}
else if(haveFGGreen == false)
try
vcmessage.setFGGreen(Integer.parseInt(s));
catch(NumberFormatException nfe){}
else if(haveFGBlue == false)
try
vcmessage.setFGBlue(Integer.parseInt(s));
//reset flag
//haveOpeningFGColorTag = false;
catch(NumberFormatException nfe){}
else if(haveOpeningBGColorTag)
if(haveBGRed == false)
try
vcmessage.setBGRed(Integer.parseInt(s));
catch(NumberFormatException nfe){}
else if(haveBGGreen == false)
try
vcmessage.setBGGreen(Integer.parseInt(s));
catch(NumberFormatException nfe){}
else if(haveBGBlue == false)
{ System.out.println("getting BGBlue data");
try
vcmessage.setBGBlue(Integer.parseInt(s));
//reset flag
//haveOpeningBGColorTag = false;
catch(NumberFormatException nfe){}
else if(haveOpeningThicknessTag)
try
vcmessage.setThickness(Integer.parseInt(s));
catch(NumberFormatException nfe){}
else if(haveOpeningIsFilledTag)
vcmessage.setIsFilled(s);
else if(haveOpeningImageDataTag && vcmessage.getProcessEvent() == org.jcanvas.comm.ProcessEvent.MODIFY)
vcmessage.setBase64ImageData(s);
else if(haveOpeningTextDataTag && vcmessage.getProcessEvent() == org.jcanvas.comm.ProcessEvent.MODIFY)
vcmessage.setTextData(s);
//reset
haveOpeningShapePropertiesTag = false;
emit(s);
//===========================================================
// Utility Methods ...
//===========================================================
// Wrap I/O exceptions in SAX exceptions, to
// suit handler signature requirements
private void emit(String s)throws SAXException
try {
out.write(s);
out.flush();
} catch (IOException e) {
throw new SAXException("I/O error", e);
// Start a new line
private void nl()throws SAXException
try {
out.write(lineEnd);
} catch (IOException e) {
throw new SAXException("I/O error", e);
//treat validation errors as fatal
public void error(SAXParseException e)
throws SAXParseException
throw e;
// dump warnings too
public void warning(SAXParseException err)
throws SAXParseException
System.out.println("** Warning"
+ ", line " + err.getLineNumber()
+ ", uri " + err.getSystemId());
System.out.println(" " + err.getMessage());
}Just out of curiosity what happens if you append a space to the end of the XML document?
-
Processing large XML messages ( 100Mb) in PI 7.1
Hi All
I have PI 7.1 & need to process & create Large XML messages with not so extensive mapping & direction is from SAP to FTP server.
I created the test scenario using Consumer Proxy in order to check how large message our PI server can handle, so till 100Mb it went fine but anything above 100Mb got stuck in R3 server Integration engine only. When I checked the message in MONI of R3 server, initially it gives "Automatic Restart" status & after the retry limit was over it gave me "System Error-after automatic restart" with the error status as -->
<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
- <!-- Call Integration Server
-->
- <SAP:Error xmlns:SAP="http://sap.com/xi/XI/Message/30" xmlns:SOAP="http://schemas.xmlsoap.org/soap/envelope/" SOAP:mustUnderstand="">
<SAP:Category>XIServer</SAP:Category>
<SAP:Code area="INTERNAL">CLIENT_RECEIVE_FAILED</SAP:Code>
<SAP:P1>110</SAP:P1>
<SAP:P2 />
<SAP:P3 />
<SAP:P4 />
<SAP:AdditionalText />
<SAP:ApplicationFaultMessage namespace="" />
<SAP:Stack>Error while receiving by HTTP (error code: 110, error text: )</SAP:Stack>
<SAP:Retry>A</SAP:Retry>
</SAP:Error>
Can you let me know how can we further tune our SAP R3 server to process the large files as the message is getting stuck in R3 server (at HTTP_SEND) only it is not even reaching PI server, also breaking message into small messages cannot be implemented as we need to send the file in ONE go only.
Regards
Lalit
Edited by: Lalit Chaudhary on May 5, 2009 6:05 PM
Edited by: Lalit Chaudhary on May 6, 2009 2:49 AMso till 100Mb it went fine but anything above 100Mb got stuck in R3 server Integration engine only
all the systems are configured with a default timeout parameter....it determines till what time a system should try processing a file...if this is exceeded then you may get the mentioned error....
So what you can do is try increasing the timeout of your system....so that you give the system some more time for processing the file
Please note that increasing the timeout would mean decreasing performance
To check how much is the impact see the performance before increasing the timeout and after increasing..
If you need some help in file processing in XI:
/people/sravya.talanki2/blog/2005/11/29/night-mare-processing-huge-files-in-sap-xi
Hope it helps.
regards,
Abhishek. -
Map CDATA to Message Structure
Recently, I've been asked to map generic message data embedded in a XML body's CDATA container to a complete message structure defined in XI.
When I searched on SDN, I could only find information about the other way around (wrapping XML structured data into CDATA) which is why I'm posting this thread. The solution is so easy, yet doesn't seem to be straightforward, which is why I absolutely wanted to document and share it with you.
This is the message sent to SAP PI:
<?xml version="1.0" encoding="UTF-8"?>
<Envelope>
<Header>
<To>Danny</To>
<MsgType>test</MsgType>
</Header>
<Body><![CDATA[<hr:TestMsgRequest xsi:schemaLocation="http://tatis.com/test/schemas/ testcdata.xsd" xmlns:hr="http://danny.com/manifest/schemas/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"><hr:customer><hr:name>aaaaaaaaaaaaaaaaaaaaaaa</hr:name><hr:code>1234</hr:code><hr:address> <hr:name>test Customer</hr:name><hr:postalcode>BE9876</hr:postalcode><hr:town>Somewhere</hr:town><hr:country>Belgium</hr:country></hr:address></hr:customer>
</hr:TestMsgRequest>]]></Body>
</Envelope>
As you see it consists of a Header and a Body. The Body contains the CDATA which should be unserialized and mapped to the following message structure
<customer>
<name>aaaaaaaaaaaaaaaaaaaaaaa</name>
<code>1234</code>
<address>
<name>test Customer</name>
<postalcode>BE9876</postalcode>
<town>Somewhere</town>
<country>Belgium</country>
</address>
</customer>
I've created an xslt mapping, imported it as an archive and used the XSLT mapping in the interface mapping.
The following source code did the trick:
<?xml version="1.0"?>
<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:ns0="http://tatis.com/schemas/msg/envelope/ext">
<xsl:template match="ns0:Envelope">
<xsl:value-of select="ns0:Body" disable-output-escaping="yes"/>
</xsl:template>
</xsl:stylesheet>
As you might have noticed during mapping testing, XI adds a namespace to your source XML structure (ns0, ns1, etc.). You should pay attention to include this namespace in the XSLT!
If you have questions, don't hesitate to drop a mail, Danny.Hi.
Thanks. I am still not understanding.
Where did / How did you derive the ns "xmlns:ns0="http://tatis.com/schemas/msg/envelope/ext"???
Thanks.
Sean -
How to store and retrieve XML messages in AQ using ESB/ BPE
Hello,
I am having a requirement which I feel should be fairly common - store and retrieve XML messages in AQ. However, I am struggling to decide which type of queue to use AQ or JMS...Here is the requirement
1. In an ESB, I want to read different kind of files using file adapter. Different kind as in, having different structure or schema
2. I want to create a queue that is capable of storing any kind of xml data. To this queue, I want to enqueue the message read in step 1.
3. In another process, say a BPEL, I want to dequeue the message and write into a file. The filename is retrieved from one of the header properties. I want to dequeue using a stored procedure, not by using a JMS or AQ Adapter (reason being that these adapters poll the queue, and consume a message immediately. However, I want to consume the message only when there is a business need)
My questions are:
1. What kind of queue I should create in the DB (What should be its payload type...XMLType? )... I guess the answer would also determine the adapter to be used - JMS or AQ
2. How I should map the xml data read from the file in step 1 to this adapter
Any help is highly appreciated.You are right in suggesting that I dont need to store my XML data as xml in the DB...I dont want to too :) but its just that, thats the only option I can see at this time (the other track i am exploring is :
File adapter(XML) -> Convert to opaque (base64binary) -> Enqueue opaque to JMS (aq$_jms_bytes_message) ->Dequeue Opaque -> Write file opaquely.
In this I have hit the roadblock in trying to convert XML to base64binary...maybe some custom java function is needed...anyway)
Coming back to this thread, where I am trying the following
File adapter(XML) -> Enqueue as XML to queue ->Dequeue XML -> Write file opaquely.
PS: I think its important for me to mention that I am using SOA 10.1.3.1.0
I tried the steps you gave...after creating the queue, I am trying to create a JMS adapter. But the queue I created doesnt show up in the browse window of destinations for the JMS Adapter..That had led me to infer that JMS adapter cant be used
{color:#99cc00}CREATE OR REPLACE TYPE batchupdate_row_type AS OBJECT
(update_queue_id NUMBER
,upc VARCHAR2(20)
,price1 NUMBER);
{color}
{color:#99cc00}CREATE OR REPLACE TYPE batchupdate_rec_type AS VARRAY(9999999) OF batchupdate_row_type;
CREATE OR REPLACE TYPE payload_type AS OBJECT ( payload batchupdate_rec_type);
EXECUTE DBMS_AQADM.CREATE_QUEUE_TABLE ( queue_table => 'jmsuser.batch_update_queue_table', queue_payload_type => 'payload_type');
EXECUTE DBMS_AQADM.CREATE_QUEUE ( queue_name => 'batch_update_queue', queue_table => 'jmsuser.batch_update_queue_table');
EXECUTE DBMS_AQADM.START_QUEUE ( queue_name => 'batch_update_queue'); {color}
I also needed some opinion on whether the last step of my proposed solution ( Dequeue XML -> Write file opaquely) is possible. As I want to develop a service oblivious of the structure of the file, I dont want to create a file adapter based on a particular xsd...so I want to write whatever xml I am getting from the queue....is this step possible -
Multiple lines in a Output XML message
Hi all,
I am currently implimenting a simple scenario of creating a file in a particular format using XI.The working scenario is that we get an XML message from BO which will be mapped to the required format of the file.But for testing we are using an hardcoded XML file as the incoming message to XI.
But there is a problem I am facing. The incoming XML message will contain multiple information and this has to be mapped to a header information followed by items.Like for example I have a payment document which has paid some 5 invoices.The incoming XML message will have this information and what I need in the output is to have the invoice information in 5 different lines.
For eg - Assume I have the following structure for incoming message
REGUH
REGUP
....and so on
Here for every REGUH entry we can have mulitple REGUP and also we can have multiple REGUH.
Say my target structure is -
Header Info
Record Info
so for every REGUH and corresponding REGUP combination I will have a Header Info and Record Info.For the next REGUH and corresponding REGUP I will have another Header and Record Info.
I tried testing this in message mapping by duplicating the node REGUH and REGUP but it does not work.I also tried by having the occurances as 1 to n on both sides.It did not seem to work.
Can you guys give some feedback on this.
Thanks..
SandeepManish,
Thanks for the information.But this was a simple case which works.But in my case I have something like -
one field in REGUH will appear once in the file while some other fields will appear multiple times.Also I have a lot other structures which are something like this.
I assume that occurence for both sides should be 1 to n.
But it does not seem to work for me.Its a bit complicated target structure. -
How to handle xml message in proxy inbound processing?
Hi Experts,
I have a scenario that is SOAP Client====>XI===>ECC.
But i don't need to use the XI mapping,i skip mapping
in XI and use the generated proxy inbound processing.
Here is a message structure as below.
<commodityList>
■<commodity>
■■<detailNo>303303</detailNo>
■■<makerName>sony</makerName>
■■<ChargeInfoList>
■■■<productId>aaaa</productId>
■■■<name>bbb</name>
■■</ChargeInfoList>
■</commodity>
</commodityList>
When i sent the message without field entry of <productId>
and <name> i got the response in soap client as below.
<commodityList>
■<commodity>
■■<detailNo>303303</detailNo>
■■<makerName>sony</makerName>
■</commodity>
</commodityList>
The field tag <ChargeInfoList> doesn't display.
But i want it to display as below.
<commodityList>
■<commodity>
■■<detailNo>303303</detailNo>
■■<makerName>sony</makerName>
■■<ChargeInfoList>
■</commodity>
</commodityList>
In case of field entry is empty,how to let the response
contains tag?
As i know ,there is a CONTROLLER in proxy .
But i don't know if it is relevant to this
case and i don't know how to handle it.
BrandHi Mrudula,
As far as i know there are no content conversion methodology for HTTPS as the recevier adapter.
Also you can read through these links to confirm the same:
http://help.sap.com/saphelp_nw04/helpdata/en/0d/5ab43b274a960de10000000a114084/content.htm
http://publib.boulder.ibm.com/infocenter/wbihelp/v6rxmx/index.jsp?topic=/com.ibm.wbia_adapters.doc/doc/sap_xi/sapximst30.htm
SAP NetWeaver - XML Communication Interface (CA-XML) [original link is broken]
Regards,
abhy
note: reward the helpful. -
How to Post XML Messages with SOAP Headers to a Trading Partner URL
Hi All,
Greeting to the Oracle B2B Community. We are currently working on how to post a Custom XML Message with SOAP Headers to a Trading Partner URL. I would really appreciate if anybody could provide me some inputs or links to some documentation on how to achieve the above requirement. The details are below:
1. Our Internal Application generates a Flat File (PO Extract).
2. The Extract then needs to be transformed to an XML Message. We are planning to use BPEL to do the transformation to XML Message.
3. Once it is transformed to an XML message it needs to be posted to the Trading Partner URL as an HTTP Post and with SOAP Headers.
We are planning to use B2B to do the posting but I am not sure on how to do the set-ups and what all parameter files in B2B needs to be updated in order to achieve the same. Also it is mandatory that we send SOAP Headers in the XML Message.
Thanks In Advance for your help.
Regards,
DibyaHello Dibya,
As you are already doing the transformation from Flat file to XML in BPEL which is typically the capability of B2B, please use the Soap binding in BPEL to send the document to Trading partner.
Rgds,Ramesh -
How to map a complex XML message onto a flattened XSD for multi line insert
Hi Experts.
I have a webservice in my composite that takes an xml message that contains repeating complex type elements. The XSD is as follows:
<?xml version= '1.0' encoding= 'UTF-8' ?>
<xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:XxInt003Stg="http://www.somewhere.co.uk/xxx/integration/int003Stage"
targetNamespace="http://www.somewhere.co.uk/xxx/integration/int003Stage" elementFormDefault="qualified">
<xsd:complexType name="InterfaceFileType">
<xsd:sequence>
<xsd:element name="FileName" type="xsd:string"/>
<xsd:element name="FileSource" type="xsd:string"/>
<xsd:element name="FileIdentifier" type="xsd:integer"/>
<xsd:element name="InterfaceInvoices" type="XxInt003Stg:InterfaceInvoicesType"/>
</xsd:sequence>
</xsd:complexType>
<xsd:complexType name="InterfaceInvoicesType">
<xsd:sequence>
<xsd:element name="InterfaceInvoice" type="XxInt003Stg:InterfaceInvoiceType"
maxOccurs="unbounded"/>
</xsd:sequence>
</xsd:complexType>
<xsd:complexType name="InterfaceInvoiceType">
<xsd:sequence>
<xsd:element name="SupplierNumber" type="xsd:string"/>
<xsd:element name="SupplierSite" type="xsd:string"/>
<xsd:element name="InvoiceNumber" type="xsd:string"/>
<xsd:element name="InterfaceInvoiceLines">
<xsd:complexType>
<xsd:complexContent>
<xsd:extension base="XxInt003Stg:InterfaceInvoiceLinesType">
<xsd:sequence>
<xsd:element name="InterfaceInvoiceLine"
type="XxInt003Stg:InterfaceInvoiceLineType"
maxOccurs="unbounded"/>
</xsd:sequence>
</xsd:extension>
</xsd:complexContent>
</xsd:complexType>
</xsd:element>
</xsd:sequence>
</xsd:complexType>
<xsd:complexType name="InterfaceInvoiceLinesType"/>
<xsd:complexType name="InterfaceInvoiceLineType">
<xsd:sequence>
<xsd:element name="LineAmount" type="xsd:decimal" nillable="false"/>
<xsd:element name="TaxAmount" type="xsd:decimal"/>
<xsd:element name="BusinessEntityReference" type="xsd:string"/>
<xsd:element name="AccountNumber" type="xsd:string"/>
</xsd:sequence>
</xsd:complexType>
<xsd:element name="InterfacePayload">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="InterfaceFiles" type="XxInt003Stg:InterfaceFileType"
maxOccurs="unbounded"/>
</xsd:sequence>
</xsd:complexType>
</xsd:element>
</xsd:schema>
When I try to push this through the database adapter after mapping the fields it inserts multiple rows but they are all the same values. I have put a for-each XSLT construct based on the lowest element in the XSD (Invoice Line) and allocated that at various places on the target tree structure but with no success.
The XSLT is as follows:
<xsl:template match="/">
<top:XxInt003InterfaceInvoiceStgCollection>
<top:XxInt003InterfaceInvoiceStg>
<top:fileName>
<xsl:value-of select="/inp1:InterfacePayload/inp1:InterfaceFiles/inp1:FileName"/>
</top:fileName>
<top:fileSource>
<xsl:value-of select="/inp1:InterfacePayload/inp1:InterfaceFiles/inp1:FileSource"/>
</top:fileSource>
<top:fileIdentifier>
<xsl:value-of select="/inp1:InterfacePayload/inp1:InterfaceFiles/inp1:FileIdentifier"/>
</top:fileIdentifier>
<top:supplierNumber>
<xsl:value-of select="/inp1:InterfacePayload/inp1:InterfaceFiles/inp1:InterfaceInvoices/inp1:InterfaceInvoice/inp1:SupplierNumber"/>
</top:supplierNumber>
<top:supplierSite>
<xsl:value-of select="/inp1:InterfacePayload/inp1:InterfaceFiles/inp1:InterfaceInvoices/inp1:InterfaceInvoice/inp1:SupplierSite"/>
</top:supplierSite>
<top:invoiceNumber>
<xsl:value-of select="/inp1:InterfacePayload/inp1:InterfaceFiles/inp1:InterfaceInvoices/inp1:InterfaceInvoice/inp1:InvoiceNumber"/>
</top:invoiceNumber>
<xsl:for-each select="/inp1:InterfacePayload/inp1:InterfaceFiles/inp1:InterfaceInvoices/inp1:InterfaceInvoice/inp1:InterfaceInvoiceLines/inp1:InterfaceInvoiceLine">
<top:lineAmount>
<xsl:value-of select="/inp1:InterfacePayload/inp1:InterfaceFiles/inp1:InterfaceInvoices/inp1:InterfaceInvoice/inp1:InterfaceInvoiceLines/inp1:InterfaceInvoiceLine/inp1:LineAmount"/>
</top:lineAmount>
</xsl:for-each>
<top:taxAmount>
<xsl:value-of select="/inp1:InterfacePayload/inp1:InterfaceFiles/inp1:InterfaceInvoices/inp1:InterfaceInvoice/inp1:InterfaceInvoiceLines/inp1:InterfaceInvoiceLine/inp1:TaxAmount"/>
</top:taxAmount>
<top:businessEntityReference>
<xsl:value-of select="/inp1:InterfacePayload/inp1:InterfaceFiles/inp1:InterfaceInvoices/inp1:InterfaceInvoice/inp1:InterfaceInvoiceLines/inp1:InterfaceInvoiceLine/inp1:BusinessEntityReference"/>
</top:businessEntityReference>
<top:accountNumber>
<xsl:value-of select="/inp1:InterfacePayload/inp1:InterfaceFiles/inp1:InterfaceInvoices/inp1:InterfaceInvoice/inp1:InterfaceInvoiceLines/inp1:InterfaceInvoiceLine/inp1:AccountNumber"/>
</top:accountNumber>
</top:XxInt003InterfaceInvoiceStg>
</top:XxInt003InterfaceInvoiceStgCollection>
</xsl:template>
I am sure this is just something fundemantal I am doing, is it something to do with the inp1 bit of the XSLT? I get the feeling this should be looping somehow?
Thanks
KeithHi,
as I understand you try to transform 'InterfacePayload' (your XSD - just easier to read here)
InterfacePayload (1:1)
-- InterfaceFiles (1:N)
---- FileName (1:1)
---- FileSource (1:1)
---- FileIdentifier (1:1)
---- InterfaceInvoices (1:1)
------ InterfaceInvoice (1:N)
-------- SupplierNumber (1:1)
-------- SupplierSite (1:1)
-------- InvoiceNumber (1:1)
-------- InterfaceInvoiceLines (1:1)
---------- InterfaceInvoiceLine (1:N)
------------ LineAmount (1:1)
------------ TaxAmount (1:1)
------------ BusinessEntityReference (1:1)
------------ AccountNumber (1:1)
to 'XxInt003InterfaceInvoiceStgCollection' (extracted from your XSLT)
XxInt003InterfaceInvoiceStgCollection (1:1)
-- XxInt003InterfaceInvoiceStg (1:1)
---- fileName (1:1)
---- fileSource (1:1)
---- fileIdentifier (1:1)
---- supplierNumber (1:1)
---- supplierSite (1:1)
---- invoiceNumber (1:1)
---- lineAmount (1:N)
---- taxAmount (1:1)
---- businessEntityReference (1:1)
---- accountNumber (1:1)
In the 'xsl:for-each' construct
+<xsl:for-each select="/inp1:InterfacePayload/inp1:InterfaceFiles/inp1:InterfaceInvoices/inp1:InterfaceInvoice/inp1:InterfaceInvoiceLines/inp1:InterfaceInvoiceLine">+
+<top:lineAmount>+
+<xsl:value-of select="/inp1:InterfacePayload/inp1:InterfaceFiles/inp1:InterfaceInvoices/inp1:InterfaceInvoice/inp1:InterfaceInvoiceLines/inp1:InterfaceInvoiceLine/inp1:LineAmount" />+
+</top:lineAmount>+
+</xsl:for-each>+
- you are asking to iterate through all available 'inp1:InterfaceInvoiceLine' elements in the input XML document
- the value of the element 'top:lineAmount' (for each iteration) is being calculated as all values of available 'inp1:LineAmount' elements in the input XML document together
So, if you have ... lets say
- 4x 'inp1:InterfaceInvoiceLine' element in the input XML document, each containing one 'inp1:LineAmount' element ... with values {1, 2, 3, 4} respectively
- the output will be something like this
<top:lineAmount>1234</top:lineAmount>
<top:lineAmount>1234</top:lineAmount>
<top:lineAmount>1234</top:lineAmount>
<top:lineAmount>1234</top:lineAmount>
Why are you always querying from +/inp1:InterfacePayload/inp1:InterfaceFiles/...+ ?
I think ... all Xpath queries in your XSLT are wrong (they query something else than you think).
e.g.
- putting all file names together into one element (+/inp1:InterfacePayload/inp1:InterfaceFiles/inp1:FileName+)
- putting all file sources together into one element (+/inp1:InterfacePayload/inp1:InterfaceFiles/inp1:FileSource+)
- putting all invoice numbers together into one element (+/inp1:InterfacePayload/inp1:InterfaceFiles/inp1:InterfaceInvoices/inp1:InterfaceInvoice/inp1:InvoiceNumber+)
Best regards,
Martin.
Maybe you are looking for
-
When I open Firefox, I can see the homepage. When I try to open a new tab, I can't neither by clicking the + on the Tab bar, nor by File>New Tab. However, if I press a link in my home page, it opens in a new tab. ???
-
ADF 11G - CommandNavigationItem
Hi, I am using forEach Loop to generate the NavigationItem. *Unable to evaluate action EL i.e action="#{item.actionCall}"* <af:navigationPane id="glbTabs" binding="#{backingBeanScope.backing_Main.globalTabs}"> <af:forEach var="item" items="#{HPSMenu.
-
Export/import table with XMLTYPE data_type and fine_grained policy
Hi friends! I'm trying to export a table with XMLTYPE and faine-grained policy. Source: HP-UX - Oracle Database 10g Enterprise Edition Release 10.2.0.4.0 - 64bi Target: Linux 2.6.18-238.el5 - Oracle Database 11g Enterprise Edition Release 11.2.0.3.0
-
How do I turn off automatic updates?
How do I turn off automatic updates on a Galaxy S5? I would like to select manually the updates I want.
-
How do I export or print a log of specific iCal entries?
I keep a boat log on iCal - daily entries all with the same event title eg: Boat Log. How can I export or print a compilation of just those entries, sorted by date?