ASG
IBM
Zystems
Cressida
Icon
Netflexity
 
  MQSeries.net
Search  Search       Tech Exchange      Education      Certifications      Library      Info Center      SupportPacs      LinkedIn  Search  Search                                                                   FAQ  FAQ   Usergroups  Usergroups
 
Register  ::  Log in Log in to check your private messages
 
RSS Feed - WebSphere MQ Support RSS Feed - Message Broker Support

MQSeries.net Forum Index » WebSphere Message Broker (ACE) Support » external Files

Post new topic  Reply to topic
 external Files « View previous topic :: View next topic » 
Author Message
oomran
PostPosted: Fri Feb 23, 2007 1:42 pm    Post subject: external Files Reply with quote

Novice

Joined: 19 Feb 2007
Posts: 16

how to read value from an external file using esql only (Compute node), without java or any plug in.
Back to top
View user's profile Send private message
jefflowrey
PostPosted: Fri Feb 23, 2007 6:27 pm    Post subject: Reply with quote

Grand Poobah

Joined: 16 Oct 2002
Posts: 19981

You can't.
_________________
I am *not* the model of the modern major general.
Back to top
View user's profile Send private message
oomran
PostPosted: Sat Feb 24, 2007 6:33 am    Post subject: Reply with quote

Novice

Joined: 19 Feb 2007
Posts: 16

I tried to use external entities in XML

so I get the input message

i/p
<msg>
<CustomerName>xyz</CustomerName>
<CustomerMail>xyz</CustomerMail>
<CustomerAddress>xyz</CustomerAddress>
</msg>

and in the compute node I added a password tag with its value from an external file

but I got the output as the following

o/p
<doc type declaration to assigne the extent external entity to the file>
<msg>
<CustomerName>xyz</CustomerName>
<CustomerMail>xyz</CustomerMail>
<CustomerAddress>xyz</CustomerAddress>
<password>&extent;</password>
</msg>

when I copy the output to an XML file it read the password content from the file.

but I want the value to be extracted in the output queue
Back to top
View user's profile Send private message
elvis_gn
PostPosted: Sat Feb 24, 2007 6:51 am    Post subject: Reply with quote

Padawan

Joined: 08 Oct 2004
Posts: 1905
Location: Dubai

Hi oomran,
oomran wrote:
and in the compute node I added a password tag with its value from an external file
How did you read the file from a compute node ?

oomran wrote:
when I copy the output to an XML file it read the password content from the file.

but I want the value to be extracted in the output queue
How are u copying the XML to a file ?

Can you please paste your ESQL code. How did you get this
oomran wrote:
<doc type declaration to assigne the extent external entity to the file>

It is not possible to read an external file from a compute unless you are using a java function there or something....

Regards.
Back to top
View user's profile Send private message Send e-mail
jefflowrey
PostPosted: Sat Feb 24, 2007 9:10 am    Post subject: Reply with quote

Grand Poobah

Joined: 16 Oct 2002
Posts: 19981

You can not do this from ESQL.

The XMLNSC parser will not read external files when serializing or unserializing an XML message tree.

I repeat.

You can not do this from ESQL.

You can read data from Databases using ESQL.
_________________
I am *not* the model of the modern major general.
Back to top
View user's profile Send private message
oomran
PostPosted: Sat Feb 24, 2007 12:56 pm    Post subject: Reply with quote

Novice

Joined: 19 Feb 2007
Posts: 16

Here is My Try

Code:
set OutputRoot = InputRoot

SET OutputRoot.XML.(XML.DocTypeDecl).(XML.IntSubset).
   (XML.ExternalEntityDecl)extent2 = '';

SET OutputRoot.XML.(XML.DocTypeDecl).(XML.IntSubset).
   (XML.ExternalEntityDecl)extent2.(XML.SystemId)
   = 'more.txt';

Set OutputRoot.XML.(XML.Element)CustomerPasswrod.(XML.AsisElementContent) = '&extent2;'


now the output is :

Code:
<msg>
<CustomerName>xyz</CustomerName>
<CustomerMail>xyz</CustomerMail>
<CustomerAddress>xyz</CustomerAddress>
<password>&extent2;</password>
</msg>


when I copy the output to an xml File the XML parser in the browser extract the extent2 value from the file more.txt

but when I try in another node to get the customerpassword value I get &extent2;

the Broker XML parser doesn't extract the exernal entity.

I know that reading from files in the esql is not possible but I try to get around that.
Back to top
View user's profile Send private message
jefflowrey
PostPosted: Sat Feb 24, 2007 1:40 pm    Post subject: Reply with quote

Grand Poobah

Joined: 16 Oct 2002
Posts: 19981

Yes, please continue to try things.

I'm sure eventually you will have tried everything you can possibly try.

And then you will have proven for yourself what you have already been told.

You can't do this in ESQL.

You can't do this with the XML parsers.

You can only read data from files in a Java Compute node, a Java custom-plugin, or a C custom plugin.
_________________
I am *not* the model of the modern major general.
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic  Reply to topic Page 1 of 1

MQSeries.net Forum Index » WebSphere Message Broker (ACE) Support » external Files
Jump to:  



You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
Protected by Anti-Spam ACP
 
 


Theme by Dustin Baccetti
Powered by phpBB © 2001, 2002 phpBB Group

Copyright © MQSeries.net. All rights reserved.