Friday, December 11, 2015

Oracle SOA BPEL FTP Pooling File (Weblogic Admin Console & BPEL code)

First Create a connection for FTPAdaptor as we do it for DBAdaptor in weblogic admin console.

Open weblogic console http://<yourhost>:<port>/console
- Go to deployment (left menu)
- Go to FtpAdapter  -> Configuration -> Outbound Connection Pool


Important part is adding following properties for the above created ftp connection.
 listParserKey: change it from UNIX to WIN
You must change following : host, password, serverType (win for windows, unix for unix system), username


BPEL Design:


-








Just to transfer the file to you can select the opaque option instead of constructing the schema.

Download sample source code from here: 







Thursday, April 23, 2015

Oracle SOA BPEL Secure the service by HTTPS and Token

Webservice which is exposed to the outer world is need to be secured by two important ways 
1. Policy enforces message protection ie, to pass the payload in encryted and signed form in the network
2. Authentication for inbound SOAP requests ie., to prevent the access of webservice from unauthorised people to access it.
To complete this task we need to accompliss three tasks
Task 1: Create a BPELprocess which is secured
Task 2: Create Keystore with keypair and certificates
Task 3: Configure the EM with the created key store.
Task 4: Test the secure BPEL service

Task 1: Create a BPELprocess which is secured

Lets create a Oracle BPEL service is exposed as secured service
1. I have just created a simple BPEL service which just echo the data which is passed to the service. But this BPEL is secured by using WS-Security policy. Lets see the screenshots to constructs the secured service through JDeveloper during design time.

2. Right click the exposed service which need to be secured and select WS policy


3. Select oracle/wss11_username_token_with_message_protection_service_policy policy, this policy enforces message protection (integrity and confidentiality) and authentication for inbound SOAP requests in accordance with the WS-Security 1.1 standard. Both plain text and digest mechanisms are supported.

4. Deploy the service in the Weblogic Domain.
If we test this service directly, the service will fail as we didn't set the keystore in weblogic server.
Task 2: Create Keystore with keypair and certificates:
1. Create a self-signed certificate and keystore with one single command below. Here the password is set as 'password' for the keystore and encryption
keytool -genkey -keyalg RSA -alias selfsigned -keystore keystore.jks -storepass password -validity 360 -keysize 2048
2. With below command we can see what is present inside the created keystore
keytool -list -v -keystore keystore.jks
Task 3: Configure the EM with the created key store:
1. Login to EM and navigate to keystore of the domain


2. Select Keystore configuration
3. Replace the default jks file with created keystore file. 
   "selfsigned" is the alais value for key and crypt alias
    "password" is the password for the both the entry

4. Click OK and restart the server.

Task 4: Test the secure BPEL service

1. Navigate to the deployed bpel service and click test button in EM
2. select securing and OWSM security option
3. select wss11_username_token_with_message_protection_client_policy
4. Enter weblogic username and password for authentication
5. Click test webservice button. It should be successfully.




Thursday, April 9, 2015

JMS Destination JCA-12141 CONN_FAC_NOT_FOUND



The JCA Binding Component was unable to establish an outbound JCA CCI connection due to the following issue: BINDING.JCA-12141 ERRJMS_CONN_FAC_NOT_FOUND.


Rootcause: Basically remote jms server is not able to be connected from soa server.

We have used tcp connection to connect to the remote server.
SOA server is not able to connect to <destination url>  through TCP via port number 3035 where as same url was accessible from SOA prod server. Hence test-case was failed in Pre-Prod. Network team can check why tcp connection to the destination is not getting connected.

Friday, March 6, 2015

Error: Message part element undefined in wsdl

Error: Message part element undefined in wsdl

java.lang.Exception: Message part element undefined in wsdl part name = payload type = ClaimResponse


Resolution: Check the wsdl file's input or output element's part. Part shuld be undefined. If you use JDeveloper, then in design view explanatory symbol will be displayed in part section of input which indicate that part is undefined. Fix the schema to fix this issue

Creating XML Scema with List of complex type (List of Employees or List of Records)



Creating XML Scema with List of complex type (List of Employes or List of Records)


Below XML is the schema for sample list of claims. Check the video below for more detail

<?xml version="1.0" encoding="windows-1252" ?>
<xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema"
            xmlns="http://www.example.org"
            targetNamespace="http://www.example.org"
            elementFormDefault="qualified">
  <xsd:complexType name="ClaimRequestType">
    <xsd:sequence maxOccurs="unbounded">
      <xsd:element name="Claim" type="ClaimType"/>
    </xsd:sequence>
  </xsd:complexType>
  <xsd:complexType name="ClaimType">
    <xsd:sequence>
      <xsd:element name="id"/>
      <xsd:element name="claimId"/>
    </xsd:sequence>
  </xsd:complexType>
  <xsd:element name="claimRequest" type="ClaimRequestType"/>
  <xsd:complexType name="ClaimResponseType">
    <xsd:sequence>
      <xsd:element name="ClaimResponse" type="ClaimResponseType"/>
    </xsd:sequence>
  </xsd:complexType>
  <xsd:complexType name="ClaimResponse">
    <xsd:sequence>
      <xsd:element name="id"/>
      <xsd:element name="status"/>
      <xsd:element name="amount"/>
    </xsd:sequence>
  </xsd:complexType>
</xsd:schema>