Hi,

I thought that my problems are over, but unfortunately I still have a problem 
to connect client web page with tuscany web server. I did everything as you 
suggested but I firebug gives an error 404 method not found message.

This is code integrated in web page:
$(document).ready(function(){
         
$.getJSON("http://ZoranPC:8080/CreateLearningGoalsService/getServiceTest";); 
 });

This is the content of the composite file:

<?xml version="1.0" encoding="UTF-8"?>

           xmlns:tuscany="http://tuscany.apache.org/xmlns/sca/1.1";
name="lpc" 
targetNamespace="http://eclipse.org/intelleo-LPC/src/org/intelleo/ws/lpc";>
  <component name="CreateLearningGoalsServiceComponent">
    <implementation.java 
class="org.intelleo.ws.lpc.impl.CreateLearningGoalsImpl"/>
    <reference name="availableCompetencesService" 
target="AvailableCompetencesComponent/AvailableCompetencesService"/>
    <service name="CreateLearningGoalsService">
      <interface.java 
interface="org.intelleo.ws.lpc.interfaces.CreateLearningGoalsService">
           <tuscany:binding.jsonrpc/>
      </interface.java>
    </service>
  </component>
  <component name="AvailableCompetencesComponent">
    <implementation.java 
class="org.intelleo.ws.lpc.impl.AvailableCompetencesImpl"/>
    <service name="AvailableCompetencesService">
      <interface.java 
interface="org.intelleo.ws.lpc.interfaces.AvailableCompetencesService"/>
    </service>
  </component> 
   <service name="CreateLearningGoalsService" 
promote="CreateLearningGoalsServiceComponent/CreateLearningGoalsService">
    <interface.java 
interface="org.intelleo.ws.lpc.interfaces.CreateLearningGoalsService"/>
    <tuscany:binding.jsonrpc/>
  </service> 
</composite>

CreateLearningGoalsService class defines two methods:

@Callback
   String getAvailableCompetences(String sortingCriteria);
   void getServiceTest();


This is what I get on eclipse console after starting a server application:

Starting of the SCA IntelLEO Web service Application exposed as JSONP 
Services...
Mar 13, 2010 7:59:03 PM org.apache.tuscany.sca.node.impl.NodeImpl start
INFO: Starting node: http://tuscany.apache.org/sca/1.1/nodes/default0 domain: 
default
Mar 13, 2010 7:59:03 PM org.apache.tuscany.sca.node.impl.NodeFactoryImpl 
loadContributions
INFO: Loading contribution: 
file:/F:/source%20folder/IntelLEO%202/intelleo_lpc_ws/target/classes/
Mar 13, 2010 7:59:05 PM org.mortbay.log.Slf4jLog info
INFO: Logging to org.slf4j.impl.JDK14LoggerAdapter(org.mortbay.log) via 
org.mortbay.log.Slf4jLog
- Deploying module: rampart-1.4 - 
jar:file:/F:/source%20folder/tuscany-sca-2.0-SNAPSHOT/modules/tuscany-binding-ws-runtime-axis2-2.0-SNAPSHOT.jar!/org/apache/tuscany/sca/binding/ws/axis2/engine/repository/modules/rampart-1.4.mar
Mar 13, 2010 7:59:05 PM org.apache.tuscany.sca.http.jetty.JettyLogger info
INFO: jetty-6.1.19
Mar 13, 2010 7:59:05 PM org.apache.tuscany.sca.http.jetty.JettyLogger info
INFO: Started [email protected]:8080
Mar 13, 2010 7:59:05 PM org.apache.tuscany.sca.http.jetty.JettyServer 
addServletMapping
INFO: Added Servlet mapping: 
http://ZoranPC:8080/CreateLearningGoalsServiceComponent/CreateLearningGoalsService
Mar 13, 2010 7:59:05 PM 
org.apache.tuscany.sca.core.assembly.impl.EndpointRegistryImpl addEndpoint
INFO: Add endpoint - (@22834317)Endpoint:  URI = 
CreateLearningGoalsServiceComponent#service-binding(CreateLearningGoalsService/CreateLearningGoalsService)
- Deploying module: rampart-1.4 - 
jar:file:/F:/source%20folder/tuscany-sca-2.0-SNAPSHOT/modules/tuscany-binding-ws-runtime-axis2-2.0-SNAPSHOT.jar!/org/apache/tuscany/sca/binding/ws/axis2/engine/repository/modules/rampart-1.4.mar
Mar 13, 2010 7:59:05 PM org.apache.tuscany.sca.http.jetty.JettyServer 
addServletMapping
INFO: Added Servlet mapping: 
http://ZoranPC:8080/AvailableCompetencesComponent/AvailableCompetencesService
Mar 13, 2010 7:59:05 PM 
org.apache.tuscany.sca.core.assembly.impl.EndpointRegistryImpl addEndpoint
INFO: Add endpoint - (@18088644)Endpoint:  URI = 
AvailableCompetencesComponent#service-binding(AvailableCompetencesService/AvailableCompetencesService)
... Press Enter to Exit...

I don't know if the problem is in not accessible services here or I'm using a 
wrong URL here.
Zoran





________________________________
From: Luciano Resende <[email protected]>
To: [email protected]
Sent: Sat, March 13, 2010 1:49:38 AM
Subject: Re: javascript client

On Fri, Mar 12, 2010 at 3:11 PM, Zoran Jeremic <[email protected]> wrote:
> I still have the same error with the code you sent to me. I have installed
> maven2 plugin for eclipse and when running project with it, the following
> error is displayed:
>
> [INFO] Scanning for projects...
> [ERROR] The build could not read 1 project -> [Help 1]
> [ERROR]   The project
> org.apache.tuscany.sca:sample-intelleo-lpc:2.0-SNAPSHOT (F:\source
> folder\IntelLEO 2\intelleo_lpc\pom.xml) has 1 error
> [ERROR]     Non-resolvable parent POM
> org.apache.tuscany.sca:tuscany-sca:2.0-SNAPSHOT for
> org.apache.tuscany.sca:sample-intelleo-lpc:2.0-SNAPSHOT: Failed to resolve
> POM for org.apache.tuscany.sca:tuscany-sca:2.0-SNAPSHOT due to Missing:
> ----------
> 1) org.apache.tuscany.sca:tuscany-sca:pom:2.0-SNAPSHOT
> ----------
> 1 required artifact is missing.
>
> for artifact:
>   org.apache.tuscany.sca:tuscany-sca:pom:2.0-SNAPSHOT

You would need to first checkout 2.x source and build

svn co https://svn.apache.org/repos/asf/tuscany/sca-java-2.x/trunk/ java-sca-2.x
cd java-sca-2.x
mvn -N clean install
cd modules
mvn -fae clean install

then go to the project i sent you (the webapp one)
and try

mvn clean install

More details at
http://cwiki.apache.org/confluence/display/TUSCANYxDOCx2x/SCA+Java+Development+Guide


-- 
Luciano Resende
http://people.apache.org/~lresende
http://twitter.com/lresende1975
http://lresende.blogspot.com/



      

Reply via email to