You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@tuscany.apache.org by "ant elder (JIRA)" <tu...@ws.apache.org> on 2006/03/19 10:50:58 UTC

[jira] Created: (TUSCANY-123) J2SE client using ModuleContext locateService for an externalService fails

J2SE client using ModuleContext locateService for an externalService fails
--------------------------------------------------------------------------

         Key: TUSCANY-123
         URL: http://issues.apache.org/jira/browse/TUSCANY-123
     Project: Tuscany
        Type: Bug
  Components: Java SCA Core  
    Reporter: ant elder
    Priority: Minor


A J2SE client using ModuleContext locateService for an externalService fails. 

Try changing the HelloWorldClient in the helloworldwsclient sample to use the externalService "HelloWorldService" in the moduleContext.locate call and it fails. You get different errors depending on if the externalService uses interface.java or interface.wsdl.

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


[jira] Updated: (TUSCANY-123) J2SE client using ModuleContext locateService for an externalService fails

Posted by "Raymond Feng (JIRA)" <tu...@ws.apache.org>.
     [ http://issues.apache.org/jira/browse/TUSCANY-123?page=all ]

Raymond Feng updated TUSCANY-123:
---------------------------------

    Attachment: interopdoc_testcases.zip

Here's the zip containing the WS external service and entry point projects for the InteropDocTest. I didn't have a chance to test
the entry point.

> J2SE client using ModuleContext locateService for an externalService fails
> --------------------------------------------------------------------------
>
>          Key: TUSCANY-123
>          URL: http://issues.apache.org/jira/browse/TUSCANY-123
>      Project: Tuscany
>         Type: Bug

>   Components: Java SCA Core
>     Reporter: ant elder
>     Priority: Blocker
>  Attachments: interopdoc_testcases.zip
>
> A J2SE client using ModuleContext locateService for an externalService fails. 
> Try changing the HelloWorldClient in the helloworldwsclient sample to use the externalService "HelloWorldService" in the moduleContext.locate call and it fails. You get different errors depending on if the externalService uses interface.java or interface.wsdl.

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


[jira] Updated: (TUSCANY-123) J2SE client using ModuleContext locateService for an externalService fails

Posted by "Jean-Sebastien Delfino (JIRA)" <tu...@ws.apache.org>.
     [ http://issues.apache.org/jira/browse/TUSCANY-123?page=all ]

Jean-Sebastien Delfino updated TUSCANY-123:
-------------------------------------------

    Priority: Blocker  (was: Minor)

TUSCANY-173 is a blocker and was closed as a duplicate of 123, so I think 123 now qualifies as blocker :)  

> J2SE client using ModuleContext locateService for an externalService fails
> --------------------------------------------------------------------------
>
>          Key: TUSCANY-123
>          URL: http://issues.apache.org/jira/browse/TUSCANY-123
>      Project: Tuscany
>         Type: Bug

>   Components: Java SCA Core
>     Reporter: ant elder
>     Priority: Blocker

>
> A J2SE client using ModuleContext locateService for an externalService fails. 
> Try changing the HelloWorldClient in the helloworldwsclient sample to use the externalService "HelloWorldService" in the moduleContext.locate call and it fails. You get different errors depending on if the externalService uses interface.java or interface.wsdl.

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


[jira] Commented: (TUSCANY-123) J2SE client using ModuleContext locateService for an externalService fails

Posted by "Raymond Feng (JIRA)" <tu...@ws.apache.org>.
    [ http://issues.apache.org/jira/browse/TUSCANY-123?page=comments#action_12376061 ] 

Raymond Feng commented on TUSCANY-123:
--------------------------------------

To get the test case build, you need to run "mvn clean install eclipse:eclipse" against the root folder of the "interopdoc". It's a maven project.

> J2SE client using ModuleContext locateService for an externalService fails
> --------------------------------------------------------------------------
>
>          Key: TUSCANY-123
>          URL: http://issues.apache.org/jira/browse/TUSCANY-123
>      Project: Tuscany
>         Type: Bug

>   Components: Java SCA Core
>     Reporter: ant elder
>     Assignee: Jim Marino
>     Priority: Blocker
>  Attachments: interopdoc_testcases.zip
>
> A J2SE client using ModuleContext locateService for an externalService fails. 
> Try changing the HelloWorldClient in the helloworldwsclient sample to use the externalService "HelloWorldService" in the moduleContext.locate call and it fails. You get different errors depending on if the externalService uses interface.java or interface.wsdl.

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


[jira] Commented: (TUSCANY-123) J2SE client using ModuleContext locateService for an externalService fails

Posted by "ant elder (JIRA)" <tu...@ws.apache.org>.
    [ http://issues.apache.org/jira/browse/TUSCANY-123?page=comments#action_12376213 ] 

ant elder commented on TUSCANY-123:
-----------------------------------

An alternative may be to change the externalSevrice to use interface.java instead of interface.wsdl however that results in the infinate loop in AbstractJavaComponentInvoker that was reported in TUSCANY-218

> J2SE client using ModuleContext locateService for an externalService fails
> --------------------------------------------------------------------------
>
>          Key: TUSCANY-123
>          URL: http://issues.apache.org/jira/browse/TUSCANY-123
>      Project: Tuscany
>         Type: Bug

>   Components: Java SCA Core
>     Reporter: ant elder
>     Assignee: Jim Marino
>     Priority: Blocker
>  Attachments: interopdoc_testcases.zip
>
> A J2SE client using ModuleContext locateService for an externalService fails. 
> Try changing the HelloWorldClient in the helloworldwsclient sample to use the externalService "HelloWorldService" in the moduleContext.locate call and it fails. You get different errors depending on if the externalService uses interface.java or interface.wsdl.

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


[jira] Commented: (TUSCANY-123) J2SE client using ModuleContext locateService for an externalService fails

Posted by "Raymond Feng (JIRA)" <tu...@ws.apache.org>.
    [ http://issues.apache.org/jira/browse/TUSCANY-123?page=comments#action_12374480 ] 

Raymond Feng commented on TUSCANY-123:
--------------------------------------

I debugged the problem and found out the target invoker is set only if there's a reference pointing to the WS-externalService.  The logic to configure target handler is in ExternalWebserviceWireBuilder. In my test case, I call moduleContext.locateService("InteropDocTest") directly instead of going through the reference.



> J2SE client using ModuleContext locateService for an externalService fails
> --------------------------------------------------------------------------
>
>          Key: TUSCANY-123
>          URL: http://issues.apache.org/jira/browse/TUSCANY-123
>      Project: Tuscany
>         Type: Bug

>   Components: Java SCA Core
>     Reporter: ant elder
>     Priority: Minor

>
> A J2SE client using ModuleContext locateService for an externalService fails. 
> Try changing the HelloWorldClient in the helloworldwsclient sample to use the externalService "HelloWorldService" in the moduleContext.locate call and it fails. You get different errors depending on if the externalService uses interface.java or interface.wsdl.

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


[jira] Commented: (TUSCANY-123) J2SE client using ModuleContext locateService for an externalService fails

Posted by "Jim Marino (JIRA)" <tu...@ws.apache.org>.
    [ http://issues.apache.org/jira/browse/TUSCANY-123?page=comments#action_12376058 ] 

Jim Marino commented on TUSCANY-123:
------------------------------------

This was tagentially related to TUSCANY-124. I also can't get the zip file to build (maybe I am putting it in the wrong place?) but in any event, I think I fixed it as part of TUSCANY-124.  I've added testcases that rely on the foo binding in container-java that exercise this core feature: 

org.apache.tuscany.container.java.integration.binding.EPtoExternalServiceTestCase 
org.apache.tuscany.container.java.integration.binding.ExternalServiceProxyInvokeTestCase 

Again, if this doesn't fix the problem, can you send a testcase demonstrating the issue so I can help address it? 

> J2SE client using ModuleContext locateService for an externalService fails
> --------------------------------------------------------------------------
>
>          Key: TUSCANY-123
>          URL: http://issues.apache.org/jira/browse/TUSCANY-123
>      Project: Tuscany
>         Type: Bug

>   Components: Java SCA Core
>     Reporter: ant elder
>     Assignee: Jim Marino
>     Priority: Blocker
>  Attachments: interopdoc_testcases.zip
>
> A J2SE client using ModuleContext locateService for an externalService fails. 
> Try changing the HelloWorldClient in the helloworldwsclient sample to use the externalService "HelloWorldService" in the moduleContext.locate call and it fails. You get different errors depending on if the externalService uses interface.java or interface.wsdl.

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


[jira] Assigned: (TUSCANY-123) J2SE client using ModuleContext locateService for an externalService fails

Posted by "Jim Marino (JIRA)" <tu...@ws.apache.org>.
     [ http://issues.apache.org/jira/browse/TUSCANY-123?page=all ]

Jim Marino reassigned TUSCANY-123:
----------------------------------

    Assign To: Jim Marino

> J2SE client using ModuleContext locateService for an externalService fails
> --------------------------------------------------------------------------
>
>          Key: TUSCANY-123
>          URL: http://issues.apache.org/jira/browse/TUSCANY-123
>      Project: Tuscany
>         Type: Bug

>   Components: Java SCA Core
>     Reporter: ant elder
>     Assignee: Jim Marino
>     Priority: Blocker
>  Attachments: interopdoc_testcases.zip
>
> A J2SE client using ModuleContext locateService for an externalService fails. 
> Try changing the HelloWorldClient in the helloworldwsclient sample to use the externalService "HelloWorldService" in the moduleContext.locate call and it fails. You get different errors depending on if the externalService uses interface.java or interface.wsdl.

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


[jira] Commented: (TUSCANY-123) J2SE client using ModuleContext locateService for an externalService fails

Posted by "ant elder (JIRA)" <tu...@ws.apache.org>.
    [ http://issues.apache.org/jira/browse/TUSCANY-123?page=comments#action_12376215 ] 

ant elder commented on TUSCANY-123:
-----------------------------------

The related JIRA about using interface.wsdl in .componentType side files is TUSCANY-141

> J2SE client using ModuleContext locateService for an externalService fails
> --------------------------------------------------------------------------
>
>          Key: TUSCANY-123
>          URL: http://issues.apache.org/jira/browse/TUSCANY-123
>      Project: Tuscany
>         Type: Bug

>   Components: Java SCA Core
>     Reporter: ant elder
>     Assignee: Jim Marino
>     Priority: Blocker
>  Attachments: interopdoc_testcases.zip
>
> A J2SE client using ModuleContext locateService for an externalService fails. 
> Try changing the HelloWorldClient in the helloworldwsclient sample to use the externalService "HelloWorldService" in the moduleContext.locate call and it fails. You get different errors depending on if the externalService uses interface.java or interface.wsdl.

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


[jira] Resolved: (TUSCANY-123) J2SE client using ModuleContext locateService for an externalService fails

Posted by "Jim Marino (JIRA)" <tu...@ws.apache.org>.
     [ http://issues.apache.org/jira/browse/TUSCANY-123?page=all ]
     
Jim Marino resolved TUSCANY-123:
--------------------------------

    Resolution: Fixed

Closing this since original problem is fixed, and we can work on TUSCANY-218 and TUSCANY-141 as new issues

> J2SE client using ModuleContext locateService for an externalService fails
> --------------------------------------------------------------------------
>
>          Key: TUSCANY-123
>          URL: http://issues.apache.org/jira/browse/TUSCANY-123
>      Project: Tuscany
>         Type: Bug

>   Components: Java SCA Core
>     Reporter: ant elder
>     Assignee: Jim Marino
>     Priority: Blocker
>  Attachments: interopdoc_testcases.zip
>
> A J2SE client using ModuleContext locateService for an externalService fails. 
> Try changing the HelloWorldClient in the helloworldwsclient sample to use the externalService "HelloWorldService" in the moduleContext.locate call and it fails. You get different errors depending on if the externalService uses interface.java or interface.wsdl.

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


[jira] Commented: (TUSCANY-123) J2SE client using ModuleContext locateService for an externalService fails

Posted by "ant elder (JIRA)" <tu...@ws.apache.org>.
    [ http://issues.apache.org/jira/browse/TUSCANY-123?page=comments#action_12376212 ] 

ant elder commented on TUSCANY-123:
-----------------------------------

This is not fixed. The original issue i think may have been but this exposes another problem so the ModuleContext locateService still fails.
 
The problem now appears to be that the object return by locateService does not implement the expected Java interface. The externalService is using interface.wsdl so tuscany generates a Java interface class to represent the WSDL portType. Thats the interface that the proxy returned to the client is implementing but its not the same as the interface the client is expecting so the client gets a class cast exception.

I guess what should happen is something like before generating the interface for the WSDL portType it should check if the client has available a class of that name and if so use that instead of generating one.

This is the same issue we were discussing on IRC the other day with using interface.wsdl in a .componentType side file. Can't remember if there's a JIRA for that, I'll go check and if so link these JIRAs together.

The original description describes how to recreate the problem, if thats not clear enough here's the patch to make the required change:

Index: C:/SCA/SVN/RN9/samples/helloworld/helloworldwsclient/src/main/java/org/apache/tuscany/samples/helloworldwsclient/HelloWorldClient.java
===================================================================
--- C:/SCA/SVN/RN9/samples/helloworld/helloworldwsclient/src/main/java/org/apache/tuscany/samples/helloworldwsclient/HelloWorldClient.java	(revision 396794)
+++ C:/SCA/SVN/RN9/samples/helloworld/helloworldwsclient/src/main/java/org/apache/tuscany/samples/helloworldwsclient/HelloWorldClient.java	(working copy)
@@ -39,7 +39,7 @@
         ModuleContext moduleContext = CurrentModuleContext.getContext();
 
         // Locate the HelloWorld service component and invoke it
-        HelloWorldService helloworldService = (HelloWorldService) moduleContext.locateService("HelloWorldServiceComponent");
+        HelloWorldService helloworldService = (HelloWorldService) moduleContext.locateService("HelloWorldService");
 
         String value = helloworldService.getGreetings("World");
 


> J2SE client using ModuleContext locateService for an externalService fails
> --------------------------------------------------------------------------
>
>          Key: TUSCANY-123
>          URL: http://issues.apache.org/jira/browse/TUSCANY-123
>      Project: Tuscany
>         Type: Bug

>   Components: Java SCA Core
>     Reporter: ant elder
>     Assignee: Jim Marino
>     Priority: Blocker
>  Attachments: interopdoc_testcases.zip
>
> A J2SE client using ModuleContext locateService for an externalService fails. 
> Try changing the HelloWorldClient in the helloworldwsclient sample to use the externalService "HelloWorldService" in the moduleContext.locate call and it fails. You get different errors depending on if the externalService uses interface.java or interface.wsdl.

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