[
http://jira.codehaus.org/browse/MGWT-300?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=270379#comment-270379
]
Michał Bartczak commented on MGWT-300:
-------------------------------------------
Okay, I digged a little in that issue and it seems the problem is outside of
the plugin code.
Problem is in QDox parser, which fails to parse the class properly.
clazz.getAnnotations() returns an not-null but empty table (0 elements) in
following code:
{code:title=GenerateAsyncMojo.java}
String uri = MessageFormat.format( rpcPattern, className );
if ( clazz.getAnnotations() != null )
{
for ( Annotation annotation : clazz.getAnnotations() )
{
getLog().debug( "annotation found on service interface " +
annotation );
if ( annotation.getType().getValue().equals(
"com.google.gwt.user.client.rpc.RemoteServiceRelativePath" ) )
{
uri = annotation.getNamedParameter( "value" ).toString();
// remove quotes
uri = uri.substring( 1, uri.length() - 1 );
getLog().debug( "@RemoteServiceRelativePath annotation
found on service interface " + uri );
}
}
}
{code}
I'll open a proper case in QDox
> Generated Async class does not reflect @RemoteServiceRelativePath annotation
> ----------------------------------------------------------------------------
>
> Key: MGWT-300
> URL: http://jira.codehaus.org/browse/MGWT-300
> Project: Maven 2.x GWT Plugin
> Issue Type: Bug
> Affects Versions: 2.3.0
> Reporter: Michał Bartczak
>
> While having following interface:
> {code:title=GreetingService.java}
> @RemoteServiceRelativePath("greetings")
> public interface GreetingService extends RemoteService {
> String greetServer(String name) throws IllegalArgumentException;
> }
> {code}
> following Async is created:
> {code:title=GreetingServiceAsync.java}
> public interface GreetingServiceAsync
> {
> /**
> * GWT-RPC service asynchronous (client-side) interface
> * @see com.roche.test.client.GreetingService
> */
> void greetServer( java.lang.String p0, AsyncCallback<java.lang.String>
> callback );
> /**
> * Utility class to get the RPC Async interface from client-side code
> */
> public static final class Util
> {
> private static GreetingServiceAsync instance;
> public static final GreetingServiceAsync getInstance()
> {
> if ( instance == null )
> {
> instance = (GreetingServiceAsync) GWT.create(
> GreetingService.class );
> ServiceDefTarget target = (ServiceDefTarget) instance;
> target.setServiceEntryPoint( GWT.getModuleBaseURL() +
> "GreetingService" );
> }
> return instance;
> }
> private Util()
> {
> // Utility class should not be instanciated
> }
> }
> }
> {code}
> Generated code should reflect the @RemoteServiceRelativePath annotation.
--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira
---------------------------------------------------------------------
To unsubscribe from this list, please visit:
http://xircles.codehaus.org/manage_email