You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@tuscany.apache.org by kelvin goodson <kg...@thegoodsons.org.uk> on 2010/02/25 18:29:55 UTC

store webapp sample

I'm trying to run the store webapp sample,  and made a few fixups
which I committed. but I'm currently seeing a message "dojo" is not
defined" in firebug when I navigate to
http://localhost:8080/sample-store-webapp .  I fixed a similar problem
with "tuscany is not defined" by changing the script inclusion for
store.js to "/sample-webapp-store/store.js" in store.html, and the
current committed store.html has dojo.js included in a similar path
(attempting to fix this by symmetry with the previous fix), but alas I
don't seem to be able to include the dojo.js script.

I've been blundering around in a browser trying to guess where dojo.js
might be found, but as yet no joy.

Can anyone help me pin this down please?

Kelvin.

Re: store webapp sample

Posted by Simon Laws <si...@googlemail.com>.
Ah I see so the resources are being provided on the wrong URL. So
we've broken something somewhere.

Simon

Re: store webapp sample

Posted by Luciano Resende <lu...@gmail.com>.
On Fri, Feb 26, 2010 at 8:48 AM, kelvin goodson <ke...@gmail.com> wrote:
> If I put http://localhost:8080/sample-jagg-webapp/?smd into the
> browser I see the basic HTML of the webapp being displayed and I see
> two "gets", one for dojo.js and one for plan.js.  This doesnt seem to
> be any different behaviour from the variant of the url without ?smd
>
> Kelvin.
>
>
> On Fri, Feb 26, 2010 at 4:40 PM, Simon Laws <si...@googlemail.com> wrote:
>> Is the smd being pulled back from the service? Not 100% sure here but
>> I'm assuming the client side still needs the smd description in order
>> to understand the jsonrpc version of the service interface. You can
>> try adding ?smd to the end of the service URL that is registered with
>> the webapp container. Assuming this is available do you see this being
>> pulled by the browser?
>>
>> Simon
>>
>

In the case of Store webapp, the smd is available from
http://localhost:8080/sample-store-webapp/Catalog?smd

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

Re: store webapp sample

Posted by kelvin goodson <ke...@gmail.com>.
If I put http://localhost:8080/sample-jagg-webapp/?smd into the
browser I see the basic HTML of the webapp being displayed and I see
two "gets", one for dojo.js and one for plan.js.  This doesnt seem to
be any different behaviour from the variant of the url without ?smd

Kelvin.


On Fri, Feb 26, 2010 at 4:40 PM, Simon Laws <si...@googlemail.com> wrote:
> Is the smd being pulled back from the service? Not 100% sure here but
> I'm assuming the client side still needs the smd description in order
> to understand the jsonrpc version of the service interface. You can
> try adding ?smd to the end of the service URL that is registered with
> the webapp container. Assuming this is available do you see this being
> pulled by the browser?
>
> Simon
>

Re: store webapp sample

Posted by Simon Laws <si...@googlemail.com>.
Is the smd being pulled back from the service? Not 100% sure here but
I'm assuming the client side still needs the smd description in order
to understand the jsonrpc version of the service interface. You can
try adding ?smd to the end of the service URL that is registered with
the webapp container. Assuming this is available do you see this being
pulled by the browser?

Simon

Re: store webapp sample

Posted by kelvin goodson <ke...@gmail.com>.
After getting to the point reported above with the sample store
webapp, I switched attention back to my own app [1], based on that
sample.  I have now reached the same point in my app as I had with the
store webapp sample,  in this case, instead of reporting catalog.get()
is not a function I see the analagous planView.getLite() is not a
function.

My suspicions are aroused by hovering over the catalog or planView
objects in firebug, and I see the declared class of these objects to
be "dojo.rpc.JsonService";  I'm not sure if this is right.  Can anyone
throw any light on this please?

Kelvin.

[1] http://svn.apache.org/viewvc/tuscany/sandbox/kgoodson/jagg-webapp/ and
     http://svn.apache.org/viewvc/tuscany/sandbox/kgoodson/jagg-logic/

On Fri, Feb 26, 2010 at 11:23 AM, kelvin goodson
<ke...@gmail.com> wrote:
> Luciano,
>
>  I've certainly been able to progress after your changes.  However,
> currently I'm seeing "catalog.get" is not a function from Firebug on
> line 127 of the store.html script.
>
> Kelvin.
>
>
>
> On Fri, Feb 26, 2010 at 12:59 AM, Luciano Resende <lu...@gmail.com> wrote:
>> On Thu, Feb 25, 2010 at 9:29 AM, kelvin goodson <kg...@thegoodsons.org.uk> wrote:
>>> I'm trying to run the store webapp sample,  and made a few fixups
>>> which I committed. but I'm currently seeing a message "dojo" is not
>>> defined" in firebug when I navigate to
>>> http://localhost:8080/sample-store-webapp .  I fixed a similar problem
>>> with "tuscany is not defined" by changing the script inclusion for
>>> store.js to "/sample-webapp-store/store.js" in store.html, and the
>>> current committed store.html has dojo.js included in a similar path
>>> (attempting to fix this by symmetry with the previous fix), but alas I
>>> don't seem to be able to include the dojo.js script.
>>>
>>> I've been blundering around in a browser trying to guess where dojo.js
>>> might be found, but as yet no joy.
>>>
>>> Can anyone help me pin this down please?
>>>
>>
>> In your scenario, where the application does not provide the dojo
>> resources we are going to use the ones from within the
>> web-javascript-dojo module and there was an issue on how we were
>> trying to serve dojo resources from DojoResourceServlet (basically not
>> considering contextRoot when in a web application server).
>>
>> Having said that, I would like to remove your changes from revision
>> #916355, and fix the runtime to allow this to work in both embedded
>> and hosted environment more transparently.
>>
>> Note that after my changes, there is still one issue, which seems to
>> be related to host-webapp changing the contextPath and that seems to
>> make the tuscany widget miss behave as it was trying to reach the
>> initial registered endpoint based on the binding-uri... hope this gets
>> you going... and I can check this further tomorrow...
>>
>>
>> --
>> Luciano Resende
>> http://people.apache.org/~lresende
>> http://twitter.com/lresende1975
>> http://lresende.blogspot.com/
>>
>

Re: store webapp sample

Posted by kelvin goodson <ke...@gmail.com>.
Thanks Luciano,  I'm not sure if I can be of help progressing this at
this point, but if there's anything I can do please let me know.

On Fri, Feb 26, 2010 at 4:49 PM, Luciano Resende <lu...@gmail.com> wrote:
> On Fri, Feb 26, 2010 at 3:23 AM, kelvin goodson <ke...@gmail.com> wrote:
>> Luciano,
>>
>>  I've certainly been able to progress after your changes.  However,
>> currently I'm seeing "catalog.get" is not a function from Firebug on
>> line 127 of the store.html script.
>>
>> Kelvin.
>>
>
> Yes, this is the same issue I'm seeing, and here is my current
> understanding of the problem...
>
> 1) We registered the services as /Catalog
> 2) We generate store.js pointing to /Catalog
> 3) Runtime (host-webapp) gets called to update all registered services
> to contextRoot/Catalog
>
> Then, during invocation, we try to access /Catalog and fails with
> 404.... as it is now set as contextRoot/Catalog...
> Although I know what is causing the problem is... I'm still
> investigating what the proper definitive solution should be... as this
> issue has come in the past [1][2] and it seemed to have regressed
> again.
>
>
> [1] http://www.mail-archive.com/dev@tuscany.apache.org/msg10134.html
> [2] http://www.mail-archive.com/dev@tuscany.apache.org/msg10284.html
>
> --
> Luciano Resende
> http://people.apache.org/~lresende
> http://twitter.com/lresende1975
> http://lresende.blogspot.com/
>

Re: store webapp sample

Posted by Luciano Resende <lu...@gmail.com>.
On Fri, Feb 26, 2010 at 3:23 AM, kelvin goodson <ke...@gmail.com> wrote:
> Luciano,
>
>  I've certainly been able to progress after your changes.  However,
> currently I'm seeing "catalog.get" is not a function from Firebug on
> line 127 of the store.html script.
>
> Kelvin.
>

Yes, this is the same issue I'm seeing, and here is my current
understanding of the problem...

1) We registered the services as /Catalog
2) We generate store.js pointing to /Catalog
3) Runtime (host-webapp) gets called to update all registered services
to contextRoot/Catalog

Then, during invocation, we try to access /Catalog and fails with
404.... as it is now set as contextRoot/Catalog...
Although I know what is causing the problem is... I'm still
investigating what the proper definitive solution should be... as this
issue has come in the past [1][2] and it seemed to have regressed
again.


[1] http://www.mail-archive.com/dev@tuscany.apache.org/msg10134.html
[2] http://www.mail-archive.com/dev@tuscany.apache.org/msg10284.html

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

Re: store webapp sample

Posted by kelvin goodson <ke...@gmail.com>.
Luciano,

  I've certainly been able to progress after your changes.  However,
currently I'm seeing "catalog.get" is not a function from Firebug on
line 127 of the store.html script.

Kelvin.



On Fri, Feb 26, 2010 at 12:59 AM, Luciano Resende <lu...@gmail.com> wrote:
> On Thu, Feb 25, 2010 at 9:29 AM, kelvin goodson <kg...@thegoodsons.org.uk> wrote:
>> I'm trying to run the store webapp sample,  and made a few fixups
>> which I committed. but I'm currently seeing a message "dojo" is not
>> defined" in firebug when I navigate to
>> http://localhost:8080/sample-store-webapp .  I fixed a similar problem
>> with "tuscany is not defined" by changing the script inclusion for
>> store.js to "/sample-webapp-store/store.js" in store.html, and the
>> current committed store.html has dojo.js included in a similar path
>> (attempting to fix this by symmetry with the previous fix), but alas I
>> don't seem to be able to include the dojo.js script.
>>
>> I've been blundering around in a browser trying to guess where dojo.js
>> might be found, but as yet no joy.
>>
>> Can anyone help me pin this down please?
>>
>
> In your scenario, where the application does not provide the dojo
> resources we are going to use the ones from within the
> web-javascript-dojo module and there was an issue on how we were
> trying to serve dojo resources from DojoResourceServlet (basically not
> considering contextRoot when in a web application server).
>
> Having said that, I would like to remove your changes from revision
> #916355, and fix the runtime to allow this to work in both embedded
> and hosted environment more transparently.
>
> Note that after my changes, there is still one issue, which seems to
> be related to host-webapp changing the contextPath and that seems to
> make the tuscany widget miss behave as it was trying to reach the
> initial registered endpoint based on the binding-uri... hope this gets
> you going... and I can check this further tomorrow...
>
>
> --
> Luciano Resende
> http://people.apache.org/~lresende
> http://twitter.com/lresende1975
> http://lresende.blogspot.com/
>

Re: store webapp sample

Posted by kelvin goodson <ke...@gmail.com>.
Thanks Luciano,  and I'm more than happy for my changes to be
substituted.  I'll take another look at this in the light of your
comments.

Regards, KElvin.

On Fri, Feb 26, 2010 at 12:59 AM, Luciano Resende <lu...@gmail.com> wrote:
> On Thu, Feb 25, 2010 at 9:29 AM, kelvin goodson <kg...@thegoodsons.org.uk> wrote:
>> I'm trying to run the store webapp sample,  and made a few fixups
>> which I committed. but I'm currently seeing a message "dojo" is not
>> defined" in firebug when I navigate to
>> http://localhost:8080/sample-store-webapp .  I fixed a similar problem
>> with "tuscany is not defined" by changing the script inclusion for
>> store.js to "/sample-webapp-store/store.js" in store.html, and the
>> current committed store.html has dojo.js included in a similar path
>> (attempting to fix this by symmetry with the previous fix), but alas I
>> don't seem to be able to include the dojo.js script.
>>
>> I've been blundering around in a browser trying to guess where dojo.js
>> might be found, but as yet no joy.
>>
>> Can anyone help me pin this down please?
>>
>
> In your scenario, where the application does not provide the dojo
> resources we are going to use the ones from within the
> web-javascript-dojo module and there was an issue on how we were
> trying to serve dojo resources from DojoResourceServlet (basically not
> considering contextRoot when in a web application server).
>
> Having said that, I would like to remove your changes from revision
> #916355, and fix the runtime to allow this to work in both embedded
> and hosted environment more transparently.
>
> Note that after my changes, there is still one issue, which seems to
> be related to host-webapp changing the contextPath and that seems to
> make the tuscany widget miss behave as it was trying to reach the
> initial registered endpoint based on the binding-uri... hope this gets
> you going... and I can check this further tomorrow...
>
>
> --
> Luciano Resende
> http://people.apache.org/~lresende
> http://twitter.com/lresende1975
> http://lresende.blogspot.com/
>

Re: store webapp sample

Posted by Luciano Resende <lu...@gmail.com>.
On Thu, Feb 25, 2010 at 9:29 AM, kelvin goodson <kg...@thegoodsons.org.uk> wrote:
> I'm trying to run the store webapp sample,  and made a few fixups
> which I committed. but I'm currently seeing a message "dojo" is not
> defined" in firebug when I navigate to
> http://localhost:8080/sample-store-webapp .  I fixed a similar problem
> with "tuscany is not defined" by changing the script inclusion for
> store.js to "/sample-webapp-store/store.js" in store.html, and the
> current committed store.html has dojo.js included in a similar path
> (attempting to fix this by symmetry with the previous fix), but alas I
> don't seem to be able to include the dojo.js script.
>
> I've been blundering around in a browser trying to guess where dojo.js
> might be found, but as yet no joy.
>
> Can anyone help me pin this down please?
>

In your scenario, where the application does not provide the dojo
resources we are going to use the ones from within the
web-javascript-dojo module and there was an issue on how we were
trying to serve dojo resources from DojoResourceServlet (basically not
considering contextRoot when in a web application server).

Having said that, I would like to remove your changes from revision
#916355, and fix the runtime to allow this to work in both embedded
and hosted environment more transparently.

Note that after my changes, there is still one issue, which seems to
be related to host-webapp changing the contextPath and that seems to
make the tuscany widget miss behave as it was trying to reach the
initial registered endpoint based on the binding-uri... hope this gets
you going... and I can check this further tomorrow...


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

Re: store webapp sample

Posted by kelvin goodson <ke...@gmail.com>.
Hi Abraham

many thanks for your response.  You can see the sample codes structure at
[1].  As alluded to by Luciano in his response to my post, the inclusion of
the dojo script is done for me by some part of the tuscany infrastructure
that I haven't quite fathomed yet.  You can see the import of the dojo
script at [2], but I see that Luciano made a change to this file yesterday,
after my post, so I'll go look at that with keen interest and report back.

Regards

Kelvin.


[1]
http://svn.apache.org/viewvc/tuscany/sca-java-2.x/trunk/samples/store-webapp/
[2] http://svn.apache.org/viewvc?view=revision&revision=916537

On Thu, Feb 25, 2010 at 6:22 PM, Abraham G Guerra <ag...@us.ibm.com>wrote:

> what does the directory structure for your project look like? In
> particular, where is the dojo dir? Can you paste the import command for
> dojo.js within store.html
>
>
> Regards,
> *
> Abraham Guerra*
> Software Engineer, Innovation Initiatives, CIO Office
> Somers, NY 10589
> 914-766-3268 t/l 826-3268
>
>
>
> [image: Inactive hide details for kelvin goodson ---02/25/2010 12:30:51
> PM---I'm trying to run the store webapp sample, and made a few]kelvin
> goodson ---02/25/2010 12:30:51 PM---I'm trying to run the store webapp
> sample, and made a few fixups
>
>
>     *kelvin goodson <kg...@thegoodsons.org.uk>*
>             Sent by: kelvingoodson@gmail.com
>
>             02/25/2010 12:29 PM
>             Please respond to
>             user@tuscany.apache.org
>
>
>
> To
>
> user@tuscany.apache.org
> cc
>
>
> Subject
>
> store webapp sample
>
> I'm trying to run the store webapp sample,  and made a few fixups
> which I committed. but I'm currently seeing a message "dojo" is not
> defined" in firebug when I navigate to
> http://localhost:8080/sample-store-webapp .  I fixed a similar problem
> with "tuscany is not defined" by changing the script inclusion for
> store.js to "/sample-webapp-store/store.js" in store.html, and the
> current committed store.html has dojo.js included in a similar path
> (attempting to fix this by symmetry with the previous fix), but alas I
> don't seem to be able to include the dojo.js script.
>
> I've been blundering around in a browser trying to guess where dojo.js
> might be found, but as yet no joy.
>
> Can anyone help me pin this down please?
>
> Kelvin.
>
>

Re: store webapp sample

Posted by Abraham G Guerra <ag...@us.ibm.com>.
what does the directory structure for your project look like?  In
particular, where is the dojo dir?  Can you paste the import command for
dojo.js within store.html


Regards,

Abraham Guerra
Software Engineer, Innovation Initiatives, CIO Office
Somers, NY 10589
914-766-3268 t/l 826-3268




                                                                           
             kelvin goodson                                                
             <kg@thegoodsons.o                                             
             rg.uk>                                                     To 
             Sent by:                  user@tuscany.apache.org             
             kelvingoodson@gma                                          cc 
             il.com                                                        
                                                                   Subject 
                                       store webapp sample                 
             02/25/2010 12:29                                              
             PM                                                            
                                                                           
                                                                           
             Please respond to                                             
             user@tuscany.apac                                             
                  he.org                                                   
                                                                           
                                                                           




I'm trying to run the store webapp sample,  and made a few fixups
which I committed. but I'm currently seeing a message "dojo" is not
defined" in firebug when I navigate to
http://localhost:8080/sample-store-webapp, .  I fixed a similar problem
with "tuscany is not defined" by changing the script inclusion for
store.js to "/sample-webapp-store/store.js" in store.html, and the
current committed store.html has dojo.js included in a similar path
(attempting to fix this by symmetry with the previous fix), but alas I
don't seem to be able to include the dojo.js script.

I've been blundering around in a browser trying to guess where dojo.js
might be found, but as yet no joy.

Can anyone help me pin this down please?

Kelvin.