Posts

Remove Empty Attributes in XQuery

Here is how you can remove empty attributes while xQuery mapping. Consider the following input xml: Input: Case 1: <product> <code>MAX</code> </product> Expected Result: <FinalProduct ProductCode="MAX" > </FinalProduct> Case2: <product> <code/> </product> Expected Result: <FinalProduct> </FinalProduct> Thus, we don't want the attribute to be present if the mapped element is null. Please find the below snippet for the above problem: <FinalProduct>                {                        if((fn:boolean(data($product/code))))                           then attribute ProductCode                           {      ...

Solution for Error "The invocation resulted in an error: Cipher not initialized."

Image
I received this " The invocation resulted in an error: Cipher not initialized ." error while calling the external service running on SSL. Please find the below screen shot. Solution: Add the following line in setDomainEnv.cmd or setDomainEnv.sh  below  "set EXTRA_JAVA_PROPERTIES=". set EXTRA_JAVA_PROPERTIES=%EXTRA_JAVA_PROPERTIES% -Dssl.debug=true -Dweblogic.StdoutDebugEnabled=true -Dweblogic.security.SSL.verbose=true -Dweblogic.security.SSL.ignoreHostnameVerification=true -Dweblogic.ssl.AllowUnencryptedNullCipher=true -Dweblogic.security.SSL.nojce=true Thanks, Rohan 

Solution for "The invocation resulted in an error: Not Found" message in response

Image
Hi, Recently I got an error while testing my business service. Please find the below screen shot. But the service used to work properly when I test it from SOAP UI. The solution for this is to disable (by default enabled) " Use Chunked Streaming Mode " in business service. Formal definition: Use Chunked Streaming Mode Select this option if you want to use HTTP chunked transfer encoding to send messages. Note : Do not use chunked streaming with if you use the  Follow HTTP Redirects  option. Redirection and authentication cannot be handled automatically in chunked mode Thanks, Rohan

Adding Security to Oracle Service Bus with Oracle Web Services Manager

Image
Oracle Web Services Manager(OWSM)  allows the definition and storage of declarative policies to be applied to web services, enabling enforcement and monitoring of security, management and audit policies.  Web Services security has multiple facets (Authentication, Authorization, Confidentiality, Integrity), each with its own standards, which can be defined as service policies, or just plain policies. In this post  we will use a simple WS-Security Username/Token policy to enforce only the users known by our system will be able to execute the service endpoint. In order to do that, we will use the default user from the Weblogic domain. 1. Create the OSB domain with OWSM.  Please find the below screen shot for reference: OSB Configuration for OWSM You will need  DEV_MDS  and  DEV_SOAINFRA  schema created on Oracle 11g database. You can run RCU to create the same. Have created samp...

Simple Hands on Hibernate

Image
Hi, In the below post will try to explain how to create simple Hibernate Project from crash. Below is the scenario: I have an EVENT table and want to insert one simple row in that table. Here is the table script: CREATE TABLE EVENT_DETAILS  ( NAME VARCHAR2(20),  LOCATION VARCHAR2(20),  ID VARCHAR2(20) NOT NULL,  CONSTRAINT EVENT_DETAILS_PK PRIMARY KEY (ID) ) First, you need to download the Hibernate Distribution Bundle, you can get it here: http://www.hibernate.org/downloads Extract the Zip file and use Hibernate.jar . Here I downloaded " hibernate-distribution-3.6.8.Final " but we will be traditional mapping files in this example. Now, create a new Java Project in eclipse. Say, " SampleBankPartyApp ". Create a folder structure under your project: " config/orm/hibernate/cfg " and " config/orm/hibernate/hbm " Next, we need to create Hibernate Configuration file. Here I am using Oracle 11g database. You can change the confi ...

Steps to Install Maven on windows

1. Go to http://maven.apache.org/download.html#Installation 2. Download Maven 2.2.1 Binary “ apache-maven-2.2.1-bin.zip ” 3. Extract the ZIP where you want to install maven. For eg. “D:\Maven\apache-maven-3.0.3” 4. Add the M2_HOME environment variable and set it to “D:\Maven\apache-maven-3.0.3” 5. Add the M2 environment variable and set it to “D:\Maven\apache-maven-3.0.3\bin” 6. Add “D:\Maven\apache-maven-3.0.3\bin” to your PATH variable. 7. Open the command prompt and type “mvn --version” to test whether its installed or not.     It should print:     Apache Maven 3.0.3 (r1075438; 2011-02-28 23:01:09+0530)     Maven home: D:\Maven\apache-maven-3.0.3     Java version: 1.6.0_22, vendor: Sun Microsystems Inc.     Java home: C:\Program Files\Java\jdk1.6.0_22\jre     Default locale: en_IN, platform encoding: Cp1252     OS name: "windows 7", version: "6.1", arc...

Important point regarding "OSB Publish Action "

Image
Hi, I had used OSB publish action to make  asynchronous call to the external service. While working on this, I found that, If we used OSB Publish Action to call the OSB proxy service (on Local, or on HTTP) it becomes a  synchronous call and Thread get block till we don't get the response.  OSB Publish Action work  asynchronously only when the Publish call is from Proxy service to Business Service.  For example: Consider an order proxy which make a Publish call to OSB logger Proxy and OSB Logger proxy then may call a Business Service to log the data. Here the call from Order proxy to Logger proxy is Synchronous, even though we expect it to be Asynchronous. The way around:  One solution is you make a publish call from OSB Logger proxy to OSB Logger Business Service. You can used publish or a call out at Order Proxy. In this way you can have a asynchronous call to Logger Proxy. Thanks, Rohan Lopes