The Author Online Book Forums are Moving

The Author Online Book Forums will soon redirect to Manning's liveBook and liveVideo. All book forum content will migrate to liveBook's discussion forum and all video forum content will migrate to liveVideo. Log in to liveBook or liveVideo with your Manning credentials to join the discussion!

Thank you for your engagement in the AoF over the years! We look forward to offering you a more enhanced forum experience.

siamackj (32) [Avatar] Offline
#1
I am trying to move sample codes into RAD 7.5.2 IDE (chapter 1) using WAS 7.0.0.3 with SCA feature pack installed. However, Upon moving the client code, the following import statements are not found:

import org.apache.tuscany.sca.node.SCAClient;
import org.apache.tuscany.sca.node.SCANode;
import org.apache.tuscany.sca.node.SCANodeFactory;

Looking at server runtime jars, I see Tuscany-sca-api-1.3-SNAPSHOT.jar in there (though package names different). So I assume that IBM is using its own modified version of SCA. I was wondering if there are any docs on how to rewrite the client code using IBM software.

Anyways, IBM donated the software and IBMers are writing the book, so the least expected is to have the source code run on IBM software as well.
siamackj (32) [Avatar] Offline
#2
Re: SCA and RAD 7.5.2 and Websphere 7.0.0.3
Finally after almost a few hours of trying, I managed to run chapter1 sample. However, For testing, I was not able to use the client code provided. Instead, I added a webservice binding to "Trip" service in Trip component, and I then tested it with "Webservice" explorer.

In section 1.4.3, the diagram shows a "wire" between "Currency Converter Reference" and "Currency Converter Service". I do not see the wire in my diagram despite the fact that my TripComposite.composite.xml is almost identical to the one provided by source code. am I missing anything here? [below is my TripComposite.composite.xml]:

<?xml version="1.0" encoding="UTF-8"?>
<composite xmlns="http://www.osoa.org/xmlns/sca/1.0" autowire="false" name="TripComposite" targetNamespace="http://tuscanyscatours">
<component name="CurrencyConverterComponent">
<implementation.java class="currencyconverter.CurrencyConverterImpl"/>
<service name="CurrencyConverter">
<interface.java interface="currencyconverter.CurrencyConverter"/>
</service>
</component>
<component name="TripComponent">
<implementation.java class="trip.TripImpl"/>
<service name="Trip">
<interface.java interface="trip.Trip"/>
<binding.ws/>
</service>
<reference name="currencyConverter" target="CurrencyConverterComponent"/>
</component>
</composite>
simon.nash (37) [Avatar] Offline
#3
Re: SCA and RAD 7.5.2 and Websphere 7.0.0.3
There should be a wire there. Can you try changing the reference definition to:
<reference name="currencyConverter" target="CurrencyConverterComponent/CurrencyConverter"/>

This is equivalent in SCA terms, as the service name can be defaulted if there is only one service in the component. Perhaps the tool that is drawing your diagram does not realise this.
siamackj (32) [Avatar] Offline
#4
Re: SCA and RAD 7.5.2 and Websphere 7.0.0.3
Simon, thank you for your reply , I made the change and the wire is there now. I think you are right, the tool does not realize that when target is set to a component with one service.