Showing posts with label Java. Show all posts
Showing posts with label Java. Show all posts

Saturday, January 5, 2013

Configure IBM MQ 7 - JMS with JBOSS


Configure IBM MQ JMS with JBOSS


http://rocksolutions.wordpress.com/2012/02/04/using-websphere-mq-with-jboss-as-5/

Step 1: Install JBoss 5
Step 2: Install Websphere MQ 7
Step3: Install wmq.jmsra.rar

Step 4: Create wmq.jmsra-ds.xml

<?xml version=”1.0? encoding=”UTF-8??>
<connection-factories>
<tx-connection-factory>
<jndi-name>IVTCF</jndi-name>
<xa-transaction />
<rar-name>wmq.jmsra.rar</rar-name>
<connection-definition>javax.jms.ConnectionFactory</connection-definition>
<config-property name=”channel” type=”java.lang.String”>SYSTEM.DEF.SVRCONN</config-property>
<config-property name=”hostName” type=”java.lang.String”>127.0.0.1</config-property>
<config-property name=”port” type=”java.lang.String”>1417</config-property>
<config-property name=”queueManager” type=”java.lang.String”>JBOSS_QM</config-property>
<config-property name=”transportType” type=”java.lang.String”>CLIENT</config-property>
<security-domain-and-application>JmsXARealm</security-domain-and-application>
</tx-connection-factory>
<mbean code=”org.jboss.resource.deployment.AdminObject” name=”jca.wmq:name=ivtqueue”>
<!– Bind this AdminObject with the JNDI name IVTQueue –>
<attribute name=”JNDIName”>IVTQueue</attribute>
<depends optional-attribute-name=”RARName”>jboss.jca:service=RARDeployment,name=’wmq.jmsra.rar’</depends>
<attribute name=”Type”>javax.jms.Queue</attribute>
<attribute name=”Properties”>
baseQueueManagerName=JBOSS_QM
baseQueueName=JBOSS_Q
</attribute>
</mbean>
</connection-factories>

Step 5:  Create a EJB 3.0 project in JBoss Studio or in Eclipse IDE.

Step 6: Write a Message Driven Bean

Step 7:  Now Build the project.Start the server, If all the configuration are correct then you will see binding information of the JNDI name in the server logs, This is the first indication that Link between MQ and JBoss has successfully created.

References:

Code Example:


Below link gives you an example of how to configure web sphere MQ with JBOSS


Code Example


Sunday, July 15, 2012

Signing a SOAP Request / XML Message using Digital Certificate in Java

Refer the following links for Signing a SOAP Request / XML Request using Digital Certificate / Keystore in Java Axis using XML Signature.

http://www.javaworld.com/javaworld/jw-12-2002/jw-1220-xmlsecurity.html?page=6

Some other References:

what is Canonicalization and Examples of XML Canonicalization.

http://www.w3.org/TR/xml-c14n
http://www.java2s.com/Tutorial/Java/0410__Web-Services-SOA/SignSOAPmessage.htm

Good for XML Signature concepts especially Canonicalization.
http://www.javaworld.com/javaworld/jw-12-2002/jw-1220-xmlsecurity.html?page=2

For signing and verifying the signature.
http://www.javaworld.com/javaworld/jw-12-2002/jw-1220-xmlsecurity.html?page=6

Good example about signing a soap message with explaination.
http://www.javaworld.com/javaworld/jw-10-2002/jw-1011-securexml.html

For References.
http://www.javaworld.com/javaworld/jw-10-2002/jw-1011-securexml.html?page=5#resources

Reference refers to the data object being signed. It includes the Transform elements, which process in their textual order. The last transform's output becomes the input to DigestMethod, which will produce the DigestValue element's content.

Java XML Digital Signature API

http://docs.oracle.com/cd/E17802_01/webservices/webservices/docs/2.0/tutorial/doc/

http://www.coderanch.com/t/500258/Web-Services/java/send-Signed-SOAP-Message

http://svn.apache.org/repos/asf/webservices/axis/branches/Beta2/java/samples/security/

-Venkat GK