Application Development and Automation Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

Reading XML from App Server

Former Member
0 Likes
340

Hi all,

We are on 46C. Been using the XML parsing to parse XML file from App server to SAP (internal table). Works great, but having problem with one file. I have looked at the file and it looks ok.

The program freezes up at one point...see below:


* wrap the table containing the file into a stream
  G_ISTREAM = G_STREAMFACTORY->CREATE_ISTREAM_ITABLE( TABLE =
              T_XML_TABLE
              SIZE  = G_LEN            ).

* Creating a document
  G_DOCUMENT = G_IXML->CREATE_DOCUMENT( ).

* Create a Parser
  G_PARSER = G_IXML->CREATE_PARSER( STREAM_FACTORY = G_STREAMFACTORY
                                    istream        = G_ISTREAM
                                    DOCUMENT       = G_DOCUMENT ).

* Parse the stream
  DATA: RTN TYPE I                  .
  RTN = G_PARSER->PARSE( )          .---> IT freezes here
  IF RTN NE 0.
     IF G_PARSER->NUM_ERRORS( ) NE 0.

Any idea? Has anyone encountered this before, if so, how did you fix this problem.

Thanks,

Rajesh

2 REPLIES 2
Read only

Former Member
0 Likes
310

Hello,

Would you know what is the size of the file? Could it be that instead of freezing it is parsing the file but it is taking a lot of time ?

Can you see the job running in the job list?

Best regards,

Thierry

Read only

0 Likes
310

It's a 9KB file. Very small...Like I said, other files have no problem. I did notice one thing though.


<Address AddressType="Mailing">
     <AddressLine>na</AddressLine> 
     <AddressLine>na</AddressLine>    ---------> Fails here         
     <City>Houston</City> 
     <StateProvince>Texas</StateProvince> 

When I removed the duplicate <AddressLine> tag, it worked fine and didn't freeze up. Can anyone validate ?

Thanks. Raj