Sebastián, unfortunately callbacks for web clients is not done yet,
(the doc page you reference has two comments about this, one saying -
"The following on Web 2.0 callbacks is not yet fully implemented,
describing here to encourage feedback "). I'd really like to get it
done as it seems like a vastly simpler approach than most other Web
2.0 toolkits have for handling comet operations, but its had to take a
lower priority than the current Tuscany work bringing up the OASIS
spec support. Do tell me more about what you're doing and it might
encourage me/anyoneelse to help finish it sooner.

   ...ant

2009/10/23 Sebastián Groh <sebastiang...@gmail.com>:
> Hello,
>             I'm having problems tring to start my tomcat server when I use
> implementation.web.
>
> I'm developing a webapp deployed over Tomcat 5.5 server.
> In my eclipse buildpath I have added all jars included in release of
> tuscany-sca-1.5/lib.
>
> My composite is similar to the example showed in
> http://tuscany.apache.org/sca-java-implementationweb.html (links to examples
> not works. ie:
> https://svn.apache.org/repos/asf/tuscany/java/sca/samples/helloworld-web-callback/
> . Where are the correct links?)
>
> <component name="WebClient">
>    <implementation.web web-uri=""/>
>    <reference name="service" target="HelloworldService">
>        <tuscany:binding.dwr />
>        <callback>
>            <tuscany:binding.dwr />
>        </callback>
>    </reference>
> </component>
>
> and my implementation is:
>
> <html>
>  <head>
>
>    <script type="text/javascript"
> src="org.osoa.sca.componentContext.js"></script>
>
>    <script language="JavaScript">
>
>       componentContext.getService("service").sayHelloCallback =
>          function(reply) {
>             document.getElementById('result').innerHTML=reply;
>          };
>
>       function callSayHello() {
>
>  componentContext.getService("service").sayHello(document.getElementById('name').value);
>       }
>
>    </script>
>
>  </head>
>  <body >
>
>    . . .
>
>     <input type="text" id="name" width="10">
>
>     <button name="submit" onclick="callSayHello()">Say hello</button>
>
>     <div id='result'></div>
>
>    . . .
>
>  </body>
> </html>
>
> The problems are:
> Problem 1) When I start tomcat the log shows:
>
> 22/10/2009 23:21:05
> org.apache.tuscany.sca.contribution.processor.ExtensibleStAXArtifactProcessor
> read
> ADVERTENCIA: Element {http://www.osoa.org/xmlns/sca/1.0}implementation.web
> cannot be processed. ([row,col {unknown-source}]: [3,5])
> 22/10/2009 23:21:05
> org.apache.tuscany.sca.contribution.processor.ExtensibleStAXArtifactProcessor
> ADVERTENCIA: Element {http://www.osoa.org/xmlns/sca/1.0}implementation.web
> cannot be processed. ([row,col {unknown-source}]: [3,5])
> 22/10/2009 23:21:05
> org.apache.tuscany.sca.contribution.processor.ValidatingXMLStreamReader
> GRAVE: XMLSchema validation error occured in: null ,line = 6, column = 5,
> Message = cvc-complex-type.2.4.a: Invalid content was found starting with
> element 'sca:binding.dwr'. One of
> '{"http://www.osoa.org/xmlns/sca/1.0":interface,
> "http://www.osoa.org/xmlns/sca/1.0":operation,
> "http://www.osoa.org/xmlns/sca/1.0":binding,
> WC[##other:"http://www.osoa.org/xmlns/sca/1.0";],
> "http://www.osoa.org/xmlns/sca/1.0":callback}' is expected.
> 22/10/2009 23:21:05
> org.apache.tuscany.sca.contribution.processor.ExtensibleStAXArtifactProcessor
> read
> ADVERTENCIA: Element {http://www.osoa.org/xmlns/sca/1.0}binding.dwr cannot
> be processed. ([row,col {unknown-source}]: [6,5])
> 22/10/2009 23:21:05
> org.apache.tuscany.sca.contribution.processor.ExtensibleStAXArtifactProcessor
> ADVERTENCIA: Element {http://www.osoa.org/xmlns/sca/1.0}binding.dwr cannot
> be processed. ([row,col {unknown-source}]: [6,5])
> 22/10/2009 23:21:05
> org.apache.tuscany.sca.contribution.processor.ExtensibleStAXArtifactProcessor
> read
> ADVERTENCIA: Element callback cannot be processed. ([row,col
> {unknown-source}]: [7,9])
> 22/10/2009 23:21:05
> org.apache.tuscany.sca.contribution.processor.ExtensibleStAXArtifactProcessor
> ADVERTENCIA: Element callback cannot be processed. ([row,col
> {unknown-source}]: [7,9])
> 22/10/2009 23:21:05
> org.apache.tuscany.sca.contribution.processor.ValidatingXMLStreamReader
> GRAVE: XMLSchema validation error occured in: null ,line = 18, column = 5,
> Message = UndeclaredPrefix: Cannot resolve 'federation:federacion' as a
> QName: the prefix 'federation' is not declared.
> 22/10/2009 23:21:05
> org.apache.tuscany.sca.contribution.processor.ValidatingXMLStreamReader
> GRAVE: XMLSchema validation error occured in: null ,line = 18, column = 5,
> Message = cvc-attribute.3: The value 'federation:federacion' of attribute
> 'name' on element 'sca:implementation.composite' is not valid with respect
> to its type, 'QName'.
> 22/10/2009 23:21:05
> org.apache.tuscany.sca.contribution.processor.ExtensibleStAXArtifactProcessor
> read
> ADVERTENCIA: Element {http://www.osoa.org/xmlns/sca/1.0}implementation.web
> cannot be processed. ([row,col {unknown-source}]: [3,5])
> 22/10/2009 23:21:05
> org.apache.tuscany.sca.contribution.processor.ExtensibleStAXArtifactProcessor
> ADVERTENCIA: Element {http://www.osoa.org/xmlns/sca/1.0}implementation.web
> cannot be processed. ([row,col {unknown-source}]: [3,5])
> 22/10/2009 23:21:05
> org.apache.tuscany.sca.contribution.processor.ValidatingXMLStreamReader
> GRAVE: XMLSchema validation error occured in: null ,line = 6, column = 5,
> Message = cvc-complex-type.2.4.a: Invalid content was found starting with
> element 'sca:binding.dwr'. One of
> '{"http://www.osoa.org/xmlns/sca/1.0":interface,
> "http://www.osoa.org/xmlns/sca/1.0":operation,
> "http://www.osoa.org/xmlns/sca/1.0":binding,
> WC[##other:"http://www.osoa.org/xmlns/sca/1.0";],
> "http://www.osoa.org/xmlns/sca/1.0":callback}' is expected.
> 22/10/2009 23:21:05
> org.apache.tuscany.sca.contribution.processor.ExtensibleStAXArtifactProcessor
> read
> ADVERTENCIA: Element {http://www.osoa.org/xmlns/sca/1.0}binding.dwr cannot
> be processed. ([row,col {unknown-source}]: [6,5])
> 22/10/2009 23:21:05
> org.apache.tuscany.sca.contribution.processor.ExtensibleStAXArtifactProcessor
> ADVERTENCIA: Element {http://www.osoa.org/xmlns/sca/1.0}binding.dwr cannot
> be processed. ([row,col {unknown-source}]: [6,5])
> 22/10/2009 23:21:05
> org.apache.tuscany.sca.contribution.processor.ExtensibleStAXArtifactProcessor
> read
> ADVERTENCIA: Element callback cannot be processed. ([row,col
> {unknown-source}]: [7,9])
> 22/10/2009 23:21:05
> org.apache.tuscany.sca.contribution.processor.ExtensibleStAXArtifactProcessor
> ADVERTENCIA: Element callback cannot be processed. ([row,col
> {unknown-source}]: [7,9])
> 22/10/2009 23:21:05
> org.apache.tuscany.sca.contribution.processor.ValidatingXMLStreamReader
> .
> .
> .
>
>
> Problem 2)
> When the page is loaded in the browser and the onclick fires the event I'm
> having the error (In error console):
> Error: componentContext is not defined
> This can be solved resolving problem 1?
>
> Any in this list solved this problems?
> Regards,
>
>                      Sebastián
>

Reply via email to