On Mon, Jul 7, 2008 at 5:54 AM, Christine Karman <[EMAIL PROTECTED]> 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 > > <[EMAIL PROTECTED]> 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 > > <[EMAIL PROTECTED]> > > > 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 > >
