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/04/28 16:04:43 UTC

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

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


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

Posted by "Davanum Srinivas (JIRA)" <ax...@ws.apache.org>.
     [ 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


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

Posted by "Jason Carreira (JIRA)" <ax...@ws.apache.org>.
     [ 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


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

Posted by "Davanum Srinivas (JIRA)" <ax...@ws.apache.org>.
     [ http://issues.apache.org/jira/browse/AXIS-1964?page=comments#action_63971 ]
     
Davanum Srinivas commented on AXIS-1964:
----------------------------------------

discussion thread:
http://marc.theaimsgroup.com/?t=111461704500002&r=1&w=2

> 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