[ 
http://issues.apache.org/jira/browse/MUSE-39?page=comments#action_12420193 ] 

Dan Jemiolo commented on MUSE-39:
---------------------------------

The original description of the issue is not accurate. It addresses the issue 
of having operations in the WSDL that have no Java equivalent (via 
capabilities); the situation we are trying to solve is actually the opposite - 
the WSDL may be generated on the fly, and the WSDL doc available at 
initialization time may be empty or not existent, so there will be no 
operations lacking Java implementations. This will allow users whose resource 
interfaces are very large (or whose number of resource types is very large) to 
avoid creating the WSDL files and rely on runtime checking to verify requests.

Muse does not need a flag to shut off the check for WSDL operations backed by 
Java methods. Users who encounter the above use case should simply extend 
SimpleResource (or SimpleWsResource) and take the following steps:

1. Override hasOperation( ) to either always return "true" or to perform 
whatever special logic/API call is needed to determine if the operation is 
valid.

2. Override invoke( ) to use whatever logic/API is needed to make the operation 
invocation w/o the use of capabilities.

This solution seems ideal because in both cases, the user may rely on 
super.hasOperation or super.invoke to get the default behavior if only some 
operations require special handling.



> Provide optional flag in descriptor that prevents runtime exception if WSDL 
> and Java interfaces are not completely in synch
> ---------------------------------------------------------------------------------------------------------------------------
>
>          Key: MUSE-39
>          URL: http://issues.apache.org/jira/browse/MUSE-39
>      Project: Muse
>         Type: Improvement

>  Environment: Axis2 and OSGi
>     Reporter: Dan Jemiolo
>     Priority: Minor

>
> Right now Muse is using the WSDL to validate the public interface against the 
> internal code, and throws a runtime exception if it discovers that not all 
> the operations in the WSDL are covered by the Java interface. Similarly, an 
> operation must be in the WSDL to be called remotely (this is a security 
> measure, and also prevents name clashes). The code that does the first check 
> is in SimpleResourceDescriptor, while the second check is in SimpleResource; 
> both could be overridden to stop this behavior in the case where a user wants 
> Muse to be more "free form" when acting as an interface to an IT resource.
> A better idea, however, might be to add a flag (default value "true") that 
> tells Muse whether it should enforce the binding between WSDL and Java 
> capability code. I want the default to be true to encourage use of the 
> standard programming model, but providing a flag that will turn the exception 
> into a simple log message would not be hard and makes Muse flexible when 
> necessary. The second issue, however, should probably be handled by a user 
> extending or replacing SimpleResource such that hasOperation always returns 
> true (or uses some other logic test) and invoke( ) does whatever is necessary 
> to validate the operation being requested.

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


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to