You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@tuscany.apache.org by "ant elder (JIRA)" <tu...@ws.apache.org> on 2006/04/29 17:16:38 UTC

[jira] Resolved: (TUSCANY-8) NPE in ExternalWebServiceHandler.getSOAPAction when Java interface method name doesn't match WSDL operation name

     [ http://issues.apache.org/jira/browse/TUSCANY-8?page=all ]
     
ant elder resolved TUSCANY-8:
-----------------------------

    Resolution: Fixed

I think this is subtly different from the name mangling issue, its specifically about the case of the 1st character which with Java naming conventions will always be a lowercase character. And, that's what the interfaces Tuscany generates for a WSDL look like so it just doesn't work unless we tolerate it.  I've fixed this  specific issue now,  the name mangling issues can be done in another JIRA when they come up. 

> NPE in ExternalWebServiceHandler.getSOAPAction when Java interface method name doesn't match WSDL operation name
> ----------------------------------------------------------------------------------------------------------------
>
>          Key: TUSCANY-8
>          URL: http://issues.apache.org/jira/browse/TUSCANY-8
>      Project: Tuscany
>         Type: Bug

>   Components: Java SCA Axis Binding
>     Reporter: ant elder
>     Assignee: ant elder
>     Priority: Minor
>  Attachments: ExternalWebServiceHandler.java
>
> If a WSDL portType has operation name that starts with a capital letter (common with .Net WSDL) but a component uses a Java interface which has the method name start with a lower case character then there's a null pointer exception at org.apache.tuscany.binding.axis.handler.ExternalWebServiceHandler.getSOAPAction(ExternalWebServiceHandler.java:427).
> Eg, this WSDL has an operation "GetQuote" for which the usual Java method name would be "getQuote": http://www.webservicex.net/stockquote.asmx?WSDL
> Thia is a common problem with Java WS stacks making invocations without using mapping meta data.
> One solution is to change the Java interface to capitalize the method name to match the WSDL, but thats not standard Java naming practice and looks a bit ugly. 
> Another solution could be to fix the Tuscany code to check for both un-capitalized and capitalized names when trying to find the correct operation. There's two places that would need changing for that:
>   line 83 in org.apache.tuscany.binding.axis.handler.ExternalWebServiceConfigurationHandler
>   line 140 in org.apache.tuscany.binding.axis.handler.ExternalWebServiceHandler    
> Some people are quite dogmatic about this and say it should fail, others are more pragmatic and think its better to cope with this special case for users. What do you guys think? I can send in a patch for this if you agree. Either way, the NPE in getSOAPAction isn't the most helpful error.

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