|
View:
New views
3 Messages
—
Rating Filter:
Alert me
|
|
|
[jira] Created: (MUSE-227) No exceptions allowed in generated WSRF property setters/gettersNo 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 Assigned To: 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 workaround: 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: muse-dev-unsubscribe@... For additional commands, e-mail: muse-dev-help@... |
|
|
[jira] Updated: (MUSE-227) No exceptions allowed in generated WSRF property setters/getters[ https://issues.apache.org/jira/browse/MUSE-227?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Erik Rissanen updated MUSE-227: ------------------------------- Description: 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 was: 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 workaround: the interface declares either throws Exception or throws SOAPFault Corrected typo in description > 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 > Assigned To: 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: muse-dev-unsubscribe@... For additional commands, e-mail: muse-dev-help@... |
|
|
[jira] Commented: (MUSE-227) No exceptions allowed in generated WSRF property setters/getters[ 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: muse-dev-unsubscribe@... For additional commands, e-mail: muse-dev-help@... |
| Free embeddable forum powered by Nabble | Forum Help |