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 » General IBM MQ Support » How to use MQI calls in ASP

Post new topic  Reply to topic
 How to use MQI calls in ASP « View previous topic :: View next topic » 
Author Message
Beaula
PostPosted: Wed Oct 08, 2003 1:18 am    Post subject: How to use MQI calls in ASP Reply with quote

Apprentice

Joined: 11 Sep 2002
Posts: 39
Location: Infotech, Madhapur,India

How can we use MQ Series call (MQPUT, MQGET etc.) on an ASP page. Can some one expalin this ?.
Back to top
View user's profile Send private message Send e-mail
jefflowrey
PostPosted: Wed Oct 08, 2003 5:38 am    Post subject: Reply with quote

Grand Poobah

Joined: 16 Oct 2002
Posts: 19981

Just like you do with Visual Basic.
_________________
I am *not* the model of the modern major general.
Back to top
View user's profile Send private message
Beaula
PostPosted: Thu Oct 09, 2003 2:31 am    Post subject: How to put the MQSeries code in ASP Reply with quote

Apprentice

Joined: 11 Sep 2002
Posts: 39
Location: Infotech, Madhapur,India

JeffLowrey wrote:
Just like you do with Visual Basic.


I have a sample application where i have used MQPUT Call to connect to the queue. I dont have any idea to integrate the same with ASP. Can you please tell me the procedure to do the same. This will be very useful.
Back to top
View user's profile Send private message Send e-mail
vnreddy
PostPosted: Thu Oct 09, 2003 4:15 am    Post subject: How to use MQI calls in ASP Reply with quote

Novice

Joined: 01 May 2003
Posts: 23
Location: UK

Build MQI COM DLL using C or VB and call that .DLL component in a ASP page..

/Narasimha Reddy
Back to top
View user's profile Send private message Send e-mail Yahoo Messenger MSN Messenger
jefflowrey
PostPosted: Thu Oct 09, 2003 5:16 am    Post subject: Reply with quote

Grand Poobah

Joined: 16 Oct 2002
Posts: 19981

If you don't know how to integrate VB into ASP, I'm not sure you know either VB or ASP very well.

Here's some sample code.
Code:
<%@ language = VBscript %>
<html>
<head><title>Putting a test message</title></head>
<body>
<%
Set MQSess = Server.CreateObject("MQAX200.MQSession")
Set QMgr = MQSess.AccessQueueManager("") 'Accesses default queue manager
Set OutputQueue = QMgr.AccessQueue("aLocalQueue",16) '16=MQOO_OUPTUT
Set outputMsg = MQSess.AccessMessage()O
outputMsg.Format="MQSTR   "
outputMsg.WriteString("Hello ASP world!")
OutputQueue.put outputMsg
%>
Sucessfully put "Hello ASP World!" to aLocalQueue.
</body>
</html>


You should do a search for 'ASP' or 'VisualBasic' here on this website for more information, including links to the appropriate IBM documentation.

You may have to do things at your webserver to register the MQ Active X components (Com objects) to it. I don't know for sure.
_________________
I am *not* the model of the modern major general.
Back to top
View user's profile Send private message
Beaula
PostPosted: Thu Oct 09, 2003 11:29 pm    Post subject: Reply with quote

Apprentice

Joined: 11 Sep 2002
Posts: 39
Location: Infotech, Madhapur,India

JeffLowrey wrote:
If you don't know how to integrate VB into ASP, I'm not sure you know either VB or ASP very well.

Here's some sample code.
Code:
<%@ language = VBscript %>
<html>
<head><title>Putting a test message</title></head>
<body>
<%
Set MQSess = Server.CreateObject("MQAX200.MQSession")
Set QMgr = MQSess.AccessQueueManager("") 'Accesses default queue manager
Set OutputQueue = QMgr.AccessQueue("aLocalQueue",16) '16=MQOO_OUPTUT
Set outputMsg = MQSess.AccessMessage()
outputMsg.Format="MQSTR   "
outputMsg.WriteString("Hello ASP world!")
OutputQueue.put outputMsg
%>
Sucessfully put "Hello ASP World!" to aLocalQueue.
</body>
</html>


You should do a search for 'ASP' or 'VisualBasic' here on this website for more information, including links to the appropriate IBM documentation.

You may have to do things at your webserver to register the MQ Active X components (Com objects) to it. I don't know for sure.


Thanks for the reply because this code guided me in the right path.

I have tried your code and the same is giving the following error. Can you please guide me, how to check the not authorised access (2035) and where I have to define the access IIS or MQSeries.

Error Type:
mqax200 (0x800A7D00)
MQAX200.MQSession::AccessQueueManager CompletionCode = 2, ReasonCode = 2035,
ReasonName = MQRC_NOT_AUTHORIZED
/MQTest/TestPage.asp, line 17

Please guide me.
Back to top
View user's profile Send private message Send e-mail
jefflowrey
PostPosted: Fri Oct 10, 2003 6:04 am    Post subject: Reply with quote

Grand Poobah

Joined: 16 Oct 2002
Posts: 19981

Beaula wrote:
Thanks for the reply because this code guided me in the right path.

I have tried your code and the same is giving the following error. Can you please guide me, how to check the not authorised access (2035) and where I have to define the access IIS or MQSeries.

Error Type:
mqax200 (0x800A7D00)
MQAX200.MQSession::AccessQueueManager CompletionCode = 2, ReasonCode = 2035,
ReasonName = MQRC_NOT_AUTHORIZED
/MQTest/TestPage.asp, line 17

Please guide me.


This is a security error.

Please click on the 'Documentation' button at the top of this page, select "Websphere MQ messaging latest multiplatform books" and read "Websphere MQ Security".

Or do a search here for '2035'.
_________________
I am *not* the model of the modern major general.
Back to top
View user's profile Send private message
vnreddy
PostPosted: Fri Oct 10, 2003 7:11 am    Post subject: How to use MQI calls in ASP Reply with quote

Novice

Joined: 01 May 2003
Posts: 23
Location: UK

I have faced the same kind of problem in my enviroment too.

Give the security access in MQServer for the userid , under which IIS service is running.

/Narasimha Reddy
Back to top
View user's profile Send private message Send e-mail Yahoo Messenger MSN Messenger
Beaula
PostPosted: Tue Dec 21, 2004 5:23 am    Post subject: MQSeries & ASP Reply with quote

Apprentice

Joined: 11 Sep 2002
Posts: 39
Location: Infotech, Madhapur,India

<%@ language = VBscript %>
<html>
<head><title>Putting a test message</title></head>
<body>
<%
Set MQSess = Server.CreateObject("MQAX200.MQSession")
Set QMgr = MQSess.AccessQueueManager("") 'Accesses default queue manager
Set OutputQueue = QMgr.AccessQueue("aLocalQueue",16) '16=MQOO_OUPTUT
Set outputMsg = MQSess.AccessMessage()
outputMsg.Format="MQSTR "
outputMsg.WriteString("Hello ASP world!")
OutputQueue.put outputMsg
%>
Sucessfully put "Hello ASP World!" to aLocalQueue.
</body>
</html>

I have tried the above code and the same is giving the following error. Can you please guide me, how to check the not authorised access (2035) and where I have to define the access IIS or MQSeries.

Error Type:
mqax200 (0x800A7D00)
MQAX200.MQSession::AccessQueueManager CompletionCode = 2, ReasonCode = 2035,
ReasonName = MQRC_NOT_AUTHORIZED
/MQTest/TestPage.asp, line 17

Please guide me.

I have faced the same kind of problem in my enviroment too.

Give the security access in MQServer for the userid , under which IIS service is running.

/Narasimha Red

Can anyone tell me how to set the security access as specified by Narasimha?
Back to top
View user's profile Send private message Send e-mail
kirani
PostPosted: Tue Dec 21, 2004 7:47 am    Post subject: Reply with quote

Jedi Knight

Joined: 05 Sep 2001
Posts: 3779
Location: Torrance, CA, USA

Is your MQSeries installed on the same server as your webserver? IF so, you can just add the user-id (for example, ASP.net) under which the application/IIS runs into MQM group on the server.

There is a section in System Administration manual about setting up security for Websphere MQ.
_________________
Kiran


IBM Cert. Solution Designer & System Administrator - WBIMB V5
IBM Cert. Solutions Expert - WMQI
IBM Cert. Specialist - WMQI, MQSeries
IBM Cert. Developer - MQSeries

Back to top
View user's profile Send private message Visit poster's website
Beaula
PostPosted: Wed Dec 22, 2004 3:24 am    Post subject: MQSeries & ASP Reply with quote

Apprentice

Joined: 11 Sep 2002
Posts: 39
Location: Infotech, Madhapur,India

I tried to reinstall MQSeries 5.2 on Windows 2000 and I executed my old application written in VB. I am getting Run time error 53, MQM.DLL file not found. I set the variable as given below, still I am getting the error.

Check MQSERVER environment variable:
'* Under Windows NT/2000
'* Click: Start->Settings->Control Panel
'* Double Click: System
'* Click tab for ENVIRONMENT
'* Add/Change System variable:
'* MQSERVER=TO_QM_beaula/tcp/172.19.197.51

Can somebody guide to resolve the above problem?

Thanks in advance.
Back to top
View user's profile Send private message Send e-mail
Display posts from previous:   
Post new topic  Reply to topic Page 1 of 1

MQSeries.net Forum Index » General IBM MQ Support » How to use MQI calls in ASP
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.