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 ax...@ws.apache.org on 2004/08/09 23:42:19 UTC

[jira] Created: (AXIS-1502) validation of service endpoint interface is too strict

Message:

  A new issue has been created in JIRA.

---------------------------------------------------------------------
View the issue:
  http://issues.apache.org/jira/browse/AXIS-1502

Here is an overview of the issue:
---------------------------------------------------------------------
        Key: AXIS-1502
    Summary: validation of service endpoint interface is too strict
       Type: Bug

     Status: Unassigned
   Priority: Critical

    Project: Axis
 Components: 
             Basic Architecture
   Versions:
             beta-2

   Assignee: 
   Reporter: Matthew Hawthorne

    Created: Mon, 9 Aug 2004 2:41 PM
    Updated: Mon, 9 Aug 2004 2:41 PM
Environment: Redhat Linux 9
jdk 1.4.2_05

Description:
I define my services as Java interfaces.  The server implementation is a session bean which I deploy using the java:EJB provider.

When calling Service.getPort with Axis 1.2 beta 2, it fails with this error:

javax.xml.rpc.ServiceException: Incompatible service endpoint interface: mil.navy.ia.nicweb.dos.iface.services.ImportService
at org.apache.axis.client.Service.getPort(Service.java:423)
at org.apache.axis.client.Service.getPort(Service.java:382)

I took a look at the code for org.apache.axis.client.Service, and it seems to do some validation on the endpoint.

(Lines 419-424, sorry if the formatting gets weird).

--------------------------------

Binding binding = port.getBinding();

SymbolTable symbolTable = wsdlParser.getSymbolTable();

BindingEntry bEntry = symbolTable.getBindingEntry(binding.getQName());

if(bEntry.getParameters().size() != proxyInterface.getMethods().length) {
 throw new ServiceException(Messages.getMessage("incompatibleSEI00", "" + proxyInterface.getName()));
} 

--------------------------------

It looks to me that it's asserting that the number of methods in the endpoint interface must match the number of methods exposed by the service.  This seems like a fair assumption, but won't work in my situation.  The java:EJB provider receives an instance of an EJB's remote or local interface, and (if allowedMethods='*') exposes methods like:

- remove
- getEJBLocalHome
- getPrimaryKey
- isIdentical

So naturally, the numbers won't match.  I could manually only expose the methods on the server that are also defined in the interface, but I'd prefer to avoid this if at all possible.

So, none of my services which I use in this way work when upgrading to Axis 1.2 beta 2.

In my opinion, this validation is a bit harsh.  If I'm misunderstanding the purpose of service endpoints, and exact validation such as this is absolutely necessary, then please let me know.  I think it's good that the interfaces are being validated, but wonder if there is a more flexible way to do it.

Perhaps a warning could be logged, instead of the exception being thrown.  This could serve as a good transition.

Thanks for any feedback!


---------------------------------------------------------------------
JIRA INFORMATION:
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

If you want more information on JIRA, or have a bug to report see:
   http://www.atlassian.com/software/jira