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

ant elder reassigned TUSCANY-8:
-------------------------------

    Assign To: ant elder

> 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

Reply via email to