RE: (forte-users) SAX Parser
I would be interested to see TechNote 11811. I just tried the Forté support
web site and couldn't get it. Can anyone help?
Thanks,
Nick.
-----Original Message-----
From: Zee Khan [mailto:[email protected]]
Sent: Tuesday, August 24, 1999 10:08 AM
To: [email protected]
Cc: [email protected]
Subject: RE: (forte-users) SAX Parser
Forte recommends not using DOM for 'documents with large
number of tags'
(TechNote 11811) so I am using SAX.
Any thoughts/suggestions would be welcome,
thanks,
>From: "Jeanne Hesler" <[email protected]>
>To: "'Zee Khan'" <[email protected]>,
<[email protected]>
>Subject: RE: (forte-users) SAX Parser
>Date: Tue, 24 Aug 1999 08:48:23 -0500
>
>Out of curiosity, is it the node structure that you are
trying to avoid,
>or is it the DOM itself? Can you share some of your
reasons? It would
>seem to me that a node or tree structure would be ideally
suited for
>representing the complex structures that you describe.
>
>Jeanne
>=====================================================
>Jeanne Hesler <[email protected]>
>MSF&W Software
>Product Development
>(217) 698-3535 ext. 207
>http://www.msfw.com
>=====================================================
>/\ Imaging Developer - the only imaging product
>\/ integrated into the Forte Development Environment
>=====================================================
>
>
>-----Original Message-----
>From: Zee Khan [mailto:[email protected]]
>Sent: Monday, August 23, 1999 10:32 AM
>To: [email protected]
>Subject: (forte-users) SAX Parser
>
>
>I am using the SAX parser to parse some complex XML.
>
>My problem comes with complex data structures. There
>are several embedded structures, how are these best
>reflected with a SAX parser.
>
>(I guess one solution is to use DOM which returns
>a node structure, but I want to avoid this)
>
>thanks in advace,
>
>
>______________________________________________________
>Get Your Private, Free Email at http://www.hotmail.com
>
>--
>For the archives, go to:
http://lists.sageit.com/forte-users
>To unsubscribe send in a new email the word:
>'Unsubscribe' to: [email protected]
>
>--
>For the archives, go to:
http://lists.sageit.com/forte-users and use
>the login: forte and the password: archive. To unsubscribe,
send in a new
>email the word: 'Unsubscribe' to:
[email protected]
>
Get Your Private, Free Email at http://www.hotmail.com
For the archives, go to: http://lists.sageit.com/forte-users
and use
the login: forte and the password: archive. To unsubscribe,
send in a new
email the word: 'Unsubscribe' to:
[email protected]
I would be interested to see TechNote 11811. I just tried the Forté support
web site and couldn't get it. Can anyone help?
Thanks,
Nick.
-----Original Message-----
From: Zee Khan [mailto:[email protected]]
Sent: Tuesday, August 24, 1999 10:08 AM
To: [email protected]
Cc: [email protected]
Subject: RE: (forte-users) SAX Parser
Forte recommends not using DOM for 'documents with large
number of tags'
(TechNote 11811) so I am using SAX.
Any thoughts/suggestions would be welcome,
thanks,
>From: "Jeanne Hesler" <[email protected]>
>To: "'Zee Khan'" <[email protected]>,
<[email protected]>
>Subject: RE: (forte-users) SAX Parser
>Date: Tue, 24 Aug 1999 08:48:23 -0500
>
>Out of curiosity, is it the node structure that you are
trying to avoid,
>or is it the DOM itself? Can you share some of your
reasons? It would
>seem to me that a node or tree structure would be ideally
suited for
>representing the complex structures that you describe.
>
>Jeanne
>=====================================================
>Jeanne Hesler <[email protected]>
>MSF&W Software
>Product Development
>(217) 698-3535 ext. 207
>http://www.msfw.com
>=====================================================
>/\ Imaging Developer - the only imaging product
>\/ integrated into the Forte Development Environment
>=====================================================
>
>
>-----Original Message-----
>From: Zee Khan [mailto:[email protected]]
>Sent: Monday, August 23, 1999 10:32 AM
>To: [email protected]
>Subject: (forte-users) SAX Parser
>
>
>I am using the SAX parser to parse some complex XML.
>
>My problem comes with complex data structures. There
>are several embedded structures, how are these best
>reflected with a SAX parser.
>
>(I guess one solution is to use DOM which returns
>a node structure, but I want to avoid this)
>
>thanks in advace,
>
>
>______________________________________________________
>Get Your Private, Free Email at http://www.hotmail.com
>
>--
>For the archives, go to:
http://lists.sageit.com/forte-users
>To unsubscribe send in a new email the word:
>'Unsubscribe' to: [email protected]
>
>--
>For the archives, go to:
http://lists.sageit.com/forte-users and use
>the login: forte and the password: archive. To unsubscribe,
send in a new
>email the word: 'Unsubscribe' to:
[email protected]
>
Get Your Private, Free Email at http://www.hotmail.com
For the archives, go to: http://lists.sageit.com/forte-users
and use
the login: forte and the password: archive. To unsubscribe,
send in a new
email the word: 'Unsubscribe' to:
[email protected]
Similar Messages
-
RE: (forte-users) XML Parser - Reading an XML document intothe Document
Hi Laks
Here is an example of converting a XML doc to a DOM object.
The method is ParseXML(pXMLString:TextData, pListType:CSAListInterface).
Hope this helps.
Argyris Simakis
Corporate Services Applications ITB
Sydney AUSTRALIA
-----Original Message-----
From: Narayanan, Lakshmi [mailto:lnarayanoxhp.com]
Sent: Thursday, April 06, 2000 8:31 AM
To: 'kamranaminyahoo.com'
Subject: (forte-users) XML Parser - Reading an XML document into the
Document Object
Importance: High
Hi guys,
I have been trying to read an XML file and feed it into the XMLParser.
I have read about the DOM API, and i can work with the DOM API in java
scripts. How
will i play with it in TOOL implementation of DOM API. Can anyone guide me
in this
process.
Thanks for your help.
Laks
For the archives, go to: http://lists.xpedior.com/forte-users and use
the login: forte and the password: archive. To unsubscribe, send in a new
email the word: 'Unsubscribe' to: forte-users-requestlists.xpedior.comHi Laks
Here is an example of converting a XML doc to a DOM object.
The method is ParseXML(pXMLString:TextData, pListType:CSAListInterface).
Hope this helps.
Argyris Simakis
Corporate Services Applications ITB
Sydney AUSTRALIA
-----Original Message-----
From: Narayanan, Lakshmi [mailto:lnarayanoxhp.com]
Sent: Thursday, April 06, 2000 8:31 AM
To: 'kamranaminyahoo.com'
Subject: (forte-users) XML Parser - Reading an XML document into the
Document Object
Importance: High
Hi guys,
I have been trying to read an XML file and feed it into the XMLParser.
I have read about the DOM API, and i can work with the DOM API in java
scripts. How
will i play with it in TOOL implementation of DOM API. Can anyone guide me
in this
process.
Thanks for your help.
Laks
For the archives, go to: http://lists.xpedior.com/forte-users and use
the login: forte and the password: archive. To unsubscribe, send in a new
email the word: 'Unsubscribe' to: forte-users-requestlists.xpedior.com -
RE: (forte-users) XML Parser - Reading an XML document intothe D ocumen
Hi Simakis,
Your attachments explained the exact start i was looking for.
Thanks a lot for sharing.
Thanks
Laks
-----Original Message-----
From: Simakis, Argyris [mailto:Argyris.Simakisdet.nsw.edu.au]
Sent: Thursday, April 06, 2000 12:35 AM
To: 'Narayanan, Lakshmi'
Cc: 'kamranaminyahoo.com'
Subject: RE: (forte-users) XML Parser - Reading an XML document into the
D ocument Object
Hi Laks
Here is an example of converting a XML doc to a DOM object.
The method is ParseXML(pXMLString:TextData, pListType:CSAListInterface).
Hope this helps.
Argyris Simakis
Corporate Services Applications ITB
Sydney AUSTRALIA
-----Original Message-----
From: Narayanan, Lakshmi [mailto:lnarayanoxhp.com]
Sent: Thursday, April 06, 2000 8:31 AM
To: 'kamranaminyahoo.com'
Subject: (forte-users) XML Parser - Reading an XML document into the
Document Object
Importance: High
Hi guys,
I have been trying to read an XML file and feed it into the XMLParser.
I have read about the DOM API, and i can work with the DOM API in java
scripts. How
will i play with it in TOOL implementation of DOM API. Can anyone guide me
in this
process.
Thanks for your help.
Laks
For the archives, go to: http://lists.xpedior.com/forte-users and use
the login: forte and the password: archive. To unsubscribe, send in a new
email the word: 'Unsubscribe' to: forte-users-requestlists.xpedior.comHi Simakis,
Your attachments explained the exact start i was looking for.
Thanks a lot for sharing.
Thanks
Laks
-----Original Message-----
From: Simakis, Argyris [mailto:Argyris.Simakisdet.nsw.edu.au]
Sent: Thursday, April 06, 2000 12:35 AM
To: 'Narayanan, Lakshmi'
Cc: 'kamranaminyahoo.com'
Subject: RE: (forte-users) XML Parser - Reading an XML document into the
D ocument Object
Hi Laks
Here is an example of converting a XML doc to a DOM object.
The method is ParseXML(pXMLString:TextData, pListType:CSAListInterface).
Hope this helps.
Argyris Simakis
Corporate Services Applications ITB
Sydney AUSTRALIA
-----Original Message-----
From: Narayanan, Lakshmi [mailto:lnarayanoxhp.com]
Sent: Thursday, April 06, 2000 8:31 AM
To: 'kamranaminyahoo.com'
Subject: (forte-users) XML Parser - Reading an XML document into the
Document Object
Importance: High
Hi guys,
I have been trying to read an XML file and feed it into the XMLParser.
I have read about the DOM API, and i can work with the DOM API in java
scripts. How
will i play with it in TOOL implementation of DOM API. Can anyone guide me
in this
process.
Thanks for your help.
Laks
For the archives, go to: http://lists.xpedior.com/forte-users and use
the login: forte and the password: archive. To unsubscribe, send in a new
email the word: 'Unsubscribe' to: forte-users-requestlists.xpedior.com -
Re: (forte-users) SAXParser and InputSource
Michael Beaulieu wrote on Mon November 8:
Hello,
I was wondering if anyone has any experience using the XMLParser
Library!? in Forte. I have no problem parsing a file using the
forte parser but when I try to parse a message/TextData object I get
the error " element not found " ( which is not due to my xml file )
The class InputSource has a method that takes SeekStream in its
setCharacterStream method:
str : MemoryStream = new();
str.open(SP_AM_READ_WRITE);
str.WriteText(myMessage);
theSource : InputSource = new();
theSource.setCharacterStream(str);
myParser.parse(theSource);Add this line after you're done writing to the MemoryStream:
str.Seek(position=0);
When the SAX parser is reading, it's reading from the current position
forward; after writing to the stream the current position is at the
end, so you have to rewind it to the beginning before giving it to the
SAX parser.
Cliff Draper
Forte Engineering
Forte Software, a subsidiary of SunWhy not this:
while myText.moveToString(' ') do
myText.ReplaceRange('-', myText.Offset, myText.Offset+1);
end while;
or if you prefer verbosity:
while myText.moveToString(source=' ') do
myText.ReplaceRange(source='-', startOffset=myText.Offset,
endOffset=myText.Offset+1);
end while;
-----Original Message-----
From: FatchJeBAM.com [mailto:FatchJeBAM.com]
Sent: Wednesday, January 12, 2000 2:51 PM
To: Troy.Burnsvacationclub.com; kamranaminyahoo.com
Subject: RE: (forte-users) search and replace within a TextData
How about this?? May have to play with start/end on ReplaceRange as I
didn't really test this
Anybody got a better way??
-- replace space with underscore
For x in 1 to myTextdata.LengthToEnd() do
If myTextData.IsSpace() then
MyTextdata.ReplaceRange('_'. Startoffset=myTextdata.offset,
endoffset=myTextdata.offset+1);
End if;
MyTextdata.MoveNext;
End for;
Jerry Fatcheric
-----Original Message-----
From: Burns, Troy [mailto:Troy.Burnsvacationclub.com]
Sent: Wednesday, January 12, 2000 9:40 AM
To: kamranaminyahoo.com
Subject: (forte-users) search and replace within a
TextData
Hello all,
I need to search within a textdata object, replacing all
occurrances of a
space
with another character. Can you give a quick code example
of how I would do
this?
Thanks in advance,
Troy
Troy Burns
Marriott Vacation Club Intl.
E-mail: troy.burnsvacationclub.com
Phone: (941) 688-7700 ext. 4408
For the archives, go to: http://lists.sageit.com/forte-users
and use
the login: forte and the password: archive. To unsubscribe,
send in a new
email the word: 'Unsubscribe' to:
forte-users-requestlists.sageit.com
For the archives, go to: http://lists.sageit.com/forte-users and use
the login: forte and the password: archive. To unsubscribe, send in a new
email the word: 'Unsubscribe' to: forte-users-requestlists.sageit.com -
Re: (forte-users) Fusion for the VAR
Hi,
It is a good idea. In fact, I think that how Forte is
going to integrate her own suite of app. too. ( I
kind of recall that there is a speech on this topic in
Forum ).
However, as Forte will most likely goes toward Java, I
would suggest that you take into account the
abstraction on Conductor ( which is frankly an event
broker ) and Fusion ( which handles the XML mapping )
too. In doing so, you can save guard your investment
on the design without binding tightly with FORTE and I
bet there will be tons of event broker or XML parser
in the future market.
On the other hand, this integration by Fusion would be
perfect for a perfect world. But, in this imperfect
world, it would be hard to do cross-checking between
apps in Fusion.
In the old days, we repulicate data or do file
transfer to integrate apps. In doing so, we also
build-in all the cross-checking procedure / reports.
In the case of Fusion, is there such a safety net to
save guard data integrity. Can I identify a lost
event and trace back to find out whether it is a app.
problem or Conductor problem?
I think the customer would surely like to know.
Regards,
Peter Sham.
--- "Thomas Mercer-Hursh, Ph.D."
<[email protected]> wrote:
Fusion has been positioned as an EAI tool, something
at which it appears to
be very, very good, but in recent months I have been
thinking about its
possible role as an architectural tool for those of
us who build large,
multi-application suites of applications. Having
been tossing some of
these ideas around the halls at Harrison Street, I
thought I would try some
of them on this audience as well to see what
reaction I got.
This concept is based on the context that one has
multiple interacting
applications which are loosely coupled, or at least
which should be. E.g.,
an order processing application may need credit
status information from an
accounts receivable application and may generate
invoices which then need
to be tracked for payment by that application, but
the connections between
these applications are specific, limited, and
readily enumerable. Mind
you, people don't always build their applications so
cleanly modularized,
but I think we all agree these days that they should
be.
The idea is to provide each application with a
specific API, which it may
currently have only indirectly. I.e., today one
might simply have calls
directly from one application to another, but one
would gather all these
links together and define an API, probably in XML
which covered all of the
necessary communciations between applications.
These would then be used to
build a Fusion Proxy and one would build the
necessary Conductor processes
to handle the communications which previously might
have been made directly
between applications. There is probably some
performance loss in this
process, but many of these interfaces are not
performance intensive and my
bet is that if the whole Fusion concept has adequate
performance for the
purposes for which it is being primarily marketed,
then it has the
performance for this sort of usage.
One would get several advantages from this
structure:
1) Interapplication communications would be handled
by a Conductor process
and thus be much more readily configurable than any
hard-coded link.
2) One would gain the ability to unplug one's own
application and plug in a
customer's application when the customer insisted on
using something else.
3) The discipline of working in this structure would
insure clean boundries
between applications, which is not only sound
design, but promotes the
flexibility of the overall suite.
4) Those with untransitioned legacy applications
would have a framework
that would allow a mixture of new and old
applications to co-exist, thus
providing them with a transition strategy until the
full product line was
converted.
Note that I am assuming that one would want to build
the individual
applications so that they also used Conductor for
managing their business
process logic, but that seems to me to be an
independent decision from this
one.
So, comments?
Any downsides?
Any added benefits I haven't covered here?
Are there many out there that would benefit from
this approach or just a few?
Is anyone doing anything like this?
Note that the one downside I have found so far is
that Fusion licensing,
independent of the Conductor aspect, is based on the
number of proxies and
so someone like CI who has 15 or more applications
in a typical site is
going to have 15 or more proxies. My bet is that
this can be handled once
it is clear that use of Fusion by a VAR for
integrating own applications is
not the same use as by an end-user integrating
arbitrary multiple applications.
=========================================================================
Thomas Mercer-Hursh, Ph.D email:
[email protected]
Computing Integrity, Inc. sales:
510-233-9329
550 Casey Drive - Cypress Point support:
510-233-9327
Point Richmond, CA 94801-3751 fax:
510-233-6950
For the archives, go to:
http://lists.sageit.com/forte-users and use
the login: forte and the password: archive. To
unsubscribe, send in a new
email the word: 'Unsubscribe' to:
[email protected]
=====Yes, they do & one page is 1KB page. We use the same instrument to check
memory usage & to send alerts in our production system.
Thanks.
Suraj
-----Original Message-----
From: Epari, Madhusudhan [mailto:[email protected]]
Sent: Monday, May 14, 2001 2:37 PM
To: 'Saraf, Suraj'; 'Forte User Forum'
Subject: RE: (forte-users) Instrument for memory used in the partition
Thanks all for the response. I observed "Allocated Pages" instrument doesn't
change as and when memory usage by the partition changes. I was trying to
find a way to measure the actual memory (specifically in bytes or KBs).
Thanks,
Madhu
-----Original Message-----
From: Saraf, Suraj [mailto:[email protected]]
Sent: Thursday, May 10, 2001 12:46 PM
To: 'Epari, Madhusudhan'; 'Forte User Forum'
Subject: RE: (forte-users) Instrument for memory used in the partition
Hello,
I think you can use 'OperatingSystem' service agent & check 'AllocatedPages'
instrument to see how many memory pages are used. You can compare that with
your maximum allocation & send alerts depending on that. Thanks.
Suraj
-----Original Message-----
From: Epari, Madhusudhan [mailto:[email protected]]
Sent: Thursday, May 10, 2001 11:15 AM
To: 'Forte User Forum'
Subject: (forte-users) Instrument for memory used in the partition
Hello Everyone,
Is there an instrument to track the memory used in the partition at a given
point of time. I have a requirement where an alert has to be generated in
the environment when partition uses all its available memory.
Thanks in advance,
Madhu
For the archives, go to: http://lists.xpedior.com/forte-users and use
the login: forte and the password: archive. To unsubscribe, send in a new
email the word: 'Unsubscribe' to: [email protected] -
hi,
i am assuming the problem is with sax parser but i cant be sure. I am parsing a xml file (about 1.4MB) with some data in it. the parser i have created reads the xml file correctly for the most part but when at some point the
"public void characters(char buf[], int offset, int len) throws SAXException"
function stops working correctly....i.e it doesnt fully read read the data between the "<start>" and "</start>" element. say it reads about 100 id's correctly---for 101 ID it does this. This is just an example. Since, the problem might be with how :
"public void characters(char buf[], int offset, int len) throws SAXException"
function is reading the data i was wondering if anybody else had encountered this problem or please let me know if i need to change something in the code: here's a part of the code :
Bascially i have created three classes to enter data into three mysql tables and as i parse the data i fill up the columns by matching the column header with the tagName.
import java.sql.Connection;
import java.sql.DriverManager;
import java.sql.SQLException;
import java.sql.*;
import java.io.*;
import java.util.ArrayList;
import java.lang.Object;
import org.xml.sax.*;
import org.xml.sax.helpers.DefaultHandler;
import java.util.*;
import javax.xml.parsers.SAXParserFactory;
import javax.xml.parsers.ParserConfigurationException;
import javax.xml.parsers.SAXParser;
public class Echo03 extends DefaultHandler
StringBuffer textBuffer;
int issuedValue, prodValue;
OrdHeader header = new OrdHeader();
OrdDetail detail = new OrdDetail();
Member memInfo = new Member();
//new addition to store the dynamic value of the products
TestOrdheader prod = new TestOrdheader();
int counter;
String tag, newTag;
SetValue setVal = new SetValue();
String test;
public static void main(String argv[])
if (argv.length != 1) {
System.err.println("Usage: cmd filename");
System.exit(1);
// Use an instance of ourselves as the SAX event handler
DefaultHandler handler = new Echo03();
// Use the default (non-validating) parser
SAXParserFactory factory = SAXParserFactory.newInstance();
try {
// Set up output stream
out = new OutputStreamWriter(System.out, "UTF8");
// Parse the input
SAXParser saxParser = factory.newSAXParser();
saxParser.parse( new File(argv[0]), handler);
} catch (Throwable t) {
t.printStackTrace();
System.exit(0);
static private Writer out;
private String indentString = " "; // Amount to indent
private int indentLevel = 0;
//===========================================================
// SAX DocumentHandler methods
//===========================================================
public void startDocument()
throws SAXException
nl();
nl();
emit("START DOCUMENT");
nl();
emit("<?xml version='1.0' encoding='UTF-8'?>");
header.assign();
public void endDocument()
throws SAXException
nl(); emit("END DOCUMENT");
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
indentLevel++;
nl(); //emit("ELEMENT: ");
String eName = lName; // element name
if ("".equals(eName)) eName = qName; // namespaceAware = false
if (qName.equals("Billing")){
issuedValue = 1;
}else if (qName.equals("Shipping")){
issuedValue = 2;
}else if (qName.equals("ShippingTotal")){
issuedValue = 3;
//check to see if "Product" is the name of the element thats coming next
if (qName.equals("Product")){
if (issuedValue != 3){
prodValue = 1;
prod.addCounter();
}else{
prodValue = 0;
tag = eName;
if (attrs != null) {
for (int i = 0; i < attrs.getLength(); i++) {
String aName = attrs.getLocalName(i); // Attr name
if ("".equals(aName)) aName = attrs.getQName(i);
nl();
emit(" ATTR: ");
emit(aName);
emit("\t\"");
emit(attrs.getValue(i));
emit("\"");
if (attrs.getLength() > 0) nl();
public void endElement(String namespaceURI,
String sName, // simple name
String qName // qualified name
throws SAXException
nl();
String eName = sName; // element name
if ("".equals(eName)){
eName = qName; // not namespaceAware
if ("Order".equals(eName)){
//enter into database
databaseEnter();
textBuffer = null;
indentLevel--;
public void characters(char buf[], int offset, int len)
throws SAXException
nl();
try {
String s = new String(buf, offset, len);
if (!s.trim().equals("")){
settag(tag, s);
s = null;
}catch (NullPointerException E){
System.out.println("Null pointer Exception:"+E);
//===========================================================
// 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
// and indent the next line appropriately
private void nl()
throws SAXException
String lineEnd = System.getProperty("line.separator");
try {
out.write(lineEnd);
for (int i=0; i < indentLevel; i++) out.write(indentString);
} catch (IOException e) {
throw new SAXException("I/O error", e);
===================================================================
///User defined methods
===================================================================
private String strsplit(String splitstr){
String delimiter = new String("=");
String[] value = splitstr.split(delimiter);
value[1] = value[1].replace(':', ' ');
return value[1];
public void settag(String tag, String s){
String pp_transid = null, pp_respmsg = null,pp_authid = null, pp_avs = null, pp_avszip = null;
if ((tag.equals("OrderDate")) || (tag.equals("OrderProcessingInfo"))){
if (tag.equals("OrderDate")){
StringTokenizer st = new StringTokenizer(s);
String orddate = st.nextToken();
String ordtime = st.nextToken();
header.put("ordDate", orddate);
header.put("ordTime", ordtime);
}else if (tag.equals("OrderProcessingInfo")){
StringTokenizer st1 = new StringTokenizer(s);
int tokenCount = 1;
while (tokenCount <= st1.countTokens()){
switch(tokenCount){
case 1:
String extra = st1.nextToken();
break;
case 2:
String Opp_transid = st1.nextToken();
pp_transid = strsplit(Opp_transid);
break;
case 3:
String Opp_respmsg = st1.nextToken();
pp_respmsg = strsplit(Opp_respmsg);
break;
case 4:
String Opp_authid = st1.nextToken();
pp_authid = strsplit(Opp_authid);
break;
case 5:
String Opp_avs = st1.nextToken();
pp_avs = strsplit(Opp_avs);
break;
case 6:
String Opp_avszip = st1.nextToken();
pp_avszip = strsplit(Opp_avszip);
break;
tokenCount++;
header.put("pp_transid", pp_transid);
header.put("pp_respmsg", pp_respmsg);
header.put("pp_authid", pp_authid);
header.put("pp_avs", pp_avs);
header.put("pp_avszip", pp_avszip);
}else{
newTag = new String(setVal.set_name(tag, issuedValue));
header.put(newTag, s);
//detail.put(newTag, s);
prod.put(newTag, s);
memInfo.put(newTag,s);
//Check to see-- if we should add this product to the database or not
boolean check = prod.checkValid(newTag, prodValue);
if (check){
prod.addValues(s);
setVal.clearMod();
==================================================================
Here's the error that i get:
java.util.NoSuchElementException
at org.apache.crimson.parser.Parser2.parseInternal(Parser2.java:691)
at org.apache.crimson.parser.Parser2.parse(Parser2.java:337)
at org.apache.crimson.parser.XMLReaderImpl.parse(XMLReaderImpl.java:448)
at javax.xml.parsers.SAXParser.parse(SAXParser.java:345)
at javax.xml.parsers.SAXParser.parse(SAXParser.java:281)
at Echo03.main(Echo03.java:47)I haven't gone through your code but I also had a similar error....and the exception in my was because of an "&" instead of the entity reference & in one of the element values. I use a non-validating parser but if you use a validating one then this might not be the reason for your exception.
-
Re: (forte-users) Minimal Fusion
Thomas,
A response which may contain no answers...and may lead to more questions...
As a novice fusion user, one of the largest obstacles to using Fusion is the lack of XML API's in an application, be it a customer's in-house or vendor's software product. Corresponding to this is simply the lack of any API's in the application. As Forte (abet Sun, now iPlanet) says in their training manual 'A nontrivial task is to build new adapters for your programs if you wish to enable them to interact using XML documents over HTTP'. This is probably an understatement.
The question that come to mind is:
Does the warehouse have published API's their product?
If not, then, IMHO, you have steep hill to climb, not the least being communication, cooperation, and coordination from the warehouse vendor (another one of those 'nontrivial tasks') in trying to create the required API's
if so, then it is a matter of building an adapter, in a language that is compatible with the warehouse's API (hopefully C or some derivation of) , that contains (1) a DOM (Document Object Module) to API Translator, (2) an XML Parser (converts XML to DOM and visa-versa) , and (3) a HTTP server (again, another one of those 'nontrivial tasks').
Forte (abet Sun, now iPlanet) suggests, and I would concur (with reservations), that if you haven't done this before you should probably hire their services from the Forte Integration Services group. Their costs (admittible high) should be offset be the time it would take to develop one on your own. A side benefit is working with them, you learn the process for making other adapters in the future. If Fusion is a marketing success, then the benefits should out weigh the costs.
The Forte Integration Services group markets, or will market, a Fusion Adapter Designer, some sort of a SDK, which assists in the creation of Adapters. I do not know the availability of that product at this time.
As to your question "Is it reasonable to consider doing this project under Fusion as a
getting-feet-wet experience?" If you (or your customer) can afford the costs, and the warehouse has published API's, I would say that you gotta get-your-feet-wet somehow. If the warehouse doesn't have published API's and are not willing to put forth the effort and resources to do so, I would say your chances of success are considerably less.
In any case, IMHO, it will be a 'non trivial' undertaking.
-later
-labeaux
"Thomas Mercer-Hursh, Ph.D." <thomascintegrity.com> 10/31/00 04:49PM >>>This may be one of those questions which has no answer, but ...
Our long term plan is to develop XML APIs to each of the modules in our
suite of non-Forte applications and to integrate these under Fusion, thus
gaining Conductor management of the inter-module work flows and a cleaner
loose coupling of the applications along with other benefits such as the
ease of integration with other packages, a clean way to migrate to Forte
modules, and an ease of interconnecting "mini-applications" to address
specific customer needs.
I have an existing customer who has made a decision to migrate to a third
party warehouse from an in-house warehouse. I.e., were this transition to
the new structure complete, this would correspond to unhooking some of our
modules and replacing these with an adapter to the corresponding modules in
the third party warehouse.
In fact, as it looks now, I will need to build the logical equivalent of
these APIs anyway -- might as well do it in XML, right? And these APIs
will communicate with a daemon responsible for the message traffic to and
from. I tried to get this traffic to be XML and to use MQSeries or JMS as
the transport, but the folks at the warehouse end don't seem to be able to
handle such things, so I am stuck doing something fairly stupid for the
actual communication.
So, the question for those out there who have already paid their Fusion
dues, is it reasonable to consider doing this project under Fusion as a
getting-feet-wet experience. There are only half a dozen APIs to do and I
have to do those anyway and am inclined to make them XML regardless. There
will be one communication daemon to which all these connect and the
business processes originally implemented in Conductor will basically be
just point to point connects, except for routing traffic from the daemon to
the right API based on message type. That's really all I need it to do,
i.e., far too simple to actually need Fusion, but a possible opportunity
to get started and then to expand to other uses.
Crazy?
=========================================================================
Thomas Mercer-Hursh, Ph.D email: thomascintegrity.com
Computing Integrity, Inc. sales: 510-233-9329
550 Casey Drive - Cypress Point support: 510-233-9327
Point Richmond, CA 94801-3751 fax: 510-233-6950
For the archives, go to: http://lists.xpedior.com/forte-users and use
the login: forte and the password: archive. To unsubscribe, send in a new
email the word: 'Unsubscribe' to: forte-users-requestlists.xpedior.comAt 07:55 AM 11/1/00, Labeaux Schiek wrote:
As a novice fusion user, one of the largest obstacles to using Fusion is
the lack of XML API's in an application, be it a customer's in-house or
vendor's software product.In this case, the good news is that one of the applications in question is
our own, so whipping up an XML API to suit each required transaction on
that side is no more, probably less, work than importing or exporting a
flat file or whatever. Moreover, my current expectation of how this
interaction will work is something like this:
</pre>
---Fusion------
| |
WACS<-->WACS_Daemon<----VPN socket
connection---->IS_Daemon I/S
</pre>
I.e., I/S, our application, and the IS_Daemon which handles the connection
traffic across the internet link are both mine. For I/S, I will create XML
APIs to suit. For the IS_daemon, I might use the transform facilities to
convert this XML to the pipe-delimited format they are expected at the
other end and make the daemon a simple manager of the connection or, the
daemon could do the conversion, but the former seems like the more
appropriate approach. The API between the two daemons is something we are
defining now (unfortunately I lost the argument to make that XML).
Corresponding to this is simply the lack of any API's in the
application. As Forte (abet Sun, now iPlanet) says in their training
manual 'A nontrivial task is to build new adapters for your programs if
you wish to enable them to interact using XML documents over HTTP'.My neophyte understanding is that, since I am defining the API to I/S in
the diagram above and I can make this XML, then the adapter issue
disappears there. I might have to create an adapter for the daemon, but if
necessary, I could make that the same XML on a pass through and do the
translation in the daemon.
If not, then, IMHO, you have steep hill to climb, not the least being
communication, cooperation, and coordination from the warehouse vendor
(another one of those 'nontrivial tasks') in trying to create the required
API'sWe are well through this process anyway. ... which is not to say that it
has been or will be easy, but it must be done whether I use Fusion or
not. Given that the vote has gone in favor of simple messages of
pipe-delimited records, i.e., basically flat file, the technical issues
there are minimal.
if so, then it is a matter of building an adapter, in a language that is
compatible with the warehouse's API (hopefully C or some derivation of) ,
that contains (1) a DOM (Document Object Module) to API Translator, (2)
an XML Parser (converts XML to DOM and visa-versa) , and (3) a HTTP server
(again, another one of those 'nontrivial tasks').I'm not sure I quite understand what you are saying here. The HTTP part
won't be there since we will apparently be connecting via a VPN sockets
connection. But, how are you distinguishing DOM and XML since DOM is a
particular form of XML? The XML API I build for I/S will be DOM compliant.
Forte (abet Sun, now iPlanet) suggests, and I would concur (with
reservations), that if you haven't done this before you should probably
hire their services from the Forte Integration Services group. Their
costs (admittible high) should be offset be the time it would take to
develop one on your own. A side benefit is working with them, you learn
the process for making other adapters in the future. If Fusion is a
marketing success, then the benefits should out weigh the costs.I am familiar with the "party" line. If I were building a complete
interface to another major product (I/S is roughly equivalent to JDEC in
coverage) in the context of an EAI project, I would happily invite them in
and hope to pick up pointers. Here, though, there are only 8 or 9 total
transaction types and either all of the interfaces are XML, i.e., no
adapter required as I understand it, or only the daemon will need an
adapter and that will be a choice I can make depending on how things
go. One does wish it were possible to sample a small piece of that
knowledge store without having to buy the whole thing, though.
The Forte Integration Services group markets, or will market, a Fusion
Adapter Designer, some sort of a SDK, which assists in the creation of
Adapters. I do not know the availability of that product at this time.Last I checked, one couldn't get this without the consulting ... hence the
last sentence above.
Thanks for your input.
=========================================================================
Thomas Mercer-Hursh, Ph.D email: thomascintegrity.com
Computing Integrity, Inc. sales: 510-233-9329
550 Casey Drive - Cypress Point support: 510-233-9327
Point Richmond, CA 94801-3751 fax: 510-233-6950 -
Re: [(forte-users) Need help w/SQL to Informix using anarray in WHERE c
Bob.
That syntax isn't know Forte, used Dynamic SQL and coding
it dynamically. And the SQL statement exceed 255 bytes, divide in 2 or more
sentences (NameListCity1, NameListCity2, NalmeListCountry1, ...)
Try with:
NameListCity = 'city1','city2','city3'...
NalmeListCountry = 'country1','country2','country3',...
WHERE
city in (:NameListCity) and
country_code in (:NameListCountry)
Bye.
"Briggs, Bob" <Bob.Briggsmarriott.com> wrote:
I'm trying to invoke a query to Informix to select rows that match any of
the city / country pairs that exist in an array that is passed into the
method. The SQL itself seems to be OK however it appears that Forte is
having a problem in parsing the Select statement when it gets to the WHERE
clause. The resulting exception shows the SQL string formatted properly up
to the WHERE clause which ends like "WHERE city". Does anyone know of a way
to make this type of query work in a single invocation? I'm trying not to
issue multiple queries as would be the case if I used Dynamic SQL and coding
it dynamically with multiple OR statements is not really an option since the
overall length of the SQL statement cannot exceed 256 bytes. I have included
an example of the code below, any insight would be greatly appreciated.
SQL SELECT address1 tnAddress, city tnCity, state tnState, zipcode
tnZipcode,
hotel_code tnHotel_Code, name tnHotelName, product_code
tnProduct_code, loc_type tnLoc_Type,
phone tnPhone, country_code tnCountry
INTO
:po_aboLocator
FROM
Hotel
WHERE
city in :pi_aboNickNameList[*].sCityName and
country_code in :pi_aboNickNameList[*].sCountryCode
ON SESSION getDBSession();
Thank you very much,
Bob
For the archives, go to: http://lists.xpedior.com/forte-users and use
the login: forte and the password: archive. To unsubscribe, send in a new
email the word: 'Unsubscribe' to: forte-users-requestlists.xpedior.comBob.
That syntax isn't know Forte, used Dynamic SQL and coding
it dynamically. And the SQL statement exceed 255 bytes, divide in 2 or more
sentences (NameListCity1, NameListCity2, NalmeListCountry1, ...)
Try with:
NameListCity = 'city1','city2','city3'...
NalmeListCountry = 'country1','country2','country3',...
WHERE
city in (:NameListCity) and
country_code in (:NameListCountry)
Bye.
"Briggs, Bob" <Bob.Briggsmarriott.com> wrote:
I'm trying to invoke a query to Informix to select rows that match any of
the city / country pairs that exist in an array that is passed into the
method. The SQL itself seems to be OK however it appears that Forte is
having a problem in parsing the Select statement when it gets to the WHERE
clause. The resulting exception shows the SQL string formatted properly up
to the WHERE clause which ends like "WHERE city". Does anyone know of a way
to make this type of query work in a single invocation? I'm trying not to
issue multiple queries as would be the case if I used Dynamic SQL and coding
it dynamically with multiple OR statements is not really an option since the
overall length of the SQL statement cannot exceed 256 bytes. I have included
an example of the code below, any insight would be greatly appreciated.
SQL SELECT address1 tnAddress, city tnCity, state tnState, zipcode
tnZipcode,
hotel_code tnHotel_Code, name tnHotelName, product_code
tnProduct_code, loc_type tnLoc_Type,
phone tnPhone, country_code tnCountry
INTO
:po_aboLocator
FROM
Hotel
WHERE
city in :pi_aboNickNameList[*].sCityName and
country_code in :pi_aboNickNameList[*].sCountryCode
ON SESSION getDBSession();
Thank you very much,
Bob
For the archives, go to: http://lists.xpedior.com/forte-users and use
the login: forte and the password: archive. To unsubscribe, send in a new
email the word: 'Unsubscribe' to: forte-users-requestlists.xpedior.com -
OBIEE Writeback error Sax parser Expected entity name with ampersand gt/lt
Hi,
I've enabled OBIEE 10.1.3.3.2 on Suse Linux 9.x writeback successfully for an OBIEE report, however if any of the fields contain XML special characters like ampersand, less than, greater than symbols etc when I save I get error:
An error occurred while writing to the server. Please check to make sure you have entered appropriate values. If the problem persists, contact your system administrator.
Sax parser returned an exception. Message: Expected entity name for reference, Entity publicId: , Entity systemId: , Line number: 1, Column number: 795
Error Details
Error Codes: UH6MBRBC:E6MUPJPH
Xml parsed: <writeBack template="entry"><record action="update"><value columnID="c10">C</value><value columnID="c2">Jun-08</value><value columnID="c5">0001</value><value columnID="c1">NET RESULT</value><value columnID="c7">T000</value><value columnID="c3">Total X & X</value>...
I don't really want to have to use replace function on all the fields in the report to remove special characters + train users not to enter them in editable field.
Anyone got any ideas how to get around this?
Thanks,
GarethHi
I am getting this error in writeback while submitting
An error occurred while writing to the server. Please check to make sure you have entered appropriate values. If the problem persists, contact your system administrator.
Sax parser returned an exception. Message: Unterminated entity reference, 'M', Entity publicId: , Entity systemId: , Line number: 1, Column number: 85
Error Details
Error Codes: UH6MBRBC:E6MUPJPH
Xml parsed: <writeBack template="CPE_writeback"><record action="update"><value columnID="c0">H&M SWEDEN</value><value columnID="c1">7/5/2010</value><value columnID="c2">8/26/2010</value><value columnID="c11">Administrator</value><value columnID="c7">BOOKED</value><value columnID="c10"> y</value><value columnID="c9">H&M SWEDEN ;7/5/2010 ;8/26/2010 ;BOOKED</value></record></writeBack>
I think the problem is with '&' or might be with something else, if i choose other options form dropdowns its does not give me any error. only fot this customer "H&M SWEDEN"
can any one please tell me what workaround i can do.. the obi version is 10.1.3.2 -
SAX parser problem in JDK1.5
I have parse the xml file using SAX in jdk1.5 environment. During the parsing, it missed the some text content.
for example
<employeeid>
<empid>1001</empid>
<empid>1002</empid>
</employeeid>
If i have parse the above xml file using SAX in jdk1.5 environment. The output is
1001
100
during the parsing , SAX parser misses digit of 2.
if i have parse the above xml file using SAX in jdk1.4 environment , it is working fine.
what is the problem in jdk1.5
please help
balaWhat I expect the problem to be was discussed recently in a topic titled "SAX Parser Problems" that was started on March 14 at 6:59 AM by JackoBS.
Read that and see if it fixes your problem. If so, it is not a JDK1.5 problem, but a user error.
Dave Patterson -
RE: (forte-users) XML and XSL in Forte
We too (at Viking Freight) would also be very interested to see if anybody
has produced such a useful series of classes...
Frank Lees, Developer
-----Original Message-----
From: Amin, Kamran [mailto:kamran.aminframeworkinc.com]
Sent: Wednesday, January 19, 2000 12:11 PM
To: 'Forte User'
Subject: (forte-users) XML and XSL in Forte
Has anybody integrated an XSL parser with Forte. I know Forte provides us
with an XML parser but that does not help with parsing XSL. There a lot of
parsers written in JAVA but that will not integrate well with Forte. We
need something that will be easy to integrate with Forte. This parser will
take our XML and XSL to give us a result set. If anybody can comment on the
subject or share some information I would appreciate it.
thanks in advance.
ka
For the archives, go to: http://lists.sageit.com/forte-users and use
the login: forte and the password: archive. To unsubscribe, send in a new
email the word: 'Unsubscribe' to: forte-users-requestlists.sageit.com -
Oggetto: Re: (forte-users) XML - ExportDocumentproblem
Ok, I'll detail the question.
The application I'm talking about is a Fortè server and a Java client (or other
client platform).
I have to send via HTTP a XML message to and from the two.
I'm developing the Forte side (but think will have the same problems in Java).
Since there could be lots of client sides developed by others teams (or given
out to external suppliers) my concern is to send the message containing the DTD
information to enforce the validation on the various application.
Maybe you are right and I'm overcautious, but the messages are to be built
following the various DTDs (and this is impossible aside starting from a xml
template, since I cannot create a DTD runtime or insert a declaration <!DOCUMENT
...> ... I'll example:)
doc : document = new();
xml : processistruction = doc.createprocessistruction('xml version="1.0"');
root : element = doc.createelement('root');
dtd : ????? = doc.create??????(???);
doc.addchild(xml);
doc.appendchild(dtd);
doc.addchild(root);
All would be nice if I only know how to fill the ???
This is needed because I want to use the parser to make the work for me and
check the doc while I build it.
Also since the DTD should be put on a url it could change and I need to send
this info along with the message to inform the client (since I'm the server
[suffering of multiple personality problem] I think is my duty).
If I recall well DTD are meant to force the parser to create defaults and things
like that.
As I said I'm new of the problem and probabli I may use DTD in a wrong way, but
Luca
Matthew Middleton <mathew.middletonlawpoint.com.au> il 09/08/2000 01.03.16
Per: forte-userslists.xpedior.com
cc: (ccr: Luca Gioppo/CSI/IT)
Oggetto: Re: (forte-users) XML - ExportDocument problemI went through the same process some time back. I
submitted a call to Forte and was informed that there
are hooks but they were intentionally undocumented
because Forte had plans to provide a interface to
Source Control Managers in future releases. If you
submit a call, they will send you a ZIP file
containing instructions on how to use the hooks. The
hooks have proven very useful.
--- Luca Gioppo <Luca.Gioppocsi.it> wrote:
>
>
I think that the topic is still open and alive.
In my case I have the need to integrate with PVCS
dimension.
The problem for me is that we develop both with java
and tool, and is
frustrating seeing java people smiling as tha
various tools give the chance to
integrate to various extends with source control
products.
I'm interested too in the problem, looking for a
solution since a bit, but no
satifactory solutions.
So count 2 on the problem.
Luca
"David Potts" <david.pottss1.com> il 23/11/2000
17.12.47
Per: forte-userslists.xpedior.com
cc: (ccr: Luca Gioppo/CSI/IT)
Oggetto: (forte-users) Source Control
Hello,
I'm looking how to do version control for forte
development, and have
done a search on the list archive. There are lots
of messages asking
how to do source control, but the answers all seem
to be "roll your
own". My questions are:
(1) Most of the postings seem to come from some
years ago. What is the
current state of play with source control for forte
4GL?
(2) There was some mention of "hooks". What are
these hooks?
(3) With Sun appearing on the scene, anyone got any
idea where source
control is going in future versions?
I'm very new to Forte, so sorry if this topic has
been closed.
Cheers,
Dave.
ATTACHMENT part 2 application/octet-streamname=david.potts.vcf
http://shopping.yahoo.com/ -
RE: (forte-users) dynamic select & maxrowsparameter
I thing this code should help:
** Accepts command string for dynamic query and **
** an empty array of BC to which the results **
** should be appended. Returns the filled BC **
** array. **
l_dynamicStatement : DBStatementHandle;
l_inputDescriptor : DBDataSet;
l_outputDescriptor : DBDataSet;
l_outputData : DBDataSet;
l_intStatementType : integer;
l_intRowType : integer;
l_intNumRows : integer;
l_intRowCount : integer = 0;
l_result : BusinessClass = new;
BEGIN
-- Prepare SQL statement for query given command string
l_dynamicStatement = self.GetDBSession().Prepare(
commandString = p_strSql,
inputDataSet = l_inputDescriptor,
cmdType = l_intStatementType);
-- Open Cursor
l_intRowType = GetDBSession().OpenCursor(
statementHandle = l_dynamicStatement,
inputDataSet = l_inputDescriptor,
resultDataSet = l_outputDescriptor);
-- Fetch first row
l_intNumrows = GetDBSession().FetchCursor(
statementHandle = l_dynamicStatement,
resultDataSet = l_outputData);
WHILE l_intNumRows > 0 DO -- If prev fetch returned a row
-- Increment count of rows fetched
l_intRowCount = l_intRowCount + 1;
-- Check for excessive number of rows retrieved
-- Then it checks if you want to throw a exception or
-- just exit and return the result set.
IF l_introwCount > p_intMaxRow THEN
IF p_bThrowExcept THEN
-- Shut the cursor down and remove prepared
statement
GetDBSession().CloseCursor(l_dynamicStatement);
GetDBSession().RemoveStatement(l_dynamicStatement);
// Raise exception
-- Have to put code
ELSE
EXIT;
END IF;
END IF;
-- Parse result from DBDataSet to subclass
-- of BusinessClass
l_result = parseResult(l_outputData);
// Add row to array
p_aryBC.AppendRow(l_result.Clone(deep=TRUE));
// Fetch next row
l_intNumrows = GetDBSession().FetchCursor(
statementHandle = l_dynamicStatement,
resultDataSet = l_outputData);
END WHILE;
-- Shut the cursor down and remove prepared statement
GetDBSession().CloseCursor(l_dynamicStatement);
GetDBSession().RemoveStatement(l_dynamicStatement);
EXCEPTION
when e: GenericException do
GetDBSession().CloseCursor(l_dynamicStatement);
GetDBSession().RemoveStatement(l_dynamicStatement);
raise e;
END;
return p_aryBC;
ka
Kamran Amin
Framework, Inc.
303 South Broadway
Tarrytown, NY 10591
(914) 631-2322x121
[email protected]
http://www.frameworkinc.com/
-----Original Message-----
From: Matthew Middleton [mailto:[email protected]]
Sent: Thursday, December 09, 1999 11:15 PM
To: Will Chris
Cc: [email protected]
Subject: RE: (forte-users) dynamic select & maxrows parameter
Think there's a mis-understanding. The maxrows I refer to is not SQL but a
forte method parameter as in the following:
dynStatement = self.DefaultDBSession.Prepare(commandString = sqlStatement
,inputDataSet = inputDescriptor
,cmdType = commandType);
rowType = self.DefaultDBSession.Select(statementHandle = dynStatement
,inputDataSet = inputDescriptor
,resultDataSet = outputDescriptor
,maxrows = 100);
the variable sqlStatement holds the "dynamic" select string.
If I don't set maxrows I get a runtime error, as mentioned, it is running
against Oracle.
At 14:47 10/12/99 +1100, you wrote:
We use Oracle and Rdb and we have dynamic and non-dynamic SQL. No
combination of
these demand a max rows clause.
For example the following query works on both databases :
lvLanguageCodesList : Array of LanguageCodes = new();
begin transaction
sql select Language_Code LanguageCode,
Language_Nm LanguageNm,
System_Control_YN SystemControlYN,
Other_Language_YN OtherLanguageYN
into :lvLanguageCodesList
from SRD_LANGUAGE_CODES
order by Language_Nm
on session StudentRegistryDBSession;
end transaction;
if lvLanguageCodesList.items = 0 then
return Nil;
else
return lvLanguageCodesList;
end if;
Indeed if we wanted to use max rows its a bit of a pain in the bum because
Oracle and
Rdb use different syntax to define the row limit. So our dynamic SQL
'builder class'
has to detect the database flavour and configure max rows accordingly(where
we want to use
it).
I can only guess that the error you are getting is not assoicated to therow
limit or is caused because of the database you are using ?
Regards,
Chris Will, Sydney, Australia
-----Original Message-----
From: Matthew Middleton [mailto:[email protected]]
Sent: Friday, 10 December 1999 14:33
To: [email protected]
Subject: (forte-users) dynamic select & maxrows parameter
the help for DBSession.Select method says that the maxrows
parameter is not
required. Leaving it out does not give a compile error.
However at runtime
an error is got saying maxrows must be > 0.
I am using a method that accepts a where clause as a
parameter and am not
really interested in what the number of rows will be.
Should I be?
Does anyone have any knowledge they can share on this one.
Thanks.
Regards,
Matthew Middleton Ph: +61 2 9239 4972
Oryx Software Consultant Fax: +61 2 9239 4900
Lawpoint Pty. Ltd. E-mail [email protected]
For the archives, go to: http://lists.sageit.com/forte-users and use
the login: forte and the password: archive. To unsubscribe,
send in a new
email the word: 'Unsubscribe' to: [email protected]
For the archives, go to: http://lists.sageit.com/forte-users and use
the login: forte and the password: archive. To unsubscribe, send in a new
email the word: 'Unsubscribe' to: [email protected]
Regards,
Matthew Middleton Ph: +61 2 9239 4972
Oryx Software Consultant Fax: +61 2 9239 4900
Lawpoint Pty. Ltd. E-mail [email protected]
For the archives, go to: http://lists.sageit.com/forte-users and use
the login: forte and the password: archive. To unsubscribe, send in a new
email the word: 'Unsubscribe' to: [email protected]I thing this code should help:
** Accepts command string for dynamic query and **
** an empty array of BC to which the results **
** should be appended. Returns the filled BC **
** array. **
l_dynamicStatement : DBStatementHandle;
l_inputDescriptor : DBDataSet;
l_outputDescriptor : DBDataSet;
l_outputData : DBDataSet;
l_intStatementType : integer;
l_intRowType : integer;
l_intNumRows : integer;
l_intRowCount : integer = 0;
l_result : BusinessClass = new;
BEGIN
-- Prepare SQL statement for query given command string
l_dynamicStatement = self.GetDBSession().Prepare(
commandString = p_strSql,
inputDataSet = l_inputDescriptor,
cmdType = l_intStatementType);
-- Open Cursor
l_intRowType = GetDBSession().OpenCursor(
statementHandle = l_dynamicStatement,
inputDataSet = l_inputDescriptor,
resultDataSet = l_outputDescriptor);
-- Fetch first row
l_intNumrows = GetDBSession().FetchCursor(
statementHandle = l_dynamicStatement,
resultDataSet = l_outputData);
WHILE l_intNumRows > 0 DO -- If prev fetch returned a row
-- Increment count of rows fetched
l_intRowCount = l_intRowCount + 1;
-- Check for excessive number of rows retrieved
-- Then it checks if you want to throw a exception or
-- just exit and return the result set.
IF l_introwCount > p_intMaxRow THEN
IF p_bThrowExcept THEN
-- Shut the cursor down and remove prepared
statement
GetDBSession().CloseCursor(l_dynamicStatement);
GetDBSession().RemoveStatement(l_dynamicStatement);
// Raise exception
-- Have to put code
ELSE
EXIT;
END IF;
END IF;
-- Parse result from DBDataSet to subclass
-- of BusinessClass
l_result = parseResult(l_outputData);
// Add row to array
p_aryBC.AppendRow(l_result.Clone(deep=TRUE));
// Fetch next row
l_intNumrows = GetDBSession().FetchCursor(
statementHandle = l_dynamicStatement,
resultDataSet = l_outputData);
END WHILE;
-- Shut the cursor down and remove prepared statement
GetDBSession().CloseCursor(l_dynamicStatement);
GetDBSession().RemoveStatement(l_dynamicStatement);
EXCEPTION
when e: GenericException do
GetDBSession().CloseCursor(l_dynamicStatement);
GetDBSession().RemoveStatement(l_dynamicStatement);
raise e;
END;
return p_aryBC;
ka
Kamran Amin
Framework, Inc.
303 South Broadway
Tarrytown, NY 10591
(914) 631-2322x121
[email protected]
http://www.frameworkinc.com/
-----Original Message-----
From: Matthew Middleton [mailto:[email protected]]
Sent: Thursday, December 09, 1999 11:15 PM
To: Will Chris
Cc: [email protected]
Subject: RE: (forte-users) dynamic select & maxrows parameter
Think there's a mis-understanding. The maxrows I refer to is not SQL but a
forte method parameter as in the following:
dynStatement = self.DefaultDBSession.Prepare(commandString = sqlStatement
,inputDataSet = inputDescriptor
,cmdType = commandType);
rowType = self.DefaultDBSession.Select(statementHandle = dynStatement
,inputDataSet = inputDescriptor
,resultDataSet = outputDescriptor
,maxrows = 100);
the variable sqlStatement holds the "dynamic" select string.
If I don't set maxrows I get a runtime error, as mentioned, it is running
against Oracle.
At 14:47 10/12/99 +1100, you wrote:
We use Oracle and Rdb and we have dynamic and non-dynamic SQL. No
combination of
these demand a max rows clause.
For example the following query works on both databases :
lvLanguageCodesList : Array of LanguageCodes = new();
begin transaction
sql select Language_Code LanguageCode,
Language_Nm LanguageNm,
System_Control_YN SystemControlYN,
Other_Language_YN OtherLanguageYN
into :lvLanguageCodesList
from SRD_LANGUAGE_CODES
order by Language_Nm
on session StudentRegistryDBSession;
end transaction;
if lvLanguageCodesList.items = 0 then
return Nil;
else
return lvLanguageCodesList;
end if;
Indeed if we wanted to use max rows its a bit of a pain in the bum because
Oracle and
Rdb use different syntax to define the row limit. So our dynamic SQL
'builder class'
has to detect the database flavour and configure max rows accordingly(where
we want to use
it).
I can only guess that the error you are getting is not assoicated to therow
limit or is caused because of the database you are using ?
Regards,
Chris Will, Sydney, Australia
-----Original Message-----
From: Matthew Middleton [mailto:[email protected]]
Sent: Friday, 10 December 1999 14:33
To: [email protected]
Subject: (forte-users) dynamic select & maxrows parameter
the help for DBSession.Select method says that the maxrows
parameter is not
required. Leaving it out does not give a compile error.
However at runtime
an error is got saying maxrows must be > 0.
I am using a method that accepts a where clause as a
parameter and am not
really interested in what the number of rows will be.
Should I be?
Does anyone have any knowledge they can share on this one.
Thanks.
Regards,
Matthew Middleton Ph: +61 2 9239 4972
Oryx Software Consultant Fax: +61 2 9239 4900
Lawpoint Pty. Ltd. E-mail [email protected]
For the archives, go to: http://lists.sageit.com/forte-users and use
the login: forte and the password: archive. To unsubscribe,
send in a new
email the word: 'Unsubscribe' to: [email protected]
For the archives, go to: http://lists.sageit.com/forte-users and use
the login: forte and the password: archive. To unsubscribe, send in a new
email the word: 'Unsubscribe' to: [email protected]
Regards,
Matthew Middleton Ph: +61 2 9239 4972
Oryx Software Consultant Fax: +61 2 9239 4900
Lawpoint Pty. Ltd. E-mail [email protected]
For the archives, go to: http://lists.sageit.com/forte-users and use
the login: forte and the password: archive. To unsubscribe, send in a new
email the word: 'Unsubscribe' to: [email protected] -
Re: (forte-users) Hi - Query on XML Import document -Hang
Double check that your XML is valid. I've seen
importDocument hang when I'm missing an end tag.
I don't think it's a validating parser.
Of course, there's no documentation, so.... :)
Chris
--- "Saravanan, Lakshmi N." <lnarayanoxhp.com> wrote:
Hi guys,
I am trying to import an XML document from a
Memory stream object. I
got the example
from this group ( It was very helpful ).
Sample Code :
l_MemStr : MemoryStream = new;
l_MemStr.Open( SP_AM_READ_WRITE );
l_MemStr.WriteText( source = l_XMLData );
l_MemStr.Seek( position=0 );
-- Create a Document object from the memory stream
myDoc : Document = new;
myDoc.importdocument( l_MemStr );
After this line nothing seems to happen.. the
partition just hangs... keeps
the CPU busy.
If i deploy the same in a NT or on a IBM box it
works fine. The problem is
with the Sequent box..( i guess ).
Did any of you guys face a problem like this...
Please let us know..
I would really appreciate it.
Thanks
Laks
For the archives, go to:
http://lists.xpedior.com/forte-users and use
the login: forte and the password: archive. To
unsubscribe, send in a new
email the word: 'Unsubscribe' to:
forte-users-requestlists.xpedior.com
http://mail.yahoo.com/Well, Forte have agreed to release a patch for the XML bug on DG Unix with
Forte Version 3.0.M.2. I've attached a related mail with this.
- Charu.
-----Original Message-----
From: Epari, Madhusudhan [mailto:meparioxhp.com]
Sent: Friday, September 01, 2000 7:59 AM
To: 'Amin, Kamran'
Cc: 'forte-userslists.xpedior.com'
Subject: RE: (forte-users) Hi - Query on XML Import document - Hang
I did check the xml by opening it in IE 5.0 for it's well-formedness. Still
it's failing on sequent box.
-----Original Message-----
From: Amin, Kamran [mailto:kamran.aminlendware.com]
Sent: Friday, September 01, 2000 10:55 AM
To: 'Epari, Madhusudhan'
Subject: RE: (forte-users) Hi - Query on XML Import document - Hang
Well not really. One way to check if the xml is valid is to open it in IE
5.0. If its well formed then it will show up otherwise it will give you an
error. Also the document object is not the best code that came out of Forte
and has errors, so this might be a bug you will have to report. And they
are not giving any new patches until 3.5 comes out in 2 months.
ka
-----Original Message-----
From: Epari, Madhusudhan [mailto:meparioxhp.com]
Sent: Friday, September 01, 2000 10:52 AM
To: 'Christopher Fury'
Cc: 'forte-userslists.xpedior.com'
Subject: RE: (forte-users) Hi - Query on XML Import document - Hang
If the XML is invalid it should fail on all boxes. This should be a sequent
specific problem.
Madhu
-----Original Message-----
From: Christopher Fury [mailto:cfuryyahoo.com]
Sent: Friday, September 01, 2000 9:37 AM
To: 'forte-userslists.xpedior.com'
Subject: Re: (forte-users) Hi - Query on XML Import document - Hang
Double check that your XML is valid. I've seen
importDocument hang when I'm missing an end tag.
I don't think it's a validating parser.
Of course, there's no documentation, so.... :)
Chris
--- "Saravanan, Lakshmi N." <lnarayanoxhp.com> wrote:
Hi guys,
I am trying to import an XML document from a
Memory stream object. I
got the example
from this group ( It was very helpful ).
Sample Code :
l_MemStr : MemoryStream = new;
l_MemStr.Open( SP_AM_READ_WRITE );
l_MemStr.WriteText( source = l_XMLData );
l_MemStr.Seek( position=0 );
-- Create a Document object from the memory stream
myDoc : Document = new;
myDoc.importdocument( l_MemStr );
After this line nothing seems to happen.. the
partition just hangs... keeps
the CPU busy.
If i deploy the same in a NT or on a IBM box it
works fine. The problem is
with the Sequent box..( i guess ).
Did any of you guys face a problem like this...
Please let us know..
I would really appreciate it.
Thanks
Laks
For the archives, go to:
http://lists.xpedior.com/forte-users and use
the login: forte and the password: archive. To
unsubscribe, send in a new
email the word: 'Unsubscribe' to:
forte-users-requestlists.xpedior.com
http://mail.yahoo.com/
For the archives, go to: http://lists.xpedior.com/forte-users and use
the login: forte and the password: archive. To unsubscribe, send in a new
email the word: 'Unsubscribe' to: forte-users-requestlists.xpedior.com
For the archives, go to: http://lists.xpedior.com/forte-users and use
the login: forte and the password: archive. To unsubscribe, send in a new
email the word: 'Unsubscribe' to: forte-users-requestlists.xpedior.com
For the archives, go to: http://lists.xpedior.com/forte-users and use
the login: forte and the password: archive. To unsubscribe, send in a new
email the word: 'Unsubscribe' to: forte-users-requestlists.xpedior.com -
Hi All,
I get an xml file by making an http request. The name of the DTD comes as a relative path in the response xml file.
Questions
1. Is there a way to handle this
2. I read somewhere that i could avoid looking at the DTD alltogether,
can someone show me how with a sample code.
Kind regardsNothing seems to help, Please help,
Im using jdk1.4 A full source codee would be great.
Thanks in advance.
This is the trace and the Code follows below:
C:\codes\parser>java -classpath xerces.jar;. ReaderConnector
Initiating Connection to System URL = http://a.b.c.com:5280/vega/
request?method=login&ui=ch16132-user&pwd=pass
Connected ..
Opening Stream for reading data
Got input stream java.io.BufferedInputStream@19821f
Got reader java.io.BufferedReader@addbf1
Read login file ...
Parsing ...
Start of Login document
\vega\xml\xrf.dtd (The system cannot find the path)
Parsed
********************************3
*****Code*****
import javax.xml.parsers.*;
import org.xml.sax.*;
import java.io.*;
import java.util.*;
import java.net.*;
import org.xml.sax.EntityResolver;
import org.xml.sax.InputSource;
import org.xml.sax.helpers.*;
import org.xml.sax.ContentHandler;
import org.xml.sax.Locator;
import org.xml.sax.Attributes;
import org.xml.sax.XMLReader;
import org.xml.sax.helpers.XMLReaderFactory;
* @author JAVA
* @version
public class ReaderConnector{
public ReaderConnector() {
/*Login URl doesnt change*/
private String loginUrl = "http://a.b.c.com:5280/vega/request?method=login&ui=ch16132-user&pwd=pass";
//private String loginUrl = "c://temp/test.xml";
private String sessionId;
public String getSessionId(){
if(sessionId == null){
createConnection();
return sessionId;
}else{
return sessionId;
public void createConnection() {
DataInputStream inputStream = null;
BufferedReader reader = null;
InputStream in = null;
FileOutputStream fos= null;
//System.setProperty("javax.xml.parsers.SAXParserFactory", "org.apache.xerces.jaxp.SAXParserFactoryImpl");
try {
URL url = new URL(loginUrl);
URLConnection connection = url.openConnection();
connection.setUseCaches(false);
System.out.println(" Initiating Connection to System URL = " + "http://a.b.c.com:5280/vega/request?method=login&ui=ch16132-usr&pwd=pass");
connection.connect();
System.out.println(" Connected ..");
System.out.println(" Opening Stream for reading data ");
in = new BufferedInputStream (new DataInputStream (connection.getInputStream()));
System.out.println("Got input stream "+ in);
reader = new BufferedReader(new InputStreamReader(new BufferedInputStream(in)));
System.out.println("Got reader "+ reader);
System.out.println("Read login file ...");
parseStream(reader);
}catch (Exception e) {
System.out.println(e.getMessage());
}finally {
try {
in.close();
//fos.close();
if (inputStream != null) {
inputStream.close();
if(reader!=null){
reader.close();
} catch (Exception ex) {
System.out.println(ex.getMessage());
ex.printStackTrace();
public void parseStream(BufferedReader br){
System.out.println("Parsing ...");
try{
/*SAXParserFactory spf = SAXParserFactory.newInstance();
spf.setValidating(false);
spf.setNamespaceAware(false);
org.xml.sax.Parser sp = (org.xml.sax.Parser)spf.newSAXParser();
//sp.isValidating(false);
sp.setDTDHandler(new Resolver());
//sp.setDocumentHandler(new Handler());
InputSource iSource = new InputSource(br);
Handler h = new Handler();
sp.parse(iSource ); */
XMLReader parser;
parser = XMLReaderFactory.createXMLReader();
parser.setContentHandler(new Handler());
parser.setDTDHandler(new Resolver());
parser.parse(new InputSource(br));
}catch(Exception e){
System.out.println(e.getMessage());
System.out.println("Parsed");
public static void main(String [] args){
ReaderConnector connector = new ReaderConnector ();
//connector.testParsing("c://temp/test.xml");
connector.createConnection();
private class Resolver extends DefaultHandler{
public InputSource resolveEntity(String publicId, String systemId) throws SAXException {
System.err.println(publicId + " ! " + systemId);
if (("/vega/xml/xrf.dtd").equalsIgnoreCase(systemId) || ("/vega/xml/xrf.dtd").equalsIgnoreCase(publicId))
try {
return new InputSource(new URL("http://a.b.c.com:5280"+systemId).openStream());
} catch (MalformedURLException e) {
throw new SAXException(e);
} catch (IOException e) {
throw new SAXException(e);
else return null;
private class Handler extends org.xml.sax.helpers.DefaultHandler{
public void startDocument() throws org.xml.sax.SAXException {
System.out.println("Start of Login document");
public void endDocument() throws org.xml.sax.SAXException {
System.out.println("End of document");
public void ignorableWhitespace(char[] values, int param, int param2) throws org.xml.sax.SAXException {
public void endElement(java.lang.String str, java.lang.String str1, java.lang.String str2) throws org.xml.sax.SAXException {
System.out.println("End of element reached: str, str1, str2 "+ str + " , "+ str1 + " , "+ str2);
System.out.println("Session ID "+ sessionId);
public void skippedEntity(java.lang.String str) throws org.xml.sax.SAXException {
public void processingInstruction(java.lang.String str, java.lang.String str1) throws org.xml.sax.SAXException {
public void startElement(java.lang.String str, java.lang.String str1, java.lang.String str2, org.xml.sax.Attributes attributes) throws org.xml.sax.SAXException {
if(("A").equals(str2)){
for(int i=0; i< attributes.getLength();i++){
System.out.println("Attribute "+ i + ", Name, Value "+ attributes.getQName(i) + ", " + attributes.getValue(i));
if(("v").equalsIgnoreCase(attributes.getQName(i)))
sessionId = attributes.getValue(i);
public void endPrefixMapping(java.lang.String str) throws org.xml.sax.SAXException {
public void startPrefixMapping(java.lang.String str, java.lang.String str1) throws org.xml.sax.SAXException {
public void characters(char[] values, int param, int param2) throws org.xml.sax.SAXException {
String s = new String(values);
String text = s.substring(param, param+param2);
public void setDocumentLocator(org.xml.sax.Locator locator) {
XML File
<?xml version="1.0" encoding="ISO-8859-1" ?>
<!DOCTYPE XRF (View Source for full doctype...)>
- <XRF r="2.11.1" c="" g="" u="ch16132-user" k="" d="20050614" t="151146">
<A k="i0005" n="3" v="1964216949" />
</XRF>
****When you view source*******
<?xml version="1.0" encoding="ISO-8859-1"?>
<!DOCTYPE XRF SYSTEM "/vega/xml/xrf.dtd">
<XRF r="2.11.1" c="" g="" u="ch16132-user" k="" d="20050614" t="151722">
<A k="i0005" n="3" v="350287547"/>
</XRF>
Maybe you are looking for
-
0FC_BP_ITEMS DataSource Initialization procedure
Hi Experts, Could someone provide me step by step procedure on the above mentioned DataSource implementation by considering my input here. SAP ECC - Clinet 100 is for configuration Client 200 is for data extraction (as soon as you f
-
How to get sales order data in R/3. Any FM?
Hi , Is there any FM in R/3 to get sales order data. In CRM we use CRM_ORDER_READ to get the Header and Item details. Like wise FM in R/3 is required. Actually I have to test 'Usage' in sales tab of VA01/VA02/VA03. How to get the order details? what
-
any help finding my ipad serial number please Thanks
-
HT6114 Can't install OS X 10.9.2 Mavericks update
I need to install an OS X Mavericks 10.9.2 update on my new MacBook Pro. It took almost 24 hours and then, with just a couple of hours to go, it said "An error has occurred. Didn't get a response from the Apple Software Update Server when downloading
-
Re: Suppression of 0 in an Integer field
Chuck, Use the template of the widget to suppress the zero when it is zero. The template of an numeric field can contain up to four combinations of templates, separated by semi-colons: positive;negative;zero;null Thus, a possible template might be: 0