You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@tuscany.apache.org by "Jim Marino (JIRA)" <tu...@ws.apache.org> on 2006/10/02 22:48:26 UTC

[jira] Commented: (TUSCANY-767) NPE in CompositeReference.java when service is defined using interface wsdl

    [ http://issues.apache.org/jira/browse/TUSCANY-767?page=comments#action_12439312 ] 
            
Jim Marino commented on TUSCANY-767:
------------------------------------

Ignacio was going to add some testcases to verify behavior and I'll apply.

> NPE in CompositeReference.java when service is defined using interface wsdl
> ---------------------------------------------------------------------------
>
>                 Key: TUSCANY-767
>                 URL: http://issues.apache.org/jira/browse/TUSCANY-767
>             Project: Tuscany
>          Issue Type: Bug
>          Components: Java SCA Core
>    Affects Versions: Java-M2
>            Reporter: Rick Rineholt
>         Assigned To: Jim Marino
>            Priority: Blocker
>             Fix For: Java-M2
>
>         Attachments: OperationInvocationHandlers.patch
>
>
> If a service is defined using interface wsdl the service contract does not have an interface class this results in org.apache.tuscany.core.implementation.composite.CompositeReference getting an NPE.

-- 
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: tuscany-dev-unsubscribe@ws.apache.org
For additional commands, e-mail: tuscany-dev-help@ws.apache.org


Re: [jira] Commented: (TUSCANY-767) NPE in CompositeReference.java when service is defined using interface wsdl

Posted by Jim Marino <jm...@myromatours.com>.
On Oct 2, 2006, at 4:26 PM, Jeremy Boynes wrote:

> On Oct 2, 2006, at 3:49 PM, Ignacio Silva-Lepe wrote:
>
>> Ah, if only test cases were that simple ... :-)
>>
If it isn't simple to unit test that generally indicates we have a  
broader problem - e.g. lack of separation of concerns.
>> As it turns out, CompositeReference (as an extension of  
>> ReferenceExtension) needs to pass a reference interface class to  
>> its parent ctor, which seems most appropriately obtained from the  
>> service contract it is given. This does not seem to be very  
>> generic, not mention the fact that ServiceContract is an abstract  
>> class, not an interface and not directly instantiable either, so  
>> the test case cannot be very generic either.
>>
>> So much for that, thoughts?
>
> Use a private inner class to mock out ServiceContract? Use EasyMock  
> class extension to generate a instantiable version of  
> ServiceContract? Make ServiceContract an interface?
>
Probably should use the inner class approach but I've also found  
EasyMock to be useful in mocking out classes as well through its  
extension package.
> But more fundamentally, why does ReferenceExtension need a Java  
> interface class - shouldn't it be using a ServiceContract?
Yea this seems a bit strange. It should only require one when  
generating proxies.
>
> --
> Jeremy
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: tuscany-dev-unsubscribe@ws.apache.org
> For additional commands, e-mail: tuscany-dev-help@ws.apache.org
>


---------------------------------------------------------------------
To unsubscribe, e-mail: tuscany-dev-unsubscribe@ws.apache.org
For additional commands, e-mail: tuscany-dev-help@ws.apache.org


Re: [jira] Commented: (TUSCANY-767) NPE in CompositeReference.java when service is defined using interface wsdl

Posted by Jeremy Boynes <jb...@apache.org>.
On Oct 2, 2006, at 3:49 PM, Ignacio Silva-Lepe wrote:

> Ah, if only test cases were that simple ... :-)
>
> As it turns out, CompositeReference (as an extension of  
> ReferenceExtension) needs to pass a reference interface class to  
> its parent ctor, which seems most appropriately obtained from the  
> service contract it is given. This does not seem to be very  
> generic, not mention the fact that ServiceContract is an abstract  
> class, not an interface and not directly instantiable either, so  
> the test case cannot be very generic either.
>
> So much for that, thoughts?

Use a private inner class to mock out ServiceContract? Use EasyMock  
class extension to generate a instantiable version of  
ServiceContract? Make ServiceContract an interface?

But more fundamentally, why does ReferenceExtension need a Java  
interface class - shouldn't it be using a ServiceContract?

--
Jeremy


---------------------------------------------------------------------
To unsubscribe, e-mail: tuscany-dev-unsubscribe@ws.apache.org
For additional commands, e-mail: tuscany-dev-help@ws.apache.org


Re: [jira] Commented: (TUSCANY-767) NPE in CompositeReference.java when service is defined using interface wsdl

Posted by Ignacio Silva-Lepe <is...@verizon.net>.
Ah, if only test cases were that simple ... :-)

As it turns out, CompositeReference (as an extension of ReferenceExtension) 
needs to pass a reference interface class to its parent ctor, which seems 
most appropriately obtained from the service contract it is given. This does 
not seem to be very generic, not mention the fact that ServiceContract is an 
abstract class, not an interface and not directly instantiable either, so 
the test case cannot be very generic either.

So much for that, thoughts?

----- Original Message ----- 
From: "Jim Marino (JIRA)" <tu...@ws.apache.org>
To: <tu...@ws.apache.org>
Sent: Monday, October 02, 2006 4:48 PM
Subject: [jira] Commented: (TUSCANY-767) NPE in CompositeReference.java when 
service is defined using interface wsdl


>    [ 
> http://issues.apache.org/jira/browse/TUSCANY-767?page=comments#action_12439312 ]
>
> Jim Marino commented on TUSCANY-767:
> ------------------------------------
>
> Ignacio was going to add some testcases to verify behavior and I'll apply.
>
>> NPE in CompositeReference.java when service is defined using interface 
>> wsdl
>> ---------------------------------------------------------------------------
>>
>>                 Key: TUSCANY-767
>>                 URL: http://issues.apache.org/jira/browse/TUSCANY-767
>>             Project: Tuscany
>>          Issue Type: Bug
>>          Components: Java SCA Core
>>    Affects Versions: Java-M2
>>            Reporter: Rick Rineholt
>>         Assigned To: Jim Marino
>>            Priority: Blocker
>>             Fix For: Java-M2
>>
>>         Attachments: OperationInvocationHandlers.patch
>>
>>
>> If a service is defined using interface wsdl the service contract does 
>> not have an interface class this results in 
>> org.apache.tuscany.core.implementation.composite.CompositeReference 
>> getting an NPE.
>
> -- 
> 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: tuscany-dev-unsubscribe@ws.apache.org
> For additional commands, e-mail: tuscany-dev-help@ws.apache.org
>
> 



---------------------------------------------------------------------
To unsubscribe, e-mail: tuscany-dev-unsubscribe@ws.apache.org
For additional commands, e-mail: tuscany-dev-help@ws.apache.org