Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

NT MQ messaging with ActiveX components...

Status
Not open for further replies.

rtgordon

Programmer
Jan 17, 2001
104
US
I tested the sample mqaxtriv locally on an IIS server, and the message came back successful. When I tried to run the program remotely from a client browser, it would not run. I verified all of the security settings,etc. My question is... does the MQclient have to be installed on each machine that will be running this app through their browser?
 
Referring to the thread about MQClients, I assume you are using Java? You need to specify the MQEnvironment attribute to use a TCP/IP connection rather than the JNI (local) interface. Check the manual MQSeries - Using Java for full details.

For JMS the technique is similar - use something like this either directly in your program (at the expense of portability) or store and then retrieve the object using JNDI:

import javax.jms.*;
import com.ibm.mq.jms.*;

MQFactory = new MQQueueConnectionFactory();

((MQQueueConnectionFactory)MQFactory).setQueueManager("MYQMGR");
((MQQueueConnectionFactory)MQFactory).setChannel("MY.CLIENTCHL");
((MQQueueConnectionFactory)MQFactory).setHostName("myhost.my.com"); ((MQQueueConnectionFactory)MQFactory).setTransportType(JMSC.MQJMS_TP_CLIENT_MQ_TCPIP);

All (i.e. most) MQ manuals by the way are at
Cheers,
Paul
 
Actually, I was trying to use ASP/JavaScript... This is just a slight variation of the sample program that runs on the IIS server, but not on a remote machine.

<%@ Language=VBScript %>
<%
partNumber = 52132146546213
%>


<HTML>
<HEAD>
<META NAME=&quot;GENERATOR&quot; Content=&quot;Microsoft Visual Studio 6.0&quot;>
<script language=javascript>
function PutMqMessage() {

qm = MQAXSession.AccessQueueManager(&quot;&quot;);
q = qm.AccessQueue(&quot;SYSTEM.DEFAULT.LOCAL.QUEUE&quot;, 16 | 1);
pmsg = MQAXSession.AccessMessage();
ps = <%=partNumber%>
pmsg.writeString(ps);
q.Put(pmsg);
gmsg = MQAXSession.AccessMessage();
gmsg.MessageId = pmsg.MessageId;
q.Get(gmsg);
gs = ReadString(gmsg.MessageLength);
}
</script>
</HEAD>
<BODY bgcolor=blue onLoad=PutMqMessage()>
<!-- my test Mq object (guid for MQAXSessionession) -->
<OBJECT
classid=&quot;clsid:00290471-B893-11CF-A5F7-444553540000&quot;
id=MQAXSession
>
</OBJECT>
<P>

<H3>Installation Verification Test for JavaScript</H3><HR>

<form name=&quot;Formtest&quot;>
<input type=&quot;button&quot; name=&quot;bjava&quot; value=&quot;Test Message&quot; onClick=&quot;PutMqMessage()&quot; language=&quot;JavaScript&quot;>
</form>

</BODY>
</HTML>
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top