axis-java-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Davanum Srinivas (JIRA)" <axis-...@ws.apache.org>
Subject [jira] Commented: (AXIS-1964) Axis can't recognize method from port type operations on JDK5
Date Thu, 28 Apr 2005 14:26:28 GMT
     [ http://issues.apache.org/jira/browse/AXIS-1964?page=comments#action_63974 ]
     
Davanum Srinivas commented on AXIS-1964:
----------------------------------------

i just tried "WSDL2Java -t" with code in latest CVS...works fine.

    public void test1ServiceSoapGetWeatherInfo() throws Exception {
        com.ejse.WeatherService.ServiceSoapStub binding;
        try {
            binding = (com.ejse.WeatherService.ServiceSoapStub)
                          new com.ejse.WeatherService.ServiceLocator().getServiceSoap();
        }
        catch (javax.xml.rpc.ServiceException jre) {
            if(jre.getLinkedCause()!=null)
                jre.getLinkedCause().printStackTrace();
            throw new junit.framework.AssertionFailedError("JAX-RPC ServiceException caught:
" + jre);
        }
        assertNotNull("binding is null", binding);

        // Time out after a minute
        binding.setTimeout(60000);

        // Test operation
        com.ejse.WeatherService.WeatherInfo value = null;
        value = binding.getWeatherInfo(02067);
        // TBD - validate results
    }

thanks,
-- dims

> 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


Mime
View raw message