Posts

Showing posts from May, 2012

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                           {                              data($product/code)                          }                           else ()                 } </FinalProduct> Thanks, Rohan Lopes

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 sample proxy in OSB to get the customer details