See below.

  Simon

Simon Laws wrote:

On 8/10/07, Jean-Sebastien Delfino <[EMAIL PROTECTED]> wrote:

Simon Laws wrote:

On 8/10/07, Simon Nash <[EMAIL PROTECTED]> wrote:


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]

Having looked back at the spec I think both of these exampled should be


valid. I.e that the tuscany runtime should be able to workout what the
endpoint uri is based on the SCDL wiring. Does anyone have examples of
bindings that are explicitly not wireable in which case an error would

be

validly produced?

Simon



Sorry I'm having trouble understanding this. What's a "non-wireable"
binding? My understanding of the spec is:
- references can be wired
- they can use whatever binding they want
- bindings on both ends of a wire must match

I'm probably missing something but the initial snippet in TUSCANY-1526
looks valid to me and should work. If it doesn't it's a bug, which needs
to be fixed.

--
Jean-Sebastien


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

The wireable binding is something that appears in the code. I don't know

what it's for but the sca binding implements the interface and the web
service binding doesn't.

Looking at the spec we are agreeing that these cases should work so I'll
close this JIRA and open a new one against the fault (once I've got my build
back to the stage where I can try it again). But It would be useful to get
an explanation of what the
org.apache.tuscany.sca.assembly.WireableBindingis and under what
circumstances bindings do and don't implement it.

I have been intending to look into this myself, but I have been too
"heads down" on callbacks recently for this to get high enough up the
priority stack.  I am not convinced that we need this interface.
The names in the target attribute are just another way to specify URIs
for bindings.  I think we can handle all the valid cases by setting an
appropriate URI into the reference binding without the need for reference
bindings to be explicitly aware of their target SCA components, services,
and bindings.  Each cloned reference binding instance has its own runtime
wire, and this seems a suitable place to hold this additional information.

This is my impression at the moment without having looked in detail at
the places where WireableBinding is currently used.  There aren't very
many of them.

  Simon


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

Reply via email to