cancel
Showing results for 
Search instead for 
Did you mean: 

Cannot perform action on XML document Content is not allowed in prolog

Former Member
0 Kudos

Hello community,

The "Cannot perform action on XML document Content is not allowed in prolog." message error stops my xml_loader action while reading an XML file.

Please help,

Thanks in advance,

Accepted Solutions (1)

Accepted Solutions (1)

former_member211944
Active Participant
0 Kudos

Hi Fernando,

This exception comes if the XML contains an invalid content like a space or dot in the beginning element i.e. before the "<?xml…."

Check the XML. Most probably it will solve the problem.

Regards,

Rohit Negi.

Former Member
0 Kudos

Thanks Rohit,

No,  there is no any invalid content .  In addition to the error message , I should have told you that the xml files are being writed by the PI system server  in a Web MII workbench folder .  I can not see any xml files using the workbench, but when I look at the file system they exist !

Applying your suggestion, I copied the xml content from the xml file which can not been read by the MII transaction ( the prolog error message ) to an xml file created at the workbench, and there was no problem using the same transaction against that xml file !! . The content is the same ! ¿ How come ¡?

Please help me out .

Best regards,

jcgood25
Active Contributor
0 Kudos

Is PI writing to disk or publishing to the NW db in the MII project folder web path?  You can't effectively force feed the project xml files at the disk level.

Former Member
0 Kudos

Thanks Jeremy,

PI is writting directly to a MII proyect folder web path .  These xml files created by the PI system can not been seen by the workbench,  but they exist .

Thanks for your support . Best regards,

jcgood25
Active Contributor
0 Kudos

I'm still not entirely sure about your answer.  Is PI writing directly to the filesystem?  Even if you are putting the files into the same physical directory used for MII web project content, you are correct because the DB doesn't have the files and any restarts or publishing always come from the DB, and get pushed to disk.

If you store the physical files in a folder and leverage the NetWeaver Virtual Host, you can create an alias to this location that should then work in an http path for the XML loader.  (search Virtual in the NetWeaver Admin menu and you can figure it out from there).

Otherwise you'll need to work out the mechanics to post the files to MII so that the xml can be stored in the project path in the database and published in a manner similar to using the web:// prefix in a transaction (where it stores to DB and publishes to the file system path).

Former Member
0 Kudos

Thanks Jeremy ,

What is a best practice to locate the xml files coming from a PI system ¡?  I will ask the PI system administrator to locate the xml files at the PI file system and let us know how to reach them . Does that seems right ¡?

Best regards,

agentry_src
Active Contributor
0 Kudos

This may be a little late in the discussion, but what is the reason for using PI at all?  Is there a business reason to incorporate PI in the data transfer process?

Regards, Mike

Former Member
0 Kudos

No problem Michael,

When an equipment has reached its preventive maximum working hours,  PI creates a xml file located at a the proyect workbench folder directory ( which is the reason why I can not see it at the workbench ) to be read by my MII transaction in order to place a SAP maintenance notificaction . 

Now , I changed my mind and I want the get file list  action to read the files located at another server different from the MII server .  The end user gave me the following adress . ¿ How can I read the files using the mentioned action ? or do I need to use the FTP get file list action instead ?

Please help

\\rpd-ofcwnapp01\DBASES\Transfer\XML

Former Member
0 Kudos

Michael,

i am trying to use the FTP get file list action and the following error shows up :

  • [ERROR] [FTP_Get_File_List_0]FTPGetFileList: Error while getting file list for folder \DBASES\Transfer\XML , Could not change to directory: \DBASES\Transfer\XML

Any ideas,  Please help

agentry_src
Active Contributor
0 Kudos

Hi Fernando,
I have been assuming that you meant SAP Process Integration (PI), but I am beginning to think you mean OSIsoft's PI Historian.  Can you tell me which is monitoring the equipment maximum working hours?  (also how?)

Thanks, Mike

Former Member
0 Kudos

Thanks Michael,

Yes, it is PI from OSIsoft .  I do not really know the details on hos PI does it , all I know is that PI generates the XML files . I tested the content of one file and works fine .  My problem is making MII read them .

Thanks for your help ,

agentry_src
Active Contributor
0 Kudos

Hi Fernando,

I think there is more than one way to deal with this issue.  I also suspect I may not have been the only one confused here, but who knows. 

Are you using PCo to connect to PI?  Are you connecting to PI other than through this xml file approach?

Regards, Mike

Former Member
0 Kudos

Hi Michael,

No I am not using PCo.  This is a file transfer aproach from PI OSISoft to MII .  I know that MII can ask directly to PI OSISoft;  however,  this is the way the end user and people from OSISoft agreed .

And yes,  we are connecting to PI OsiSoft directly from MII in other apps . 

Thanks & Best Regards,

Former Member
0 Kudos

Michael,

I have set a period in the folder parameter of the FTP Get File List action and received the following message : “[INFO] [FTP_Get_File_List_0]FTPGetFileList: Number of files: 39 “ .  I suppose that MII is being able to connect to the FTP server but not being able to read the file list from the folder . 

The following path \\rpd-ofcwnapp01\DBASES\Transfer\XML  is where the XML files are being placed by the PI OSISoft system .  It works using the windows file browser .  How do you specify this path at the folder parameter of the FTP Get File List action ?????? .  In addition,  I have asked the PI system administrator to give us the full path thinking that it may work .  If this does not work, we are planning to download the SFTP custom action blocks .

Please help

Former Member
0 Kudos

Summary,

I have finally found the way to use the FTP Get File List and the XML loader action together .  MII can  find the xml file at the FTP server .  However the "Cannot perform action on XML document Content is not allowed in prolog" error message is showing up again .

Please help,  thanks in advance

agentry_src
Active Contributor
0 Kudos

Hi Fernando,

Can you provide a screen shot of how you have the two action blocks configured?  Or alternatively, can you attach the transaction or a sanitized version so I and others can review it?

Thanks, Mike

Former Member
0 Kudos

Finally,

I replace the xml loader action with a text loader action and used a bls local xml file property . This was a workaround and worked fine .  Never knew what was the reason why the xml loader action did not work . 

If you wish I can send you the bls transaction . 


Best regards,

Answers (0)