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 » Access xmlnsc from ESQL

Post new topic  Reply to topic
 Access xmlnsc from ESQL « View previous topic :: View next topic » 
Author Message
tekt9
PostPosted: Wed Apr 10, 2013 11:07 pm    Post subject: Access xmlnsc from ESQL Reply with quote

Novice

Joined: 13 Aug 2012
Posts: 15

Hi...
I've created a flow where I need to access the XMLNSC-tree.

I've got:
Code:
 ['SOAPRoot' : 0xafea330]
  (0x01000000:Name  ):Properties      = ( ['SOAPPROPERTYPARSER' : 0xb0171a0]
    (0x03000000:NameValue):MessageSet             = 'SOAP_MessageSet' (CHARACTER)
    (0x03000000:NameValue):MessageType            = '' (CHARACTER)
    (0x03000000:NameValue):MessageFormat          = '' (CHARACTER)
    (0x03000000:NameValue):Encoding               = 546 (INTEGER)
    (0x03000000:NameValue):CodedCharSetId         = 1208 (INTEGER)
    (0x03000000:NameValue):Transactional          = FALSE (BOOLEAN)
    (0x03000000:NameValue):Persistence            = FALSE (BOOLEAN)
    (0x03000000:NameValue):CreationTime           = GMTTIMESTAMP '2013-04-10 22:29:05.429' (GMTTIMESTAMP)
    (0x03000000:NameValue):ExpirationTime         = -1 (INTEGER)
    (0x03000000:NameValue):Priority               = 0 (INTEGER)
    (0x03000000:NameValue):ReplyIdentifier        = X'000000000000000000000000000000000000000000000000' (BLOB)
    (0x03000000:NameValue):ReplyProtocol          = 'SOAP-AXIS2' (CHARACTER)
    (0x03000000:NameValue):Topic                  = NULL
    (0x03000000:NameValue):ContentType            = 'text/xml;charset=UTF-8' (CHARACTER)
    (0x03000000:NameValue):IdentitySourceType     = '' (CHARACTER)
    (0x03000000:NameValue):IdentitySourceToken    = '' (CHARACTER)
    (0x03000000:NameValue):IdentitySourcePassword = '' (CHARACTER)
    (0x03000000:NameValue):IdentitySourceIssuedBy = '' (CHARACTER)
    (0x03000000:NameValue):IdentityMappedType     = '' (CHARACTER)
    (0x03000000:NameValue):IdentityMappedToken    = '' (CHARACTER)
    (0x03000000:NameValue):IdentityMappedPassword = '' (CHARACTER)
    (0x03000000:NameValue):IdentityMappedIssuedBy = '' (CHARACTER)
  )
  (0x01000000:Name  ):HTTPInputHeader = ( ['WSINPHDR' : 0xafea660]
    (0x03000000:NameValue):X-Original-HTTP-Command = 'POST http://192.168.1.101:7800/SOAP_MessageSetSOAP_HTTP_Service HTTP/1.1' (CHARACTER)
    (0x03000000:NameValue):Accept-Encoding         = 'gzip,deflate' (CHARACTER)
    (0x03000000:NameValue):Content-Type            = 'text/xml;charset=UTF-8' (CHARACTER)
    (0x03000000:NameValue):SOAPAction              = '""' (CHARACTER)
    (0x03000000:NameValue):Content-Length          = '317' (CHARACTER)
    (0x03000000:NameValue):Host                    = '192.168.1.101:7800' (CHARACTER)
    (0x03000000:NameValue):Connection              = 'Keep-Alive' (CHARACTER)
    (0x03000000:NameValue):User-Agent              = 'Apache-HttpClient/4.1.1 (java 1.5)' (CHARACTER)
    (0x03000000:NameValue):X-Remote-Addr           = '192.168.1.101' (CHARACTER)
    (0x03000000:NameValue):X-Remote-Host           = '192.168.1.101' (CHARACTER)
    (0x03000000:NameValue):X-Server-Name           = '192.168.1.101' (CHARACTER)
    (0x03000000:NameValue):X-Server-Port           = '7800' (CHARACTER)
    (0x03000000:NameValue):X-Query-String          = '' (CHARACTER)
    (0x03000000:NameValue):X-Scheme                = 'http' (CHARACTER)
  )
  (0x01000000:Folder):XMLNSC          = ( ['xmlnsc' : 0xaff5640]
    (0x01000000:Folder)http://tempuri.org/SOAP_MessageSet:Request = ( ['xmlnsc' : 0xaff5990]
      (0x03000000:PCDataField):faktor_a = 2 (INTEGER)
      (0x03000000:PCDataField):faktor_b = 3 (INTEGER)
    )
  )
)


And I need to access the elements "faktor_a " and "faktor_b".

my code:
Code:
       DECLARE int_A INTEGER;
       DECLARE int_B INTEGER;
            
       SET int_A = FIELDVALUE(InputRoot.XMLNSC.Request.(XMLNSC.Field)faktor_a);
       SET int_B = FIELDVALUE(InputRoot.XMLNSC.Request.(XMLNSC.Field)faktor_b);


But int_A and int_B are null after execution. What am I doing wrong.
Back to top
View user's profile Send private message
kimbert
PostPosted: Thu Apr 11, 2013 12:00 am    Post subject: Reply with quote

Jedi Council

Joined: 29 Jul 2003
Posts: 5542
Location: Southampton

The 'Request' tag belongs to namespace 'http://tempuri.org/SOAP_MessageSet'. You must either use a wildcard for the namespace or ( better) explicitly declare and use the namespace in your ESQL.
Like this:
Code:
       DECLARE soapms NAMESPACE http://tempuri.org/SOAP_MessageSet;
       SET int_A = FIELDVALUE(InputRoot.XMLNSC.soapms:Request.(XMLNSC.Field)faktor_a);
       SET int_B = FIELDVALUE(InputRoot.XMLNSC.soapms:Request.(XMLNSC.Field)faktor_b);


btw, thanks for using a code section for the trace node output...but the indentation in the Trace node output looks wrong. I would have expected faktor_a and faktor_b to be indented under the 'Request' element.
Back to top
View user's profile Send private message
rekarm01
PostPosted: Thu Apr 11, 2013 12:54 am    Post subject: Re: Access xmlnsc from ESQL Reply with quote

Grand Master

Joined: 25 Jun 2008
Posts: 1415

The InfoCenter also has more information about how to use namespace expressions when constructing ESQL field references.

tekt9 wrote:
I've got:
Code:
 ['SOAPRoot' : 0xafea330]
  (0x01000000:Name  ):Properties      = ( ['SOAPPROPERTYPARSER' : 0xb0171a0]
...
  (0x01000000:Name  ):HTTPInputHeader = ( ['WSINPHDR' : 0xafea660]
...
  (0x01000000:Folder):XMLNSC          = ( ['xmlnsc' : 0xaff5640]
    (0x01000000:Folder)http://tempuri.org/SOAP_MessageSet:Request = ( ['xmlnsc' : 0xaff5990]
      (0x03000000:PCDataField):faktor_a = 2 (INTEGER)
      (0x03000000:PCDataField):faktor_b = 3 (INTEGER)
    )
  )
)

[code] tags preserve indented text, while [quote] tags do not.

tekt9 wrote:
my code:
Code:
       SET int_A = FIELDVALUE(InputRoot.XMLNSC.Request.(XMLNSC.Field)faktor_a);
       SET int_B = FIELDVALUE(InputRoot.XMLNSC.Request.(XMLNSC.Field)faktor_b);

The FIELDVALUE() function calls and (XMLNSC.Field) specific type are harmless, but unnecessary.
Back to top
View user's profile Send private message
tekt9
PostPosted: Thu Apr 11, 2013 9:47 am    Post subject: Solved Reply with quote

Novice

Joined: 13 Aug 2012
Posts: 15

Thanks... That solved the issue
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 » Access xmlnsc from ESQL
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.