You are viewing a plain text version of this content. The canonical link for it is here.
Posted to solr-user@lucene.apache.org by Benson Margulies <bi...@gmail.com> on 2008/07/07 20:13:16 UTC

Re: js client

The Javascript should have the right URL automatically if you get it from
the ?js URL.

Anyway, I think I was the first person to say 'stupid' about that WSDL in
the sample.

I'm not at all clear on what you are doing at this point.

Please send along  the URL that works for you in soapUI and the URL that
works for you in the <script>...</script> element.




On Mon, Jul 7, 2008 at 5:54 AM, Christine Karman <ch...@christine.nl>
wrote:

> On Sun, 2008-07-06 at 10:25 -0400, Benson Margulies wrote:
> > In the sample, it is a relative URL to the web service endpoint. The
> > sample starts from a stupid WSDL with silly names for the service and
> > the port.
>
> I'm sorry about using the word "stupid".
>
> >
> > Take your endpoint deployment URL, the very URL that is logged when
> > your service starts up, and add ?js to the end of it. Period.
>
> Yes, that's what I do, and that part has been working all the time. What
> doesn't work is I use the same url without the ?js for the web service.
> Is there a way to see the Jetty log file? Mabye that will give me a clue
> what's happening. If nothing is in the jetty log file, I know the
> problem is elsewhere.
>
> Christine
>
> >
> > If it is
> >
> > http://wendy.christine.nl:9000/soap, make it
> >
> >  http://wendy.christine.nl:9000/soap?js
> >
> >
> >
> > The sample is taking advantage of relative URLs to avoid typing
> > http://etc.
> >
> > On Sun, Jul 6, 2008 at 8:52 AM, Christine Karman
> > <ch...@christine.nl> wrote:
> >         On Sun, 2008-07-06 at 07:37 -0400, Benson Margulies wrote:
> >         > The javascript client probably cannot handle redirects. If
> >         you are now
> >         > using ?js, you shouldn't need a redirect.
> >
> >
> >         well actually, the server redirect is similar to a rewrite. It
> >         makes /soap the same as /soap:9000. removing the redirect
> >         brings me back
> >         to the 650 error, "access to restricted uri denied".
> >
> >         What does the /Soap/SoapPort mean in the sample? how does that
> >         translate
> >         to my localhost:9000 or localhost/soap? (localhost ==
> >         wendy.christine.nl).
> >
> >         It's silly that creating the web service from my java code is
> >         so very
> >         simple, and that some stupid javascript code can't be
> >         persuaded to work
> >         properly :-)  I've done my part of javascript but I have never
> >         liked it.
> >
> >         CXF is really good. I was in a project a while ago where I
> >         suggested to
> >         use cxf, but someone who was supposed to have releavant
> >         experience
> >         insisted on using axis2. Took him a week to create some soap
> >         services.
> >         He had to remove all enums  and nested objects from the
> >         project because
> >         axis wouldn't support that. A friend of mine is using cxf in
> >         his project
> >         and he insisted I use it also.
> >
> >         Christine
> >
> >
> >         >
> >         > The browser allows an HTML page to load javascript from
> >         anywhere. Once
> >         > it has loaded javascript from a host:port, it will allow
> >         outbound
> >         > connections to that host:port.
> >         >
> >         > So, once you use src="...../?js" you should be set.
> >         >
> >         > The sample does not fully demonstrate this effect, since it
> >         has the
> >         > benefit of really  running the web service and the static
> >         HTML from
> >         > the very same host::port.
> >         >
> >         > In the past, before there was such a thing as the ?js URL,
> >         the
> >         > solution here was a reverse proxy instead of a redirect. You
> >         set up
> >         > URL rewriting in plain old Apache 2 so that xxx:9000 is
> >         transparently
> >         > available at xxx.
> >         >
> >         > I don't have my recipe for this available at home, if you're
> >         still
> >         > stuck tomorrow I can dig it out of my office.
> >         >
> >         >
> >         >
> >         >
> >         > On Sun, Jul 6, 2008 at 7:20 AM, Christine
> >         <ch...@christine.nl>
> >         > wrote:
> >         >         Benson,
> >         >         I'm still struggling. This is what I have now.
> >         >         I have copied the Greeter example
> >         (js-browser-client-simple)
> >         >         from the
> >         >         samples. Because cross-scripting is not allowed (I
> >         think that
> >         >         was
> >         >         causing the 650 error I got) I have created a
> >         redirect in my
> >         >         apache web
> >         >         server so my url is now local and at port 80.
> >         The ?js import
> >         >         works fine.
> >         >         My url is the same as the ?js url, without the ?js.
> >         >         I have tested my web service with SoapUI. When I
> >         point my
> >         >         browser to the
> >         >         url from the javascript (similar to
> >         the /SoapContext/SoapPort
> >         >         in the
> >         >         sample) I get an error message from the Soap server,
> >         so I know
> >         >         it's
> >         >         listening at that url. But running the javascript
> >         gives an
> >         >         error -1,
> >         >         "could not connect to server". I run the web service
> >         from
> >         >         within
> >         >         Eclipse, which doesn't produce any log output when I
> >         get the
> >         >         -1 error.
> >         >         It does when I get the error at the same url in my
> >         browser.
> >         >
> >         >         this is the first bit of my html, the rest is the
> >         same as the
> >         >         sample.
> >         >
> >         >         <html>
> >         >         <head><title>...</title>
> >         >         <script language="JavaScript" TYPE="text/JavaScript"
> >         >         src="/dir/port?js"></script>
> >         >         <SCRIPT LANGUAGE="JavaScript"
> >         TYPE="text/JavaScript"><!--
> >         >
> >         >         var CXFChat = new chat__CXFChat ();
> >         >         CXFChat.url="/dir/port";
> >         >         var responseString;
> >         >         var userId="";
> >         >
> >         >         function sayResponse(response)
> >         >         {
> >         >                responseSpan.firstChild.nodeValue =
> >         >         response.getResponseType();
> >         >         }
> >         >
> >         >         function sayError(error)
> >         >         {
> >         >                alert('error ' + error);
> >         >         }
> >         >         ......
> >         >
> >         >
> >         >         --
> >         >         dagdag is just a two character rotation of byebye
> >         >         www.christine.nl
> >         >
> >         >
> >
> >         --
> >
> >         dagdag is just a two character rotation of byebye
> >         www.christine.nl
> >
> >
> >
> --
> dagdag is just a two character rotation of byebye
> www.christine.nl
>
>

Re: Integrate Solr with Tomcat in Linux

Posted by Preetam Rao <bl...@gmail.com>.
set the solr home folder such that-

If you are using jndi name for solr.home or command line argument for
solr.home, then it will look for conf and lib folders under that folder.

If you are not using jndi name, then it looks for solr/conf and solr/lib
folders under current directory which is the directory you started tomcat
from.

You can get the conf and lib folders from the distributions example folder
also

Hope this helps

Thanks
Preetam

On Wed, Jul 9, 2008 at 9:28 AM, Noble Paul നോബിള്‍ नोब्ळ् <
noble.paul@gmail.com> wrote:

> The context 'solr' is not  initialized. The most likely reson is that
> you have not set the solr.home correctly.
> --Noble
>
> On Wed, Jul 9, 2008 at 3:24 AM, sandeep kaur <sa...@yahoo.co.in>
> wrote:
> >
> > Hi,
> >
> > As i am running tomcat after copying the solr files to appropriate tomcat
> directories, i am getting the followin error in the catalina log:
> >
> > Jul 8, 2008 10:30:02 PM org.apache.catalina.core.AprLifecycleListener
> init
> > INFO: The Apache Tomcat Native library which allows optimal performance
> in production environments was not found on the java.library.path:
> /usr/java/jdk1.6.0_06
> >
> /jre/lib/i386/client:/usr/java/jdk1.6.0_06/jre/lib/i386:/usr/java/jdk1.6.0_06/jr
> > e/../lib/i386:/usr/java/packages/lib/i386:/lib:/usr/lib
> > Jul 8, 2008 10:30:02 PM org.apache.coyote.http11.Http11Protocol init
> > INFO: Initializing Coyote HTTP/1.1 on http-8080
> > Jul 8, 2008 10:30:02 PM org.apache.catalina.startup.Catalina load
> > INFO: Initialization processed in 285 ms
> > Jul 8, 2008 10:30:02 PM org.apache.catalina.core.StandardService start
> > INFO: Starting service Catalina
> > Jul 8, 2008 10:30:02 PM org.apache.catalina.core.StandardEngine start
> > INFO: Starting Servlet Engine: Apache Tomcat/6.0.9
> > Jul 8, 2008 10:30:02 PM org.apache.solr.servlet.SolrDispatchFilter init
> > INFO: SolrDispatchFilter.init()
> > Jul 8, 2008 10:30:02 PM org.apache.solr.core.Config getInstanceDir
> > INFO: Using JNDI solr.home: /home/user_name/softwares
> > Jul 8, 2008 10:30:02 PM org.apache.solr.core.Config setInstanceDir
> > INFO: Solr home set to '/home/user_name/softwares/'
> > Jul 8, 2008 10:30:02 PM org.apache.catalina.core.StandardContext start
> > SEVERE: Error filterStart
> > Jul 8, 2008 10:30:02 PM org.apache.catalina.core.StandardContext start
> > SEVERE: Context [/solr] startup failed due to previous errors
> > Jul 8, 2008 10:30:03 PM org.apache.coyote.http11.Http11Protocol start
> > INFO: Starting Coyote HTTP/1.1 on http-8080
> > Jul 8, 2008 10:30:03 PM org.apache.jk.common.ChannelSocket init
> > INFO: JK: ajp13 listening on /0.0.0.0:8009
> > Jul 8, 2008 10:30:03 PM org.apache.jk.server.JkMain start
> > INFO: Jk running ID=0 time=0/30  config=null
> > Jul 8, 2008 10:30:03 PM org.apache.catalina.startup.Catalina start
> > INFO: Server startup in 589 ms
> >
> > In the browser while typing http://localhost:8080/solr/admin
> >
> > i am getting the following error
> >
> > HTTP Status 404 - /solr/admin
> >
> > type Status report
> >
> > message /solr/admin
> >
> > description The requested resource (/solr/admin) is not available.
> > Apache Tomcat/6.0.9
> >
> > Could anyone please suggest how to resolve this error.
> >
> > Thanks,
> > Sandip
> >
> >
> > --- On Tue, 8/7/08, Shalin Shekhar Mangar <sh...@gmail.com>
> wrote:
> >
> >> From: Shalin Shekhar Mangar <sh...@gmail.com>
> >> Subject: Re: Integrate Solr with Tomcat in Linux
> >> To: solr-user@lucene.apache.org, sandeep_kmca@yahoo.co.in
> >> Date: Tuesday, 8 July, 2008, 4:40 PM
> >> Take a look at http://wiki.apache.org/solr/SolrTomcat
> >>
> >> Please avoid replying to an older message when you're
> >> starting a new topic.
> >>
> >> On Tue, Jul 8, 2008 at 4:36 PM, sandeep kaur
> >> <sa...@yahoo.co.in>
> >> wrote:
> >>
> >> > Hi,
> >> >
> >> >  I have solr with jetty as server application running
> >> on Linux.
> >> >
> >> > Could anyone please tell me the changes i need to make
> >> to integrate Tomcat
> >> > with solr on Linux.
> >> >
> >> > Thanks,
> >> > Sandip
> >> >
> >> > --- On Mon, 7/7/08, Benson Margulies
> >> <bi...@gmail.com> wrote:
> >> >
> >> > > From: Benson Margulies
> >> <bi...@gmail.com>
> >> > > Subject: Re: js client
> >> > > To: christine@christine.nl, "solr-user"
> >> <so...@lucene.apache.org>
> >> > > Date: Monday, 7 July, 2008, 11:43 PM
> >> > > The Javascript should have the right URL
> >> automatically if
> >> > > you get it from
> >> > > the ?js URL.
> >> > >
> >> > > Anyway, I think I was the first person to say
> >> > > 'stupid' about that WSDL in
> >> > > the sample.
> >> > >
> >> > > I'm not at all clear on what you are doing at
> >> this
> >> > > point.
> >> > >
> >> > > Please send along  the URL that works for you in
> >> soapUI and
> >> > > the URL that
> >> > > works for you in the
> >> <script>...</script>
> >> > > element.
> >> > >
> >> > >
> >> > >
> >> > >
> >> > > On Mon, Jul 7, 2008 at 5:54 AM, Christine Karman
> >> > > <ch...@christine.nl>
> >> > > wrote:
> >> > >
> >> > > > On Sun, 2008-07-06 at 10:25 -0400, Benson
> >> Margulies
> >> > > wrote:
> >> > > > > In the sample, it is a relative URL to
> >> the web
> >> > > service endpoint. The
> >> > > > > sample starts from a stupid WSDL with
> >> silly names
> >> > > for the service and
> >> > > > > the port.
> >> > > >
> >> > > > I'm sorry about using the word
> >> "stupid".
> >> > > >
> >> > > > >
> >> > > > > Take your endpoint deployment URL, the
> >> very URL
> >> > > that is logged when
> >> > > > > your service starts up, and add ?js to
> >> the end of
> >> > > it. Period.
> >> > > >
> >> > > > Yes, that's what I do, and that part has
> >> been
> >> > > working all the time. What
> >> > > > doesn't work is I use the same url
> >> without the ?js
> >> > > for the web service.
> >> > > > Is there a way to see the Jetty log file?
> >> Mabye that
> >> > > will give me a clue
> >> > > > what's happening. If nothing is in the
> >> jetty log
> >> > > file, I know the
> >> > > > problem is elsewhere.
> >> > > >
> >> > > > Christine
> >> > > >
> >> > > > >
> >> > > > > If it is
> >> > > > >
> >> > > > > http://wendy.christine.nl:9000/soap,
> >> make it
> >> > > > >
> >> > > > >  http://wendy.christine.nl:9000/soap?js
> >> > > > >
> >> > > > >
> >> > > > >
> >> > > > > The sample is taking advantage of
> >> relative URLs
> >> > > to avoid typing
> >> > > > > http://etc.
> >> > > > >
> >> > > > > On Sun, Jul 6, 2008 at 8:52 AM,
> >> Christine Karman
> >> > > > > <ch...@christine.nl> wrote:
> >> > > > >         On Sun, 2008-07-06 at 07:37
> >> -0400, Benson
> >> > > Margulies wrote:
> >> > > > >         > The javascript client
> >> probably
> >> > > cannot handle redirects. If
> >> > > > >         you are now
> >> > > > >         > using ?js, you
> >> shouldn't need a
> >> > > redirect.
> >> > > > >
> >> > > > >
> >> > > > >         well actually, the server
> >> redirect is
> >> > > similar to a rewrite. It
> >> > > > >         makes /soap the same as
> >> /soap:9000.
> >> > > removing the redirect
> >> > > > >         brings me back
> >> > > > >         to the 650 error, "access
> >> to
> >> > > restricted uri denied".
> >> > > > >
> >> > > > >         What does the /Soap/SoapPort
> >> mean in the
> >> > > sample? how does that
> >> > > > >         translate
> >> > > > >         to my localhost:9000 or
> >> localhost/soap?
> >> > > (localhost ==
> >> > > > >         wendy.christine.nl).
> >> > > > >
> >> > > > >         It's silly that creating
> >> the web
> >> > > service from my java code is
> >> > > > >         so very
> >> > > > >         simple, and that some stupid
> >> javascript
> >> > > code can't be
> >> > > > >         persuaded to work
> >> > > > >         properly :-)  I've done my
> >> part of
> >> > > javascript but I have never
> >> > > > >         liked it.
> >> > > > >
> >> > > > >         CXF is really good. I was in a
> >> project a
> >> > > while ago where I
> >> > > > >         suggested to
> >> > > > >         use cxf, but someone who was
> >> supposed to
> >> > > have releavant
> >> > > > >         experience
> >> > > > >         insisted on using axis2. Took
> >> him a week
> >> > > to create some soap
> >> > > > >         services.
> >> > > > >         He had to remove all enums  and
> >> nested
> >> > > objects from the
> >> > > > >         project because
> >> > > > >         axis wouldn't support that.
> >> A friend
> >> > > of mine is using cxf in
> >> > > > >         his project
> >> > > > >         and he insisted I use it also.
> >> > > > >
> >> > > > >         Christine
> >> > > > >
> >> > > > >
> >> > > > >         >
> >> > > > >         > The browser allows an HTML
> >> page to
> >> > > load javascript from
> >> > > > >         anywhere. Once
> >> > > > >         > it has loaded javascript
> >> from a
> >> > > host:port, it will allow
> >> > > > >         outbound
> >> > > > >         > connections to that
> >> host:port.
> >> > > > >         >
> >> > > > >         > So, once you use
> >> > > src="...../?js" you should be set.
> >> > > > >         >
> >> > > > >         > The sample does not fully
> >> > > demonstrate this effect, since it
> >> > > > >         has the
> >> > > > >         > benefit of really  running
> >> the web
> >> > > service and the static
> >> > > > >         HTML from
> >> > > > >         > the very same host::port.
> >> > > > >         >
> >> > > > >         > In the past, before there
> >> was such a
> >> > > thing as the ?js URL,
> >> > > > >         the
> >> > > > >         > solution here was a
> >> reverse proxy
> >> > > instead of a redirect. You
> >> > > > >         set up
> >> > > > >         > URL rewriting in plain old
> >> Apache 2
> >> > > so that xxx:9000 is
> >> > > > >         transparently
> >> > > > >         > available at xxx.
> >> > > > >         >
> >> > > > >         > I don't have my recipe
> >> for this
> >> > > available at home, if you're
> >> > > > >         still
> >> > > > >         > stuck tomorrow I can dig
> >> it out of
> >> > > my office.
> >> > > > >         >
> >> > > > >         >
> >> > > > >         >
> >> > > > >         >
> >> > > > >         > On Sun, Jul 6, 2008 at
> >> 7:20 AM,
> >> > > Christine
> >> > > > >         <ch...@christine.nl>
> >> > > > >         > wrote:
> >> > > > >         >         Benson,
> >> > > > >         >         I'm still
> >> struggling.
> >> > > This is what I have now.
> >> > > > >         >         I have copied the
> >> Greeter
> >> > > example
> >> > > > >         (js-browser-client-simple)
> >> > > > >         >         from the
> >> > > > >         >         samples. Because
> >> > > cross-scripting is not allowed (I
> >> > > > >         think that
> >> > > > >         >         was
> >> > > > >         >         causing the 650
> >> error I got)
> >> > > I have created a
> >> > > > >         redirect in my
> >> > > > >         >         apache web
> >> > > > >         >         server so my url
> >> is now
> >> > > local and at port 80.
> >> > > > >         The ?js import
> >> > > > >         >         works fine.
> >> > > > >         >         My url is the same
> >> as the
> >> > > ?js url, without the ?js.
> >> > > > >         >         I have tested my
> >> web service
> >> > > with SoapUI. When I
> >> > > > >         point my
> >> > > > >         >         browser to the
> >> > > > >         >         url from the
> >> javascript
> >> > > (similar to
> >> > > > >         the /SoapContext/SoapPort
> >> > > > >         >         in the
> >> > > > >         >         sample) I get an
> >> error
> >> > > message from the Soap server,
> >> > > > >         so I know
> >> > > > >         >         it's
> >> > > > >         >         listening at that
> >> url. But
> >> > > running the javascript
> >> > > > >         gives an
> >> > > > >         >         error -1,
> >> > > > >         >         "could not
> >> connect to
> >> > > server". I run the web service
> >> > > > >         from
> >> > > > >         >         within
> >> > > > >         >         Eclipse, which
> >> doesn't
> >> > > produce any log output when I
> >> > > > >         get the
> >> > > > >         >         -1 error.
> >> > > > >         >         It does when I get
> >> the error
> >> > > at the same url in my
> >> > > > >         browser.
> >> > > > >         >
> >> > > > >         >         this is the first
> >> bit of my
> >> > > html, the rest is the
> >> > > > >         same as the
> >> > > > >         >         sample.
> >> > > > >         >
> >> > > > >         >         <html>
> >> > > > >         >
> >> > > <head><title>...</title>
> >> > > > >         >         <script
> >> > > language="JavaScript"
> >> > > TYPE="text/JavaScript"
> >> > > > >         >
> >> > >
> >> src="/dir/port?js"></script>
> >> > > > >         >         <SCRIPT
> >> > > LANGUAGE="JavaScript"
> >> > > > >
> >> > > TYPE="text/JavaScript"><!--
> >> > > > >         >
> >> > > > >         >         var CXFChat = new
> >> > > chat__CXFChat ();
> >> > > > >         >
> >> > > CXFChat.url="/dir/port";
> >> > > > >         >         var
> >> responseString;
> >> > > > >         >         var
> >> userId="";
> >> > > > >         >
> >> > > > >         >         function
> >> > > sayResponse(response)
> >> > > > >         >         {
> >> > > > >         >
> >> > > responseSpan.firstChild.nodeValue =
> >> > > > >         >
> >> response.getResponseType();
> >> > > > >         >         }
> >> > > > >         >
> >> > > > >         >         function
> >> sayError(error)
> >> > > > >         >         {
> >> > > > >         >
> >> alert('error
> >> > > ' + error);
> >> > > > >         >         }
> >> > > > >         >         ......
> >> > > > >         >
> >> > > > >         >
> >> > > > >         >         --
> >> > > > >         >         dagdag is just a
> >> two
> >> > > character rotation of byebye
> >> > > > >         >         www.christine.nl
> >> > > > >         >
> >> > > > >         >
> >> > > > >
> >> > > > >         --
> >> > > > >
> >> > > > >         dagdag is just a two character
> >> rotation
> >> > > of byebye
> >> > > > >         www.christine.nl
> >> > > > >
> >> > > > >
> >> > > > >
> >> > > > --
> >> > > > dagdag is just a two character rotation of
> >> byebye
> >> > > > www.christine.nl
> >> > > >
> >> > > >
> >> >
> >> >
> >> >      Bollywood, fun, friendship, sports and more. You
> >> name it, we have it
> >> > on http://in.promos.yahoo.com/groups/bestofyahoo/
> >> >
> >>
> >>
> >>
> >> --
> >> Regards,
> >> Shalin Shekhar Mangar.
> >
> >
> >      Explore your hobbies and interests. Go to
> http://in.promos.yahoo.com/groups/
> >
>
>
>
> --
> --Noble Paul
>

Re: Integrate Solr with Tomcat in Linux

Posted by Noble Paul നോബിള്‍ नोब्ळ् <no...@gmail.com>.
The context 'solr' is not  initialized. The most likely reson is that
you have not set the solr.home correctly.
--Noble

On Wed, Jul 9, 2008 at 3:24 AM, sandeep kaur <sa...@yahoo.co.in> wrote:
>
> Hi,
>
> As i am running tomcat after copying the solr files to appropriate tomcat directories, i am getting the followin error in the catalina log:
>
> Jul 8, 2008 10:30:02 PM org.apache.catalina.core.AprLifecycleListener init
> INFO: The Apache Tomcat Native library which allows optimal performance in production environments was not found on the java.library.path: /usr/java/jdk1.6.0_06
> /jre/lib/i386/client:/usr/java/jdk1.6.0_06/jre/lib/i386:/usr/java/jdk1.6.0_06/jr
> e/../lib/i386:/usr/java/packages/lib/i386:/lib:/usr/lib
> Jul 8, 2008 10:30:02 PM org.apache.coyote.http11.Http11Protocol init
> INFO: Initializing Coyote HTTP/1.1 on http-8080
> Jul 8, 2008 10:30:02 PM org.apache.catalina.startup.Catalina load
> INFO: Initialization processed in 285 ms
> Jul 8, 2008 10:30:02 PM org.apache.catalina.core.StandardService start
> INFO: Starting service Catalina
> Jul 8, 2008 10:30:02 PM org.apache.catalina.core.StandardEngine start
> INFO: Starting Servlet Engine: Apache Tomcat/6.0.9
> Jul 8, 2008 10:30:02 PM org.apache.solr.servlet.SolrDispatchFilter init
> INFO: SolrDispatchFilter.init()
> Jul 8, 2008 10:30:02 PM org.apache.solr.core.Config getInstanceDir
> INFO: Using JNDI solr.home: /home/user_name/softwares
> Jul 8, 2008 10:30:02 PM org.apache.solr.core.Config setInstanceDir
> INFO: Solr home set to '/home/user_name/softwares/'
> Jul 8, 2008 10:30:02 PM org.apache.catalina.core.StandardContext start
> SEVERE: Error filterStart
> Jul 8, 2008 10:30:02 PM org.apache.catalina.core.StandardContext start
> SEVERE: Context [/solr] startup failed due to previous errors
> Jul 8, 2008 10:30:03 PM org.apache.coyote.http11.Http11Protocol start
> INFO: Starting Coyote HTTP/1.1 on http-8080
> Jul 8, 2008 10:30:03 PM org.apache.jk.common.ChannelSocket init
> INFO: JK: ajp13 listening on /0.0.0.0:8009
> Jul 8, 2008 10:30:03 PM org.apache.jk.server.JkMain start
> INFO: Jk running ID=0 time=0/30  config=null
> Jul 8, 2008 10:30:03 PM org.apache.catalina.startup.Catalina start
> INFO: Server startup in 589 ms
>
> In the browser while typing http://localhost:8080/solr/admin
>
> i am getting the following error
>
> HTTP Status 404 - /solr/admin
>
> type Status report
>
> message /solr/admin
>
> description The requested resource (/solr/admin) is not available.
> Apache Tomcat/6.0.9
>
> Could anyone please suggest how to resolve this error.
>
> Thanks,
> Sandip
>
>
> --- On Tue, 8/7/08, Shalin Shekhar Mangar <sh...@gmail.com> wrote:
>
>> From: Shalin Shekhar Mangar <sh...@gmail.com>
>> Subject: Re: Integrate Solr with Tomcat in Linux
>> To: solr-user@lucene.apache.org, sandeep_kmca@yahoo.co.in
>> Date: Tuesday, 8 July, 2008, 4:40 PM
>> Take a look at http://wiki.apache.org/solr/SolrTomcat
>>
>> Please avoid replying to an older message when you're
>> starting a new topic.
>>
>> On Tue, Jul 8, 2008 at 4:36 PM, sandeep kaur
>> <sa...@yahoo.co.in>
>> wrote:
>>
>> > Hi,
>> >
>> >  I have solr with jetty as server application running
>> on Linux.
>> >
>> > Could anyone please tell me the changes i need to make
>> to integrate Tomcat
>> > with solr on Linux.
>> >
>> > Thanks,
>> > Sandip
>> >
>> > --- On Mon, 7/7/08, Benson Margulies
>> <bi...@gmail.com> wrote:
>> >
>> > > From: Benson Margulies
>> <bi...@gmail.com>
>> > > Subject: Re: js client
>> > > To: christine@christine.nl, "solr-user"
>> <so...@lucene.apache.org>
>> > > Date: Monday, 7 July, 2008, 11:43 PM
>> > > The Javascript should have the right URL
>> automatically if
>> > > you get it from
>> > > the ?js URL.
>> > >
>> > > Anyway, I think I was the first person to say
>> > > 'stupid' about that WSDL in
>> > > the sample.
>> > >
>> > > I'm not at all clear on what you are doing at
>> this
>> > > point.
>> > >
>> > > Please send along  the URL that works for you in
>> soapUI and
>> > > the URL that
>> > > works for you in the
>> <script>...</script>
>> > > element.
>> > >
>> > >
>> > >
>> > >
>> > > On Mon, Jul 7, 2008 at 5:54 AM, Christine Karman
>> > > <ch...@christine.nl>
>> > > wrote:
>> > >
>> > > > On Sun, 2008-07-06 at 10:25 -0400, Benson
>> Margulies
>> > > wrote:
>> > > > > In the sample, it is a relative URL to
>> the web
>> > > service endpoint. The
>> > > > > sample starts from a stupid WSDL with
>> silly names
>> > > for the service and
>> > > > > the port.
>> > > >
>> > > > I'm sorry about using the word
>> "stupid".
>> > > >
>> > > > >
>> > > > > Take your endpoint deployment URL, the
>> very URL
>> > > that is logged when
>> > > > > your service starts up, and add ?js to
>> the end of
>> > > it. Period.
>> > > >
>> > > > Yes, that's what I do, and that part has
>> been
>> > > working all the time. What
>> > > > doesn't work is I use the same url
>> without the ?js
>> > > for the web service.
>> > > > Is there a way to see the Jetty log file?
>> Mabye that
>> > > will give me a clue
>> > > > what's happening. If nothing is in the
>> jetty log
>> > > file, I know the
>> > > > problem is elsewhere.
>> > > >
>> > > > Christine
>> > > >
>> > > > >
>> > > > > If it is
>> > > > >
>> > > > > http://wendy.christine.nl:9000/soap,
>> make it
>> > > > >
>> > > > >  http://wendy.christine.nl:9000/soap?js
>> > > > >
>> > > > >
>> > > > >
>> > > > > The sample is taking advantage of
>> relative URLs
>> > > to avoid typing
>> > > > > http://etc.
>> > > > >
>> > > > > On Sun, Jul 6, 2008 at 8:52 AM,
>> Christine Karman
>> > > > > <ch...@christine.nl> wrote:
>> > > > >         On Sun, 2008-07-06 at 07:37
>> -0400, Benson
>> > > Margulies wrote:
>> > > > >         > The javascript client
>> probably
>> > > cannot handle redirects. If
>> > > > >         you are now
>> > > > >         > using ?js, you
>> shouldn't need a
>> > > redirect.
>> > > > >
>> > > > >
>> > > > >         well actually, the server
>> redirect is
>> > > similar to a rewrite. It
>> > > > >         makes /soap the same as
>> /soap:9000.
>> > > removing the redirect
>> > > > >         brings me back
>> > > > >         to the 650 error, "access
>> to
>> > > restricted uri denied".
>> > > > >
>> > > > >         What does the /Soap/SoapPort
>> mean in the
>> > > sample? how does that
>> > > > >         translate
>> > > > >         to my localhost:9000 or
>> localhost/soap?
>> > > (localhost ==
>> > > > >         wendy.christine.nl).
>> > > > >
>> > > > >         It's silly that creating
>> the web
>> > > service from my java code is
>> > > > >         so very
>> > > > >         simple, and that some stupid
>> javascript
>> > > code can't be
>> > > > >         persuaded to work
>> > > > >         properly :-)  I've done my
>> part of
>> > > javascript but I have never
>> > > > >         liked it.
>> > > > >
>> > > > >         CXF is really good. I was in a
>> project a
>> > > while ago where I
>> > > > >         suggested to
>> > > > >         use cxf, but someone who was
>> supposed to
>> > > have releavant
>> > > > >         experience
>> > > > >         insisted on using axis2. Took
>> him a week
>> > > to create some soap
>> > > > >         services.
>> > > > >         He had to remove all enums  and
>> nested
>> > > objects from the
>> > > > >         project because
>> > > > >         axis wouldn't support that.
>> A friend
>> > > of mine is using cxf in
>> > > > >         his project
>> > > > >         and he insisted I use it also.
>> > > > >
>> > > > >         Christine
>> > > > >
>> > > > >
>> > > > >         >
>> > > > >         > The browser allows an HTML
>> page to
>> > > load javascript from
>> > > > >         anywhere. Once
>> > > > >         > it has loaded javascript
>> from a
>> > > host:port, it will allow
>> > > > >         outbound
>> > > > >         > connections to that
>> host:port.
>> > > > >         >
>> > > > >         > So, once you use
>> > > src="...../?js" you should be set.
>> > > > >         >
>> > > > >         > The sample does not fully
>> > > demonstrate this effect, since it
>> > > > >         has the
>> > > > >         > benefit of really  running
>> the web
>> > > service and the static
>> > > > >         HTML from
>> > > > >         > the very same host::port.
>> > > > >         >
>> > > > >         > In the past, before there
>> was such a
>> > > thing as the ?js URL,
>> > > > >         the
>> > > > >         > solution here was a
>> reverse proxy
>> > > instead of a redirect. You
>> > > > >         set up
>> > > > >         > URL rewriting in plain old
>> Apache 2
>> > > so that xxx:9000 is
>> > > > >         transparently
>> > > > >         > available at xxx.
>> > > > >         >
>> > > > >         > I don't have my recipe
>> for this
>> > > available at home, if you're
>> > > > >         still
>> > > > >         > stuck tomorrow I can dig
>> it out of
>> > > my office.
>> > > > >         >
>> > > > >         >
>> > > > >         >
>> > > > >         >
>> > > > >         > On Sun, Jul 6, 2008 at
>> 7:20 AM,
>> > > Christine
>> > > > >         <ch...@christine.nl>
>> > > > >         > wrote:
>> > > > >         >         Benson,
>> > > > >         >         I'm still
>> struggling.
>> > > This is what I have now.
>> > > > >         >         I have copied the
>> Greeter
>> > > example
>> > > > >         (js-browser-client-simple)
>> > > > >         >         from the
>> > > > >         >         samples. Because
>> > > cross-scripting is not allowed (I
>> > > > >         think that
>> > > > >         >         was
>> > > > >         >         causing the 650
>> error I got)
>> > > I have created a
>> > > > >         redirect in my
>> > > > >         >         apache web
>> > > > >         >         server so my url
>> is now
>> > > local and at port 80.
>> > > > >         The ?js import
>> > > > >         >         works fine.
>> > > > >         >         My url is the same
>> as the
>> > > ?js url, without the ?js.
>> > > > >         >         I have tested my
>> web service
>> > > with SoapUI. When I
>> > > > >         point my
>> > > > >         >         browser to the
>> > > > >         >         url from the
>> javascript
>> > > (similar to
>> > > > >         the /SoapContext/SoapPort
>> > > > >         >         in the
>> > > > >         >         sample) I get an
>> error
>> > > message from the Soap server,
>> > > > >         so I know
>> > > > >         >         it's
>> > > > >         >         listening at that
>> url. But
>> > > running the javascript
>> > > > >         gives an
>> > > > >         >         error -1,
>> > > > >         >         "could not
>> connect to
>> > > server". I run the web service
>> > > > >         from
>> > > > >         >         within
>> > > > >         >         Eclipse, which
>> doesn't
>> > > produce any log output when I
>> > > > >         get the
>> > > > >         >         -1 error.
>> > > > >         >         It does when I get
>> the error
>> > > at the same url in my
>> > > > >         browser.
>> > > > >         >
>> > > > >         >         this is the first
>> bit of my
>> > > html, the rest is the
>> > > > >         same as the
>> > > > >         >         sample.
>> > > > >         >
>> > > > >         >         <html>
>> > > > >         >
>> > > <head><title>...</title>
>> > > > >         >         <script
>> > > language="JavaScript"
>> > > TYPE="text/JavaScript"
>> > > > >         >
>> > >
>> src="/dir/port?js"></script>
>> > > > >         >         <SCRIPT
>> > > LANGUAGE="JavaScript"
>> > > > >
>> > > TYPE="text/JavaScript"><!--
>> > > > >         >
>> > > > >         >         var CXFChat = new
>> > > chat__CXFChat ();
>> > > > >         >
>> > > CXFChat.url="/dir/port";
>> > > > >         >         var
>> responseString;
>> > > > >         >         var
>> userId="";
>> > > > >         >
>> > > > >         >         function
>> > > sayResponse(response)
>> > > > >         >         {
>> > > > >         >
>> > > responseSpan.firstChild.nodeValue =
>> > > > >         >
>> response.getResponseType();
>> > > > >         >         }
>> > > > >         >
>> > > > >         >         function
>> sayError(error)
>> > > > >         >         {
>> > > > >         >
>> alert('error
>> > > ' + error);
>> > > > >         >         }
>> > > > >         >         ......
>> > > > >         >
>> > > > >         >
>> > > > >         >         --
>> > > > >         >         dagdag is just a
>> two
>> > > character rotation of byebye
>> > > > >         >         www.christine.nl
>> > > > >         >
>> > > > >         >
>> > > > >
>> > > > >         --
>> > > > >
>> > > > >         dagdag is just a two character
>> rotation
>> > > of byebye
>> > > > >         www.christine.nl
>> > > > >
>> > > > >
>> > > > >
>> > > > --
>> > > > dagdag is just a two character rotation of
>> byebye
>> > > > www.christine.nl
>> > > >
>> > > >
>> >
>> >
>> >      Bollywood, fun, friendship, sports and more. You
>> name it, we have it
>> > on http://in.promos.yahoo.com/groups/bestofyahoo/
>> >
>>
>>
>>
>> --
>> Regards,
>> Shalin Shekhar Mangar.
>
>
>      Explore your hobbies and interests. Go to http://in.promos.yahoo.com/groups/
>



-- 
--Noble Paul

Re: Integrate Solr with Tomcat in Linux

Posted by sandeep kaur <sa...@yahoo.co.in>.
Hi,

As i am running tomcat after copying the solr files to appropriate tomcat directories, i am getting the followin error in the catalina log:

Jul 8, 2008 10:30:02 PM org.apache.catalina.core.AprLifecycleListener init
INFO: The Apache Tomcat Native library which allows optimal performance in production environments was not found on the java.library.path: /usr/java/jdk1.6.0_06
/jre/lib/i386/client:/usr/java/jdk1.6.0_06/jre/lib/i386:/usr/java/jdk1.6.0_06/jr
e/../lib/i386:/usr/java/packages/lib/i386:/lib:/usr/lib
Jul 8, 2008 10:30:02 PM org.apache.coyote.http11.Http11Protocol init
INFO: Initializing Coyote HTTP/1.1 on http-8080
Jul 8, 2008 10:30:02 PM org.apache.catalina.startup.Catalina load
INFO: Initialization processed in 285 ms
Jul 8, 2008 10:30:02 PM org.apache.catalina.core.StandardService start
INFO: Starting service Catalina
Jul 8, 2008 10:30:02 PM org.apache.catalina.core.StandardEngine start
INFO: Starting Servlet Engine: Apache Tomcat/6.0.9
Jul 8, 2008 10:30:02 PM org.apache.solr.servlet.SolrDispatchFilter init
INFO: SolrDispatchFilter.init()
Jul 8, 2008 10:30:02 PM org.apache.solr.core.Config getInstanceDir
INFO: Using JNDI solr.home: /home/user_name/softwares
Jul 8, 2008 10:30:02 PM org.apache.solr.core.Config setInstanceDir
INFO: Solr home set to '/home/user_name/softwares/'
Jul 8, 2008 10:30:02 PM org.apache.catalina.core.StandardContext start
SEVERE: Error filterStart
Jul 8, 2008 10:30:02 PM org.apache.catalina.core.StandardContext start
SEVERE: Context [/solr] startup failed due to previous errors
Jul 8, 2008 10:30:03 PM org.apache.coyote.http11.Http11Protocol start
INFO: Starting Coyote HTTP/1.1 on http-8080
Jul 8, 2008 10:30:03 PM org.apache.jk.common.ChannelSocket init
INFO: JK: ajp13 listening on /0.0.0.0:8009
Jul 8, 2008 10:30:03 PM org.apache.jk.server.JkMain start
INFO: Jk running ID=0 time=0/30  config=null
Jul 8, 2008 10:30:03 PM org.apache.catalina.startup.Catalina start
INFO: Server startup in 589 ms

In the browser while typing http://localhost:8080/solr/admin

i am getting the following error

HTTP Status 404 - /solr/admin

type Status report

message /solr/admin

description The requested resource (/solr/admin) is not available.
Apache Tomcat/6.0.9

Could anyone please suggest how to resolve this error.

Thanks,
Sandip


--- On Tue, 8/7/08, Shalin Shekhar Mangar <sh...@gmail.com> wrote:

> From: Shalin Shekhar Mangar <sh...@gmail.com>
> Subject: Re: Integrate Solr with Tomcat in Linux
> To: solr-user@lucene.apache.org, sandeep_kmca@yahoo.co.in
> Date: Tuesday, 8 July, 2008, 4:40 PM
> Take a look at http://wiki.apache.org/solr/SolrTomcat
> 
> Please avoid replying to an older message when you're
> starting a new topic.
> 
> On Tue, Jul 8, 2008 at 4:36 PM, sandeep kaur
> <sa...@yahoo.co.in>
> wrote:
> 
> > Hi,
> >
> >  I have solr with jetty as server application running
> on Linux.
> >
> > Could anyone please tell me the changes i need to make
> to integrate Tomcat
> > with solr on Linux.
> >
> > Thanks,
> > Sandip
> >
> > --- On Mon, 7/7/08, Benson Margulies
> <bi...@gmail.com> wrote:
> >
> > > From: Benson Margulies
> <bi...@gmail.com>
> > > Subject: Re: js client
> > > To: christine@christine.nl, "solr-user"
> <so...@lucene.apache.org>
> > > Date: Monday, 7 July, 2008, 11:43 PM
> > > The Javascript should have the right URL
> automatically if
> > > you get it from
> > > the ?js URL.
> > >
> > > Anyway, I think I was the first person to say
> > > 'stupid' about that WSDL in
> > > the sample.
> > >
> > > I'm not at all clear on what you are doing at
> this
> > > point.
> > >
> > > Please send along  the URL that works for you in
> soapUI and
> > > the URL that
> > > works for you in the
> <script>...</script>
> > > element.
> > >
> > >
> > >
> > >
> > > On Mon, Jul 7, 2008 at 5:54 AM, Christine Karman
> > > <ch...@christine.nl>
> > > wrote:
> > >
> > > > On Sun, 2008-07-06 at 10:25 -0400, Benson
> Margulies
> > > wrote:
> > > > > In the sample, it is a relative URL to
> the web
> > > service endpoint. The
> > > > > sample starts from a stupid WSDL with
> silly names
> > > for the service and
> > > > > the port.
> > > >
> > > > I'm sorry about using the word
> "stupid".
> > > >
> > > > >
> > > > > Take your endpoint deployment URL, the
> very URL
> > > that is logged when
> > > > > your service starts up, and add ?js to
> the end of
> > > it. Period.
> > > >
> > > > Yes, that's what I do, and that part has
> been
> > > working all the time. What
> > > > doesn't work is I use the same url
> without the ?js
> > > for the web service.
> > > > Is there a way to see the Jetty log file?
> Mabye that
> > > will give me a clue
> > > > what's happening. If nothing is in the
> jetty log
> > > file, I know the
> > > > problem is elsewhere.
> > > >
> > > > Christine
> > > >
> > > > >
> > > > > If it is
> > > > >
> > > > > http://wendy.christine.nl:9000/soap,
> make it
> > > > >
> > > > >  http://wendy.christine.nl:9000/soap?js
> > > > >
> > > > >
> > > > >
> > > > > The sample is taking advantage of
> relative URLs
> > > to avoid typing
> > > > > http://etc.
> > > > >
> > > > > On Sun, Jul 6, 2008 at 8:52 AM,
> Christine Karman
> > > > > <ch...@christine.nl> wrote:
> > > > >         On Sun, 2008-07-06 at 07:37
> -0400, Benson
> > > Margulies wrote:
> > > > >         > The javascript client
> probably
> > > cannot handle redirects. If
> > > > >         you are now
> > > > >         > using ?js, you
> shouldn't need a
> > > redirect.
> > > > >
> > > > >
> > > > >         well actually, the server
> redirect is
> > > similar to a rewrite. It
> > > > >         makes /soap the same as
> /soap:9000.
> > > removing the redirect
> > > > >         brings me back
> > > > >         to the 650 error, "access
> to
> > > restricted uri denied".
> > > > >
> > > > >         What does the /Soap/SoapPort
> mean in the
> > > sample? how does that
> > > > >         translate
> > > > >         to my localhost:9000 or
> localhost/soap?
> > > (localhost ==
> > > > >         wendy.christine.nl).
> > > > >
> > > > >         It's silly that creating
> the web
> > > service from my java code is
> > > > >         so very
> > > > >         simple, and that some stupid
> javascript
> > > code can't be
> > > > >         persuaded to work
> > > > >         properly :-)  I've done my
> part of
> > > javascript but I have never
> > > > >         liked it.
> > > > >
> > > > >         CXF is really good. I was in a
> project a
> > > while ago where I
> > > > >         suggested to
> > > > >         use cxf, but someone who was
> supposed to
> > > have releavant
> > > > >         experience
> > > > >         insisted on using axis2. Took
> him a week
> > > to create some soap
> > > > >         services.
> > > > >         He had to remove all enums  and
> nested
> > > objects from the
> > > > >         project because
> > > > >         axis wouldn't support that.
> A friend
> > > of mine is using cxf in
> > > > >         his project
> > > > >         and he insisted I use it also.
> > > > >
> > > > >         Christine
> > > > >
> > > > >
> > > > >         >
> > > > >         > The browser allows an HTML
> page to
> > > load javascript from
> > > > >         anywhere. Once
> > > > >         > it has loaded javascript
> from a
> > > host:port, it will allow
> > > > >         outbound
> > > > >         > connections to that
> host:port.
> > > > >         >
> > > > >         > So, once you use
> > > src="...../?js" you should be set.
> > > > >         >
> > > > >         > The sample does not fully
> > > demonstrate this effect, since it
> > > > >         has the
> > > > >         > benefit of really  running
> the web
> > > service and the static
> > > > >         HTML from
> > > > >         > the very same host::port.
> > > > >         >
> > > > >         > In the past, before there
> was such a
> > > thing as the ?js URL,
> > > > >         the
> > > > >         > solution here was a
> reverse proxy
> > > instead of a redirect. You
> > > > >         set up
> > > > >         > URL rewriting in plain old
> Apache 2
> > > so that xxx:9000 is
> > > > >         transparently
> > > > >         > available at xxx.
> > > > >         >
> > > > >         > I don't have my recipe
> for this
> > > available at home, if you're
> > > > >         still
> > > > >         > stuck tomorrow I can dig
> it out of
> > > my office.
> > > > >         >
> > > > >         >
> > > > >         >
> > > > >         >
> > > > >         > On Sun, Jul 6, 2008 at
> 7:20 AM,
> > > Christine
> > > > >         <ch...@christine.nl>
> > > > >         > wrote:
> > > > >         >         Benson,
> > > > >         >         I'm still
> struggling.
> > > This is what I have now.
> > > > >         >         I have copied the
> Greeter
> > > example
> > > > >         (js-browser-client-simple)
> > > > >         >         from the
> > > > >         >         samples. Because
> > > cross-scripting is not allowed (I
> > > > >         think that
> > > > >         >         was
> > > > >         >         causing the 650
> error I got)
> > > I have created a
> > > > >         redirect in my
> > > > >         >         apache web
> > > > >         >         server so my url
> is now
> > > local and at port 80.
> > > > >         The ?js import
> > > > >         >         works fine.
> > > > >         >         My url is the same
> as the
> > > ?js url, without the ?js.
> > > > >         >         I have tested my
> web service
> > > with SoapUI. When I
> > > > >         point my
> > > > >         >         browser to the
> > > > >         >         url from the
> javascript
> > > (similar to
> > > > >         the /SoapContext/SoapPort
> > > > >         >         in the
> > > > >         >         sample) I get an
> error
> > > message from the Soap server,
> > > > >         so I know
> > > > >         >         it's
> > > > >         >         listening at that
> url. But
> > > running the javascript
> > > > >         gives an
> > > > >         >         error -1,
> > > > >         >         "could not
> connect to
> > > server". I run the web service
> > > > >         from
> > > > >         >         within
> > > > >         >         Eclipse, which
> doesn't
> > > produce any log output when I
> > > > >         get the
> > > > >         >         -1 error.
> > > > >         >         It does when I get
> the error
> > > at the same url in my
> > > > >         browser.
> > > > >         >
> > > > >         >         this is the first
> bit of my
> > > html, the rest is the
> > > > >         same as the
> > > > >         >         sample.
> > > > >         >
> > > > >         >         <html>
> > > > >         >
> > > <head><title>...</title>
> > > > >         >         <script
> > > language="JavaScript"
> > > TYPE="text/JavaScript"
> > > > >         >
> > >
> src="/dir/port?js"></script>
> > > > >         >         <SCRIPT
> > > LANGUAGE="JavaScript"
> > > > >
> > > TYPE="text/JavaScript"><!--
> > > > >         >
> > > > >         >         var CXFChat = new
> > > chat__CXFChat ();
> > > > >         >
> > > CXFChat.url="/dir/port";
> > > > >         >         var
> responseString;
> > > > >         >         var
> userId="";
> > > > >         >
> > > > >         >         function
> > > sayResponse(response)
> > > > >         >         {
> > > > >         >
> > > responseSpan.firstChild.nodeValue =
> > > > >         >        
> response.getResponseType();
> > > > >         >         }
> > > > >         >
> > > > >         >         function
> sayError(error)
> > > > >         >         {
> > > > >         >               
> alert('error
> > > ' + error);
> > > > >         >         }
> > > > >         >         ......
> > > > >         >
> > > > >         >
> > > > >         >         --
> > > > >         >         dagdag is just a
> two
> > > character rotation of byebye
> > > > >         >         www.christine.nl
> > > > >         >
> > > > >         >
> > > > >
> > > > >         --
> > > > >
> > > > >         dagdag is just a two character
> rotation
> > > of byebye
> > > > >         www.christine.nl
> > > > >
> > > > >
> > > > >
> > > > --
> > > > dagdag is just a two character rotation of
> byebye
> > > > www.christine.nl
> > > >
> > > >
> >
> >
> >      Bollywood, fun, friendship, sports and more. You
> name it, we have it
> > on http://in.promos.yahoo.com/groups/bestofyahoo/
> >
> 
> 
> 
> -- 
> Regards,
> Shalin Shekhar Mangar.


      Explore your hobbies and interests. Go to http://in.promos.yahoo.com/groups/

Re: Integrate Solr with Tomcat in Linux

Posted by sandeep kaur <sa...@yahoo.co.in>.
thanks and sorry, i will take care of this next time


--- On Tue, 8/7/08, Shalin Shekhar Mangar <sh...@gmail.com> wrote:

> From: Shalin Shekhar Mangar <sh...@gmail.com>
> Subject: Re: Integrate Solr with Tomcat in Linux
> To: solr-user@lucene.apache.org, sandeep_kmca@yahoo.co.in
> Date: Tuesday, 8 July, 2008, 4:40 PM
> Take a look at http://wiki.apache.org/solr/SolrTomcat
> 
> Please avoid replying to an older message when you're
> starting a new topic.
> 
> On Tue, Jul 8, 2008 at 4:36 PM, sandeep kaur
> <sa...@yahoo.co.in>
> wrote:
> 
> > Hi,
> >
> >  I have solr with jetty as server application running
> on Linux.
> >
> > Could anyone please tell me the changes i need to make
> to integrate Tomcat
> > with solr on Linux.
> >
> > Thanks,
> > Sandip
> >
> > --- On Mon, 7/7/08, Benson Margulies
> <bi...@gmail.com> wrote:
> >
> > > From: Benson Margulies
> <bi...@gmail.com>
> > > Subject: Re: js client
> > > To: christine@christine.nl, "solr-user"
> <so...@lucene.apache.org>
> > > Date: Monday, 7 July, 2008, 11:43 PM
> > > The Javascript should have the right URL
> automatically if
> > > you get it from
> > > the ?js URL.
> > >
> > > Anyway, I think I was the first person to say
> > > 'stupid' about that WSDL in
> > > the sample.
> > >
> > > I'm not at all clear on what you are doing at
> this
> > > point.
> > >
> > > Please send along  the URL that works for you in
> soapUI and
> > > the URL that
> > > works for you in the
> <script>...</script>
> > > element.
> > >
> > >
> > >
> > >
> > > On Mon, Jul 7, 2008 at 5:54 AM, Christine Karman
> > > <ch...@christine.nl>
> > > wrote:
> > >
> > > > On Sun, 2008-07-06 at 10:25 -0400, Benson
> Margulies
> > > wrote:
> > > > > In the sample, it is a relative URL to
> the web
> > > service endpoint. The
> > > > > sample starts from a stupid WSDL with
> silly names
> > > for the service and
> > > > > the port.
> > > >
> > > > I'm sorry about using the word
> "stupid".
> > > >
> > > > >
> > > > > Take your endpoint deployment URL, the
> very URL
> > > that is logged when
> > > > > your service starts up, and add ?js to
> the end of
> > > it. Period.
> > > >
> > > > Yes, that's what I do, and that part has
> been
> > > working all the time. What
> > > > doesn't work is I use the same url
> without the ?js
> > > for the web service.
> > > > Is there a way to see the Jetty log file?
> Mabye that
> > > will give me a clue
> > > > what's happening. If nothing is in the
> jetty log
> > > file, I know the
> > > > problem is elsewhere.
> > > >
> > > > Christine
> > > >
> > > > >
> > > > > If it is
> > > > >
> > > > > http://wendy.christine.nl:9000/soap,
> make it
> > > > >
> > > > >  http://wendy.christine.nl:9000/soap?js
> > > > >
> > > > >
> > > > >
> > > > > The sample is taking advantage of
> relative URLs
> > > to avoid typing
> > > > > http://etc.
> > > > >
> > > > > On Sun, Jul 6, 2008 at 8:52 AM,
> Christine Karman
> > > > > <ch...@christine.nl> wrote:
> > > > >         On Sun, 2008-07-06 at 07:37
> -0400, Benson
> > > Margulies wrote:
> > > > >         > The javascript client
> probably
> > > cannot handle redirects. If
> > > > >         you are now
> > > > >         > using ?js, you
> shouldn't need a
> > > redirect.
> > > > >
> > > > >
> > > > >         well actually, the server
> redirect is
> > > similar to a rewrite. It
> > > > >         makes /soap the same as
> /soap:9000.
> > > removing the redirect
> > > > >         brings me back
> > > > >         to the 650 error, "access
> to
> > > restricted uri denied".
> > > > >
> > > > >         What does the /Soap/SoapPort
> mean in the
> > > sample? how does that
> > > > >         translate
> > > > >         to my localhost:9000 or
> localhost/soap?
> > > (localhost ==
> > > > >         wendy.christine.nl).
> > > > >
> > > > >         It's silly that creating
> the web
> > > service from my java code is
> > > > >         so very
> > > > >         simple, and that some stupid
> javascript
> > > code can't be
> > > > >         persuaded to work
> > > > >         properly :-)  I've done my
> part of
> > > javascript but I have never
> > > > >         liked it.
> > > > >
> > > > >         CXF is really good. I was in a
> project a
> > > while ago where I
> > > > >         suggested to
> > > > >         use cxf, but someone who was
> supposed to
> > > have releavant
> > > > >         experience
> > > > >         insisted on using axis2. Took
> him a week
> > > to create some soap
> > > > >         services.
> > > > >         He had to remove all enums  and
> nested
> > > objects from the
> > > > >         project because
> > > > >         axis wouldn't support that.
> A friend
> > > of mine is using cxf in
> > > > >         his project
> > > > >         and he insisted I use it also.
> > > > >
> > > > >         Christine
> > > > >
> > > > >
> > > > >         >
> > > > >         > The browser allows an HTML
> page to
> > > load javascript from
> > > > >         anywhere. Once
> > > > >         > it has loaded javascript
> from a
> > > host:port, it will allow
> > > > >         outbound
> > > > >         > connections to that
> host:port.
> > > > >         >
> > > > >         > So, once you use
> > > src="...../?js" you should be set.
> > > > >         >
> > > > >         > The sample does not fully
> > > demonstrate this effect, since it
> > > > >         has the
> > > > >         > benefit of really  running
> the web
> > > service and the static
> > > > >         HTML from
> > > > >         > the very same host::port.
> > > > >         >
> > > > >         > In the past, before there
> was such a
> > > thing as the ?js URL,
> > > > >         the
> > > > >         > solution here was a
> reverse proxy
> > > instead of a redirect. You
> > > > >         set up
> > > > >         > URL rewriting in plain old
> Apache 2
> > > so that xxx:9000 is
> > > > >         transparently
> > > > >         > available at xxx.
> > > > >         >
> > > > >         > I don't have my recipe
> for this
> > > available at home, if you're
> > > > >         still
> > > > >         > stuck tomorrow I can dig
> it out of
> > > my office.
> > > > >         >
> > > > >         >
> > > > >         >
> > > > >         >
> > > > >         > On Sun, Jul 6, 2008 at
> 7:20 AM,
> > > Christine
> > > > >         <ch...@christine.nl>
> > > > >         > wrote:
> > > > >         >         Benson,
> > > > >         >         I'm still
> struggling.
> > > This is what I have now.
> > > > >         >         I have copied the
> Greeter
> > > example
> > > > >         (js-browser-client-simple)
> > > > >         >         from the
> > > > >         >         samples. Because
> > > cross-scripting is not allowed (I
> > > > >         think that
> > > > >         >         was
> > > > >         >         causing the 650
> error I got)
> > > I have created a
> > > > >         redirect in my
> > > > >         >         apache web
> > > > >         >         server so my url
> is now
> > > local and at port 80.
> > > > >         The ?js import
> > > > >         >         works fine.
> > > > >         >         My url is the same
> as the
> > > ?js url, without the ?js.
> > > > >         >         I have tested my
> web service
> > > with SoapUI. When I
> > > > >         point my
> > > > >         >         browser to the
> > > > >         >         url from the
> javascript
> > > (similar to
> > > > >         the /SoapContext/SoapPort
> > > > >         >         in the
> > > > >         >         sample) I get an
> error
> > > message from the Soap server,
> > > > >         so I know
> > > > >         >         it's
> > > > >         >         listening at that
> url. But
> > > running the javascript
> > > > >         gives an
> > > > >         >         error -1,
> > > > >         >         "could not
> connect to
> > > server". I run the web service
> > > > >         from
> > > > >         >         within
> > > > >         >         Eclipse, which
> doesn't
> > > produce any log output when I
> > > > >         get the
> > > > >         >         -1 error.
> > > > >         >         It does when I get
> the error
> > > at the same url in my
> > > > >         browser.
> > > > >         >
> > > > >         >         this is the first
> bit of my
> > > html, the rest is the
> > > > >         same as the
> > > > >         >         sample.
> > > > >         >
> > > > >         >         <html>
> > > > >         >
> > > <head><title>...</title>
> > > > >         >         <script
> > > language="JavaScript"
> > > TYPE="text/JavaScript"
> > > > >         >
> > >
> src="/dir/port?js"></script>
> > > > >         >         <SCRIPT
> > > LANGUAGE="JavaScript"
> > > > >
> > > TYPE="text/JavaScript"><!--
> > > > >         >
> > > > >         >         var CXFChat = new
> > > chat__CXFChat ();
> > > > >         >
> > > CXFChat.url="/dir/port";
> > > > >         >         var
> responseString;
> > > > >         >         var
> userId="";
> > > > >         >
> > > > >         >         function
> > > sayResponse(response)
> > > > >         >         {
> > > > >         >
> > > responseSpan.firstChild.nodeValue =
> > > > >         >        
> response.getResponseType();
> > > > >         >         }
> > > > >         >
> > > > >         >         function
> sayError(error)
> > > > >         >         {
> > > > >         >               
> alert('error
> > > ' + error);
> > > > >         >         }
> > > > >         >         ......
> > > > >         >
> > > > >         >
> > > > >         >         --
> > > > >         >         dagdag is just a
> two
> > > character rotation of byebye
> > > > >         >         www.christine.nl
> > > > >         >
> > > > >         >
> > > > >
> > > > >         --
> > > > >
> > > > >         dagdag is just a two character
> rotation
> > > of byebye
> > > > >         www.christine.nl
> > > > >
> > > > >
> > > > >
> > > > --
> > > > dagdag is just a two character rotation of
> byebye
> > > > www.christine.nl
> > > >
> > > >
> >
> >
> >      Bollywood, fun, friendship, sports and more. You
> name it, we have it
> > on http://in.promos.yahoo.com/groups/bestofyahoo/
> >
> 
> 
> 
> -- 
> Regards,
> Shalin Shekhar Mangar.


      Bollywood, fun, friendship, sports and more. You name it, we have it on http://in.promos.yahoo.com/groups/bestofyahoo/

Re: Integrate Solr with Tomcat in Linux

Posted by Shalin Shekhar Mangar <sh...@gmail.com>.
Take a look at http://wiki.apache.org/solr/SolrTomcat

Please avoid replying to an older message when you're starting a new topic.

On Tue, Jul 8, 2008 at 4:36 PM, sandeep kaur <sa...@yahoo.co.in>
wrote:

> Hi,
>
>  I have solr with jetty as server application running on Linux.
>
> Could anyone please tell me the changes i need to make to integrate Tomcat
> with solr on Linux.
>
> Thanks,
> Sandip
>
> --- On Mon, 7/7/08, Benson Margulies <bi...@gmail.com> wrote:
>
> > From: Benson Margulies <bi...@gmail.com>
> > Subject: Re: js client
> > To: christine@christine.nl, "solr-user" <so...@lucene.apache.org>
> > Date: Monday, 7 July, 2008, 11:43 PM
> > The Javascript should have the right URL automatically if
> > you get it from
> > the ?js URL.
> >
> > Anyway, I think I was the first person to say
> > 'stupid' about that WSDL in
> > the sample.
> >
> > I'm not at all clear on what you are doing at this
> > point.
> >
> > Please send along  the URL that works for you in soapUI and
> > the URL that
> > works for you in the <script>...</script>
> > element.
> >
> >
> >
> >
> > On Mon, Jul 7, 2008 at 5:54 AM, Christine Karman
> > <ch...@christine.nl>
> > wrote:
> >
> > > On Sun, 2008-07-06 at 10:25 -0400, Benson Margulies
> > wrote:
> > > > In the sample, it is a relative URL to the web
> > service endpoint. The
> > > > sample starts from a stupid WSDL with silly names
> > for the service and
> > > > the port.
> > >
> > > I'm sorry about using the word "stupid".
> > >
> > > >
> > > > Take your endpoint deployment URL, the very URL
> > that is logged when
> > > > your service starts up, and add ?js to the end of
> > it. Period.
> > >
> > > Yes, that's what I do, and that part has been
> > working all the time. What
> > > doesn't work is I use the same url without the ?js
> > for the web service.
> > > Is there a way to see the Jetty log file? Mabye that
> > will give me a clue
> > > what's happening. If nothing is in the jetty log
> > file, I know the
> > > problem is elsewhere.
> > >
> > > Christine
> > >
> > > >
> > > > If it is
> > > >
> > > > http://wendy.christine.nl:9000/soap, make it
> > > >
> > > >  http://wendy.christine.nl:9000/soap?js
> > > >
> > > >
> > > >
> > > > The sample is taking advantage of relative URLs
> > to avoid typing
> > > > http://etc.
> > > >
> > > > On Sun, Jul 6, 2008 at 8:52 AM, Christine Karman
> > > > <ch...@christine.nl> wrote:
> > > >         On Sun, 2008-07-06 at 07:37 -0400, Benson
> > Margulies wrote:
> > > >         > The javascript client probably
> > cannot handle redirects. If
> > > >         you are now
> > > >         > using ?js, you shouldn't need a
> > redirect.
> > > >
> > > >
> > > >         well actually, the server redirect is
> > similar to a rewrite. It
> > > >         makes /soap the same as /soap:9000.
> > removing the redirect
> > > >         brings me back
> > > >         to the 650 error, "access to
> > restricted uri denied".
> > > >
> > > >         What does the /Soap/SoapPort mean in the
> > sample? how does that
> > > >         translate
> > > >         to my localhost:9000 or localhost/soap?
> > (localhost ==
> > > >         wendy.christine.nl).
> > > >
> > > >         It's silly that creating the web
> > service from my java code is
> > > >         so very
> > > >         simple, and that some stupid javascript
> > code can't be
> > > >         persuaded to work
> > > >         properly :-)  I've done my part of
> > javascript but I have never
> > > >         liked it.
> > > >
> > > >         CXF is really good. I was in a project a
> > while ago where I
> > > >         suggested to
> > > >         use cxf, but someone who was supposed to
> > have releavant
> > > >         experience
> > > >         insisted on using axis2. Took him a week
> > to create some soap
> > > >         services.
> > > >         He had to remove all enums  and nested
> > objects from the
> > > >         project because
> > > >         axis wouldn't support that. A friend
> > of mine is using cxf in
> > > >         his project
> > > >         and he insisted I use it also.
> > > >
> > > >         Christine
> > > >
> > > >
> > > >         >
> > > >         > The browser allows an HTML page to
> > load javascript from
> > > >         anywhere. Once
> > > >         > it has loaded javascript from a
> > host:port, it will allow
> > > >         outbound
> > > >         > connections to that host:port.
> > > >         >
> > > >         > So, once you use
> > src="...../?js" you should be set.
> > > >         >
> > > >         > The sample does not fully
> > demonstrate this effect, since it
> > > >         has the
> > > >         > benefit of really  running the web
> > service and the static
> > > >         HTML from
> > > >         > the very same host::port.
> > > >         >
> > > >         > In the past, before there was such a
> > thing as the ?js URL,
> > > >         the
> > > >         > solution here was a reverse proxy
> > instead of a redirect. You
> > > >         set up
> > > >         > URL rewriting in plain old Apache 2
> > so that xxx:9000 is
> > > >         transparently
> > > >         > available at xxx.
> > > >         >
> > > >         > I don't have my recipe for this
> > available at home, if you're
> > > >         still
> > > >         > stuck tomorrow I can dig it out of
> > my office.
> > > >         >
> > > >         >
> > > >         >
> > > >         >
> > > >         > On Sun, Jul 6, 2008 at 7:20 AM,
> > Christine
> > > >         <ch...@christine.nl>
> > > >         > wrote:
> > > >         >         Benson,
> > > >         >         I'm still struggling.
> > This is what I have now.
> > > >         >         I have copied the Greeter
> > example
> > > >         (js-browser-client-simple)
> > > >         >         from the
> > > >         >         samples. Because
> > cross-scripting is not allowed (I
> > > >         think that
> > > >         >         was
> > > >         >         causing the 650 error I got)
> > I have created a
> > > >         redirect in my
> > > >         >         apache web
> > > >         >         server so my url is now
> > local and at port 80.
> > > >         The ?js import
> > > >         >         works fine.
> > > >         >         My url is the same as the
> > ?js url, without the ?js.
> > > >         >         I have tested my web service
> > with SoapUI. When I
> > > >         point my
> > > >         >         browser to the
> > > >         >         url from the javascript
> > (similar to
> > > >         the /SoapContext/SoapPort
> > > >         >         in the
> > > >         >         sample) I get an error
> > message from the Soap server,
> > > >         so I know
> > > >         >         it's
> > > >         >         listening at that url. But
> > running the javascript
> > > >         gives an
> > > >         >         error -1,
> > > >         >         "could not connect to
> > server". I run the web service
> > > >         from
> > > >         >         within
> > > >         >         Eclipse, which doesn't
> > produce any log output when I
> > > >         get the
> > > >         >         -1 error.
> > > >         >         It does when I get the error
> > at the same url in my
> > > >         browser.
> > > >         >
> > > >         >         this is the first bit of my
> > html, the rest is the
> > > >         same as the
> > > >         >         sample.
> > > >         >
> > > >         >         <html>
> > > >         >
> > <head><title>...</title>
> > > >         >         <script
> > language="JavaScript"
> > TYPE="text/JavaScript"
> > > >         >
> > src="/dir/port?js"></script>
> > > >         >         <SCRIPT
> > LANGUAGE="JavaScript"
> > > >
> > TYPE="text/JavaScript"><!--
> > > >         >
> > > >         >         var CXFChat = new
> > chat__CXFChat ();
> > > >         >
> > CXFChat.url="/dir/port";
> > > >         >         var responseString;
> > > >         >         var userId="";
> > > >         >
> > > >         >         function
> > sayResponse(response)
> > > >         >         {
> > > >         >
> > responseSpan.firstChild.nodeValue =
> > > >         >         response.getResponseType();
> > > >         >         }
> > > >         >
> > > >         >         function sayError(error)
> > > >         >         {
> > > >         >                alert('error
> > ' + error);
> > > >         >         }
> > > >         >         ......
> > > >         >
> > > >         >
> > > >         >         --
> > > >         >         dagdag is just a two
> > character rotation of byebye
> > > >         >         www.christine.nl
> > > >         >
> > > >         >
> > > >
> > > >         --
> > > >
> > > >         dagdag is just a two character rotation
> > of byebye
> > > >         www.christine.nl
> > > >
> > > >
> > > >
> > > --
> > > dagdag is just a two character rotation of byebye
> > > www.christine.nl
> > >
> > >
>
>
>      Bollywood, fun, friendship, sports and more. You name it, we have it
> on http://in.promos.yahoo.com/groups/bestofyahoo/
>



-- 
Regards,
Shalin Shekhar Mangar.

Integrate Solr with Tomcat in Linux

Posted by sandeep kaur <sa...@yahoo.co.in>.
Hi,

  I have solr with jetty as server application running on Linux.

Could anyone please tell me the changes i need to make to integrate Tomcat with solr on Linux.

Thanks,
Sandip

--- On Mon, 7/7/08, Benson Margulies <bi...@gmail.com> wrote:

> From: Benson Margulies <bi...@gmail.com>
> Subject: Re: js client
> To: christine@christine.nl, "solr-user" <so...@lucene.apache.org>
> Date: Monday, 7 July, 2008, 11:43 PM
> The Javascript should have the right URL automatically if
> you get it from
> the ?js URL.
> 
> Anyway, I think I was the first person to say
> 'stupid' about that WSDL in
> the sample.
> 
> I'm not at all clear on what you are doing at this
> point.
> 
> Please send along  the URL that works for you in soapUI and
> the URL that
> works for you in the <script>...</script>
> element.
> 
> 
> 
> 
> On Mon, Jul 7, 2008 at 5:54 AM, Christine Karman
> <ch...@christine.nl>
> wrote:
> 
> > On Sun, 2008-07-06 at 10:25 -0400, Benson Margulies
> wrote:
> > > In the sample, it is a relative URL to the web
> service endpoint. The
> > > sample starts from a stupid WSDL with silly names
> for the service and
> > > the port.
> >
> > I'm sorry about using the word "stupid".
> >
> > >
> > > Take your endpoint deployment URL, the very URL
> that is logged when
> > > your service starts up, and add ?js to the end of
> it. Period.
> >
> > Yes, that's what I do, and that part has been
> working all the time. What
> > doesn't work is I use the same url without the ?js
> for the web service.
> > Is there a way to see the Jetty log file? Mabye that
> will give me a clue
> > what's happening. If nothing is in the jetty log
> file, I know the
> > problem is elsewhere.
> >
> > Christine
> >
> > >
> > > If it is
> > >
> > > http://wendy.christine.nl:9000/soap, make it
> > >
> > >  http://wendy.christine.nl:9000/soap?js
> > >
> > >
> > >
> > > The sample is taking advantage of relative URLs
> to avoid typing
> > > http://etc.
> > >
> > > On Sun, Jul 6, 2008 at 8:52 AM, Christine Karman
> > > <ch...@christine.nl> wrote:
> > >         On Sun, 2008-07-06 at 07:37 -0400, Benson
> Margulies wrote:
> > >         > The javascript client probably
> cannot handle redirects. If
> > >         you are now
> > >         > using ?js, you shouldn't need a
> redirect.
> > >
> > >
> > >         well actually, the server redirect is
> similar to a rewrite. It
> > >         makes /soap the same as /soap:9000.
> removing the redirect
> > >         brings me back
> > >         to the 650 error, "access to
> restricted uri denied".
> > >
> > >         What does the /Soap/SoapPort mean in the
> sample? how does that
> > >         translate
> > >         to my localhost:9000 or localhost/soap?
> (localhost ==
> > >         wendy.christine.nl).
> > >
> > >         It's silly that creating the web
> service from my java code is
> > >         so very
> > >         simple, and that some stupid javascript
> code can't be
> > >         persuaded to work
> > >         properly :-)  I've done my part of
> javascript but I have never
> > >         liked it.
> > >
> > >         CXF is really good. I was in a project a
> while ago where I
> > >         suggested to
> > >         use cxf, but someone who was supposed to
> have releavant
> > >         experience
> > >         insisted on using axis2. Took him a week
> to create some soap
> > >         services.
> > >         He had to remove all enums  and nested
> objects from the
> > >         project because
> > >         axis wouldn't support that. A friend
> of mine is using cxf in
> > >         his project
> > >         and he insisted I use it also.
> > >
> > >         Christine
> > >
> > >
> > >         >
> > >         > The browser allows an HTML page to
> load javascript from
> > >         anywhere. Once
> > >         > it has loaded javascript from a
> host:port, it will allow
> > >         outbound
> > >         > connections to that host:port.
> > >         >
> > >         > So, once you use
> src="...../?js" you should be set.
> > >         >
> > >         > The sample does not fully
> demonstrate this effect, since it
> > >         has the
> > >         > benefit of really  running the web
> service and the static
> > >         HTML from
> > >         > the very same host::port.
> > >         >
> > >         > In the past, before there was such a
> thing as the ?js URL,
> > >         the
> > >         > solution here was a reverse proxy
> instead of a redirect. You
> > >         set up
> > >         > URL rewriting in plain old Apache 2
> so that xxx:9000 is
> > >         transparently
> > >         > available at xxx.
> > >         >
> > >         > I don't have my recipe for this
> available at home, if you're
> > >         still
> > >         > stuck tomorrow I can dig it out of
> my office.
> > >         >
> > >         >
> > >         >
> > >         >
> > >         > On Sun, Jul 6, 2008 at 7:20 AM,
> Christine
> > >         <ch...@christine.nl>
> > >         > wrote:
> > >         >         Benson,
> > >         >         I'm still struggling.
> This is what I have now.
> > >         >         I have copied the Greeter
> example
> > >         (js-browser-client-simple)
> > >         >         from the
> > >         >         samples. Because
> cross-scripting is not allowed (I
> > >         think that
> > >         >         was
> > >         >         causing the 650 error I got)
> I have created a
> > >         redirect in my
> > >         >         apache web
> > >         >         server so my url is now
> local and at port 80.
> > >         The ?js import
> > >         >         works fine.
> > >         >         My url is the same as the
> ?js url, without the ?js.
> > >         >         I have tested my web service
> with SoapUI. When I
> > >         point my
> > >         >         browser to the
> > >         >         url from the javascript
> (similar to
> > >         the /SoapContext/SoapPort
> > >         >         in the
> > >         >         sample) I get an error
> message from the Soap server,
> > >         so I know
> > >         >         it's
> > >         >         listening at that url. But
> running the javascript
> > >         gives an
> > >         >         error -1,
> > >         >         "could not connect to
> server". I run the web service
> > >         from
> > >         >         within
> > >         >         Eclipse, which doesn't
> produce any log output when I
> > >         get the
> > >         >         -1 error.
> > >         >         It does when I get the error
> at the same url in my
> > >         browser.
> > >         >
> > >         >         this is the first bit of my
> html, the rest is the
> > >         same as the
> > >         >         sample.
> > >         >
> > >         >         <html>
> > >         >        
> <head><title>...</title>
> > >         >         <script
> language="JavaScript"
> TYPE="text/JavaScript"
> > >         >        
> src="/dir/port?js"></script>
> > >         >         <SCRIPT
> LANGUAGE="JavaScript"
> > >        
> TYPE="text/JavaScript"><!--
> > >         >
> > >         >         var CXFChat = new
> chat__CXFChat ();
> > >         >        
> CXFChat.url="/dir/port";
> > >         >         var responseString;
> > >         >         var userId="";
> > >         >
> > >         >         function
> sayResponse(response)
> > >         >         {
> > >         >               
> responseSpan.firstChild.nodeValue =
> > >         >         response.getResponseType();
> > >         >         }
> > >         >
> > >         >         function sayError(error)
> > >         >         {
> > >         >                alert('error
> ' + error);
> > >         >         }
> > >         >         ......
> > >         >
> > >         >
> > >         >         --
> > >         >         dagdag is just a two
> character rotation of byebye
> > >         >         www.christine.nl
> > >         >
> > >         >
> > >
> > >         --
> > >
> > >         dagdag is just a two character rotation
> of byebye
> > >         www.christine.nl
> > >
> > >
> > >
> > --
> > dagdag is just a two character rotation of byebye
> > www.christine.nl
> >
> >


      Bollywood, fun, friendship, sports and more. You name it, we have it on http://in.promos.yahoo.com/groups/bestofyahoo/

Re: js client

Posted by Christine <ch...@christine.nl>.
sorry,
please ignore this message. Hadn't read Benson's last email.

Christine

On Fri, 2008-07-11 at 13:24 +0200, Christine wrote:
> On Thu, 2008-07-10 at 16:02 -0400, Benson Margulies wrote:
> > Anthony,
> > 
> > Thanks for joining in. We know exactly what Christine needs to do. She needs
> > to arrange for the static content and the web service to appear at the same
> > host:port.
> 
> Benson, just to make sure. What do you mean by "static content"? Is that
> the html or the ?js  or both?
> 
> The ?js file gets loaded properly, it contains the correct url of the
> web service, so what else can I do?
> 
> Christine
> 
-- 
dagdag is just a two character rotation of byebye
www.christine.nl


Re: js client

Posted by Christine <ch...@christine.nl>.
On Thu, 2008-07-10 at 16:02 -0400, Benson Margulies wrote:
> Anthony,
> 
> Thanks for joining in. We know exactly what Christine needs to do. She needs
> to arrange for the static content and the web service to appear at the same
> host:port.

Benson, just to make sure. What do you mean by "static content"? Is that
the html or the ?js  or both?

The ?js file gets loaded properly, it contains the correct url of the
web service, so what else can I do?

Christine

-- 
dagdag is just a two character rotation of byebye
www.christine.nl


Re: js client

Posted by Benson Margulies <bi...@gmail.com>.
Anthony,

Thanks for joining in. We know exactly what Christine needs to do. She needs
to arrange for the static content and the web service to appear at the same
host:port.

-benson


On Thu, Jul 10, 2008 at 3:22 PM, Anthony Schexnaildre <ap...@gmail.com>
wrote:

> If you download the jetty package from their website you will find that
> there is an /etc directory. In that directory are numerous examples of how
> to configure different aspects of jetty. I would take a look at jetty.xml
> and jetty-logging.xml in particular. I think it may be easier to leave
> apache out of the equation until you are sure it's not part of the problem.
>
> -Anthony
>
>
>
> On Jul 10, 2008, at 12:03 PM, Christine Karman wrote:
>
>  On Thu, 2008-07-10 at 07:38 -0400, Benson Margulies wrote:
>>
>>> Christine,
>>>
>>> I'm trying to find some time to build up an example. Until then, I
>>> want to try to clarify something.
>>>
>>> The cxfjsutils.js file and the server itself have to be on the same
>>> host:port. The rest of the html need not.
>>>
>>
>> The web service works ok and the javascript download from the web
>> service works ok. But somewhere inside the javascript the call to the
>> webservice doesn't work. Not on port 9000 and not on a rewritten /soap
>> url. The error it gives suggests that the call is ok.
>> Is there a way of activating the log in Jetty so I can see if Jetty
>> receives the call?
>>
>> dagdag
>> Christine
>>
>>
>> On Wed, Jul 9, 2008 at 12:34 PM, Christine <ch...@christine.nl>
>> wrote:
>>       Benson,
>>       this is what the js trace gives me:
>>       emptyClient constructorrequest
>>       http://www.christine.nl/soap/wendyBotabout to open POST
>>       http://www.christine.nl/soap/wendyBotabout to send dataPOST
>>       http://www.christine.nl/soap/wendyBotonreadystatechange
>>       1onreadystatechange 2onreadystatechange 4onreadystatechange DONE
>>       0
>>
>>       then it calls the error function with code -1.
>>
>> --
>> dagdag is just a two character rotation of byebye
>> www.christine.nl
>>
>>
>

Re: js client

Posted by Anthony Schexnaildre <ap...@gmail.com>.
If you download the jetty package from their website you will find  
that there is an /etc directory. In that directory are numerous  
examples of how to configure different aspects of jetty. I would take  
a look at jetty.xml and jetty-logging.xml in particular. I think it  
may be easier to leave apache out of the equation until you are sure  
it's not part of the problem.

-Anthony


On Jul 10, 2008, at 12:03 PM, Christine Karman wrote:

> On Thu, 2008-07-10 at 07:38 -0400, Benson Margulies wrote:
>> Christine,
>>
>> I'm trying to find some time to build up an example. Until then, I
>> want to try to clarify something.
>>
>> The cxfjsutils.js file and the server itself have to be on the same
>> host:port. The rest of the html need not.
>
> The web service works ok and the javascript download from the web
> service works ok. But somewhere inside the javascript the call to the
> webservice doesn't work. Not on port 9000 and not on a rewritten /soap
> url. The error it gives suggests that the call is ok.
> Is there a way of activating the log in Jetty so I can see if Jetty
> receives the call?
>
> dagdag
> Christine
>
>
> On Wed, Jul 9, 2008 at 12:34 PM, Christine <ch...@christine.nl>
> wrote:
>        Benson,
>        this is what the js trace gives me:
>        emptyClient constructorrequest
>        http://www.christine.nl/soap/wendyBotabout to open POST
>        http://www.christine.nl/soap/wendyBotabout to send dataPOST
>        http://www.christine.nl/soap/wendyBotonreadystatechange
>        1onreadystatechange 2onreadystatechange 4onreadystatechange  
> DONE
>        0
>
>        then it calls the error function with code -1.
>
> -- 
> dagdag is just a two character rotation of byebye
> www.christine.nl
>


Re: js client

Posted by Christine Karman <ch...@christine.nl>.
Hi guys,
I think I have solved all my js issues. In order to make the javascript
helloworld example work, here's what I did.

In the virtual web server config, create a proxy. Browsers don't allow
cross site scripting, for obvious reasons. In your virtual web server
configuration you add these lines (as Benson already showed)

  ProxyRequests On
  ProxyVia On
  <Proxy *>
  Order deny,allow
  Allow from all
  </Proxy>
  ProxyPass /soap http://localhost:9000
  ProxyPassReverse /soap http://localhost:9000

In order to enable proxies, in the mods-enabled directory create
symbolic links to proxy.conf, proxy.load and proxy_http.load in the
mods_avaliable directory.
I found that I need to use a high port for downloading the html and js.
During debugging I didn't notice because tcpmon was on a high port
anyway, but removing tcpmon generated a URI access denied error. So now
my html is in an iframe that is loaded from port 8100, as is the js.
I'll check this out because I think you should be able to use port 80.

In the static html, replace "response.getResponseType()" in
sayHiResponse by "response.getReturn()", which will get you the string
response from the soap service.

Don't use a form submit. A form submit causes the page to refresh,
replacing your web service response. If you run the web server locally,
the submit can precede the soap response, causing an http error.



-- 
dagdag is just a two character rotation of byebye
www.christine.nl


Re: js client

Posted by Christine Karman <ch...@christine.nl>.
Benson,
this is what tcpmon shows:

HTTP/1.1 200 OK
Date: Sun, 13 Jul 2008 13:21:51 GMT
Server: Jetty(6.1.9)
Content-Type: text/xml; charset=utf-8
SOAPAction: ""
Content-Length: 211
Via: 1.1 wendy:8100
Keep-Alive: timeout=15, max=99
Connection: Keep-Alive

<soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/">
 <soap:Body>
  <ns2:sayResponse xmlns:ns2="http://soap/">
   <return>What country are you from</return>
  </ns2:sayResponse>
 </soap:Body>
</soap:Envelope>

while the javascript in the debugger says that req.XMLResponse is null.
I'll keep searching.

dagdag
Christine


On Sat, 2008-07-12 at 18:54 -0400, Benson Margulies wrote:
> That message indicates that the browser did not receive any XML it could
> use.
> 
> What browser do you use? What debugging tools have you got turned on?
> 
> I would be tempted to use tcpmon in between the server and the browser, or
> step through things with Venkman (if you are using FF).
> 
> 
> On Fri, Jul 11, 2008 at 4:57 PM, Christine Karman <ch...@christine.nl>
> wrote:
> 
> > On Fri, 2008-07-11 at 12:54 -0400, Benson Margulies wrote:
> > > Now we are moving in the right direction.
> > >
> > > I'd recommend turning on CXF logging, as explained in confluence. It will
> > > log messages in both directions. Some message logs and the WSDL should
> > give
> > > us a clue.
> >
> > Ok. I thought cxf was logging, from the number of logg messages I got
> > from spring, but now I have cxf log messages. It says this is going out:
> > Payload:
> > <soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/">
> >  <soap:Body>
> >  <ns2:sayResponse xmlns:ns2="http://soap/">
> >   <return>invalid user id.</return>
> >  </ns2:sayResponse>
> >  </soap:Body>
> > </soap:Envelope>
> >
> > The "invalid user id." is the message my app sends back, so this looks
> > all right. CXF is sending this message and the javascript trace is
> > giving this (I have modified and added messages for convenience):
> >
> > onreadystatechange 1
> > onreadystatechange 2
> > onreadystatechange 4
> > 855 httpStatus = 0
> > onreadystatechange DONE :-)
> > httpstatus 0
> > 864 this.onsuccess
> > 868 responseXML
> > 875 Could not handle content of response.
> > 876 response xml null
> >
> > I'll keep searching, we'll get there eventually :-)
> > I'll check on the proxy again but I do assume that if a message goes one
> > way through a web server, the response should be able to go back the
> > same way.
> >
> > the wsdl is at http://www.christine.nl/soap/wendyBot?wsdl
> >
> > dagdag
> > Christine
> >
> >
> > >
> > > I'm leaving on vacation on Sunday morning.
> > >
> > > On Fri, Jul 11, 2008 at 12:20 PM, Christine Karman <
> > christine@christine.nl>
> > > wrote:
> > >
> > > > Benson,
> > > > you were right about rewrite rules not being the same as a proxy.
> > > >
> > > > I have added two lines to my apache config
> > > >
> > > > ProxyPass /soap http://localhost:9000
> > > > ProxyPassReverse /soap http://localhost:9000
> > > >
> > > > which causes the js request to be passed to the server. I can see the
> > > > reply being created, but the js says
> > > > "Could not handle content of response."
> > > >
> > > > The xml response is null. Jetty seems to write its logging output to my
> > > > console, but I don't see a lot of it.
> > > >
> > > > dagdag
> > > > Christine
> > > >
> > > > On Thu, 2008-07-10 at 15:09 -0400, Benson Margulies wrote:
> > > > > 2. Edit httpd.conf to contain the following:
> > > > >
> > > > > LoadModule proxy_module modules/mod_proxy.so
> > > > >
> > > > > LoadModule proxy_http_module modules/mod_proxy_http.so
> > > > >
> > > > > 3. Edit proxy.conf to contain the following:
> > > > >
> > > > > ProxyPass /ws/rta http://localhost:6099/rta
> > > > >
> > > > > ProxyPass /ws/rta/ http://localhost:6099/rta/
> > > > >
> > > > > ProxyPassReverse /ws/rta http://localhost:6099/rta
> > > > >
> > > > > ProxyPassReverse /ws/rta/ http://localhost:6099/rta/
> > > > >
> > > > > ProxyPass /ws/askt http://localhost:6099/askt
> > > > >
> > > > > ProxyPass /ws/askt/ http://localhost:6099/askt/
> > > > >
> > > > > ProxyPassReverse /ws/askt http://localhost:6099/askt
> > > > >
> > > > > ProxyPassReverse /ws/askt/ http://localhost:6099/askt/
> > > > >
> > > > >
> > > > >
> > > > > On Thu, Jul 10, 2008 at 2:38 PM, Benson Margulies <
> > bimargulies@gmail.com
> > > > >
> > > > > wrote:
> > > > >
> > > > > > I'm not the expert on jetty logging. However, I now realize, after
> > > > trying
> > > > > > it, that I've been telling you the wrong thing about the browser
> > > > > > cross-scripting rules.
> > > > > >
> > > > > > I thought that it was true that, so long as one of the javascript
> > files
> > > > > > came from a particular host:port combination, that you would be
> > able to
> > > > > > connect back to it.
> > > > > >
> > > > > > I was wrong. The web service must be on the same host:port as the
> > main
> > > > HTML
> > > > > > page.
> > > > > >
> > > > > > So we're back to using rewrite rules. I have set up reverse proxies
> > for
> > > > > > this purposes on Apache, but it was a very long time ago. I don't
> > have
> > > > any
> > > > > > clue how to do it on plain-old-jetty.
> > > > > >
> > > > > > You could also presumably use an invisible iframe to host a page
> > that
> > > > is
> > > > > > really on the same host as the web service, and get the data in and
> > out
> > > > of
> > > > > > there.
> > > > > >
> > > > > > I think I'll be able to post a rewrite recipe later today.
> > > > > >
> > > > > >
> > > > > >
> > > > > > On Thu, Jul 10, 2008 at 12:03 PM, Christine Karman <
> > > > christine@christine.nl>
> > > > > > wrote:
> > > > > >
> > > > > >> On Thu, 2008-07-10 at 07:38 -0400, Benson Margulies wrote:
> > > > > >> > Christine,
> > > > > >> >
> > > > > >> > I'm trying to find some time to build up an example. Until then,
> > I
> > > > > >> > want to try to clarify something.
> > > > > >> >
> > > > > >> > The cxfjsutils.js file and the server itself have to be on the
> > same
> > > > > >> > host:port. The rest of the html need not.
> > > > > >>
> > > > > >> The web service works ok and the javascript download from the web
> > > > > >> service works ok. But somewhere inside the javascript the call to
> > the
> > > > > >> webservice doesn't work. Not on port 9000 and not on a rewritten
> > /soap
> > > > > >> url. The error it gives suggests that the call is ok.
> > > > > >> Is there a way of activating the log in Jetty so I can see if
> > Jetty
> > > > > >> receives the call?
> > > > > >>
> > > > > >> dagdag
> > > > > >> Christine
> > > > > >>
> > > > > >>
> > > > > >> On Wed, Jul 9, 2008 at 12:34 PM, Christine <
> > christine@christine.nl>
> > > > > >> wrote:
> > > > > >>        Benson,
> > > > > >>        this is what the js trace gives me:
> > > > > >>        emptyClient constructorrequest
> > > > > >>        http://www.christine.nl/soap/wendyBotabout to open POST
> > > > > >>        http://www.christine.nl/soap/wendyBotabout to send
> > dataPOST
> > > > > >>        http://www.christine.nl/soap/wendyBotonreadystatechange
> > > > > >>        1onreadystatechange 2onreadystatechange 4onreadystatechange
> > > > DONE
> > > > > >>        0
> > > > > >>
> > > > > >>        then it calls the error function with code -1.
> > > > > >>
> > > > > >> --
> > > > > >> dagdag is just a two character rotation of byebye
> > > > > >> www.christine.nl
> > > > > >>
> > > > > >>
> > > > > >
> > > > --
> > > > dagdag is just a two character rotation of byebye
> > > > www.christine.nl
> > > >
> > > >
> > --
> > dagdag is just a two character rotation of byebye
> > www.christine.nl
> >
> >
-- 
dagdag is just a two character rotation of byebye
www.christine.nl


Re: js client

Posted by Benson Margulies <bi...@gmail.com>.
That message indicates that the browser did not receive any XML it could
use.

What browser do you use? What debugging tools have you got turned on?

I would be tempted to use tcpmon in between the server and the browser, or
step through things with Venkman (if you are using FF).


On Fri, Jul 11, 2008 at 4:57 PM, Christine Karman <ch...@christine.nl>
wrote:

> On Fri, 2008-07-11 at 12:54 -0400, Benson Margulies wrote:
> > Now we are moving in the right direction.
> >
> > I'd recommend turning on CXF logging, as explained in confluence. It will
> > log messages in both directions. Some message logs and the WSDL should
> give
> > us a clue.
>
> Ok. I thought cxf was logging, from the number of logg messages I got
> from spring, but now I have cxf log messages. It says this is going out:
> Payload:
> <soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/">
>  <soap:Body>
>  <ns2:sayResponse xmlns:ns2="http://soap/">
>   <return>invalid user id.</return>
>  </ns2:sayResponse>
>  </soap:Body>
> </soap:Envelope>
>
> The "invalid user id." is the message my app sends back, so this looks
> all right. CXF is sending this message and the javascript trace is
> giving this (I have modified and added messages for convenience):
>
> onreadystatechange 1
> onreadystatechange 2
> onreadystatechange 4
> 855 httpStatus = 0
> onreadystatechange DONE :-)
> httpstatus 0
> 864 this.onsuccess
> 868 responseXML
> 875 Could not handle content of response.
> 876 response xml null
>
> I'll keep searching, we'll get there eventually :-)
> I'll check on the proxy again but I do assume that if a message goes one
> way through a web server, the response should be able to go back the
> same way.
>
> the wsdl is at http://www.christine.nl/soap/wendyBot?wsdl
>
> dagdag
> Christine
>
>
> >
> > I'm leaving on vacation on Sunday morning.
> >
> > On Fri, Jul 11, 2008 at 12:20 PM, Christine Karman <
> christine@christine.nl>
> > wrote:
> >
> > > Benson,
> > > you were right about rewrite rules not being the same as a proxy.
> > >
> > > I have added two lines to my apache config
> > >
> > > ProxyPass /soap http://localhost:9000
> > > ProxyPassReverse /soap http://localhost:9000
> > >
> > > which causes the js request to be passed to the server. I can see the
> > > reply being created, but the js says
> > > "Could not handle content of response."
> > >
> > > The xml response is null. Jetty seems to write its logging output to my
> > > console, but I don't see a lot of it.
> > >
> > > dagdag
> > > Christine
> > >
> > > On Thu, 2008-07-10 at 15:09 -0400, Benson Margulies wrote:
> > > > 2. Edit httpd.conf to contain the following:
> > > >
> > > > LoadModule proxy_module modules/mod_proxy.so
> > > >
> > > > LoadModule proxy_http_module modules/mod_proxy_http.so
> > > >
> > > > 3. Edit proxy.conf to contain the following:
> > > >
> > > > ProxyPass /ws/rta http://localhost:6099/rta
> > > >
> > > > ProxyPass /ws/rta/ http://localhost:6099/rta/
> > > >
> > > > ProxyPassReverse /ws/rta http://localhost:6099/rta
> > > >
> > > > ProxyPassReverse /ws/rta/ http://localhost:6099/rta/
> > > >
> > > > ProxyPass /ws/askt http://localhost:6099/askt
> > > >
> > > > ProxyPass /ws/askt/ http://localhost:6099/askt/
> > > >
> > > > ProxyPassReverse /ws/askt http://localhost:6099/askt
> > > >
> > > > ProxyPassReverse /ws/askt/ http://localhost:6099/askt/
> > > >
> > > >
> > > >
> > > > On Thu, Jul 10, 2008 at 2:38 PM, Benson Margulies <
> bimargulies@gmail.com
> > > >
> > > > wrote:
> > > >
> > > > > I'm not the expert on jetty logging. However, I now realize, after
> > > trying
> > > > > it, that I've been telling you the wrong thing about the browser
> > > > > cross-scripting rules.
> > > > >
> > > > > I thought that it was true that, so long as one of the javascript
> files
> > > > > came from a particular host:port combination, that you would be
> able to
> > > > > connect back to it.
> > > > >
> > > > > I was wrong. The web service must be on the same host:port as the
> main
> > > HTML
> > > > > page.
> > > > >
> > > > > So we're back to using rewrite rules. I have set up reverse proxies
> for
> > > > > this purposes on Apache, but it was a very long time ago. I don't
> have
> > > any
> > > > > clue how to do it on plain-old-jetty.
> > > > >
> > > > > You could also presumably use an invisible iframe to host a page
> that
> > > is
> > > > > really on the same host as the web service, and get the data in and
> out
> > > of
> > > > > there.
> > > > >
> > > > > I think I'll be able to post a rewrite recipe later today.
> > > > >
> > > > >
> > > > >
> > > > > On Thu, Jul 10, 2008 at 12:03 PM, Christine Karman <
> > > christine@christine.nl>
> > > > > wrote:
> > > > >
> > > > >> On Thu, 2008-07-10 at 07:38 -0400, Benson Margulies wrote:
> > > > >> > Christine,
> > > > >> >
> > > > >> > I'm trying to find some time to build up an example. Until then,
> I
> > > > >> > want to try to clarify something.
> > > > >> >
> > > > >> > The cxfjsutils.js file and the server itself have to be on the
> same
> > > > >> > host:port. The rest of the html need not.
> > > > >>
> > > > >> The web service works ok and the javascript download from the web
> > > > >> service works ok. But somewhere inside the javascript the call to
> the
> > > > >> webservice doesn't work. Not on port 9000 and not on a rewritten
> /soap
> > > > >> url. The error it gives suggests that the call is ok.
> > > > >> Is there a way of activating the log in Jetty so I can see if
> Jetty
> > > > >> receives the call?
> > > > >>
> > > > >> dagdag
> > > > >> Christine
> > > > >>
> > > > >>
> > > > >> On Wed, Jul 9, 2008 at 12:34 PM, Christine <
> christine@christine.nl>
> > > > >> wrote:
> > > > >>        Benson,
> > > > >>        this is what the js trace gives me:
> > > > >>        emptyClient constructorrequest
> > > > >>        http://www.christine.nl/soap/wendyBotabout to open POST
> > > > >>        http://www.christine.nl/soap/wendyBotabout to send
> dataPOST
> > > > >>        http://www.christine.nl/soap/wendyBotonreadystatechange
> > > > >>        1onreadystatechange 2onreadystatechange 4onreadystatechange
> > > DONE
> > > > >>        0
> > > > >>
> > > > >>        then it calls the error function with code -1.
> > > > >>
> > > > >> --
> > > > >> dagdag is just a two character rotation of byebye
> > > > >> www.christine.nl
> > > > >>
> > > > >>
> > > > >
> > > --
> > > dagdag is just a two character rotation of byebye
> > > www.christine.nl
> > >
> > >
> --
> dagdag is just a two character rotation of byebye
> www.christine.nl
>
>

Re: js client

Posted by Christine Karman <ch...@christine.nl>.
On Fri, 2008-07-11 at 12:54 -0400, Benson Margulies wrote:
> Now we are moving in the right direction.
> 
> I'd recommend turning on CXF logging, as explained in confluence. It will
> log messages in both directions. Some message logs and the WSDL should give
> us a clue.

Ok. I thought cxf was logging, from the number of logg messages I got
from spring, but now I have cxf log messages. It says this is going out:
Payload: 
<soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/">
 <soap:Body>
  <ns2:sayResponse xmlns:ns2="http://soap/">
   <return>invalid user id.</return>
  </ns2:sayResponse>
 </soap:Body>
</soap:Envelope>

The "invalid user id." is the message my app sends back, so this looks
all right. CXF is sending this message and the javascript trace is
giving this (I have modified and added messages for convenience):

onreadystatechange 1 
onreadystatechange 2 
onreadystatechange 4  
855 httpStatus = 0 
onreadystatechange DONE :-) 
httpstatus 0  
864 this.onsuccess   
868 responseXML   
875 Could not handle content of response.  
876 response xml null

I'll keep searching, we'll get there eventually :-)
I'll check on the proxy again but I do assume that if a message goes one
way through a web server, the response should be able to go back the
same way.

the wsdl is at http://www.christine.nl/soap/wendyBot?wsdl

dagdag
Christine


> 
> I'm leaving on vacation on Sunday morning.
> 
> On Fri, Jul 11, 2008 at 12:20 PM, Christine Karman <ch...@christine.nl>
> wrote:
> 
> > Benson,
> > you were right about rewrite rules not being the same as a proxy.
> >
> > I have added two lines to my apache config
> >
> > ProxyPass /soap http://localhost:9000
> > ProxyPassReverse /soap http://localhost:9000
> >
> > which causes the js request to be passed to the server. I can see the
> > reply being created, but the js says
> > "Could not handle content of response."
> >
> > The xml response is null. Jetty seems to write its logging output to my
> > console, but I don't see a lot of it.
> >
> > dagdag
> > Christine
> >
> > On Thu, 2008-07-10 at 15:09 -0400, Benson Margulies wrote:
> > > 2. Edit httpd.conf to contain the following:
> > >
> > > LoadModule proxy_module modules/mod_proxy.so
> > >
> > > LoadModule proxy_http_module modules/mod_proxy_http.so
> > >
> > > 3. Edit proxy.conf to contain the following:
> > >
> > > ProxyPass /ws/rta http://localhost:6099/rta
> > >
> > > ProxyPass /ws/rta/ http://localhost:6099/rta/
> > >
> > > ProxyPassReverse /ws/rta http://localhost:6099/rta
> > >
> > > ProxyPassReverse /ws/rta/ http://localhost:6099/rta/
> > >
> > > ProxyPass /ws/askt http://localhost:6099/askt
> > >
> > > ProxyPass /ws/askt/ http://localhost:6099/askt/
> > >
> > > ProxyPassReverse /ws/askt http://localhost:6099/askt
> > >
> > > ProxyPassReverse /ws/askt/ http://localhost:6099/askt/
> > >
> > >
> > >
> > > On Thu, Jul 10, 2008 at 2:38 PM, Benson Margulies <bimargulies@gmail.com
> > >
> > > wrote:
> > >
> > > > I'm not the expert on jetty logging. However, I now realize, after
> > trying
> > > > it, that I've been telling you the wrong thing about the browser
> > > > cross-scripting rules.
> > > >
> > > > I thought that it was true that, so long as one of the javascript files
> > > > came from a particular host:port combination, that you would be able to
> > > > connect back to it.
> > > >
> > > > I was wrong. The web service must be on the same host:port as the main
> > HTML
> > > > page.
> > > >
> > > > So we're back to using rewrite rules. I have set up reverse proxies for
> > > > this purposes on Apache, but it was a very long time ago. I don't have
> > any
> > > > clue how to do it on plain-old-jetty.
> > > >
> > > > You could also presumably use an invisible iframe to host a page that
> > is
> > > > really on the same host as the web service, and get the data in and out
> > of
> > > > there.
> > > >
> > > > I think I'll be able to post a rewrite recipe later today.
> > > >
> > > >
> > > >
> > > > On Thu, Jul 10, 2008 at 12:03 PM, Christine Karman <
> > christine@christine.nl>
> > > > wrote:
> > > >
> > > >> On Thu, 2008-07-10 at 07:38 -0400, Benson Margulies wrote:
> > > >> > Christine,
> > > >> >
> > > >> > I'm trying to find some time to build up an example. Until then, I
> > > >> > want to try to clarify something.
> > > >> >
> > > >> > The cxfjsutils.js file and the server itself have to be on the same
> > > >> > host:port. The rest of the html need not.
> > > >>
> > > >> The web service works ok and the javascript download from the web
> > > >> service works ok. But somewhere inside the javascript the call to the
> > > >> webservice doesn't work. Not on port 9000 and not on a rewritten /soap
> > > >> url. The error it gives suggests that the call is ok.
> > > >> Is there a way of activating the log in Jetty so I can see if Jetty
> > > >> receives the call?
> > > >>
> > > >> dagdag
> > > >> Christine
> > > >>
> > > >>
> > > >> On Wed, Jul 9, 2008 at 12:34 PM, Christine <ch...@christine.nl>
> > > >> wrote:
> > > >>        Benson,
> > > >>        this is what the js trace gives me:
> > > >>        emptyClient constructorrequest
> > > >>        http://www.christine.nl/soap/wendyBotabout to open POST
> > > >>        http://www.christine.nl/soap/wendyBotabout to send dataPOST
> > > >>        http://www.christine.nl/soap/wendyBotonreadystatechange
> > > >>        1onreadystatechange 2onreadystatechange 4onreadystatechange
> > DONE
> > > >>        0
> > > >>
> > > >>        then it calls the error function with code -1.
> > > >>
> > > >> --
> > > >> dagdag is just a two character rotation of byebye
> > > >> www.christine.nl
> > > >>
> > > >>
> > > >
> > --
> > dagdag is just a two character rotation of byebye
> > www.christine.nl
> >
> >
-- 
dagdag is just a two character rotation of byebye
www.christine.nl


Re: js client

Posted by Benson Margulies <bi...@gmail.com>.
Now we are moving in the right direction.

I'd recommend turning on CXF logging, as explained in confluence. It will
log messages in both directions. Some message logs and the WSDL should give
us a clue.

I'm leaving on vacation on Sunday morning.

On Fri, Jul 11, 2008 at 12:20 PM, Christine Karman <ch...@christine.nl>
wrote:

> Benson,
> you were right about rewrite rules not being the same as a proxy.
>
> I have added two lines to my apache config
>
> ProxyPass /soap http://localhost:9000
> ProxyPassReverse /soap http://localhost:9000
>
> which causes the js request to be passed to the server. I can see the
> reply being created, but the js says
> "Could not handle content of response."
>
> The xml response is null. Jetty seems to write its logging output to my
> console, but I don't see a lot of it.
>
> dagdag
> Christine
>
> On Thu, 2008-07-10 at 15:09 -0400, Benson Margulies wrote:
> > 2. Edit httpd.conf to contain the following:
> >
> > LoadModule proxy_module modules/mod_proxy.so
> >
> > LoadModule proxy_http_module modules/mod_proxy_http.so
> >
> > 3. Edit proxy.conf to contain the following:
> >
> > ProxyPass /ws/rta http://localhost:6099/rta
> >
> > ProxyPass /ws/rta/ http://localhost:6099/rta/
> >
> > ProxyPassReverse /ws/rta http://localhost:6099/rta
> >
> > ProxyPassReverse /ws/rta/ http://localhost:6099/rta/
> >
> > ProxyPass /ws/askt http://localhost:6099/askt
> >
> > ProxyPass /ws/askt/ http://localhost:6099/askt/
> >
> > ProxyPassReverse /ws/askt http://localhost:6099/askt
> >
> > ProxyPassReverse /ws/askt/ http://localhost:6099/askt/
> >
> >
> >
> > On Thu, Jul 10, 2008 at 2:38 PM, Benson Margulies <bimargulies@gmail.com
> >
> > wrote:
> >
> > > I'm not the expert on jetty logging. However, I now realize, after
> trying
> > > it, that I've been telling you the wrong thing about the browser
> > > cross-scripting rules.
> > >
> > > I thought that it was true that, so long as one of the javascript files
> > > came from a particular host:port combination, that you would be able to
> > > connect back to it.
> > >
> > > I was wrong. The web service must be on the same host:port as the main
> HTML
> > > page.
> > >
> > > So we're back to using rewrite rules. I have set up reverse proxies for
> > > this purposes on Apache, but it was a very long time ago. I don't have
> any
> > > clue how to do it on plain-old-jetty.
> > >
> > > You could also presumably use an invisible iframe to host a page that
> is
> > > really on the same host as the web service, and get the data in and out
> of
> > > there.
> > >
> > > I think I'll be able to post a rewrite recipe later today.
> > >
> > >
> > >
> > > On Thu, Jul 10, 2008 at 12:03 PM, Christine Karman <
> christine@christine.nl>
> > > wrote:
> > >
> > >> On Thu, 2008-07-10 at 07:38 -0400, Benson Margulies wrote:
> > >> > Christine,
> > >> >
> > >> > I'm trying to find some time to build up an example. Until then, I
> > >> > want to try to clarify something.
> > >> >
> > >> > The cxfjsutils.js file and the server itself have to be on the same
> > >> > host:port. The rest of the html need not.
> > >>
> > >> The web service works ok and the javascript download from the web
> > >> service works ok. But somewhere inside the javascript the call to the
> > >> webservice doesn't work. Not on port 9000 and not on a rewritten /soap
> > >> url. The error it gives suggests that the call is ok.
> > >> Is there a way of activating the log in Jetty so I can see if Jetty
> > >> receives the call?
> > >>
> > >> dagdag
> > >> Christine
> > >>
> > >>
> > >> On Wed, Jul 9, 2008 at 12:34 PM, Christine <ch...@christine.nl>
> > >> wrote:
> > >>        Benson,
> > >>        this is what the js trace gives me:
> > >>        emptyClient constructorrequest
> > >>        http://www.christine.nl/soap/wendyBotabout to open POST
> > >>        http://www.christine.nl/soap/wendyBotabout to send dataPOST
> > >>        http://www.christine.nl/soap/wendyBotonreadystatechange
> > >>        1onreadystatechange 2onreadystatechange 4onreadystatechange
> DONE
> > >>        0
> > >>
> > >>        then it calls the error function with code -1.
> > >>
> > >> --
> > >> dagdag is just a two character rotation of byebye
> > >> www.christine.nl
> > >>
> > >>
> > >
> --
> dagdag is just a two character rotation of byebye
> www.christine.nl
>
>

Re: js client

Posted by Christine Karman <ch...@christine.nl>.
Benson,
you were right about rewrite rules not being the same as a proxy.

I have added two lines to my apache config

ProxyPass /soap http://localhost:9000
ProxyPassReverse /soap http://localhost:9000

which causes the js request to be passed to the server. I can see the
reply being created, but the js says 
"Could not handle content of response."

The xml response is null. Jetty seems to write its logging output to my
console, but I don't see a lot of it.

dagdag
Christine

On Thu, 2008-07-10 at 15:09 -0400, Benson Margulies wrote:
> 2. Edit httpd.conf to contain the following:
> 
> LoadModule proxy_module modules/mod_proxy.so
> 
> LoadModule proxy_http_module modules/mod_proxy_http.so
> 
> 3. Edit proxy.conf to contain the following:
> 
> ProxyPass /ws/rta http://localhost:6099/rta
> 
> ProxyPass /ws/rta/ http://localhost:6099/rta/
> 
> ProxyPassReverse /ws/rta http://localhost:6099/rta
> 
> ProxyPassReverse /ws/rta/ http://localhost:6099/rta/
> 
> ProxyPass /ws/askt http://localhost:6099/askt
> 
> ProxyPass /ws/askt/ http://localhost:6099/askt/
> 
> ProxyPassReverse /ws/askt http://localhost:6099/askt
> 
> ProxyPassReverse /ws/askt/ http://localhost:6099/askt/
> 
> 
> 
> On Thu, Jul 10, 2008 at 2:38 PM, Benson Margulies <bi...@gmail.com>
> wrote:
> 
> > I'm not the expert on jetty logging. However, I now realize, after trying
> > it, that I've been telling you the wrong thing about the browser
> > cross-scripting rules.
> >
> > I thought that it was true that, so long as one of the javascript files
> > came from a particular host:port combination, that you would be able to
> > connect back to it.
> >
> > I was wrong. The web service must be on the same host:port as the main HTML
> > page.
> >
> > So we're back to using rewrite rules. I have set up reverse proxies for
> > this purposes on Apache, but it was a very long time ago. I don't have any
> > clue how to do it on plain-old-jetty.
> >
> > You could also presumably use an invisible iframe to host a page that is
> > really on the same host as the web service, and get the data in and out of
> > there.
> >
> > I think I'll be able to post a rewrite recipe later today.
> >
> >
> >
> > On Thu, Jul 10, 2008 at 12:03 PM, Christine Karman <ch...@christine.nl>
> > wrote:
> >
> >> On Thu, 2008-07-10 at 07:38 -0400, Benson Margulies wrote:
> >> > Christine,
> >> >
> >> > I'm trying to find some time to build up an example. Until then, I
> >> > want to try to clarify something.
> >> >
> >> > The cxfjsutils.js file and the server itself have to be on the same
> >> > host:port. The rest of the html need not.
> >>
> >> The web service works ok and the javascript download from the web
> >> service works ok. But somewhere inside the javascript the call to the
> >> webservice doesn't work. Not on port 9000 and not on a rewritten /soap
> >> url. The error it gives suggests that the call is ok.
> >> Is there a way of activating the log in Jetty so I can see if Jetty
> >> receives the call?
> >>
> >> dagdag
> >> Christine
> >>
> >>
> >> On Wed, Jul 9, 2008 at 12:34 PM, Christine <ch...@christine.nl>
> >> wrote:
> >>        Benson,
> >>        this is what the js trace gives me:
> >>        emptyClient constructorrequest
> >>        http://www.christine.nl/soap/wendyBotabout to open POST
> >>        http://www.christine.nl/soap/wendyBotabout to send dataPOST
> >>        http://www.christine.nl/soap/wendyBotonreadystatechange
> >>        1onreadystatechange 2onreadystatechange 4onreadystatechange DONE
> >>        0
> >>
> >>        then it calls the error function with code -1.
> >>
> >> --
> >> dagdag is just a two character rotation of byebye
> >> www.christine.nl
> >>
> >>
> >
-- 
dagdag is just a two character rotation of byebye
www.christine.nl


Re: js client

Posted by Benson Margulies <bi...@gmail.com>.
2. Edit httpd.conf to contain the following:

LoadModule proxy_module modules/mod_proxy.so

LoadModule proxy_http_module modules/mod_proxy_http.so

3. Edit proxy.conf to contain the following:

ProxyPass /ws/rta http://localhost:6099/rta

ProxyPass /ws/rta/ http://localhost:6099/rta/

ProxyPassReverse /ws/rta http://localhost:6099/rta

ProxyPassReverse /ws/rta/ http://localhost:6099/rta/

ProxyPass /ws/askt http://localhost:6099/askt

ProxyPass /ws/askt/ http://localhost:6099/askt/

ProxyPassReverse /ws/askt http://localhost:6099/askt

ProxyPassReverse /ws/askt/ http://localhost:6099/askt/



On Thu, Jul 10, 2008 at 2:38 PM, Benson Margulies <bi...@gmail.com>
wrote:

> I'm not the expert on jetty logging. However, I now realize, after trying
> it, that I've been telling you the wrong thing about the browser
> cross-scripting rules.
>
> I thought that it was true that, so long as one of the javascript files
> came from a particular host:port combination, that you would be able to
> connect back to it.
>
> I was wrong. The web service must be on the same host:port as the main HTML
> page.
>
> So we're back to using rewrite rules. I have set up reverse proxies for
> this purposes on Apache, but it was a very long time ago. I don't have any
> clue how to do it on plain-old-jetty.
>
> You could also presumably use an invisible iframe to host a page that is
> really on the same host as the web service, and get the data in and out of
> there.
>
> I think I'll be able to post a rewrite recipe later today.
>
>
>
> On Thu, Jul 10, 2008 at 12:03 PM, Christine Karman <ch...@christine.nl>
> wrote:
>
>> On Thu, 2008-07-10 at 07:38 -0400, Benson Margulies wrote:
>> > Christine,
>> >
>> > I'm trying to find some time to build up an example. Until then, I
>> > want to try to clarify something.
>> >
>> > The cxfjsutils.js file and the server itself have to be on the same
>> > host:port. The rest of the html need not.
>>
>> The web service works ok and the javascript download from the web
>> service works ok. But somewhere inside the javascript the call to the
>> webservice doesn't work. Not on port 9000 and not on a rewritten /soap
>> url. The error it gives suggests that the call is ok.
>> Is there a way of activating the log in Jetty so I can see if Jetty
>> receives the call?
>>
>> dagdag
>> Christine
>>
>>
>> On Wed, Jul 9, 2008 at 12:34 PM, Christine <ch...@christine.nl>
>> wrote:
>>        Benson,
>>        this is what the js trace gives me:
>>        emptyClient constructorrequest
>>        http://www.christine.nl/soap/wendyBotabout to open POST
>>        http://www.christine.nl/soap/wendyBotabout to send dataPOST
>>        http://www.christine.nl/soap/wendyBotonreadystatechange
>>        1onreadystatechange 2onreadystatechange 4onreadystatechange DONE
>>        0
>>
>>        then it calls the error function with code -1.
>>
>> --
>> dagdag is just a two character rotation of byebye
>> www.christine.nl
>>
>>
>

Re: js client

Posted by Benson Margulies <bi...@gmail.com>.
I'm not the expert on jetty logging. However, I now realize, after trying
it, that I've been telling you the wrong thing about the browser
cross-scripting rules.

I thought that it was true that, so long as one of the javascript files came
from a particular host:port combination, that you would be able to connect
back to it.

I was wrong. The web service must be on the same host:port as the main HTML
page.

So we're back to using rewrite rules. I have set up reverse proxies for this
purposes on Apache, but it was a very long time ago. I don't have any clue
how to do it on plain-old-jetty.

You could also presumably use an invisible iframe to host a page that is
really on the same host as the web service, and get the data in and out of
there.

I think I'll be able to post a rewrite recipe later today.


On Thu, Jul 10, 2008 at 12:03 PM, Christine Karman <ch...@christine.nl>
wrote:

> On Thu, 2008-07-10 at 07:38 -0400, Benson Margulies wrote:
> > Christine,
> >
> > I'm trying to find some time to build up an example. Until then, I
> > want to try to clarify something.
> >
> > The cxfjsutils.js file and the server itself have to be on the same
> > host:port. The rest of the html need not.
>
> The web service works ok and the javascript download from the web
> service works ok. But somewhere inside the javascript the call to the
> webservice doesn't work. Not on port 9000 and not on a rewritten /soap
> url. The error it gives suggests that the call is ok.
> Is there a way of activating the log in Jetty so I can see if Jetty
> receives the call?
>
> dagdag
> Christine
>
>
> On Wed, Jul 9, 2008 at 12:34 PM, Christine <ch...@christine.nl>
> wrote:
>        Benson,
>        this is what the js trace gives me:
>        emptyClient constructorrequest
>        http://www.christine.nl/soap/wendyBotabout to open POST
>        http://www.christine.nl/soap/wendyBotabout to send dataPOST
>        http://www.christine.nl/soap/wendyBotonreadystatechange
>        1onreadystatechange 2onreadystatechange 4onreadystatechange DONE
>        0
>
>        then it calls the error function with code -1.
>
> --
> dagdag is just a two character rotation of byebye
> www.christine.nl
>
>

Re: js client

Posted by Christine Karman <ch...@christine.nl>.
On Thu, 2008-07-10 at 07:38 -0400, Benson Margulies wrote:
> Christine,
> 
> I'm trying to find some time to build up an example. Until then, I
> want to try to clarify something.
> 
> The cxfjsutils.js file and the server itself have to be on the same
> host:port. The rest of the html need not.

The web service works ok and the javascript download from the web
service works ok. But somewhere inside the javascript the call to the
webservice doesn't work. Not on port 9000 and not on a rewritten /soap
url. The error it gives suggests that the call is ok.
Is there a way of activating the log in Jetty so I can see if Jetty
receives the call?

dagdag
Christine


On Wed, Jul 9, 2008 at 12:34 PM, Christine <ch...@christine.nl>
wrote:
        Benson,
        this is what the js trace gives me:
        emptyClient constructorrequest
        http://www.christine.nl/soap/wendyBotabout to open POST
        http://www.christine.nl/soap/wendyBotabout to send dataPOST
        http://www.christine.nl/soap/wendyBotonreadystatechange
        1onreadystatechange 2onreadystatechange 4onreadystatechange DONE
        0
        
        then it calls the error function with code -1.
        
-- 
dagdag is just a two character rotation of byebye
www.christine.nl


Re: js client

Posted by Benson Margulies <bi...@gmail.com>.
Christine,

I'm trying to find some time to build up an example. Until then, I want to
try to clarify something.

The cxfjsutils.js file and the server itself have to be on the same
host:port. The rest of the html need not.

Thus, you can have a web page at http://www.christine.nl/soap/wendy.html

that includes the element

<script type='text/javascript' src='
http://www.christine.nl:9000/myservice?js'></script>

and expect it to work. You shouldn't need any rewrite rules.

If this isn't working for you, then I'm strongly incented to make a bigger
sample that demonstrates the equivalent.

--benson


On Wed, Jul 9, 2008 at 12:34 PM, Christine <ch...@christine.nl> wrote:

> Benson,
> this is what the js trace gives me:
> emptyClient constructorrequest
> http://www.christine.nl/soap/wendyBotabout to open POST
> http://www.christine.nl/soap/wendyBotabout to send dataPOST
> http://www.christine.nl/soap/wendyBotonreadystatechange
> 1onreadystatechange<http://www.christine.nl/soap/wendyBotonreadystatechange1onreadystatechange>2onreadystatechange 4onreadystatechange DONE 0
>
> then it calls the error function with code -1.
>
> Christine
>
> --
> dagdag is just a two character rotation of byebye
> www.christine.nl
>
>

Re: js client

Posted by Christine <ch...@christine.nl>.
Benson,
this is what the js trace gives me:
emptyClient constructorrequest
http://www.christine.nl/soap/wendyBotabout to open POST
http://www.christine.nl/soap/wendyBotabout to send dataPOST
http://www.christine.nl/soap/wendyBotonreadystatechange
1onreadystatechange 2onreadystatechange 4onreadystatechange DONE 0

then it calls the error function with code -1. 

Christine

-- 
dagdag is just a two character rotation of byebye
www.christine.nl


Re: js client

Posted by Christine Karman <ch...@christine.nl>.
On Mon, 2008-07-07 at 20:55 -0400, Benson Margulies wrote:

> You might want to look at the logging features buried in the
> javascript.

I noticed the trace function, but I couldn't figure out how to use it.

I have put a RewriteRule in my apache conf, but it seems like it writes
the new url back to the browser, similar to what a Redirect does. In
both cases, I get a -1 error from the js, it says it can't find the
server, but it did get the javascript from the same server. This is the
rule:
 RewriteEngine On
 RewriteCond %{REQUEST_URI} ^/soap/.*$
 RewriteRule ^/soap/(.*)$ http://www.christine.nl:9000/$1

The html I use is here: www.christine.nl/wendy/index.html

dagdag
Christine 

-- 
dagdag is just a two character rotation of byebye
www.christine.nl