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 » Set UserId in MQMD with HTTPInput node as input

Post new topic  Reply to topic
 Set UserId in MQMD with HTTPInput node as input « View previous topic :: View next topic » 
Author Message
jharringa
PostPosted: Tue Feb 26, 2008 7:59 am    Post subject: Set UserId in MQMD with HTTPInput node as input Reply with quote

Acolyte

Joined: 24 Aug 2007
Posts: 70

We are sending information to a queue to run an IMS tran and have to set the UserIdentifier field on the MQMD in order for the IMS tran to run under that ID (using an IMSMQ bridge).

Using the following code I've been able to do this with an MQInput but when we switch to using an HTTPInput it no longer works.

Code:
      SET OutputRoot.Properties = InputRoot.Properties;
      SET OutputRoot.MQMD.UserIdentifier = 'IMSUSER';
      SET OutputRoot.XMLNSC = InputRoot.XMLNSC;


I have done this using all of the Message contexts (starting with Set Identity) with the same results.

Any ideas?

Am I doing something wrong here? I thought I'd throw this out here before going the PMR route.

Thanks.

PS: We're running v6.1.0.1
Back to top
View user's profile Send private message
jefflowrey
PostPosted: Tue Feb 26, 2008 8:03 am    Post subject: Reply with quote

Grand Poobah

Joined: 16 Oct 2002
Posts: 19981

You already created the MQMD? And removed the HTTP Header?
_________________
I am *not* the model of the modern major general.
Back to top
View user's profile Send private message
jharringa
PostPosted: Tue Feb 26, 2008 8:07 am    Post subject: Reply with quote

Acolyte

Joined: 24 Aug 2007
Posts: 70

I threw this together real quick to test this for another developer so this is all of the code in my compute node between the HTTPInput and the MQOutput. I actually stored away the HTTP headers in an Environment variable but it doesn't get put on the OutputRoot of the message that goes into the MQOutput.

So essentially I'm letting the MQOutput handle the other MQMD fields.


Last edited by jharringa on Tue Feb 26, 2008 8:15 am; edited 1 time in total
Back to top
View user's profile Send private message
jefflowrey
PostPosted: Tue Feb 26, 2008 8:14 am    Post subject: Reply with quote

Grand Poobah

Joined: 16 Oct 2002
Posts: 19981

You need to delete the HTTP Header, and create an MQMD.

You don't need to populate the full MQMD.
_________________
I am *not* the model of the modern major general.
Back to top
View user's profile Send private message
jharringa
PostPosted: Tue Feb 26, 2008 8:34 am    Post subject: Reply with quote

Acolyte

Joined: 24 Aug 2007
Posts: 70

OK. So I'm doing the following now between my HTTPInput and my MQOutput nodes:

Code:
      SET OutputRoot.Properties = InputRoot.Properties;
      
      SET Environment.Variables.HTTP.RequestIdentifier = InputLocalEnvironment.Destination.HTTP.RequestIdentifier;
      SET Environment.Variables.HTTPRequestHeader = InputRoot.HTTPRequestHeader;
      SET Environment.Variables.HTTPInputHeader = InputRoot.HTTPInputHeader;
      
      CREATE LASTCHILD OF OutputRoot DOMAIN 'MQMD' NAME 'MQMD';
      
      SET OutputLocalEnvironment.Destination.HTTP = NULL;
      
      SET OutputRoot.MQMD.UserIdentifier = 'IMSUSER';
      SET OutputRoot.XMLNSC = InputRoot.XMLNSC;



I'm not certain what you mean by "delete the HTTP Header."
Back to top
View user's profile Send private message
jefflowrey
PostPosted: Tue Feb 26, 2008 8:41 am    Post subject: Reply with quote

Grand Poobah

Joined: 16 Oct 2002
Posts: 19981

Code:
SET OutputRoot.HTTPInputHeader = NULL;

_________________
I am *not* the model of the modern major general.
Back to top
View user's profile Send private message
jharringa
PostPosted: Tue Feb 26, 2008 8:49 am    Post subject: Reply with quote

Acolyte

Joined: 24 Aug 2007
Posts: 70

OK. That's why I was confused.

I never actually set OutputRoot.HTTPInputHeader so it was already null. I tried your suggestion but it still does not work. UserId is still the broker user.
Back to top
View user's profile Send private message
jefflowrey
PostPosted: Tue Feb 26, 2008 8:55 am    Post subject: Reply with quote

Grand Poobah

Joined: 16 Oct 2002
Posts: 19981

Your MQMD is maybe in the last place?
Code:
CREATE NEXTSIBLING OF OutputRoot.Properties DOMAIN 'MQMD';

_________________
I am *not* the model of the modern major general.
Back to top
View user's profile Send private message
jharringa
PostPosted: Tue Feb 26, 2008 9:01 am    Post subject: Reply with quote

Acolyte

Joined: 24 Aug 2007
Posts: 70

Nope.

I switched my code to make sure but it's right after OutputRoot.Properties and I've verified in the debugger. Everything appears to be in order.
Back to top
View user's profile Send private message
fjb_saper
PostPosted: Tue Feb 26, 2008 9:16 am    Post subject: Reply with quote

Grand High Poobah

Joined: 18 Nov 2003
Posts: 20756
Location: LI,NY

jharringa wrote:
OK. That's why I was confused.

I never actually set OutputRoot.HTTPInputHeader so it was already null. I tried your suggestion but it still does not work. UserId is still the broker user.

You have to set the appropriate properties on the MQPUT node.
You have to allow setall or passall or set Identity and not Default.

_________________
MQ & Broker admin
Back to top
View user's profile Send private message Send e-mail
jharringa
PostPosted: Tue Feb 26, 2008 9:34 am    Post subject: Reply with quote

Acolyte

Joined: 24 Aug 2007
Posts: 70

I've been using Set Identity (as stated above).

The message is propagated but it does not have the UserId header modified as it does when I have an MQInput node on the flow.

Essentially:

Populates UserId
MQInput -> Compute (with above logic minus HTTP stuff) -> MQOutput (with Set Identity)

Does not populate UserId
HTTPInput -> Compute (with above logic) -> MQOuput (with Set Identity or Set All)
Back to top
View user's profile Send private message
fjb_saper
PostPosted: Tue Feb 26, 2008 9:39 am    Post subject: Reply with quote

Grand High Poobah

Joined: 18 Nov 2003
Posts: 20756
Location: LI,NY

jharringa wrote:
I've been using Set Identity (as stated above).

The message is propagated but it does not have the UserId header modified as it does when I have an MQInput node on the flow.

Essentially:

Populates UserId
MQInput -> Compute (with above logic minus HTTP stuff) -> MQOutput (with Set Identity)

Does not populate UserId
HTTPInput -> Compute (with above logic) -> MQOuput (with Set Identity or Set All)


Did you check up on the content of the properties folder and the difference (input MQ vs input HTTP) ??
_________________
MQ & Broker admin
Back to top
View user's profile Send private message Send e-mail
jefflowrey
PostPosted: Tue Feb 26, 2008 9:40 am    Post subject: Reply with quote

Grand Poobah

Joined: 16 Oct 2002
Posts: 19981

Yeah, FJ's got it, I think.

You need to also remove Properties.UserIdentifier or whatever it is. I.e SET ... = NULL.
_________________
I am *not* the model of the modern major general.
Back to top
View user's profile Send private message
jharringa
PostPosted: Tue Feb 26, 2008 10:30 am    Post subject: Reply with quote

Acolyte

Joined: 24 Aug 2007
Posts: 70

OK, so I changed to the following code:

Code:
      SET OutputRoot.Properties = InputRoot.Properties;
      
      SET OutputRoot.Properties.ReplyProtocol = 'MQ';
      SET OutputRoot.Properties.ContentType = NULL;
      SET OutputRoot.HTTPInputHeader = NULL;
      SET Environment.Variables.HTTP.RequestIdentifier = InputLocalEnvironment.Destination.HTTP.RequestIdentifier;
      SET Environment.Variables.HTTPRequestHeader = InputRoot.HTTPRequestHeader;
      SET Environment.Variables.HTTPInputHeader = InputRoot.HTTPInputHeader;
      
      CREATE NEXTSIBLING OF OutputRoot.Properties DOMAIN 'MQMD';
      
      SET OutputLocalEnvironment.Destination.HTTP = NULL;
      
      SET OutputRoot.MQMD.UserIdentifier = 'IMSUSER';
      SET OutputRoot.XMLNSC = InputRoot.XMLNSC;
      
      
      SET OutputRoot.MQMD.Version=MQMD_CURRENT_VERSION;
      SET OutputRoot.MQMD.Encoding = 546;
      SET OutputRoot.MQMD.CodedCharSetId = 437;   


The only differences between the properties were the ReplyProtocol, ContentType, and the Encoding and CCSID. I have attempted to resolve these items but it appears that setting OutputRoot.Properties.ReplyProtocol does not do anything. This code didn't help.

Here are my actual Properties (from debugger variables view)

HTTP Input

Code:

Message   
   Properties   
      MessageSet   
      MessageType   
      MessageFormat   
      Encoding   273   
      CodedCharSetId   1208   
      Transactional   false   
      Persistence   false   
      CreationTime   2008-02-26 17:30:07.267   
      ExpirationTime   -1   
      Priority   0   
      ReplyIdentifier   000000000000000000000000000000000000000000000000   
      ReplyProtocol   SOAP-HTTP   
      Topic   
      ContentType   text/xml; charset=utf-8   
      IdentitySourceType   
      IdentitySourceToken   
      IdentitySourcePassword   
      IdentitySourceIssuedBy   
      IdentityMappedType   
      IdentityMappedToken   
      IdentityMappedPassword   
      IdentityMappedIssuedBy   
   MQMD   
   XMLNSC   


MQ Input

Code:
Message   
   Properties   
      MessageSet   
      MessageType   
      MessageFormat   
      Encoding   546   
      CodedCharSetId   437   
      Transactional   false   
      Persistence   false   
      CreationTime   2008-02-26 17:43:26.730   
      ExpirationTime   -1   
      Priority   0   
      ReplyIdentifier   000000000000000000000000000000000000000000000000   
      ReplyProtocol   MQ   
      Topic   
      ContentType   
      IdentitySourceType   
      IdentitySourceToken   
      IdentitySourcePassword   
      IdentitySourceIssuedBy   
      IdentityMappedType   
      IdentityMappedToken   
      IdentityMappedPassword   
      IdentityMappedIssuedBy   
   MQMD   
   XMLNSC   
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 » Set UserId in MQMD with HTTPInput node as input
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.