Active Directory and SOA 11g
. Login to Weblogic Console ( http://host:7001/console) and go to
Security Realms -> myrealm -> Providers
2. Click on "New" to create a new Provider. Let's assume you will call this provider AD.
You must select ActiveDirectoryAuthenticator as provider type.
Click OK.
3. Now , you should have the following list of providers. At this point we need to reorder the provider
list so that AD will be the first one. This step is needed for Worklist application, otherwise you
will not be able to login with the AD users in worklist.
After reordering you should have the following list of providers
4. Click on AD provider and then open the tab Provider Specific .
NOTE : this is an example, you should set the parameters to match your AD configuration.
The rest you can leave unchanged for now. Click Save.
Control Flag: SUFFICIENT
6. Restart Admin and SOA managed server to activate the changes
7. Create a new User in AD - let's call it 'dummy'
8. Look in Weblogic Console at "Users and Groups" in "myrealm" . You should be able to see the new AD user "dummy"
9. Now try to login to worklist (http://host:8001/integration/worklistapp/)
You should be able to login with "dummy" user .
BPEL Samples
A couple of additions to the list of SOA samples list
Some new BPEL samples from Clemens on SOA PM blog.
Also the fusion order demo for SOA 11g PS1
http://www.oracle.com/technology/products/jdev/samples/fod/index.html
ServerURL and Callback Server URL in SOA 11g
When you want to test a composite in SOA 11g you will see something similar to this screenshot :
You would want to change the "localhost.localdomain" part of the URL to some other hostname - for example I will use "deskLinux". To do this you need to modify the ServerURL and CallbackServerURL in the SOA configuration. This can be easily done via SOA Enterprise Manager :
1. Right Click on SOA-INFRA component in the left navigation tree. Go to Soa Administration --> Common Properties
2. Set the CallBackServerURL and the ServerURL to http://deskLinux:8001 and click Save button
3. Restart SOA server to activate the changes . The URL should now be modified for all composites.
How to Set a Timeout for a Web Service in SOA 11g ?
In 11g SOA we don't have anymore the "Timeout" property that we can put in Web Service invocations to set a maximum wait time in a sync BPEL invocation - so the solution presented in Setting a Timeout for a WebService invocation in BPEL will not work anymore in BPEL 11g.
I will explain below how to set a TIMEOUT on a Web Service invocation when using SOA 11g . This can only be used when only Web Service invocation is made through HTTP.
1. For a process that invokes a Web Service, we want to set a timeout of maximum 10 seconds that the SOA application will wait for the answer. If no response is received within the specified timeout, then we want to catch the timeout error and perform a series of other activities.
The sample below is for a BPEL in a SOA Composite - it will work the same way with Mediator as the timeout is set in composite.xml file and not in some specific BPEL file .
2. Let's say the SOA composite looks like this:
oracle.webservices.httpReadTimeout = 10000 (in MiliSeconds)
If the Web Service is on the same domain as the SOA Composite , you will also have to set :oracle.webservices.local.optimization = false You may set these properties directly in composite.xml ui:wsdlLocation="http://localhost:8001/soa-infra/services/default/Child!1.0/Child.wsdl">
<interface.wsdl interface="http://xmlns.oracle.com/test/Child/Child#wsdl.interface(Child)"/>
<binding.ws port="http://xmlns.oracle.com/test/Child/Child#wsdl.endpoint(child_client_ep/Child_pt)"
location="http://localhost:8001/soa-infra/services/default/Child!1.0/child_client_ep?WSDL">
<property name="oracle.webservices.local.optimization">false</property>
<property name="oracle.webservices.httpReadTimeout" type="xs:string" many="false">10000</property>
</binding.ws>
</reference>
4. This timeout will throw a RemoteFault - so you can easily add a Catch to your BPEL code to catch this error.
5. Now deploy the composite and run it from EM page . The Web Service we are calling takes 40 seconds to complete , but we set the timeout to 10 seconds - note that the Remote Fault occurs after 10 seconds.
How to Define Transaction Timeout for BPEL on Weblogic ?
Consider following scenario : you want to force a BPEL to wait for maximum of 3 (180 seconds) minutes to get reply from a Partner Link. You can set the following timeouts :
a) syncMaxWaitTime to 180;
b)
c) Global JTA Timeout to 300
As a general rule, you should have following relation between the timeout parameters:
syncMaxWaitTime < BPEL MBean transaction timeout < Global Transaction Timeout1. Setting the global transaction timeout on Weblogic domain level :
- Login to Weblogic console (http://host:port/console);
- Select Services > JTA from the left pane;
- Select JTA tab in the right pane;
- Change the parameter:
Timeout Seconds (specifies the time in which a transaction will timeout, if uncommitted);
<jta>
<timeout-seconds>300</timeout-seconds>
</jta>
2. Setting the transaction timeout for BPEL application in the deployment descriptor :
- Go to BEA_HOME\user_projects\apps\soaApps\BPELPM;
- Make a backup of ejb_ob_engine.jar (if anything goes wrong just put back the original ejb_ob_engine.jar);
- Open the ejb_ob_engine.jar (for example in WinZip) and edit weblogic-ejb-jar.xml ;
- Change the
for the following MBeans : CubeEngineBean, CubeDeliveryBean and MessageBean;
Save weblogic-ejb-jar.xml and repack the JAR (this is done automatically in WinZip); - Go to Weblogic Console -> Deployments and Lock&Edit;
- Select BPELPM and Update it -> this will force a redeployment of the JARs;
- Click Activate Changes (at this steps there might be some errors in Weblogic Console
but afternext there will be no problems);
- Stop the SOA server and start it again;
- After SOA server is started go to Deployments section and check if BPELPM is "Active". If not just start it from here by selecting and and cliking on "Start -> Servicing all requests".
- This property sets the maximum time the process result receiver waits for a result before returning;
- Can be changed via BPEL Console -> Manage BPEL Domain (10.1.3.3) / Configuration (10.1.3.4);
- Scroll down to find syncMaxWaitTime parameter. Change the parameter setting and click 'Apply' in lower right corner of the screen;
SOA 11g Book
New book on SOA 11g written by Oracle SOA Suite Product Management team is now available:
"Getting Started with Oracle SOA Suite 11g - A Hands-On Tutorial"
SOA 11g Samples
In SOA 11g the samples are not anymore in the install kit as were in 10g release, instead all samples are now posted on OTN for download.
SOA Suite 11g Samples -- http://www.oracle.com/technology/sample_code/products/soa/index.html
BPEL 11g Samples -- http://www.oracle.com/technology/sample_code/products/bpel/index.html
Human Workflow 11g Samples -- http://www.oracle.com/technology/sample_code/products/hwf/index.html
Deploy EAR or RAR using admin.jar
When trying to deploy an EAR or RAR using "admin.jar" you may get following error
WARNING: Exception returned by remote server: {0} javax.naming.NoPermissionException: This operation was denied. The admin.jar utility can not be used to perform operations against OPMN managed OC4J i nstnaces. Please use Enterprise Manager instead. Refer to the Oracle10iAS Admin Guide or the OC4J User's Guide for more details.
To have an example, let's say you just want to deploy RuleAuthor to a standalone oc4j container :
java -jar admin.jar ormi://localhost:12401 oc4jadmin welcome1 - bindWebApp ruleauthor ruleauthor default-web-site ruleauthor
and you get the error above.
Solution is to add the paramters
-DOPMN=true -Doracle.home=
in the command line
java -DOPMN=true -Doracle.home=/home/oracle/product/10.1.3. 1/OracleAS_1 -jar admin.jar ormi://localhost:12401 oc4jadmin welcome1 - bindWebApp ruleauthor ruleauthor default-web-site ruleauthor
and the deployment will work
[ 2009-04-01 11:37:12.901 BST ] Application Deployer for ruleauthor STARTS.
[ 2009-04-01 11:37:12.921 BST ] Copy the archive to /home/oracle/product/10.1.3
.1/OracleAS_1/j2ee/home/applications/ruleauthor.ear
[ 2009-04-01 11:37:12.945 BST ] Initialize /home/oracle/product/10.1.3.
1/OracleAS_1/j2ee/home/applications/ruleauthor.ear begins...
[ 2009-04-01 11:37:12.946 BST ] Unpacking ruleauthor.ear
[ 2009-04-01 11:37:12.997 BST ] Done unpacking ruleauthor.ear
[ 2009-04-01 11:37:12.999 BST ] Unpacking ruleauthor.war
[ 2009-04-01 11:37:13.299 BST ] Done unpacking ruleauthor.war
[ 2009-04-01 11:37:13.306 BST ] Initialize /home/oracle/product/10.1.3.
1/OracleAS_1/j2ee/home/applications/ruleauthor.ear ends...
[ 2009-04-01 11:37:13.307 BST ] Starting application : ruleauthor
[ 2009-04-01 11:37:13.307 BST ] Initializing ClassLoader(s)
[ 2009-04-01 11:37:13.319 BST ] Initializing EJB container
[ 2009-04-01 11:37:13.320 BST ] Loading connector(s)
[ 2009-04-01 11:37:13.340 BST ] Starting up resource adapters
[ 2009-04-01 11:37:13.351 BST ] Initializing EJB sessions
[ 2009-04-01 11:37:13.352 BST ] Committing ClassLoader(s)
[ 2009-04-01 11:37:13.352 BST ] Initialize ruleauthor begins...
[ 2009-04-01 11:37:13.358 BST ] Initialize ruleauthor ends...
[ 2009-04-01 11:37:13.359 BST ] Started application : ruleauthor
[ 2009-04-01 11:37:13.362 BST ] Application Deployer for ruleauthor COMPLETES.
Operation time: 461 msecs
10.1.3.5 Patchset
Oracle Application Server 10.1.3.5 patchset has been released for Windows and Linux platforms.
Patchset is available on Metalink as patch number 8626084.
RUL-01726 when Defining new Pattern in a Rule
After importing XMLFacts from an XSD, you try to create a new Pattern for a new Rule by comparing a Double (java.lang.Double type) with a double value (e.g. 4.2) , and you get following error in RuleAuthor
'RUL-01726: Data type operator for <, at position 0: java.lang.Double The reason is that xsd:double type from the XSD was transformed in Rules into the Java class java.lang.Double. When you try to compare it with a double value (e.g. 4.2), this raises an error as you cannot compare a Java Class with a double value.
In order to compare these two data types, you can use the following solution :1. Go to Definition -> JavaFact and click on Create to create a new JavaFact
2. Expand java.lang tree and select the Double class
3. Click Import . At this moment you should also see a new JavaFact created and named
java.lang.Double
4. Now go to RuleSets -> Rules and try to create a New Pattern
5. Create a new pattern and before clicking apply select the "Advanced Test " option
6. Edit the expression and change it to
myValue.doubleValue() <>The solution is to use the doubleValue() method of the java.lang.Double class. This method returns the double value, so you can compare it now with a number.
NullPointerException using HTTP Basic Authentication
If you try to use use HTTP Basic Authentication headers to invoke a secured Web Service in BPEL 10.1.3.4
<property name="httpBasicHeaders">credentials</property>
<property name="httpBasicUsername">your_username</property>
<property name="httpBasicPassword">your_password</property>
You may encounter a NullPointerException error ONLY if you use ports 80 or 443 :
<Faulthttp://schemas.oracle.com/bpel/extensionhttp://schemas.xmlsoap.org/soap/envelope/>
<faultcode>null:bindingFault</faultcode>
<faultstring>business exception</faultstring>
<faultactor>cx-fault-actor</faultactor>
<detail>
<summary>com.collaxa.cube.ws.wsif.providers.http.WSIFOperation_HTTP@c54b88 : Could not invoke 'process'; nested exception is: java.lang.NullPointerException</summary>
<detail>java.lang.NullPointerException</detail>
</detail>
</Fault>
The simplest workaround is to try to host your web-service on ports other than 80 (http) /443 (https).
The issue is fixed in MLR 8 for 10.1.3.4 - patch number 8372150.