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 » I have an JDBC adapter success xml message as follows:

Post new topic  Reply to topic Goto page Previous  1, 2
 I have an JDBC adapter success xml message as follows: « View previous topic :: View next topic » 
Author Message
sunilagarwal.1982
PostPosted: Thu May 07, 2009 4:32 am    Post subject: Reply with quote

Novice

Joined: 04 May 2009
Posts: 20

I used trace node and got the Root.

in which as said I got the below string.

(0x07000002):CWRSD = 'status="-1" description="null"'

Please let me know how to get the value of status from this string.
Back to top
View user's profile Send private message
Vitor
PostPosted: Thu May 07, 2009 4:37 am    Post subject: Reply with quote

Grand High Poobah

Joined: 11 Nov 2005
Posts: 26093
Location: Texas, USA

I give in.
_________________
Honesty is the best policy.
Insanity is the best defence.
Back to top
View user's profile Send private message
Vitor
PostPosted: Thu May 07, 2009 5:31 am    Post subject: Reply with quote

Grand High Poobah

Joined: 11 Nov 2005
Posts: 26093
Location: Texas, USA

Alright, I've got to ask: are you seriously asking how to extract a given value from a string, or is this just a bizzare joke?
_________________
Honesty is the best policy.
Insanity is the best defence.
Back to top
View user's profile Send private message
sunilagarwal.1982
PostPosted: Thu May 07, 2009 5:37 am    Post subject: Reply with quote

Novice

Joined: 04 May 2009
Posts: 20

Yes,I am serious. This is not a Joke.

I don't know how to get the value of status from this string.

I saved the value of CWRSD element in Result string

Result = 'status="-1" description="null"'

Now I am unable to get the value of status.

I used Result.status but when I debug this I got UNKNOWN.

So I am wondering how to get the value.

Regards,
Sunil
Back to top
View user's profile Send private message
mqjeff
PostPosted: Thu May 07, 2009 5:45 am    Post subject: Reply with quote

Grand Master

Joined: 25 Jun 2008
Posts: 17447

Right, so for whatever reason, the parser that you are using is not recognizing that you have things that you personally believe should be treated as attributes, rather than as element content.

Given that a) you are using the well nigh obsolete and certainly deprecated and possibly considered harmful XML domain rather than XMLNSC (this is slightly understandably given that you're trying to use the well nigh obsolete should probably be deprecated and may be considered harmful JDBC adapter instead of broker native functions...)... B) that you're expecting a full XML parse of the contents of an XML Processing Instruction...

Your confusion and difficulties abound and are somewhat (slightly) understandable.

The value you get for XML Processing instructions is exactly what you are getting - the full content as a single unitary string. If you wish to extract PIECES of that, then you need to do the extraction yourself using string processing functions.

You may, possibly, perhaps, also find enlightment by repeating your Trace using the XMLNSC parser. But I suspect that you will have some issues with that as well, given that the JDBC adapter is in play.
Back to top
View user's profile Send private message
sunilagarwal.1982
PostPosted: Thu May 07, 2009 5:51 am    Post subject: Reply with quote

Novice

Joined: 04 May 2009
Posts: 20

Yes you are right. First I used XMLNSC parser but I got xml parsing error and my flow didn't work.

Thatswhy I had to use simple XML Processing Instruction to get the value.
Back to top
View user's profile Send private message
Vitor
PostPosted: Fri May 08, 2009 12:32 am    Post subject: Reply with quote

Grand High Poobah

Joined: 11 Nov 2005
Posts: 26093
Location: Texas, USA

Please don't reopen 3 year old threads like this - refer to it if you must, but don't just keep asking the same questions on different threads. The answer won't change.
_________________
Honesty is the best policy.
Insanity is the best defence.
Back to top
View user's profile Send private message
Vitor
PostPosted: Fri May 08, 2009 12:36 am    Post subject: Reply with quote

Grand High Poobah

Joined: 11 Nov 2005
Posts: 26093
Location: Texas, USA

sunilagarwal.1982 wrote:
Thatswhy I had to use simple XML Processing Instruction to get the value.


No you didn't. You could, instead, have fixed the error and got the flow working with XMLNSC.

You've now been told (again) to use trace, and been told (again) how to resolve your problem. I think this is about as clear as it's going to get.
_________________
Honesty is the best policy.
Insanity is the best defence.
Back to top
View user's profile Send private message
mqjeff
PostPosted: Fri May 08, 2009 3:16 am    Post subject: Reply with quote

Grand Master

Joined: 25 Jun 2008
Posts: 17447

Vitor wrote:
sunilagarwal.1982 wrote:
Thatswhy I had to use simple XML Processing Instruction to get the value.


No you didn't. You could, instead, have fixed the error and got the flow working with XMLNSC.


Not necessarily. The WBI Adapters don't always produce exactly ... conformant... XML that can be parsed with XMLNSC parser.

Back to top
View user's profile Send private message
Vitor
PostPosted: Fri May 08, 2009 3:21 am    Post subject: Reply with quote

Grand High Poobah

Joined: 11 Nov 2005
Posts: 26093
Location: Texas, USA

mqjeff wrote:
Vitor wrote:
sunilagarwal.1982 wrote:
Thatswhy I had to use simple XML Processing Instruction to get the value.


No you didn't. You could, instead, have fixed the error and got the flow working with XMLNSC.


Not necessarily. The WBI Adapters don't always produce exactly ... conformant... XML that can be parsed with XMLNSC parser.



Ah. Again I learn. Hence your comment about the "harmful" JDBC adapter.
_________________
Honesty is the best policy.
Insanity is the best defence.
Back to top
View user's profile Send private message
sunilagarwal.1982
PostPosted: Sat May 09, 2009 5:44 pm    Post subject: Reply with quote

Novice

Joined: 04 May 2009
Posts: 20

Thanks All,

Now my flow is working and problem has fixed.


Thanks for your continuous support and help.

Happy Learning.


Regards,
Sunil
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic  Reply to topic Goto page Previous  1, 2 Page 2 of 2

MQSeries.net Forum Index » WebSphere Message Broker (ACE) Support » I have an JDBC adapter success xml message as follows:
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.