[ 
https://issues.apache.org/jira/browse/MUSE-227?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12665447#action_12665447
 ] 

Francesco Scandelli commented on MUSE-227:
------------------------------------------

I would also suggest, in the case of a setter method, to generate a signature 
that throws an exception base class that handles the serialization of 
ResourcePropertyChangeFailure element,  as it  is defined by WSRP spec.

> No exceptions allowed in generated WSRF property setters/getters
> ----------------------------------------------------------------
>
>                 Key: MUSE-227
>                 URL: https://issues.apache.org/jira/browse/MUSE-227
>             Project: Muse
>          Issue Type: Bug
>          Components: Tooling - Code Generation
>    Affects Versions: 2.3.0
>         Environment: Linux. Muse nightly build 2.3.0-2007-04-16-02-00
>            Reporter: Erik Rissanen
>            Assignee: Dan Jemiolo
>            Priority: Minor
>
> For resource properties wsdl2java generates an interface like this (this is 
> the sample from the tutorial):
> public interface MyCapability
> {
>     String PREFIX = "tns";
>     String NAMESPACE_URI = "http://ws.apache.org/muse/test/wsrf";;
>     public int getMessageInterval();
>     public void setMessageInterval(int param0);
>     public String getServerName();
>     public void setServerName(String param0);
> }
> Notice that the generated setters/getters do not declare any exceptions. This 
> is fine for the sample where the property is implemented as a simple member 
> variable. However, if I store the data somewhere else, for instance in a 
> database somewhere, then getting and setting of the actual resource data can 
> fail with an exception.
> As the interface declaration is now, I have to catch any exceptions and turn 
> them into unchecked RuntimeExceptions, which is a bit uggly.
> Suggested fix: the interface declares either throws Exception or throws 
> SOAPFault

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to