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 » How can I access to SOAP Header with ESQL?

Post new topic  Reply to topic
 How can I access to SOAP Header with ESQL? « View previous topic :: View next topic » 
Author Message
PiperPivo92
PostPosted: Wed Nov 09, 2016 6:56 am    Post subject: How can I access to SOAP Header with ESQL? Reply with quote

Newbie

Joined: 09 Nov 2016
Posts: 3

Hi all,
I'm new in the ESQL world and i'm trying to access the information conteined in the input soap header message.
In particular the message is structured like this:

Code:
<soapenv:Envelope xmlns:soapenv="..." xmlns:ser="...">
   <soapenv:Header>
      <ser:testObject>
        ...
      </ser:testObject>
   </soapenv:Header>
   <soapenv:Body>
        ...
   </soapenv:Body>
</soapenv:Envelope>


and i need to access the element <ser:testObject> for propagate the content to the OutputRoot in a ESQL Compute node.
I've tryed to use this code:

Code:
DECLARE soapenv NAMESPACE '...';
DECLARE ser NAMESPACE '...';

InputRoot.XMLNSC.soapenv:Envelope.soap:Header.ser:ISPWebservicesHeader


or the "InputLocalEnviromnet" object but the ruslt is always the same: empty element.

Can anyone help me please?

Thank you very mush for your help and your patience.
PiperPivo92
Back to top
View user's profile Send private message
Vitor
PostPosted: Wed Nov 09, 2016 7:09 am    Post subject: Reply with quote

Grand High Poobah

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

Presumably you're using a SOAPInput node?

This means that the SOAP items will be under the SOAP domain not XMLNSC.

Put a Trace node after the input and look at the actual message tree you're getting. This is good general advice for any message problem.
_________________
Honesty is the best policy.
Insanity is the best defence.
Back to top
View user's profile Send private message
PiperPivo92
PostPosted: Wed Nov 09, 2016 7:30 am    Post subject: Reply with quote

Newbie

Joined: 09 Nov 2016
Posts: 3

Hi Vitor, thanks for your reply.

I've use the record message to see the message through the path and i see that this element
is reachable under the localEnvironment tree but if i use the InputLocalEnviromnet return an empty element.

I try to use the Trace node now.

Thanks
Back to top
View user's profile Send private message
mqjeff
PostPosted: Wed Nov 09, 2016 7:33 am    Post subject: Reply with quote

Grand Master

Joined: 25 Jun 2008
Posts: 17447

http://www.ibm.com/support/knowledgecenter/SSMKHH_9.0.0/com.ibm.etools.mft.doc/ac64020_.htm#ac64020_
_________________
chmod -R ugo-wx /
Back to top
View user's profile Send private message
Vitor
PostPosted: Wed Nov 09, 2016 7:39 am    Post subject: Reply with quote

Grand High Poobah

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

PiperPivo92 wrote:
I've use the record message to see the message through the path and i see that this element
is reachable under the localEnvironment tree


This lies under a number of circumstances. Especially with parsing issues.

PiperPivo92 wrote:
I try to use the Trace node now.


Much more reliable.
_________________
Honesty is the best policy.
Insanity is the best defence.
Back to top
View user's profile Send private message
PiperPivo92
PostPosted: Wed Nov 09, 2016 8:08 am    Post subject: Reply with quote

Newbie

Joined: 09 Nov 2016
Posts: 3

I use the trace node and i put this between input node and compute node and the result of print ${Root} is this:

Code:
( ['SOAPRoot' : 0x282d172af30]
  (0x01000000:Name  ):Properties      = ( ['SOAPPROPERTYPARSER' : 0x282d0e98e80]
    (0x03000000:NameValue):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 '2016-11-09 16:05:47.513' (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            = 'application/x-www-form-urlencoded' (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' : 0x282d2a76620]
    (0x03000000:NameValue):X-Original-HTTP-Command = 'POST http://localhost:7800/TemperatureConverter/TemperatureConverter HTTP/1.1' (CHARACTER)
    (0x03000000:NameValue):SOAPAction              = 'http://TemperatureConverter/CtoF' (CHARACTER)
    (0x03000000:NameValue):User-Agent              = 'Java/1.7.0' (CHARACTER)
    (0x03000000:NameValue):Host                    = 'localhost:7800' (CHARACTER)
    (0x03000000:NameValue):Accept                  = 'text/html, image/gif, image/jpeg, *; q=.2, */*; q=.2' (CHARACTER)
    (0x03000000:NameValue):Connection              = 'keep-alive' (CHARACTER)
    (0x03000000:NameValue):Content-Type            = 'application/x-www-form-urlencoded' (CHARACTER)
    (0x03000000:NameValue):Content-Length          = '453' (CHARACTER)
    (0x03000000:NameValue):X-Remote-Addr           = '127.0.0.1' (CHARACTER)
    (0x03000000:NameValue):X-Remote-Host           = '127.0.0.1' (CHARACTER)
    (0x03000000:NameValue):X-Server-Name           = 'localhost' (CHARACTER)
    (0x03000000:NameValue):X-Server-Port           = '7800' (CHARACTER)
  )
  (0x01000000:Folder):XMLNSC          = ( ['xmlnsc' : 0x282d2f3e0d0]
    (0x01000400:XmlDeclaration):XmlDeclaration                  = (
      (0x03000100:Attribute):Version  = '1.0' (CHARACTER)
      (0x03000100:Attribute):Encoding = 'UTF-8' (CHARACTER)
    )
    (0x01000000:Folder        )http://TemperatureConverter:CtoF = (
      (0x03000000:PCDataField):TemperatureInC = 0 (DECIMAL)
    )
  )
)


I don't see my element. I'm doing something wrong?

Thanks again
Back to top
View user's profile Send private message
Vitor
PostPosted: Wed Nov 09, 2016 8:31 am    Post subject: Reply with quote

Grand High Poobah

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

Trace {LocalEnvironment}
_________________
Honesty is the best policy.
Insanity is the best defence.
Back to top
View user's profile Send private message
Vitor
PostPosted: Wed Nov 09, 2016 8:35 am    Post subject: Reply with quote

Grand High Poobah

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

Obvious question I should have asked:

Did you generate the service by using a WSDL; i.e. do you have the system generated subflow after the SOAPInput node?

If yes, put the Trace node after that.

If not, how are you extracting the SOAP Envelope for future processing?
_________________
Honesty is the best policy.
Insanity is the best defence.
Back to top
View user's profile Send private message
learner.ibm
PostPosted: Thu Nov 10, 2016 10:03 am    Post subject: How can I access to SOAP Header with ESQL? Reply with quote

Novice

Joined: 10 Nov 2016
Posts: 10

Check the domain from which you are accessing the SOAP request inside compute node.

If you are accessing the SOAP request after MQInput (XMLNSC will be the domain)

You should be using something like InputRoot.XMLNSC.Envelope.Header.Element where element is the node you want to access.

If the domain is SOAP after SOAPInput then you should be using something like

InputRoot.SOAP.Envelope.Header.Element where element is the node you want to access
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 » How can I access to SOAP Header with 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.