axis-java-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Ajay Upadhyaya (JIRA)" <j...@apache.org>
Subject [jira] Created: (AXIS2-856) WSDL generation should not be attempted for non RPC receivers
Date Tue, 27 Jun 2006 17:26:31 GMT
WSDL generation should not be attempted for non RPC receivers
-------------------------------------------------------------

         Key: AXIS2-856
         URL: http://issues.apache.org/jira/browse/AXIS2-856
     Project: Apache Axis 2.0 (Axis2)
        Type: Bug

 Environment: Windows
    Reporter: Ajay Upadhyaya


I'm in process of migrating from axis1.x,  I was using Message style services in my application
signatures were like Document method(Document in)

Which I've changed to OMElement method(OMElement in).The code migration went okay, app works
fine. I found one issue (for which I needed workaround in my code). Here is the scenario

class ServiceClass
{
     //service wrapper
     public OMElement operation1(OMElement in){.... }
    //real implementation of service
     OMElement operation1(){.... }
}

services.xml
---------------------
<service name="myservice">
        <description>
            my web service
        </description>
        <parameter name="ServiceClass" locked="false">ServiceClass</parameter>
        <operation name="operation1">
            <messageReceiver class="org.apache.axis2.receivers.RawXMLINOutMessageReceiver"/>
            <actionMapping>urn:operation1</actionMapping>
        </operation>
    </service>

During initialization following exception is thrown
ERROR [org.apache.axis2.deployment.ServiceBuilder] - Error in schema generating  Sorry we
don't support methods overloading !!!!
java.lang.Exception:  Sorry we don't support methods overloading !!!!
    at org.apache.ws.java2wsdl.SchemaGenerator.generateSchema(SchemaGenerator.java:143)
    at org.apache.axis2.deployment.util.Utils.fillAxisService (Utils.java:213)
    at org.apache.axis2.deployment.ServiceBuilder.populateService(ServiceBuilder.java:149)
    at org.apache.axis2.deployment.ServiceGroupBuilder.populateServiceGroup(ServiceGroupBuilder.java:91)
    at org.apache.axis2.deployment.repository.util.ArchiveReader.buildServiceGroup(ArchiveReader.java:84)
    at org.apache.axis2.deployment.repository.util.ArchiveReader.processServiceGroup(ArchiveReader.java:118)
    at org.apache.axis2.deployment.DeploymentEngine.doDeploy(DeploymentEngine.java:620)
    at org.apache.axis2.deployment.repository.util.WSInfoList.update(WSInfoList.java:195)
    at org.apache.axis2.deployment.RepositoryListener.update (RepositoryListener.java:207)
    at org.apache.axis2.deployment.RepositoryListener.checkServices(RepositoryListener.java:155)
    at org.apache.axis2.deployment.DeploymentEngine.loadServices(DeploymentEngine.java:91)
    at org.apache.axis2.deployment.WarBasedAxisConfigurator.loadServices(WarBasedAxisConfigurator.java:142)
    at org.apache.axis2.context.ConfigurationContextFactory.createConfigurationContext(ConfigurationContextFactory.java
:42)
    at org.apache.axis2.transport.http.AxisServlet.initConfigContext(AxisServlet.java:213)
    at org.apache.axis2.transport.http.AxisServlet.init(AxisServlet.java:182)

- To workaround this, I had to create a base class and move the real implementation method
in base class

class BaseClass
{
     //real implementation of service
     OMElement operation1(){.... }
}

class ServiceClass extends BaseClass
{
     //service wrapper
     public OMElement operation1(OMElement in){.... }
 }

Looking into the axis source, found that org.apache.ws.java2wsdl.SchemaGenerator.generateSchema
method uses getDeclaredMethods() call to find the methods in the service class, and as getDeclaredMethods
does not returns methods inherited by a class, the workaround works.

The irony is that, in my case, since I'm not using RPC message receivers, the SchemaGenerator
class anyway is not useful, as it does not work for non RPC cases

I'm wondering if not seeing inherited methods is a bug or a feature... but either way, this
could be put somewhere in documentation. The message Sorry we don't support methods overloading
is a bit misleading as I'm using overloaded (inherited) methods. 

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
   http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see:
   http://www.atlassian.com/software/jira


---------------------------------------------------------------------
To unsubscribe, e-mail: axis-dev-unsubscribe@ws.apache.org
For additional commands, e-mail: axis-dev-help@ws.apache.org


Mime
View raw message