• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

Expose EJB as webservice

 
Greenhorn
Posts: 14
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I am a newbie to webservice. I have an EJB and I want to expose that as wsdl. I have created an ant task build which uses servicegen. Some of the methods in my EJB returns hashtable, vector, user defined objects. When I run the build task I get this error.

Any help on this is greatly appreciated.

Here is my target in the build file


<target name="build">
<delete dir="${build}" />
<mkdir dir="${build}"/>
<copy todir="${build}" file="${ejbc_jar_file}"/>
<servicegen destEar="${build}/${ear_file}"
warName="${war_file}"
contextURI="webservice">
<service ejbJar="${build}/${ejbc_jar_file}"
targetNamespace="http://localhost:7012/combo/Combo"
serviceName="ComboService"
serviceURI="/ComboService"
generateTypes="True"
expandMethods="True"
style="document">
</service>
</servicegen>
</target>

<taskdef name="servicegen"
classname="weblogic.ant.taskdefs.webservices.servicegen.ServiceGenTask"
classpathref="classpath" />


this is the exception I get.

[servicegen] Could not process ejb-jar
[servicegen] at weblogic.ant.taskdefs.webservices.autotype.EJBAutoTyper.<init
>(EJBAutoTyper.java:73)
[servicegen] at weblogic.ant.taskdefs.webservices.servicegen.ServiceGenTask.r
unAutoTyper(ServiceGenTask.java:339)
[servicegen] at weblogic.ant.taskdefs.webservices.servicegen.ServiceGenTask.g
enerateService(ServiceGenTask.java:313)
[servicegen] at weblogic.ant.taskdefs.webservices.servicegen.ServiceGenTask.e
xecute(ServiceGenTask.java:181)
[servicegen] at org.apache.tools.ant.UnknownElement.execute(UnknownElement.ja
va:275)
[servicegen] at org.apache.tools.ant.Task.perform(Task.java:364)
[servicegen] at org.apache.tools.ant.Target.execute(Target.java:341)
[servicegen] at org.apache.tools.ant.Target.performTasks(Target.java:369)
[servicegen] at org.apache.tools.ant.Project.executeSortedTargets(Project.jav
a:1216)
[servicegen] at org.apache.tools.ant.Project.executeTarget(Project.java:1185)

[servicegen] at org.apache.tools.ant.helper.DefaultExecutor.executeTargets(De
faultExecutor.java:40)
[servicegen] at org.apache.tools.ant.Project.executeTargets(Project.java:1068
)
[servicegen] at org.apache.tools.ant.Main.runBuild(Main.java:668)
[servicegen] at org.apache.tools.ant.Main.startAnt(Main.java:187)
[servicegen] at org.apache.tools.ant.launch.Launcher.run(Launcher.java:246)
[servicegen] at org.apache.tools.ant.launch.Launcher.main(Launcher.java:67)
[servicegen] Caused by: java.util.zip.ZipException: The system cannot find the p
ath specified
[servicegen] at java.util.zip.ZipFile.open(Native Method)
[servicegen] at java.util.zip.ZipFile.<init>(ZipFile.java:111)
[servicegen] at java.util.jar.JarFile.<init>(JarFile.java:127)
[servicegen] at java.util.jar.JarFile.<init>(JarFile.java:92)
[servicegen] at weblogic.utils.jars.JarFileDelegate.<init>(JarFileDelegate.ja
va:35)
[servicegen] at weblogic.utils.jars.VirtualJarFactory.createVirtualJar(Virtua
lJarFactory.java:21)
[servicegen] at weblogic.application.ApplicationFileManager.getVirtualJarFile
(ApplicationFileManager.java:170)
[servicegen] at weblogic.ant.taskdefs.webservices.autotype.EJBAutoTyper.<init
>(EJBAutoTyper.java:68)
[servicegen] ... 15 more
[servicegen] --- Nested Exception ---
[servicegen] java.util.zip.ZipException: The system cannot find the path specifi
ed
[servicegen] at java.util.zip.ZipFile.open(Native Method)
[servicegen] at java.util.zip.ZipFile.<init>(ZipFile.java:111)
[servicegen] at java.util.jar.JarFile.<init>(JarFile.java:127)
[servicegen] at java.util.jar.JarFile.<init>(JarFile.java:92)
[servicegen] at weblogic.utils.jars.JarFileDelegate.<init>(JarFileDelegate.ja
va:35)
[servicegen] at weblogic.utils.jars.VirtualJarFactory.createVirtualJar(Virtua
lJarFactory.java:21)
[servicegen] at weblogic.application.ApplicationFileManager.getVirtualJarFile
(ApplicationFileManager.java:170)
[servicegen] at weblogic.ant.taskdefs.webservices.autotype.EJBAutoTyper.<init
>(EJBAutoTyper.java:68)
[servicegen] at weblogic.ant.taskdefs.webservices.servicegen.ServiceGenTask.r
unAutoTyper(ServiceGenTask.java:339)
[servicegen] at weblogic.ant.taskdefs.webservices.servicegen.ServiceGenTask.g
enerateService(ServiceGenTask.java:313)
[servicegen] at weblogic.ant.taskdefs.webservices.servicegen.ServiceGenTask.e
xecute(ServiceGenTask.java:181)
[servicegen] at org.apache.tools.ant.UnknownElement.execute(UnknownElement.ja
va:275)
[servicegen] at org.apache.tools.ant.Task.perform(Task.java:364)
[servicegen] at org.apache.tools.ant.Target.execute(Target.java:341)
[servicegen] at org.apache.tools.ant.Target.performTasks(Target.java:369)
[servicegen] at org.apache.tools.ant.Project.executeSortedTargets(Project.jav
a:1216)
[servicegen] at org.apache.tools.ant.Project.executeTarget(Project.java:1185)

[servicegen] at org.apache.tools.ant.helper.DefaultExecutor.executeTargets(De
faultExecutor.java:40)
[servicegen] at org.apache.tools.ant.Project.executeTargets(Project.java:1068
)
[servicegen] at org.apache.tools.ant.Main.runBuild(Main.java:668)
[servicegen] at org.apache.tools.ant.Main.startAnt(Main.java:187)
[servicegen] at org.apache.tools.ant.launch.Launcher.run(Launcher.java:246)
[servicegen] at org.apache.tools.ant.launch.Launcher.main(Launcher.java:67)

BUILD FAILED
C:\eclipse\projects\web_services_new\build.xml:124: Could not process ejb-jar


Pam
 
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
reply
    Bookmark Topic Watch Topic
  • New Topic