Tuesday, October 12, 2010

Working with Oracle Workshop for weblogic-Calling a simple synchronous process

This is my first hands on with Oracle workshop for weblogic(Eclipse IDE)

I will create a simple business service and will call a synchronous process.

The idea is to make you familiar with this tool ,how to create a simple process and how to deploy a process,it is because i have faced a lot of problems working on my first working sample in this IDE.

So by default when we install OSB we have workshop installed for us.

It can be found in the following location of your installation

BEA_HOME\workshop_10.3

There you can get workshop.exe

double click on that and you will come up with a gui



I have created a simple sample from weblogic console i will be basically using the same concept but this time i will use workshop for creating the process and deploy.


NOw select new and create a new OSB project.Give it some logical name




NOw select the OSB project and do import and resource from URL



NOw provide the URL of your synchronous Process and provide it some name as shown



It will import the wsdl and the xsd file for the synchronous bpel service



Now click on the OSB project that you have created and create a service account



provide it some name as shown



NOw choose static as resource type and provide the user id and password for the bpel console login




NOw select the osb project and create a new business service as shown



Let the default name be there



Now choose the wsdl and then choose the port for the wsdl service as shown



Now switch to http transport tab and browse to select the service account that you have created




Now select the business service and say run on target server as shown below



just select the project and move it towards right side and finish it




Now it will come up with test console which is nothing but osb console



now execute this and find the result.Sine my bpel process was supposed to return the result as hello so i got the same as




=============================

Just to let you know that initially when i was trying to make it run i have got an error something like this

org.eclipse.core.runtime.CoreException: Activation of publish session failed for:OSB Configuration

error in opening zip file

at com.bea.alsb.server.publish.ALSBPublishOperation.checkPublishStatus(ALSBPublishOperation.java:538)

at com.bea.alsb.server.publish.ALSBPublishOperation.doImport(ALSBPublishOperation.java:421)

at com.bea.alsb.server.publish.ALSBPublishOperation.publishNewContainer(ALSBPublishOperation.java:298)

at com.bea.alsb.server.publish.ALSBPublishOperation.execute(ALSBPublishOperation.java:150)

at com.bea.workshop.wls.core.server.internal.WeblogicServerBehaviour.performTasks(WeblogicServerBehaviour.java:1189)

at com.bea.workshop.wls.core.server.internal.WeblogicServerBehaviour.publishToServer(WeblogicServerBehaviour.java:744)

at com.bea.workshop.wls.core.server.internal.WeblogicServerBehaviour.publishOnce(WeblogicServerBehaviour.java:607)

at com.bea.workshop.wls.core.server.internal.WeblogicServerBehaviour.publish(WeblogicServerBehaviour.java:503)

at org.eclipse.wst.server.core.internal.Server.doPublish(Server.java:887)

at org.eclipse.wst.server.core.internal.Server.publish(Server.java:874)

at org.eclipse.wst.server.core.internal.ServerWorkingCopy.publish(ServerWorkingCopy.java:635)

at org.eclipse.wst.server.core.internal.PublishServerJob.run(PublishServerJob.java:72)

at org.eclipse.core.internal.jobs.Worker.run(Worker.java:55)

org.eclipse.core.runtime.CoreException[4000]: java.util.zip.ZipException: error in opening zip file

at java.util.zip.ZipFile.open(Native Method)

at java.util.zip.ZipFile.(ZipFile.java:114)

at java.util.zip.ZipFile.(ZipFile.java:131)

at weblogic.utils.classloaders.ZipClassFinder.(ZipClassFinder.java:23)

at weblogic.utils.classloaders.JarClassFinder.(JarClassFinder.java:35)

at weblogic.utils.classloaders.JarClassFinder.(JarClassFinder.java:25)

at weblogic.utils.classloaders.JarClassFinder.(JarClassFinder.java:21)

at com.bea.wli.sb.resources.archive.HookedJarClassLoader.(HookedJarClassLoader.java:90)

at com.bea.wli.sb.resources.archive.HookedJarClassLoader.(HookedJarClassLoader.java:75)

at com.bea.wli.sb.resources.archive.ArchiveResourceRuntimeManager$ArchiveResourceLifecycleListener.createJarClassLoader(ArchiveResourceRuntimeManager.java:125)

at com.bea.wli.sb.resources.archive.ArchiveResourceRuntimeManager$ArchiveResourceLifecycleListener.onCreate(ArchiveResourceRuntimeManager.java:171)

at com.bea.wli.config.impl.ResourceListenerNotifier.sendChangeNotification(ResourceListenerNotifier.java:456)

at com.bea.wli.config.impl.ResourceListenerNotifier.sendChangeNotificationsInContext(ResourceListenerNotifier.java:400)

at com.bea.wli.config.impl.ResourceListenerNotifier.sendChangeNotifications(ResourceListenerNotifier.java:330)

at com.bea.wli.config.impl.ResourceListenerNotifier.sendChangeNotifications(ResourceListenerNotifier.java:313)

at com.bea.wli.config.impl.ResourceListenerNotifier.beforePrepare(ResourceListenerNotifier.java:99)

at com.bea.wli.config.transaction.TransactionManager._notifyBeforePrepare(TransactionManager.java:817)

at com.bea.wli.config.transaction.TransactionManager.prepareForCommit(TransactionManager.java:518)

at com.bea.wli.config.deployment.server.ServerDeploymentReceiver._prepare(Unknown Source)

at com.bea.wli.config.deployment.server.ServerDeploymentReceiver.access$700(Unknown Source)

at com.bea.wli.config.deployment.server.ServerDeploymentReceiver$1.run(Unknown Source)

at weblogic.security.acl.internal.AuthenticatedSubject.doAs(AuthenticatedSubject.java:321)

at weblogic.security.service.SecurityManager.runAs(Unknown Source)

at com.bea.wli.config.deployment.server.ServerDeploymentReceiver.prepare(Unknown Source)

at weblogic.deploy.service.internal.targetserver.DeploymentReceiverCallbackDeliverer.doPrepareCallback(DeploymentReceiverCallbackDeliverer.java:157)

at weblogic.deploy.service.internal.targetserver.DeploymentReceiverCallbackDeliverer.access$000(DeploymentReceiverCallbackDeliverer.java:12)

at weblogic.deploy.service.internal.targetserver.DeploymentReceiverCallbackDeliverer$1.run(DeploymentReceiverCallbackDeliverer.java:45)

at weblogic.work.SelfTuningWorkManagerImpl$WorkAdapterImpl.run(SelfTuningWorkManagerImpl.java:516)

at weblogic.work.ExecuteThread.execute(ExecuteThread.java:201)

at weblogic.work.ExecuteThread.run(ExecuteThread.java:173)


This is because i was using some jar file in my osb project.Once i removed it i was able to run it properly.So just in case if you face this kind of issue just try to remove all the redundant things from your osb project.

No comments: