How to load webservices security policy from classpath

1) Add the following JAVA OPTION to the classpath -Dweblogic.wsee.policy.LoadFromClassPathEnabled=true 2) Write a simple policy. Encrypt.xml   <?xml version="1.0"?> <wsp:Policy xmlns:wsp="http://schemas.xmlsoap.org/ws/2004/09/policy" xmlns:wssp="http://www.bea.com/wls90/security/policy" > <wssp:Confidentiality> <wssp:KeyWrappingAlgorithm URI="http://www.w3.org/2001/04/xmlenc#rsa-1_5"/> <wssp:Target> <wssp:EncryptionAlgorithm URI="http://www.w3.org/2001/04/xmlenc#tripledes-cbc"/> <wssp:MessageParts Dialect="http://schemas.xmlsoap.org/2002/12/wsse#part"> wsp:Body() </wssp:MessageParts> </wssp:Target> <wssp:KeyInfo/> </wssp:Confidentiality> </wsp:Policy> 3) Write a JWS that uses this Policy SecureHelloWorldImpl.java   package examples.webservices.security_jws; import

Continue reading »

Testing secure webservice on Weblogic using SOAP UI

Create  the certificates for the client using keytool and store it at a location. You can refer our articles on SSL to get more details on how to create keystores. Once the client keystore is created you need to do the following configuration on SOAP UI.        

Continue reading »

High CPU Usage of WebLogic Server on Linux

If you observe CPU being hogged by the Weblogic Server process on a linux machine, you need to find out the Weblogic Server process id using ps -ef | grep java After you’ve found out the process id, find the thread id’s ( light weight process id’s) and their CPU

Continue reading »

javax.xml.stream.XMLStreamException while validating xml

javax.xml.stream.XMLStreamException: ParseError at [row,col]:[2,134] Message: Tried all: ‘1’ addresses, but could not connect over HTTP to server: ‘java.sun.com’, port: ’80’ at com.sun.xml.stream.XMLReaderImpl.next(XMLReaderImpl.java:545) at weblogic.servlet.internal.TldCacheHelper$TldIOHelper.parseXML(TldCacheHelper.java:132) at weblogic.descriptor.DescriptorCache.parseXML(DescriptorCache.java:380) at weblogic.servlet.internal.TldCacheHelper.parseTagLibraries(TldCacheHelper.java:65) at weblogic.servlet.internal.War.getTagInfo(War.java:889) at weblogic.servlet.internal.WebAppServletContext$ServletContextWebAppHelper.getTldInfo(WebAppServletContext.java:3708) You might encounter the following exception when the server on which Weblogic is hosted is not able to

Continue reading »

Simple Checklist for WebLogic to JBoss Migration

Compare the supported J2EE specs ( EJB, JMS, Webservices) of the Weblogic Version you are going to migrate from to the JBoss Server version. You will get the details from their official website. Find out the architecture of the Weblogic Application Server ( How many servers? Clusters? Machines?) either from

Continue reading »

Reset WebSphere admin console password

As a WebSphere admin one of the commonly seen issue is how to reset the WebSphere admin console password. Well below are the steps to reset our WebSphere Admin Console Password 1) Using Admin Console: To reset the password using the admin console a) Go to DMGR profile config cells

Continue reading »

How to change Default Ports in JBoss Application Server

These are the default ports in JBoss Application Server TCP 1090 – RMI/JRMP socket for connecting to the JMX MBeanServer TCP 1091 – RMI server socket TCP 1099 – JNDI Service TCP 1098 – RMI Port for JNDI Service TCP 4446 – JBoss Remoting Connector TCP 4712 – JBossTS Service

Continue reading »

Database authentication on JBoss EAP 5.0

Step 1 Create tables in the database and insert user, group and role information   CREATE TABLE USERS ( U_NAME VARCHAR(200) NOT NULL, U_PASSWORD VARCHAR(50) NOT NULL, U_DESCRIPTION VARCHAR(1000)) ; CREATE TABLE GROUPS ( G_NAME VARCHAR(200) NOT NULL, G_DESCRIPTION VARCHAR(1000) NULL) ; CREATE TABLE ROLES ( U_NAME VARCHAR(200) NOT NULL,

Continue reading »

Topic Send and Topic Receive demo on JBoss Application Server

1 )Create a topic Add the following in the \deploy\messaging\destinations-service.xml file   <mbean code="org.jboss.jms.server.destination.TopicService" name="jboss.messaging.destination:service=Topic,name=Topic1" xmbean-dd="xmdesc/Topic-xmbean.xml"> <depends optional-attribute-name="ServerPeer">jboss.messaging:service=ServerPeer</depends> <depends>jboss.messaging:service=PostOffice</depends> </mbean> 2) Copy the TopicSend and TopicReceive programs to a folder. TopicSend import java.io.*; import java.util.*; import javax.transaction.*; import javax.naming.*; import javax.jms.*; import javax.rmi.PortableRemoteObject; public class TopicSend { // Defines the

Continue reading »

Configure Apache Webserver to authenticate from LDAP Server

1. Connect to the LDAP Server from an LDAP Browser 2. Uncomment these two modules in httpd.conf LoadModule ldap_module modules/mod_ldap.so LoadModule authnz_ldap_module modules/mod_authnz_ldap.so 3. Add the following Location directive <Location /> AuthType Basic Require valid-user AuthName   “Enter Your ldap Username/Password” AuthBasicProvider   ldap AuthzLDAPAuthoritative   off AuthLDAPURL    ldap://localhost:444

Continue reading »