You are viewing a plain text version of this content. The canonical link for it is here.
Posted to java-dev@axis.apache.org by bu...@apache.org on 2004/02/19 23:39:32 UTC

DO NOT REPLY [Bug 27098] New: - WSDL for return parameter not generated properly for "document" service

DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG 
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
<http://nagoya.apache.org/bugzilla/show_bug.cgi?id=27098>.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND 
INSERTED IN THE BUG DATABASE.

http://nagoya.apache.org/bugzilla/show_bug.cgi?id=27098

WSDL for return parameter not generated properly for "document" service

           Summary: WSDL for return parameter not generated properly for
                    "document" service
           Product: Axis
           Version: 1.2 Alpha
          Platform: PC
        OS/Version: Linux
            Status: NEW
          Severity: Major
          Priority: Other
         Component: WSDL processing
        AssignedTo: axis-dev@ws.apache.org
        ReportedBy: seth@oculan.com


Additional platform info:
Tomcat 5.0.18
Java 1.4.0_02
Apache Axis 1.2alpha, built from CVS 04/02/18

I have set up a simple web service that returns a single bean object. The bean
is generated with Castor and the Castor (de)serializer is being used for the
parameters. I am using document encoding instead of the default rpc encoding.
This service is described by the following segment of my WSDD file:

<service name="Scan" style="document" use="literal">
<parameter name="className" value="xxx.xxx.scan.ScanWebService"/>
<parameter name="isStatic" value="false"/>
<parameter name="allowedMethods" value="*"/>
<typeMapping xmlns:scan="http://scan.xxx.xxx" qname="scan:ScanBean"
type="java:xxx.xxx.scan.ScanBean"
languageSpecificType="java:xxx.xxx.scan.ScanBean"
serializer="org.apache.axis.encoding.ser.castor.CastorSerializerFactory"
deserializer="org.apache.axis.encoding.ser.castor.CastorDeserializerFactory"
encodingStyle="document"/>
</service>


This causes a java.lang.reflect.InvocationTargetException when visiting the
?wsdl URL for the service. The exception wrapped by the
InvocationTargetException is an AxisFault with the following stack trace:

Caused by: Please register a typemapping/beanmapping for 'xxx.xxx.scan.ScanBean'
        at
org.apache.axis.wsdl.fromJava.Emitter.writePartToMessage(Emitter.java:1872)
        at
org.apache.axis.wsdl.fromJava.Emitter.writeResponseMessage(Emitter.java:1714)
        at org.apache.axis.wsdl.fromJava.Emitter.writeMessages(Emitter.java:1110)
        at org.apache.axis.wsdl.fromJava.Emitter.writePortType(Emitter.java:1067)
        at org.apache.axis.wsdl.fromJava.Emitter.getWSDL(Emitter.java:499)
        at org.apache.axis.wsdl.fromJava.Emitter.emit(Emitter.java:350)
        at
org.apache.axis.providers.BasicProvider.generateWSDL(BasicProvider.java:267)
        at org.apache.axis.strategies.WSDLGenStrategy.visit(WSDLGenStrategy.java:72)
        at org.apache.axis.SimpleChain.doVisiting(SimpleChain.java:157)
        at org.apache.axis.SimpleChain.generateWSDL(SimpleChain.java:143)
        at
org.apache.axis.handlers.soap.SOAPService.generateWSDL(SOAPService.java:411)
        at org.apache.axis.server.AxisServer.generateWSDL(AxisServer.java:506)
        at
org.apache.axis.transport.http.QSWSDLHandler.invoke(QSWSDLHandler.java:107)
        ... 39 more


The typemapping is obviously in place in the service definition; the WSDL
generator seems to be ignoring it somehow.

The code at that location (Emitter.java:1872) is an "if" statement that checks
to see whether or not the parameter uses "rpc" or "document" encoding. Out of
curiousity, I changed the encoding of the service from "document" to "rpc". When
using rpc encoding, the WSDL generation works properly.