Tuesday, January 31, 2012

Creating a Trust Keystore Using the keytool Utility for weblogic server


Follow these steps to create the Trust Keystore in weblogic server.

Copy the standard java keystore to create the new trust keystore since it already contains most of the root CA certificates needed. Oracle does not recommend modifying the standard Java trust keystore directly. Copy the standard Java keystore CA certificates located under the $WLSHOME/server/lib directory to the same directory as the certificates.
For example:
cp $WLSHOME/server/lib/cacerts $WLSDOMAIN/certs/appTrustKeyStore.jks
The default password for the standard Java keystore is changeit. Oracle recommends always changing the default password. Use the keytool utility to do this. The syntax is:
keytool -storepasswd -new -keystore -storepass
For example:
cd $WLSDOMAIN/certs
keytool -storepasswd -new welcome1 -keystore appTrustKeyStore.jks -storepass changeit
The CA certificate CertGenCA.der is used to sign all certificates generated by the utils CertGen tool and is located at $WLSHOME/server/lib directory. This CA certificate must be imported into the appTrustKeyStore.jks using the keytool utility. The syntax is:
keytool -import -v -noprompt -trustcacerts -alias -file -keystore -storepass
For example:
keytool -import -v -noprompt -trustcacerts -alias clientCACert –file $WLSHOME/server/lib/CertGenCA.der -keystore appTrustKeyStore.jks –storepass welcome1


Oracle SOA Suite 11g - Configuring Weblogic Servers to Use the Custom Key stores


Oracle SOA Suite 11g - Important SQL queries to get the details about composites from SOAINFRA schema:

The below WLST script will help us to configure the custom key stores for the weblogic servers.

The details should be changed accordingly based on your environment.

import sys
print "@@@ Starting the script ..."
from java.util import *
from javax.management import *
from java.io import FileInputStream
#The directory of the domain configuration
#/app/oracle/products/11g/admin/domains
wlsDomain=os.environ["WLSDOMAIN"]
print "WLSDOMAIN="+wlsDomain
adminURL='t3://'+<<Admin Server IP>>+':'+<<Admin Server Port>>
adminUserName='weblogic'
adminPassword=<<Admin Server Password>>
connect(adminUserName, adminPassword, adminURL)
edit()
startEdit()
###################Configure KeyStores for cluster####################
print 'Applying changes to cluster'
##Applying for Admin Server
cd('/Servers/AdminServer')
##Identity key Store location
cmo.setCustomIdentityKeyStoreFileName(wlsDomain+'/certs/appIdentityKeyStore.jks')
set('CustomIdentityKeyStorePassPhrase', 'welcome1')
##Trust key Store location
cmo.setCustomTrustKeyStoreFileName(wlsDomain+'/certs/appTrustKeyStore.jks')
set('CustomTrustKeyStorePassPhrase', 'welcome1')
cmo.setKeyStores('CustomIdentityAndCustomTrust')
cmo.setCustomIdentityKeyStoreType('JKS')
cmo.setCustomTrustKeyStoreType('JKS')
cd('/Servers/AdminServer/SSL/AdminServer')
##Server Private key Alias
cmo.setServerPrivateKeyAlias(<<Admin Server Host Name>>)
set('ServerPrivateKeyPassPhrase', 'welcome1')
##Applying for SOA managed server
cd('/Servers/SOA1')
cmo.setCustomIdentityKeyStoreFileName(wlsDomain+'/certs/appIdentityKeyStore.jks')
set('CustomIdentityKeyStorePassPhrase', 'welcome1')
cmo.setCustomTrustKeyStoreFileName(wlsDomain+'/certs/appTrustKeyStore.jks')
set('CustomTrustKeyStorePassPhrase', 'welcome1')
cmo.setKeyStores('CustomIdentityAndCustomTrust')
cmo.setCustomIdentityKeyStoreType('JKS')
cmo.setCustomTrustKeyStoreType('JKS')
cd('/Servers/SOA1/SSL/SOA1')
cmo.setServerPrivateKeyAlias(<<SOA1 Server Host Name>>)
set('ServerPrivateKeyPassPhrase', 'welcome1')
save()
activate()


Monday, January 30, 2012

Oracle SOA Suite 11g - Changing the service endpoint URL dynamically through EM console

Sometimes we may need to change the default endpoint location of the Oracle SOA Suite composite service through the EM console.

The below steps help us to change the endpoint URL’s of the references through the EM console.
  • In EM console click on the Composite
  • Scroll down to Service and References section


  • Click on Reference link and properties tab
  • Change Endpoint Address to the desired location and click apply


The new request will be send to the new endpoint location configured through the EM console.
The new endpoint configuration can be removed to send the request to the default endpoint location configured in the WSDL.


Tuesday, January 24, 2012

Oracle SOA Suite 11g – Configuration files/Common Artifacts available in MDS

Oracle SOA Suite 11g – Configuration files/Common Artifacts available in MDS:

In Oracle SOA 11g most of the configurations files /common xsd‘s are stored in MDS.

All the configurations files available in MDS are read only; the configurable values can be changed through EM console or WLST script etc.




The below are some of the important files available in MDS.

adapter-config.xml – Global configurations for Adapters
bpel-config.xml – Configurations for BPEL Engine.
mediator-config.xml –Configurations for mediator.
soa-infra.xml – Configurations for SOA-INFRA.
folders.xml –List of available SOA partitions in the server.
workflow-config.xml, workflow-identity-config.xml and workflow-notification.xml – Configurations related to Human Workflow.
RuntimeFault.wsdl
Ws-addressing.xsd

Oracle SOA Suite Version – 11.1.1.5.0


Thursday, January 19, 2012

Unexpected error in JDeveloper 11g while creating Applications

I was receiving the unexpected error as mentioned below while creating new Application or opening the existing Applications in JDeveloper and also none of the existing applications are loading.


SEVERE: Exception while updating observer[0]: [email protected]
java.lang.NullPointerException
at oracle.ide.Ide.getDefaultProject(Ide.java:487)
at oracle.bm.commonIde.ProjectObserver.update(ProjectObserver.java:57)
at oracle.ide.model.IdeSubject.notifyObservers(IdeSubject.java:98)
at oracle.ide.model.Node.notifyObservers(Node.java:786)
at oracle.ide.model.UpdateMessage.firePropertiesChanged(UpdateMessage.java:640)
at oracle.ide.model.ProjectContent$L.projectPropertiesChanged(ProjectContent.java:694)
at oracle.ide.model.Project$StorageListener.structureValuesChanged(Project.java:1097)
at oracle.javatools.data.Structure.fireStructureChangeEvent(Structure.java:455)
at oracle.javatools.data.Structure.firePlaceholderValueAdded(Structure.java:388)
at oracle.javatools.data.Structure.firePlaceholderValueAdded(Structure.java:394)
at oracle.javatools.data.Structure.firePlaceholderValueAdded(Structure.java:394)
at oracle.javatools.data.HashStructure$Impl$3.run(HashStructure.java:1970)
at oracle.javatools.data.HashStructure$Impl.putValueInKeyStruct(HashStructure.java:2021

Also, when I was trying to create new Application the below error was shown in the editor.





Monday, January 9, 2012

Synchronous composite service invocation issue with WS-Addressing enabled by default in Oracle SOA Suite 11g.

Synchronous composite service invocation issue with WS-Addressing enabled by default in Oracle SOA Suite 11g.

Issue: - When the end system invokes the synchronous (input/output) composite service deployed in Oracle SOA Suite 11g fails to process the response.
The request reaches the SOA system and the response is sent to the end system, but the end system is not able to process the response. The same flow works fine in Oracle SOA Suite 10g without any issue.
After a little struggle we have identified that Oracle SOA Suite 11g by default adds the WS-Addressing details to the response even though the process is synchronous but in 10g the WS-Addressing details are not added by default.
Responses:
10g response without ws-addressing details:-


11g response with ws-addressing details:-