Wednesday, June 30, 2010

Parse of component type files failed, check the adf-config.xml file Malformed WS Binding port. Missing # between namespace URI and service/port name

This is the scenarion

YOu have create a BPEL process Process1

You have another BPEL process Process2 and you are calling Process1 in your Process2 through partner link in SOA Suite 11g

When you will compile the project it will give you error

Error(12,61): Parse of component type files failed, check the adf-config.xml file :
"Error at line 32 char 38: Malformed WS Binding port. Missing # between namespace URI and service/port names."


The reason is that some of the fields in the composite.xml of the Process2 are still empty.

I am not sure if this is a bug because i was facing this issue in my laptop which has issues with domain name and ip.


But it you will check the composite.xml of process2 you will find some entry with "reference" tag

<reference name="Service1"
ui:wsdlLocation="BPELProcess1.wsdl">
<interface.wsdl interface="http://xmlns.oracle.com/Application1_jws/Process1/BPELProcess1#wsdl.interface(BPELProcess1)"/>
<binding.ws port=""
location=""/>
</reference>


The reason of the issue is that the binding port and location are not updated in the composite of Process2.

So you have to manually add these values over here.

first of all binding.ws port

to get this value refer to the composite.xml of your Process1 there you will also get a similar field.You have to copy and paste the same
over Process1 composite.

In my case it is something like this.



http://xmlns.oracle.com/Application1_jws/Process1/BPELProcess1#wsdl.endpoint(bpelprocess1_client_ep/BPELProcess1_pt)

Again location is your wsdl address of the Process1.

This you can get from em console.

It is the same wsdl url that you provide in the PArtnerlink of Process2 to call the Process1

So in my case it was

http://localhost:8001/soa-infra/services/default/Process1/bpelprocess1_client_ep?WSDL


so my changed reference will look something like this
<reference name="Service1"
ui:wsdlLocation="BPELProcess1.wsdl">
<interface.wsdl interface="http://xmlns.oracle.com/Application1_jws/Process1/BPELProcess1#wsdl.interface(BPELProcess1)"/>
<binding.ws port="http://xmlns.oracle.com/Application1_jws/Process1/BPELProcess1#wsdl.endpoint(bpelprocess1_client_ep/BPELProcess1_pt)"
location="http://localhost:8001/soa-infra/services/default/Process1/bpelprocess1_client_ep?WSDL"/>
</reference>


Now compile the project and it should not give any error.

IF you have a callback also you can also add value to the same by refering to the Process1 composite callback url

Tuesday, June 29, 2010

How to install .bin file in LINUX

I was trying to install jdeveloper in my LINUX environment for the first time and i found a lot of issues as i am new to Linux.

First of all you need to create a user account in LINUX.


I downloaded the .bin file and was not sure how to run it.

I followed some document and was able to install it.

The first thing is to provide the permission

So open a terminal and go to the location where you have downloaded the bin file

Then issue a command

chmod +x file.bin ./file.bin

this will grant you the permission to execute the binary file.

ONce done do a ./file.bin it will extract the binary file and will install the software.

Client Agent-OWSM

Clinet Agent

Log in to owsm console

http://host:port/ccore

Create a new component ,Provide it some logical name and choose the component type as Client Agent



Register the service and You will get a component id as shown below



now go to the following location

SOA_HOME\owsm\bin\agent.properties


You need to make following changes in there


agent.componentType=OC4JClientInterceptor
agent.component.id=C0003006
client.home – Enter the path where the client agent configuration will be installed. It is recommended to use ORACLE_HOME for client.home.
Again one thing need to be taken care of i am using windows machine hence i have used D:\product\10.1.3.1\OracleAS_1 as the path but it didn't install
the component id in the path because it created a directory in my d drive as "product10.1.3.1OracleAS_1"

So if you are using it take care to use backword slash to create the agent within Oracle home so you should use D:/product/10.1.3.1/OracleAS_1

NOw open a command console and go to SOA_HOME\owsm\bin directory and do a wsmadmin installAgent as shown



AS you will run the code following folder structure will be generated

SOA_HOME\owsm\config\interceptors\C0003006

Also some library files will be generated.

Monday, June 28, 2010

FTP sample in Oracle Service Bus (OSB)

To implement the sample we first of all will install a free FTP client to interact.

Download free ftp client from internet

Once downloaded install it on your local machine






















Once you are done with installation it will come up with a following gui page.



However in our scenario we are using OSB As FTP client so now we will install a FTP server and check it with OSB client and if time permits will check with FTP client also.

Download the FTP server from the following link

http://filezilla-project.org


And install it.



















Once it is installed following screen will come up





Now you can follow the following doc for the further configuration

http://soa-bpel-esb.blogspot.com/2011/06/ftp-adapter-in-soa-suite-11g.html

Server Agent-Disadvantage of OWSM gateway

Disadvantage of gateway.

The call passess from client to gateway to endpoint so security is only between client and gateway

No security between gateway and endpoint.


Clinet<---------------->Gateway-------------------EndPointURL



SO we go for agent which actually implement the logic at the container level itself and cause a call to be secured.


We can have multiple server agent.

First of all we need to check the configuration file agent.properties located in

SOA_HOME\owsm\bin directory.


If you will open up this configuration file then you will find that there are four component

# serveragent - manages webservice providers
# clientagent - manages webservice clients.
# OC4JServerInterceptor - Used an an interceptor for webservice providers on OC4J
# OC4JClientInterceptor - Used an an interceptor for webservice providers on OC4J

We will first see an example of a web service deployed in a oc4j container

We use interceptors when the webservices are on oc4j container we will see an example of OC4JServerInterceptor.


Log in to the owsm console

http://host:port/ccore

Create a new server agent.It will be created with some default component id as shown





Now go to agent.properties file and provide the component id in the following field.

add / replace the component id to agent.component.id

agent.component.id=C0003005

Also check if the following attribute defaults to

agent.componentType – OC4JServerInterceptor
agent.containerType – OC4J
agent.containerVersion – 10.1.3

( this is autogenerated )

Now open up a command console and deploy the server agent.

Go to SOA_HOME\owsm\bin folder and do a wsmadmin installAgent





Now log in to the em console

Choose the container then go to web services tab and select any of the web service which you want to secure through agent.

Once you will go to that web service switch to Administration tab






Now edit it and select the web service agent as shown below and say ok to the changes.




ONce it is added go to edit configuration for the web service agent.



Now restart your server to make the changes

Now when you will invoke the web service which you have secured through agent you will see a log is generate in the owsm as tby default the policy contains a logger parameter,You can further add your own policies as per your requirement.

Sunday, June 27, 2010

Transactions in SOA Suite 11g

We are very much aware of how to handle transactions in SOA Suite 10g but unfortunately we do not have much document for the same in 11g.However i came across a link

http://blogs.oracle.com/soabpm/2009/08/soa_suite_11g_-_transactions_b.html


which i would like to share which has explained it in very gud way

Saturday, June 26, 2010

Business Rules in SOA Suite 11g

In this exercise we will create a simple bpel process and a simple rule engine and we will see how does it work.For this exercise we will use

SOA Suite 11.1.1.3
Jdeveloper 11.1.1.3

Create a new Project



Create a composite with BPEL



let it be a asynchronous BPEL process



Now a bpel process will open up,drag and drop a business rule in the bpel process in between the receive and callback activity

It will open up a gui ,click on create a new dictionary



In the next screen click on create a new input variable



Next screen again create a new process variable




choose the element variable as the input response to the bpel process



Similarly create output variable for process response also



ONce you will be done with this configuration you will come up with a screen like this



We have two option either to create a rule or to create a rule dictionary.

Rule dictionary is used when we have a number of rules to be implement but in our case its a simple test case so we will just create a simple if else rule

click on create a rule and create a simple rule that if input is 20 then output is arpit



Now go to your bpel process and drag and drop a asign activity in between the receive and rule engine and assign the input variable to the input variable for rule engine




Similarly drag and drop a assign activity and copy the output of rule engine to output variable of BPEL.


To make this process look logical i have created one file adapter also which will be triggered when ever correct input will come that is when ever input will be 20 rule will be validate and output will be generated as arpit and this output will write to a particular folder.So my whole bpel process will look something like this




and my composite will look like this



Now deploy this project to you server and test its functionality.


Again from SOA Suite 11.1.1.2 we have and excellent feature that we can dynamically change the rules,this can be done by a separate console called soa composer

You can log in to soa composer using the following url

http://host:managed server port/soa/composer

Log in to soa composer and open the rules



Now you can see the rule that you have crated earlier has come into the list ,select the rule and say open




You can verify the same details that we have mentioned during the designing phase of the process.

You can select the rule set and edit it to change the values as per you new configuration and commit the changes.

Hope this exercise will give you and idea about the use case of rules in soa suite 11g

Here we have defined only one business rules so if we will pass some other value as input instead of 20 we will get an error

<bpelFault><faultType> <message>0</message></faultType><operationErroredFault xmlns="http://xmlns.oracle.com/OracleRules1/OracleRules1_DecisionService_1"><part name="payload"><errorInfo xmlns="http://xmlns.oracle.com/OracleRules1/OracleRules1_DecisionService_1"><errorMessage>Fact not found in the rule engine working memory, rule session execution failed. The rule session 70001 failed because an instance of the fact com.oracle.xmlns.javacallout_jws.project2.bpelprocess1.ProcessResponse could not be found in the working memory of the rule session. This is most likely a rule modeling error. The decision service interaction expects the fact instance to exist in the working memory of the rule session. Check the rule actions in rule designer and make sure that a fact of the expected type is being asserted. If the error persists, contact Oracle Support Services. </errorMessage></errorInfo></part></operationErroredFault></bpelFault>

which is quite clear

Wednesday, June 23, 2010

How to Find the Version of SOA Suite 11g

You can find out the version of SOA Suite 11g through many ways

First way is through opatch lsinventory.

Open a command prompt

GO to SOA_HOME/OPatch

set your ORACLE_HOME and PATH and do a opatch lsinventory

The following screenshot will help you in understanding how to do it.





It will give you the result as what is the version of SOA Suite that you are using as in my case it shows




Also you can check for the following file

GO to BEA_HOME and you can find the oepe version over there

oepe_11gR1PS1

It will give you and idea of what is the patch set version.

Again in BEA_HOME\logs you can find the version of weblogic


You can open a command propmt goto ORACLE_HOME\bin directory and run soaversion.cmd command as shown

Domain log in not getting updated in SOA Suite

You have installed a SOA Suite at your end and have created your own domain in SOA Suite.Now no logs are being logged in to the domain.log located at following location

SOA_HOME\bpel\domains\"domain name"\logs

This happens because the appender tag for domain.log is missing from configuration file located at

SOA_HOME/bpel/domains//config/log4j-config.xml.

log4j-config.xml configuration file is used to configure logging parameter and location for logging of a domain in a OC4J container.

You need to add some appender class which are responsible for writing in to the domain.log file.

Open up your log4j-config.xml file and make the changes as below


<appender name="A1" class="com.collaxa.cube.util.CXRollingFileAppender">
<param name="ImmediateFlush" value="true"/>
<param name="File"
value="D:/product/10.1.3.1/OracleAS_1/bpel/domains/<domain name>/logs/domain.log"/>
<param name="MaxBackupIndex" value="10"/>
<param value="10MB" name="MaxFileSize" />
<param name="Append" value="false"/>

<layout class="org.apache.log4j.PatternLayout">
<param name="ConversionPattern" value="<%d> <%p> <%c> %m%n"/>
</layout>
</appender>

Save the changes and restart your server now u should be able to see logs

How to post HTML data in your blog

Have you ever tried to post html/xml data in you blog it won't be published as blogger doesn't understand the data enclosed within the tag "<" and ">"

there are various software to change the code html/xml in to text but i prefer this link

Just type in your HTML/XML code and say encode.Now paste the encoded document in to your blog so that it will appear in the same form as xml document.

Tuesday, June 22, 2010

SOAP call taking a long time to return back to client

You have scenario where in you are calling a BPEL/ESB service which in turn in interacting with a legacy system to a CRM.

BPEL and ESB process are deployed on your oc4j container.

When you call the BPEL/ESB service from an external client(java clinet/soap ui)

you get a response very late.This issue mainly occurs for large payloads more than 5MB.

This is a bug in the web service framework

The issue occurs because the web service framework is inefficiently marshaling the soap message into XML for large size messages.Hence the provider framework is taking more time to return the response to the client.


To overcome this issue you need to apply patch 9371120

Monday, June 21, 2010

Activate Changes in Weblogic Hangs through console-Activate using WLST

I have an OSB cluster ,while trying to activate a process i was getting error in OSB console that the user is locked from WLS console.

I logged in to weblogic console

http://host:port/console

and did Activate changes but it got stuck.I waited for hours but it did not complete ,I am not sure of the reason for this issue.

But i was able to activate it through command console.

Open a command window and go to the following location

BEA_HOME/wlserver_10.3/server/bin

and use setWLSEnv.cmd



Now use

java weblogic.WLST command as shown


and try to log in to the server


command should be

connect('USERNAME', 'PASSWORD', 'SERVER_ADDRESS:SERVER_PORT')

So in my case i am using

connect('weblogic','welcome1','t3://localhost:7001')




Now go to edit mode and activate the changes

As shown below




For more information on using WLST script use you can search the oracle documentation

Friday, June 18, 2010

Installing SOA Suite 10.1.3.5.1 with Weblogic 10.3.1

Installer that you need for this set up are

SOASuite 10.1.3.5.1

and

Weblogic 10.3.1 which you can download from OTN

Earlier version of SOA Suite in OC4J needs a SOA Suite 10.1.3.1 installation and then upgrading it to 10.1.3.5 but this is different here you can directly install 10.1.3.5.1 on top of weblogic


The first step is to install weblogic server





























Now next step is to install the schemas.I believe you already have installed database at your end.

Go to the installer location

D:\soa10.1.3.5.1\Disk1\install\soa_schemas\irca and run irca.bat

provide the details of database and install the schemas



You might get issues like this

Failed to establish connection

Ora-12514

you verified your database and listener is up and running



This issue happens because the sid provided is not correct.

Please verify the SID name in your tnsnames.ora file

as it contains domain name also along with the sid

like orcl.abc.com

Make the changes are run it again and it will run successfully.





Install SOA Suite 10.1.3.5.1





















Now configuring the Domain

Go to the location where you have installed SOA
SOA_HOME\config and run configureSoa.bat

it will ask for password for owsm




Once password is provided it will open up a gui something like this


































So once installation is complete start Admin and managed server and check if you are able to log in to bpel and esb console.

The default user in this case is soaadmin.