What happens if you change the example a little bit to:
<component name="CalculatorServiceComponent">
<implementation.java class="calculator.CalculatorServiceImpl"/>
<reference name="addService" target="AddServiceComponent" />
<reference name="subtractService" target="SubtractServiceComponent" />
<reference name="multiplyService" target="MultiplyServiceComponent">
<interface.java interface="calculator.MultiplyService" />
<binding.ws
wsdlElement="http://calculator#wsdl.binding(MultiplySoapBinding)"/>
</reference>
<reference name="divideService" target="DivideServiceComponent" />
</component>
<component name="MultiplyServiceComponent">
<implementation.java class="calculator.MultiplyServiceImpl" />
<service>
<interface.java interface="calculator.MultiplyService" />
<binding.ws
wsdlElement="http://calculator#wsdl.port(MultiplySoapPort)"/>
</service>
</component>
I believe this is valid according to the spec. Does it work?
Simon
gengshaoguang (JIRA) wrote:
[ https://issues.apache.org/jira/browse/TUSCANY-1526?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12518963 ]
gengshaoguang commented on TUSCANY-1526:
----------------------------------------
I read SCA_WebServiceBinding_V100 again, I think there might miss some restrictions
againse "cross reference" like you mentioned here.
I agree with you.
For the time being, we need to document it as a poor practise.
Trying to wire a non-wireable binding should fal gracefully
-----------------------------------------------------------
Key: TUSCANY-1526
URL: https://issues.apache.org/jira/browse/TUSCANY-1526
Project: Tuscany
Issue Type: Bug
Components: Java SCA Core Runtime
Environment: All
Reporter: Simon Laws
Priority: Minor
If I do something like
<component name="CalculatorServiceComponent">
<implementation.java class="calculator.CalculatorServiceImpl"/>
<reference name="addService" target="AddServiceComponent" />
<reference name="subtractService" target="SubtractServiceComponent" />
<reference name="multiplyService" target="MultiplyServiceComponent">
<interface.java interface="calculator.MultiplyService" />
<binding.ws wsdlElement="http://calculator#wsdl.binding(MultiplySoapBinding)"/>
</reference>
<reference name="divideService" target="DivideServiceComponent" />
</component>
<component name="MultiplyServiceComponent">
<implementation.java class="calculator.MultiplyServiceImpl" />
<service>
<interface.java interface="calculator.MultiplyService" />
<binding.ws wsdlElement="http://calculator#wsdl.binding(MultiplySoapBinding)"/>
</service>
</component>
I belive it should tell me that I'm trying to wire the mutiplyService reference up with a binding that is not wireable. Currently it fails in the axis2 binding URL handling code with an NPE.
The runtime should just not load the contribution. I guess we could get smarter and introduce a wireable binding but we would be trying to second guess the deployers orignal intention which I don't think is a good idea.
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]