Friday, May 29, 2015

SOAP UI On Linux 64 Bit



[user@host1 soapui]$ ls
ReadyAPI-x64-1.3.0.sh
[user@host1 soapui]$ chmod u+x ReadyAPI-x64-1.3.0.sh
[user@host1 soapui]$ ./ReadyAPI-x64-1.3.0.sh
Unpacking JRE ...
Preparing JRE ...
Starting Installer ...
This will install Ready! API 1.3.0 on your computer.
OK [o, Enter], Cancel [c]
I accept the agreement
Yes [1], No [2]
1
Where should install tutorials?
[/home/celapp]
/opt/SmartBear/                                         
Create symlinks?
Yes [y, Enter], No [n]
y
Select the folder where you would like Ready! API 1.3.0 to create symlinks, then click Next.
[/usr/local/bin]

Create a desktop icon?
Yes [y, Enter], No [n]
y
Extracting files ...
                                                                           
Setup has finished installing Ready! API 1.3.0 on your computer.
Run Ready! API 1.3.0?
Yes [y, Enter], No [n]
y
View Release Notes http://readyapi.smartbear.com/release_notes/readyapi/latest
Finishing installation ...

Monday, May 11, 2015

How to test REST service from CURL


Here is the command to test the REST from curl


curl -i -H "Content-Type: application/json" -X POST -d '{"firstName": "Harish"} ' http://ussumsdsoaapp04:7001/hellorest/

If you need to pass the request payload from a file then use @filenamme 

curl -i -H "Content-Type: application/json" -X POST -d @hello.json http://ussumsdsoaapp04:7001/hellorest/

Content of  hello.json 

{"firstName": "Harish"}

Thursday, April 30, 2015

API Gateway -LDAPS with Active Directory




Error -
ested fault: simple bind failed: devad.mycompay.com:636: javax.naming.CommunicationException: simple bind failed: devad.mycompay.com:636 [Root exception is javax.net.ssl.SSLHandshakeException: sun.security.validator.ValidatorException: PKIX path building failed: sun.security.provider.certpath.SunCertPathBuilderException: unable to find valid certification path to requested target] at com.sun.jndi.ldap.LdapClient.authenticate(LdapClient.java:197) at com.sun.jndi.ldap.LdapCtx.connect(LdapCtx.java:2694) at com.sun.jndi.ldap.LdapCtx.<init>(LdapCtx.java:293) at com.sun.jndi.ldap.LdapCtxFactory.getUsingURL(LdapCtxFactory.java:175) at com.sun.jndi.ldap.LdapCtxFactory.getUsingURLs(LdapCtxFactory.java:193) at com.sun.jndi.ldap.LdapCtxFactory.getLdapCtxInstance(LdapCtxFactory.java:136) at com.sun.jndi.ldap.LdapCtxFactory.getInitialContext(LdapCtxFactory.java:66) at javax.naming.spi.NamingManager.getInitialContext(NamingManager.java:667) at javax.naming.InitialContext.getDefaultInitCtx(InitialContext.java:288) at javax.naming.InitialContext.init(InitialContext.java:223) at javax.naming.InitialContext.<init>(InitialContext.java:197) at javax.naming.directory.InitialDirContext.<init>(InitialDirContext.java:82) at com.vordel.common.ldap.LdapLookup$CachedContext.<init>(LdapLookup.java:239) at com.vordel.common.ldap.LdapLookup$ContextCache.factory(LdapLookup.java:255) at com.vordel.common.ldap.LdapLookup$ContextCache.factory(LdapLookup.java:247) at com.vordel.system.PoolCache.hold(PoolCache.java:37) at com.vordel.common.ldap.LdapLookup$InContext.runCached(LdapLookup.java:176) at com.vordel.common.ldap.LdapLookup$InContext.run(LdapLookup.java:158) at com.vordel.common.ldap.LdapLookup.search(LdapLookup.java:540) at com.vordel.common.ldap.LdapLookup.search(LdapLookup.java:505) at com.vordel.circuit.attribute.AttribLdapLookup.getAttributes(AttribLdapLookup.java:155) at com.vordel.circuit.attribute.AttributeExtractLdapProcessor.getAttributes(AttributeExtractLdapProcessor.java:122) at com.vordel.circuit.attribute.AttributeExtractBaseProcessor.invoke(AttributeExtractBaseProcessor.java:149) at com.vordel.circuit.InvocationEngine.invokeFilter(InvocationEngine.java:160) at com.vordel.circuit.InvocationEngine.invokeCircuit(InvocationEngine.java:52) at com.vordel.circuit.InvocationEngine.processMessage(InvocationEngine.java:241) at com.vordel.circuit.SyntheticCircuitChainProcessor.invoke(SyntheticCircuitChainProcessor.java:36) at com.vordel.dwe.http.HTTPPlugin.invokeDispose(HTTPPlugin.java:300) at com.vordel.dwe.http.HTTPPlugin.invoke(HTTPPlugin.java:166) Caused by: javax.net.ssl.SSLHandshakeException: sun.security.validator.ValidatorException: PKIX path building failed: sun.security.provider.certpath.SunCertPathBuilderException: unable to find valid certification path to requested target at com.sun.net.ssl.internal.ssl.Alerts.getSSLException(Alerts.java:174) at com.sun.net.ssl.internal.ssl.SSLSocketImpl.fatal(SSLSocketImpl.java:1649) at com.sun.net.ssl.internal.ssl.Handshaker.fatalSE(Handshaker.java:241) at com.sun.net.ssl.internal.ssl.Handshaker.fatalSE(Handshaker.java:235) at com.sun.net.ssl.internal.ssl.ClientHandshaker.serverCertificate(ClientHandshaker.java:1206) at com.sun.net.ssl.internal.ssl.ClientHandshaker.processMessage(ClientHandshaker.java:136) at com.sun.net.ssl.internal.ssl.Handshaker.processLoop(Handshaker.java:593) at com.sun.net.ssl.internal.ssl.Handshaker.process_record(Handshaker.java:529) at com.sun.net.ssl.internal.ssl.SSLSocketImpl.readRecord(SSLSocketImpl.java:893) at com.sun.net.ssl.internal.ssl.SSLSocketImpl.performInitialHandshake(SSLSocketImpl.java:1138) at com.sun.net.ssl.internal.ssl.SSLSocketImpl.readDataRecord(SSLSocketImpl.java:753) at com.sun.net.ssl.internal.ssl.AppInputStream.read(AppInputStream.java:75) at java.io.BufferedInputStream.fill(BufferedInputStream.java:218) at java.io.BufferedInputStream.read1(BufferedInputStream.java:258) at java.io.BufferedInputStream.read(BufferedInputStream.java:317) at com.sun.jndi.ldap.Connection.run(Connection.java:808) at java.lang.Thread.run(Thread.java:662) Caused by: sun.security.validator.ValidatorException: PKIX path building failed: sun.security.provider.certpath.SunCertPathBuilderException: unable to find valid certification path to requested target at sun.security.validator.PKIXValidator.doBuild(PKIXValidator.java:323) at sun.security.validator.PKIXValidator.engineValidate(PKIXValidator.java:217) at sun.security.validator.Validator.validate(Validator.java:218) at com.sun.net.ssl.internal.ssl.X509TrustManagerImpl.validate(X509TrustManagerImpl.java:126) at com.sun.net.ssl.internal.ssl.X509TrustManagerImpl.checkServerTrusted(X509TrustManagerImpl.java:209) at com.sun.net.ssl.internal.ssl.X509TrustManagerImpl.checkServerTrusted(X509TrustManagerImpl.java:249) at com.sun.net.ssl.internal.ssl.ClientHandshaker.serverCertificate(ClientHandshaker.java:1185) ... 12 more Caused by: sun.security.provider.certpath.SunCertPathBuilderException: unable to find valid certification path to requested target at sun.security.provider.certpath.SunCertPathBuilder.engineBuild(SunCertPathBuilder.java:174) at java.security.cert.CertPathBuilder.build(CertPathBuilder.java:238) at sun.security.validator.PKIXValidator.doBuild(PKIXValidator.java:318) ... 18 more

Solution
1. Add the Root certificate of the Active Directory in java keystore cacerts . Keystore cacerts is located in following directory.
/opt/oracle/OAG-11.1.2.1.0/apigateway/Linux.x86_64/jre/lib/security/

Command to import -
keytool -import -trustcacerts -alias ADRoot -file CelgeneCertificates/RootIntCA.cer -keystore cacerts


2. 
Restarts the gateway servers

Start Admin Node Manager:
/opt/oracle/OAG-11.1.2.1.0/apigateway/posix/bin/nodemanager -d

Stop:

/opt/oracle/OAG-11.1.2.1.0/apigateway/posix/bin/nodemanager -k


Stop API Gateway Server

/opt/oracle/OAG-11.1.2.1.0/apigateway/posix/bin/startinstance -g "DevGroup1" -n "DevGateway1" -k

/opt/oracle/OAG-11.1.2.1.0/apigateway/posix/bin/startinstance -g "DevGroup1" -n "DevGateway1" -d

Wednesday, April 29, 2015

How To Extract File having tar.gz file


For example you need to set-up the Apache LDAP explorer and you downloade the file "ApacheDirectoryStudio-linux-x86_64-2.0.0.v20130628.tar.gz"


So first step:
gzip -d ApacheDirectoryStudio-linux-x86_64-2.0.0.v20130628.tar.gz
This will create the  "ApacheDirectoryStudio-linux-x86_64-2.0.0.v20130628.tar" file

Second step: tar command

tar -xvf ApacheDirectoryStudio-linux-x86_64-2.0.0.v20130628.tar

Sunday, February 22, 2015

JDev 12c installation



1) Download the "Oracle SOA Suite" from OTN Release 12c (12.1.3.0.0) . Downloade zip file name is "jsonedit-repository-0.9.7.zip" 

http://www.oracle.com/technetwork/middleware/soasuite/downloads/index.html

2) Extract the file and it will have two jar files .

drwxr-xr-x 2 harish hgroup       4096 Feb 22 09:32 jsonedit-repository-0.9.7

[celapp@myhost Jdev]$ cd jsonedit-repository-0.9.7/

[myhost@myhost jsonedit-repository-0.9.7]$ ls
fmw_12.1.3.0.0_soa_quickstart2.jar  fmw_12.1.3.0.0_soa_quickstart.jar

[myhost@myhost jsonedit-repository-0.9.7]$ java -jar -Xms4g fmw_12.1.3.0.0_soa_quickstart.jar 

Launcher log file is /tmp/OraInstall2015-02-22_09-50-41AM/launcher2015-02-22_09-50-41AM.log.
Insufficient free space in /tmp/orcl6637823415702905917.tmp to extract the installer.  Actual 2691 MB.  Required 3053 MB.

[myhost@myhost jsonedit-repository-0.9.7]$ java -jar -Djava.io.tmpdir=/opt/tmp/tmp -Xms4g fmw_12.1.3.0.0_soa_quickstart.jar 
Launcher log file is /opt/tmp/tmp/OraInstall2015-02-22_09-53-47AM/launcher2015-02-22_09-53-47AM.log.
Extracting files................................
Starting Oracle Universal Installer

Checking if CPU speed is above 300 MHz.   Actual 2128.002 MHz    Passed
Checking monitor: must be configured to display at least 256 colors.   Actual 16777216    Passed
Checking swap space: must be greater than 512 MB.   Actual 8388600 MB    Passed
Checking if this platform requires a 64-bit JVM.   Actual 64    Passed (64-bit not required)
Checking temp space: must be greater than 300 MB.   Actual 18121 MB    Passed


Preparing to launch the Oracle Universal Installer from /opt/tmp/tmp/OraInstall2015-02-22_09-53-47AM
Log: /opt/tmp/tmp/OraInstall2015-02-22_09-53-47AM/install2015-02-22_09-53-47AM.log
You can find the log of this install session at:
 /opt/tmp/tmp/OraInstall2015-02-22_09-53-47AM/install2015-02-22_09-53-47AM.log

 Oracle JDeveloper 12c 12.1.3.0.0
 Copyright (c) 1997, 2014, Oracle and/or its affiliates. All rights reserved.

Logs successfully copied to /home/myhost/oraInventory/logs.
[myhost@myhost jsonedit-repository-0.9.7]$ 


Saturday, February 14, 2015

API Gateway Certificate Import -Can Not decode x509 object



Importing the certificate in Oracle API gateway


We received the self signed certificate from our partner and while importing in API gateway we received the Error 
"Can Not decode x509 object"





The simple way to resolve this issue  is to use Windows "Certificate Export Wizard" and choose copy to file option .
 In Export File format export screen choose "DER Encoded binary X.509 (.CER).



 Use this exported .cer file to successfully import the certificate.