You could always use the axis-admin task - this seems (!) to work, something
like the following:

    <target name="wsdd">
        <axis-admin xmlfile="deploy.wsdd"/>
    </target>


on 28/1/03 5:26 PM, Nicholas at [EMAIL PROTECTED] wrote:

> Perhaps we need a temporary Ant task to do this until
> the Java2WSDL task is updated to support EJBs. The EJB
> provider seems to have gotten pretty short shrift. I
> mean no docs and no support in Java2WSDL ?
> 
> 
> --- Alan Buxton <[EMAIL PROTECTED]> wrote:
>> Hi Naresh
>> 
>> Here's a sample of a basic deploy.wsdd. They can get
>> rather more complex,
>> but this is as good a starting point as any. In it
>> I'm exposing all methods
>> of a local stateless session bean. You'll probably
>> want to narrow that down
>> a bit :) Note that, even though it's a local bean,
>> you still have to specify
>> homeInterfaceName and remoteInterfaceName as if it
>> were a remote bean.
>> 
>> Good luck.
>> 
>> But I see your point about using the Ant task. It
>> would be a bit easier if
>> you could automate the deployment with Ant. I'm
>> afraid that I don't know the
>> answer to that one. If you find out, maybe you could
>> let me know :)
>> 
>> 
>> <deployment xmlns="http://xml.apache.org/axis/wsdd/";
>> 
>> 
> xmlns:java="http://xml.apache.org/axis/wsdd/providers/java";>
>> 
>> <service name="LocalBean" provider="java:EJB">
>> <parameter name="beanJndiName"
>> value="local/LocalBeanEJB"/>
>> <parameter name="homeInterfaceName"
>> value="big.bux.LocalBeanHome"/>
>> <parameter name="remoteInterfaceName"
>> value="big.bux.LocalBean"/>
>> <parameter name="allowedMethods" value="*"/>
>> </service>
>> </deployment>
>> 
>> 
>> 
>> on 28/1/03 12:05 PM, Naresh Bhatia at
>> [EMAIL PROTECTED] wrote:
>> 
>> Hi Alan,
>> 
>> I would like to expose an EJB as a Web Service - I
>> assume that Axis can to
>> do this because it supplies an EJB provider.
>> Java2Wsdl creates a WSDL
>> automatically for Java classes that implement
>> java.rmi.Remote but seems to
>> choke if they implement javax.ejb.EJBObject (which
>> extends java.rmi.Remote).
>> That's the problem.
>> 
>> Naresh
>> -----Original Message-----
>> From: Alan Buxton [mailto:[EMAIL PROTECTED]]
>> Sent: Tuesday, January 28, 2003 5:01 AM
>> To: [EMAIL PROTECTED]
>> Subject: Re: Does Java2Wsdl support EJBs?
>> 
>> Sorry if this is a dumb question, but why do you
>> need Java2Wsdl?
>> 
>> on 26/1/03 11:42 AM, Naresh Bhatia at
>> [EMAIL PROTECTED] wrote:
>> 
>> 
>> Does Java2Wsdl support WSDL generation from EJBs? I
>> tried it but I am
>> getting the following exception:
>> 
>> WSDLException: faultCode=OTHER_ERROR: Can't find
>> prefix for
>> 'http://ejb.javax'.
>> Namespace prefixes must be set on the
>> Definition object using the
>> addNamespace(...) method.:
>> 
>> My ant build script is as follows (compile.path
>> includes J2EE jars, thus the
>> javax.ejb package):
>> 
>> <taskdef name="java2wsdl"
>> 
> classname="org.apache.axis.tools.ant.wsdl.Java2WsdlAntTask">
>> <classpath> 
>> <path refid="axis.path"/>
>> </classpath> 
>> </taskdef> 
>> 
>> <target name="build-web-service">
>> <java2wsdl 
>> classname="MyEjb"
>> implclass="MyEjbBean"
>> namespace="http://MyEjb";
>> 
>> 
> location="http://camnbhati:7001/soap/services/MyService";
>> extraClasses=""
>> output="${build.dir}/MyService.wsdl">
>> <classpath> 
>> <path refid="compile.path"/>
>> <pathelement location="${build.dir}"/>
>> </classpath> 
>> </java2wsdl> 
>> </target> 
>> 
>> Here's are the exception details from java2WSD:
>> 
>> [java2wsdl] Java2WSDL MyEjb
>> [java2wsdl] WSDLException: faultCode=OTHER_ERROR:
>> Can't find prefix for
>> 'http://ejb.javax'.
>> Namespace prefixes must be set on the
>> Definition object using the
>> addNamespace(...) method.:
>> [java2wsdl]     at
>> com.ibm.wsdl.util.xml.DOMUtils.getPrefix(Unknown
>> Source)
>> [java2wsdl]     at
>> 
> com.ibm.wsdl.util.xml.DOMUtils.getQualifiedValue(Unknown
>> Source) 
>> [java2wsdl]     at
>> 
> com.ibm.wsdl.util.xml.DOMUtils.printQualifiedAttribute(Unknown
>> Source)
>> [java2wsdl]     at
>> com.ibm.wsdl.xml.WSDLWriterImpl.printParts(Unknown
>> Source) 
>> [java2wsdl]     at
>> 
> com.ibm.wsdl.xml.WSDLWriterImpl.printMessages(Unknown
>> Source) 
>> [java2wsdl]     at
>> 
> com.ibm.wsdl.xml.WSDLWriterImpl.printDefinition(Unknown
>> Source) 
>> [java2wsdl]     at
>> com.ibm.wsdl.xml.WSDLWriterImpl.writeWSDL(Unknown
>> Source)
>> [java2wsdl]     at
>> com.ibm.wsdl.xml.WSDLWriterImpl.getDocument(Unknown
>> Source) 
>> [java2wsdl]     at
>> 
> org.apache.axis.wsdl.fromJava.Emitter.emit(Emitter.java:269)
>> [java2wsdl]     at
>> 
> org.apache.axis.wsdl.fromJava.Emitter.emit(Emitter.java:338)
>> [java2wsdl]     at
>> 
> org.apache.axis.tools.ant.wsdl.Java2WsdlAntTask.execute(Java2WsdlAntTask.jav
>> a:249) 
>> [java2wsdl]     at
>> org.apache.tools.ant.Task.perform(Task.java:319)
>> [java2wsdl]     at
>> org.apache.tools.ant.Target.execute(Target.java:309)
>> [java2wsdl]     at
>> 
> org.apache.tools.ant.Target.performTasks(Target.java:336)
>> [java2wsdl]     at
>> 
> org.apache.tools.ant.Project.executeTarget(Project.java:1306)
>> [java2wsdl]     at
>> 
> org.apache.tools.ant.taskdefs.Ant.execute(Ant.java:371)
>> [java2wsdl]     at
>> 
> org.apache.tools.ant.taskdefs.CallTarget.execute(CallTarget.java:143)
>> [java2wsdl]     at
>> org.apache.tools.ant.Task.perform(Task.java:319)
>> [java2wsdl]     at
>> org.apache.tools.ant.Target.execute(Target.java:309)
>> [java2wsdl]     at
>> 
> org.apache.tools.ant.Target.performTasks(Target.java:336)
>> [java2wsdl]     at
>> 
> org.apache.tools.ant.Project.executeTarget(Project.java:1306)
>> [java2wsdl]     at
>> 
> org.apache.tools.ant.taskdefs.Ant.execute(Ant.java:371)
>> [java2wsdl]     at
>> org.apache.tools.ant.Task.perform(Task.java:319)
>> [java2wsdl]     at
>> org.apache.tools.ant.Target.execute(Target.java:309)
>> [java2wsdl]     at
>> 
> org.apache.tools.ant.Target.performTasks(Target.java:336)
>> [java2wsdl]     at
>> 
> org.apache.tools.ant.Project.executeTarget(Project.java:1306)
>> [java2wsdl]     at
>> 
> org.apache.tools.ant.taskdefs.Ant.execute(Ant.java:371)
>> [java2wsdl]     at
>> 
> org.apache.tools.ant.taskdefs.CallTarget.execute(CallTarget.java:143)
>> [java2wsdl]     at
>> net.sf.antcontrib.logic.ForEach.execute(Unknown
>> Source)
>> [java2wsdl]     at
>> org.apache.tools.ant.Task.perform(Task.java:319)
>> [java2wsdl]     at
>> org.apache.tools.ant.Target.execute(Target.java:309)
>> [java2wsdl]     at
>> 
> org.apache.tools.ant.Target.performTasks(Target.java:336)
>> [java2wsdl]     at
>> 
> org.apache.tools.ant.Project.executeTarget(Project.java:1306)
>> [java2wsdl]     at
>> 
> org.apache.tools.ant.taskdefs.Ant.execute(Ant.java:371)
>> [java2wsdl]     at
>> 
> org.apache.tools.ant.taskdefs.CallTarget.execute(CallTarget.java:143)
>> [java2wsdl]     at
>> org.apache.tools.ant.Task.perform(Task.java:319)
>> [java2wsdl]     at
>> org.apache.tools.ant.Target.execute(Target.java:309)
>> [java2wsdl]     at
>> 
> org.apache.tools.ant.Target.performTasks(Target.java:336)
>> 
> === message truncated ===
> 
> 
> =====
> Nicholas Whitehead
> Home: (973) 377 9335
> Cell: (201) 615 2716
> Work: (212) 622 5639
> [EMAIL PROTECTED]

__________________________________________________
Do You Yahoo!?
Everything you'll ever need on one web page
from News and Sport to Email and Music Charts
http://uk.my.yahoo.com

Reply via email to