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 "Jason Carreira (JIRA)" <ax...@ws.apache.org> on 2005/05/12 22:26:05 UTC

[jira] Commented: (AXIS-1964) Axis can't recognize method from port type operations on JDK5

     [ http://issues.apache.org/jira/browse/AXIS-1964?page=comments#action_65179 ]
     
Jason Carreira commented on AXIS-1964:
--------------------------------------

I'm still seeing this in 1.2 final. The service is built using this constructor:

public Service(URL wsdlDoc, QName serviceName) throws ServiceException

where the wsdlDoc is saved locally... This is what the Spring LocalJaxRpcServiceFactory ends up calling, and it creates a Service where the operation names are GetWeatherInfo, etc. not getWeatherInfo. 

> Axis can't recognize method from port type operations on JDK5
> -------------------------------------------------------------
>
>          Key: AXIS-1964
>          URL: http://issues.apache.org/jira/browse/AXIS-1964
>      Project: Axis
>         Type: Bug
>     Versions: 1.2RC3
>  Environment: JDK5 build 1.5.0_02-b09
>     Reporter: Jason Carreira
>     Priority: Critical

>
> When running client code created using WSDL2Java it cannot recognize the method to execute. The problem is in this code snippet starting with line 1338 in org.apache.axis.client.Call:
>         for ( int i = 0 ; i < operations.size() ; i++, op=null ) {
>             op = (Operation) operations.get( i );
>             if ( opName.equals( op.getName() ) ) {
>                 break ;
>             }
>         }
> The problem is that opName is the name of the method from the generated stub interface: "getWeatherInfo". The op.getName is returning "GetWeatherInfo".
> This problem is fixed by replacing that code with this:
>         for ( int i = 0 ; i < operations.size() ; i++, op=null ) {
>             op = (Operation) operations.get( i );
>             if ( opName.equals( JavaUtils.xmlNameToJava( op.getName() ) ) ) {
>                 break ;
>             }
>         }
> But then it fails to find the BindingOperation a few lines later when it does this:
>         BindingOperation bop = binding.getBindingOperation(opName, null, null);
> But replacing this with the following line lets it get through the Call method (and on to another bug):
>         BindingOperation bop = binding.getBindingOperation(op.getName(), null, null);
> by looking at the op.getName() instead of opName which, as we saw above, are not equal in this case.

-- 
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