Hello, folks.

I'm trying to deploy a Stateless Session Bean as a web service using Axis and JBoss. However, to this date I've been unsuccessful. There are a couple of problems, I'll post about them here one by one. The first problem I encountered was being unable to generate WSDL for the web service using the ?wsdl query parameter. Here's what I get:

There are two files attached to this message. The first one (stack-trace.txt) is the stack trace I get when trying to access the service?wsdl URL. The second one (web-service.xml) is the WSDD for this service. I hope it's ok to send attachments to this list. They are small anyway and copying them in the body message would mess up formatting and make them much harder to read (making much harder for you to help me).

Environment: JBoss 3.2.0beta2 + Apache Axis snapshot from 2002-11-25. I'm aware that this is a pretty unstable environment, but I don't think the problem is with JBoss integration. I've first tried to run using the Axis version bundled with JBoss (RC1, I think), but I ran into a bug that some mailing list messages pointed that was solved in more recent builds, so I updated the Axis libraries.

--
Pazu <[EMAIL PROTECTED]>
AXIS error

Sorry, something seems to have gone wrong... here are the details:

Fault - 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.:  

AxisFault
 faultCode: {http://www.w3.org/2002/06/soap-envelope}Server.userException
 faultSubcode: 
 faultString: 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.: 
 faultActor: null
 faultNode: null
 faultDetail: 
        stackTrace: 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.: 
        at com.ibm.wsdl.util.xml.DOMUtils.getPrefix(Unknown Source)
        at com.ibm.wsdl.util.xml.DOMUtils.getQualifiedValue(Unknown Source)
        at com.ibm.wsdl.util.xml.DOMUtils.printQualifiedAttribute(Unknown Source)
        at com.ibm.wsdl.xml.WSDLWriterImpl.printParts(Unknown Source)
        at com.ibm.wsdl.xml.WSDLWriterImpl.printMessages(Unknown Source)
        at com.ibm.wsdl.xml.WSDLWriterImpl.printDefinition(Unknown Source)
        at com.ibm.wsdl.xml.WSDLWriterImpl.writeWSDL(Unknown Source)
        at com.ibm.wsdl.xml.WSDLWriterImpl.getDocument(Unknown Source)
        at org.apache.axis.wsdl.fromJava.Emitter.emit(Emitter.java:269)
        at 
org.apache.axis.providers.java.JavaProvider.generateWSDL(JavaProvider.java:475)
        at org.apache.axis.strategies.WSDLGenStrategy.visit(WSDLGenStrategy.java:72)
        at org.apache.axis.SimpleChain.doVisiting(SimpleChain.java:156)
        at org.apache.axis.SimpleChain.generateWSDL(SimpleChain.java:143)
        at org.apache.axis.handlers.soap.SOAPService.generateWSDL(SOAPService.java:368)
        at org.apache.axis.server.AxisServer.generateWSDL(AxisServer.java:491)
        at 
org.apache.axis.transport.http.AxisServlet.processWsdlRequest(AxisServlet.java:434)
        at org.apache.axis.transport.http.AxisServlet.doGet(AxisServlet.java:286)
        at javax.servlet.http.HttpServlet.service(HttpServlet.java:740)
        at 
org.apache.axis.transport.http.AxisServletBase.service(AxisServletBase.java:339)
        at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
        at org.mortbay.jetty.servlet.ServletHolder.handle(ServletHolder.java:366)
        at 
org.mortbay.jetty.servlet.WebApplicationHandler.dispatch(WebApplicationHandler.java:293)
        at org.mortbay.jetty.servlet.ServletHandler.handle(ServletHandler.java:572)
        at org.mortbay.http.HttpContext.handle(HttpContext.java:1700)
        at 
org.mortbay.jetty.servlet.WebApplicationContext.handle(WebApplicationContext.java:554)
        at org.mortbay.http.HttpContext.handle(HttpContext.java:1650)
        at org.mortbay.http.HttpServer.service(HttpServer.java:894)
        at org.jboss.jetty.Jetty.service(Jetty.java:497)
        at org.mortbay.http.HttpConnection.service(HttpConnection.java:816)
        at org.mortbay.http.HttpConnection.handleNext(HttpConnection.java:966)
        at org.mortbay.http.HttpConnection.handle(HttpConnection.java:833)
        at org.mortbay.http.SocketListener.handleConnection(SocketListener.java:204)
        at org.mortbay.util.ThreadedServer.handle(ThreadedServer.java:289)
        at org.mortbay.util.ThreadPool$PoolThread.run(ThreadPool.java:504)

 

<deployment
    xmlns="http://xml.apache.org/axis/wsdd/";
    xmlns:java="http://xml.apache.org/axis/wsdd/providers/java";>

  <service name="Acao" provider="java:EJB" style="rpc" use="encoded">
      <parameter name="wsdlTargetNamespace" value="urn:telebahiacelular/movistore/acao"/>
      <parameter name="wsdlServiceElement" value="AcaoService"/>
      <parameter name="wsdlServicePort" value="Acao"/>
      <parameter name="wsdlPortType" value="Acao"/>

      <!-- EJBProvider -->
      <parameter name="beanJndiName" value="movistore/Acao"/>
      <parameter name="homeInterfaceName" value="com.telebahiacelular.movistore.acao.interfaces.AcaoHome"/>
      <parameter name="remoteInterfaceName" value="com.telebahiacelular.movistore.acao.interfaces.Acao"/>
      <parameter name="allowedMethods" value="*"/>
      <parameter name="jndiURL" value="jnp://localhost:1099"/>
      <parameter name="jndiContextClass" value="org.jnp.interfaces.NamingContextFactory"/>

      <parameter name="scope" value="Application"/>

      <typeMapping
        xmlns:ns="urn:telebahiacelular/movistore/acao"
        qname="ns:AcaoPKModel"
        type="java:com.telebahiacelular.movistore.acao.rpc.AcaoPKModel"
        serializer="org.apache.axis.encoding.ser.BeanSerializerFactory"
        deserializer="org.apache.axis.encoding.ser.BeanDeserializerFactory"
        encodingStyle="http://schemas.xmlsoap.org/soap/encoding/";
      />
      <typeMapping
        xmlns:ns="urn:telebahiacelular/movistore/acao"
        qname="ns:AcaoModel"
        type="java:com.telebahiacelular.movistore.acao.rpc.AcaoModel"
        serializer="org.apache.axis.encoding.ser.BeanSerializerFactory"
        deserializer="org.apache.axis.encoding.ser.BeanDeserializerFactory"
        encodingStyle="http://schemas.xmlsoap.org/soap/encoding/";
      />
      <typeMapping
        xmlns:ns="urn:telebahiacelular/movistore/acao"
        qname="ns:ArrayOf_xsd_anyType"
        type="java:java.lang.Object[]"
        serializer="org.apache.axis.encoding.ser.ArraySerializerFactory"
        deserializer="org.apache.axis.encoding.ser.ArrayDeserializerFactory"
        encodingStyle="http://schemas.xmlsoap.org/soap/encoding/";
      />
      <typeMapping
        xmlns:ns="urn:telebahiacelular/movistore/tela"
        qname="ns:TelaPKModel"
        type="java:com.telebahiacelular.movistore.tela.rpc.TelaPKModel"
        serializer="org.apache.axis.encoding.ser.BeanSerializerFactory"
        deserializer="org.apache.axis.encoding.ser.BeanDeserializerFactory"
        encodingStyle="http://schemas.xmlsoap.org/soap/encoding/";
      />
  </service>
</deployment>

Reply via email to