Deploying static content and java web services to Weblogic 9.2

I had a simple BPEL on Weblogic install - and was looking for a place to host some static XML content on the server. On OC4J, it was simple - just dump the content in the appropriate directories under htdocs, and you are done.
In a simple WLS install like the one I have, it doesn't work that way.
So I created a simple Web Project, added all my XML contents into it, and deployed the ear file into WLS, just like any J2EE application. Here you go - you can now access all the hosted content at the contextURI that you specified at deployment time!

Well, I use JDeveloper 10.1.3.3 - and needed to create and deploy a simple Java Web Service into WLS. I tried using the standard deploy-to-weblogic app server connection - but alas! - I ran into some deployment issues while deploying JWS from JDev 10.1.3.3 to WLS 9.2. The same error repeats if I pick up the ear file and deploy it directly from the WLS admin console.

But hey, there was a simple way to get it done.
Just use the WLS service generation build scripts - it will do the job just as well.

Here is a snippet of the build script that I used to deploy my WS onto WLS.

<project name="BuildHelloWorldService" default="ear">
<target name="ear">
<servicegen destEar="ears/HelloWorldService.ear" warName="HelloWorldService.war" contextURI="hello">
<classpath>
<pathelement path="${java.class.path}" />
<pathelement location="D:\oraBPEL\bpel\lib\orabpel.jar"/>
<pathelement location="D:\oraBPEL\bpel\lib\xmlparserv2.jar"/>
</classpath>
<service targetNamespace="http://xmlns.hello.com/"
serviceURI="/HelloWorldService"
generateTypes="True"
expandMethods="True"
javaClassComponents="com.hello.HelloWorld,com.hello.HelloWorldUtil,com.hello.util.HelloUtil"
serviceName="HelloWorldService"
style="document">
</service>
</servicegen>
</target>

Note that servicegen is an 8.1 release ant task. WLS 9.2 has updated ant tasks that you can leverage to build services from your java classes. I used it only for my local testing.
You can find detailed information on useful ant tasks for service generation, client stub generation and others on the WLS 9.2 documentation page.

http://e-docs.bea.com/wls/docs92/webserv/anttasks.html

Comments:

Post a Comment:
  • HTML Syntax: NOT allowed
About

Principal Product Manager

Search

Archives
« April 2014
SunMonTueWedThuFriSat
  
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
   
       
Today