You are viewing a plain text version of this content. The canonical link for it is here.
Posted to soap-user@ws.apache.org by John Kirksey <jo...@verizon.net> on 2002/11/19 16:03:27 UTC

Accessing web service from an applet

Hello, I am new to Java web services; all of my experience is with Microsoft's SOAP toolkit.

Is it possible to access a web service from an applet? I am a part time Information Systems student, and I want to have an applet that connects to a stock quote service (among other things).

I have installed the Apache toolkit and tested the sample stock quote client, and it works perfectly. I have even used several other web services on Xmethods.com, each successfully. When I convert the code to an applet, I am now getting:

java.security.AccessControlException: access denied (java.net.SocketPermission 66.28.98.121:9090 connect,resolve)

How can I overcome this?

Thanks in advance,

John Kirksey


Re: Accessing web service from an applet

Posted by Scott Nichol <sn...@scottnichol.com>.
javadoc should not care what kind of source it's being run on.

Scott Nichol

----- Original Message -----
From: "John Kirksey" <jo...@verizon.net>
To: <so...@xml.apache.org>
Sent: Thursday, November 21, 2002 4:31 PM
Subject: Re: Accessing web service from an applet


> Scott,
>
> Thanks for the advice. I created a servlet to handle my web service
> requests, and it works perfectly! What an education for a Microsoft
geek...
>
> Incidentally, does anyone know if Javadoc should work for applets and
> servlets? I am getting a java.lang.NullPointerException at
> java.util.zip.ZipFile.getInputStream() when I run it. The only common
> denominator I notice is that it only happens on applets and servlets,
but
> not with applications.
>
> Regards,
>
> John Kirksey
>
>
> > ----- Original Message -----
> > From: "Scott Nichol" <sn...@scottnichol.com>
> > To: <so...@xml.apache.org>
> > Sent: Tuesday, November 19, 2002 10:27 AM
> > Subject: Re: Accessing web service from an applet
> >
> >
> > > For security reasons, an applet can only connect to the host from
> > which
> > > is was loaded.  See, e.g., http://java.sun.com/sfaq/#socket.
> > >
> > > The two things I have done to get around this are (1) set up a
proxy
> > on
> > > that host or (2) delegate actions to servlets.  In your case, you
> > could
> > > also consider writing proxy SOAP service classes.  Your applet
would
> > > make SOAP calls to the host from which it was loaded.  The
services on
> > > that host would be clients of the real services, forwarding
parameters
> > > received from the applet to the real service, then forwarding
> > responses
> > > from the real service to your applet.
> > >
> > > Scott Nichol
> > >
> > > ----- Original Message -----
> > > From: "John Kirksey" <jo...@verizon.net>
> > > To: <so...@xml.apache.org>
> > > Sent: Tuesday, November 19, 2002 10:03 AM
> > > Subject: Accessing web service from an applet
> > >
> > >
> > > Hello, I am new to Java web services; all of my experience is with
> > > Microsoft's SOAP toolkit.
> > >
> > > Is it possible to access a web service from an applet? I am a part
> > time
> > > Information Systems student, and I want to have an applet that
> > connects
> > > to a stock quote service (among other things).
> > >
> > > I have installed the Apache toolkit and tested the sample stock
quote
> > > client, and it works perfectly. I have even used several other web
> > > services on Xmethods.com, each successfully. When I convert the
code
> > to
> > > an applet, I am now getting:
> > >
> > > java.security.AccessControlException: access denied
> > > (java.net.SocketPermission 66.28.98.121:9090 connect,resolve)
> > >
> > > How can I overcome this?
> > >
> > > Thanks in advance,
> > >
> > > John Kirksey
> > >
> > >
> > >
> > > --
> > > To unsubscribe, e-mail:
> > <ma...@xml.apache.org>
> > > For additional commands, e-mail:
> > <ma...@xml.apache.org>
> > >
> > >
> >
> >
> > --
> > To unsubscribe, e-mail:
<ma...@xml.apache.org>
> > For additional commands, e-mail:
<ma...@xml.apache.org>
> >
>
>
> --
> To unsubscribe, e-mail:
<ma...@xml.apache.org>
> For additional commands, e-mail:
<ma...@xml.apache.org>
>
>


Re: Accessing web service from an applet

Posted by Scott Nichol <sn...@scottnichol.com>.
javadoc should not care what kind of source it's being run on.

Scott Nichol

----- Original Message -----
From: "John Kirksey" <jo...@verizon.net>
To: <so...@xml.apache.org>
Sent: Thursday, November 21, 2002 4:31 PM
Subject: Re: Accessing web service from an applet


> Scott,
>
> Thanks for the advice. I created a servlet to handle my web service
> requests, and it works perfectly! What an education for a Microsoft
geek...
>
> Incidentally, does anyone know if Javadoc should work for applets and
> servlets? I am getting a java.lang.NullPointerException at
> java.util.zip.ZipFile.getInputStream() when I run it. The only common
> denominator I notice is that it only happens on applets and servlets,
but
> not with applications.
>
> Regards,
>
> John Kirksey
>
>
> > ----- Original Message -----
> > From: "Scott Nichol" <sn...@scottnichol.com>
> > To: <so...@xml.apache.org>
> > Sent: Tuesday, November 19, 2002 10:27 AM
> > Subject: Re: Accessing web service from an applet
> >
> >
> > > For security reasons, an applet can only connect to the host from
> > which
> > > is was loaded.  See, e.g., http://java.sun.com/sfaq/#socket.
> > >
> > > The two things I have done to get around this are (1) set up a
proxy
> > on
> > > that host or (2) delegate actions to servlets.  In your case, you
> > could
> > > also consider writing proxy SOAP service classes.  Your applet
would
> > > make SOAP calls to the host from which it was loaded.  The
services on
> > > that host would be clients of the real services, forwarding
parameters
> > > received from the applet to the real service, then forwarding
> > responses
> > > from the real service to your applet.
> > >
> > > Scott Nichol
> > >
> > > ----- Original Message -----
> > > From: "John Kirksey" <jo...@verizon.net>
> > > To: <so...@xml.apache.org>
> > > Sent: Tuesday, November 19, 2002 10:03 AM
> > > Subject: Accessing web service from an applet
> > >
> > >
> > > Hello, I am new to Java web services; all of my experience is with
> > > Microsoft's SOAP toolkit.
> > >
> > > Is it possible to access a web service from an applet? I am a part
> > time
> > > Information Systems student, and I want to have an applet that
> > connects
> > > to a stock quote service (among other things).
> > >
> > > I have installed the Apache toolkit and tested the sample stock
quote
> > > client, and it works perfectly. I have even used several other web
> > > services on Xmethods.com, each successfully. When I convert the
code
> > to
> > > an applet, I am now getting:
> > >
> > > java.security.AccessControlException: access denied
> > > (java.net.SocketPermission 66.28.98.121:9090 connect,resolve)
> > >
> > > How can I overcome this?
> > >
> > > Thanks in advance,
> > >
> > > John Kirksey
> > >
> > >
> > >
> > > --
> > > To unsubscribe, e-mail:
> > <ma...@xml.apache.org>
> > > For additional commands, e-mail:
> > <ma...@xml.apache.org>
> > >
> > >
> >
> >
> > --
> > To unsubscribe, e-mail:
<ma...@xml.apache.org>
> > For additional commands, e-mail:
<ma...@xml.apache.org>
> >
>
>
> --
> To unsubscribe, e-mail:
<ma...@xml.apache.org>
> For additional commands, e-mail:
<ma...@xml.apache.org>
>
>


--
To unsubscribe, e-mail:   <ma...@xml.apache.org>
For additional commands, e-mail: <ma...@xml.apache.org>


Re: Accessing web service from an applet

Posted by John Kirksey <jo...@verizon.net>.
Scott,

Thanks for the advice. I created a servlet to handle my web service
requests, and it works perfectly! What an education for a Microsoft geek...

Incidentally, does anyone know if Javadoc should work for applets and
servlets? I am getting a java.lang.NullPointerException at
java.util.zip.ZipFile.getInputStream() when I run it. The only common
denominator I notice is that it only happens on applets and servlets, but
not with applications.

Regards,

John Kirksey


> ----- Original Message -----
> From: "Scott Nichol" <sn...@scottnichol.com>
> To: <so...@xml.apache.org>
> Sent: Tuesday, November 19, 2002 10:27 AM
> Subject: Re: Accessing web service from an applet
>
>
> > For security reasons, an applet can only connect to the host from
> which
> > is was loaded.  See, e.g., http://java.sun.com/sfaq/#socket.
> >
> > The two things I have done to get around this are (1) set up a proxy
> on
> > that host or (2) delegate actions to servlets.  In your case, you
> could
> > also consider writing proxy SOAP service classes.  Your applet would
> > make SOAP calls to the host from which it was loaded.  The services on
> > that host would be clients of the real services, forwarding parameters
> > received from the applet to the real service, then forwarding
> responses
> > from the real service to your applet.
> >
> > Scott Nichol
> >
> > ----- Original Message -----
> > From: "John Kirksey" <jo...@verizon.net>
> > To: <so...@xml.apache.org>
> > Sent: Tuesday, November 19, 2002 10:03 AM
> > Subject: Accessing web service from an applet
> >
> >
> > Hello, I am new to Java web services; all of my experience is with
> > Microsoft's SOAP toolkit.
> >
> > Is it possible to access a web service from an applet? I am a part
> time
> > Information Systems student, and I want to have an applet that
> connects
> > to a stock quote service (among other things).
> >
> > I have installed the Apache toolkit and tested the sample stock quote
> > client, and it works perfectly. I have even used several other web
> > services on Xmethods.com, each successfully. When I convert the code
> to
> > an applet, I am now getting:
> >
> > java.security.AccessControlException: access denied
> > (java.net.SocketPermission 66.28.98.121:9090 connect,resolve)
> >
> > How can I overcome this?
> >
> > Thanks in advance,
> >
> > John Kirksey
> >
> >
> >
> > --
> > To unsubscribe, e-mail:
> <ma...@xml.apache.org>
> > For additional commands, e-mail:
> <ma...@xml.apache.org>
> >
> >
>
>
> --
> To unsubscribe, e-mail:   <ma...@xml.apache.org>
> For additional commands, e-mail: <ma...@xml.apache.org>
>


--
To unsubscribe, e-mail:   <ma...@xml.apache.org>
For additional commands, e-mail: <ma...@xml.apache.org>


Re: Accessing web service from an applet

Posted by John Kirksey <jo...@verizon.net>.
Thanks to all for the advice, I'll let you know how it goes!

Regards,

John Kirksey

----- Original Message ----- 
From: "Scott Nichol" <sn...@scottnichol.com>
To: <so...@xml.apache.org>
Sent: Tuesday, November 19, 2002 10:51 AM
Subject: Re: Accessing web service from an applet


> Information on the Java plug-in is at
> http://java.sun.com/j2se/1.4.1/docs/guide/plugin/developer_guide/overvie
> w.html.  As suggested by Alex, you can probably use this and signed
> applets to get around the original applet security restrictions.
> 
> Scott Nichol
> 
> ----- Original Message -----
> From: "Scott Nichol" <sn...@scottnichol.com>
> To: <so...@xml.apache.org>
> Sent: Tuesday, November 19, 2002 10:27 AM
> Subject: Re: Accessing web service from an applet
> 
> 
> > For security reasons, an applet can only connect to the host from
> which
> > is was loaded.  See, e.g., http://java.sun.com/sfaq/#socket.
> >
> > The two things I have done to get around this are (1) set up a proxy
> on
> > that host or (2) delegate actions to servlets.  In your case, you
> could
> > also consider writing proxy SOAP service classes.  Your applet would
> > make SOAP calls to the host from which it was loaded.  The services on
> > that host would be clients of the real services, forwarding parameters
> > received from the applet to the real service, then forwarding
> responses
> > from the real service to your applet.
> >
> > Scott Nichol
> >
> > ----- Original Message -----
> > From: "John Kirksey" <jo...@verizon.net>
> > To: <so...@xml.apache.org>
> > Sent: Tuesday, November 19, 2002 10:03 AM
> > Subject: Accessing web service from an applet
> >
> >
> > Hello, I am new to Java web services; all of my experience is with
> > Microsoft's SOAP toolkit.
> >
> > Is it possible to access a web service from an applet? I am a part
> time
> > Information Systems student, and I want to have an applet that
> connects
> > to a stock quote service (among other things).
> >
> > I have installed the Apache toolkit and tested the sample stock quote
> > client, and it works perfectly. I have even used several other web
> > services on Xmethods.com, each successfully. When I convert the code
> to
> > an applet, I am now getting:
> >
> > java.security.AccessControlException: access denied
> > (java.net.SocketPermission 66.28.98.121:9090 connect,resolve)
> >
> > How can I overcome this?
> >
> > Thanks in advance,
> >
> > John Kirksey
> >
> >
> >
> > --
> > To unsubscribe, e-mail:
> <ma...@xml.apache.org>
> > For additional commands, e-mail:
> <ma...@xml.apache.org>
> >
> >
> 
> 
> --
> To unsubscribe, e-mail:   <ma...@xml.apache.org>
> For additional commands, e-mail: <ma...@xml.apache.org>
> 


--
To unsubscribe, e-mail:   <ma...@xml.apache.org>
For additional commands, e-mail: <ma...@xml.apache.org>


Re: Accessing web service from an applet

Posted by John Kirksey <jo...@verizon.net>.
Thanks to all for the advice, I'll let you know how it goes!

Regards,

John Kirksey

----- Original Message ----- 
From: "Scott Nichol" <sn...@scottnichol.com>
To: <so...@xml.apache.org>
Sent: Tuesday, November 19, 2002 10:51 AM
Subject: Re: Accessing web service from an applet


> Information on the Java plug-in is at
> http://java.sun.com/j2se/1.4.1/docs/guide/plugin/developer_guide/overvie
> w.html.  As suggested by Alex, you can probably use this and signed
> applets to get around the original applet security restrictions.
> 
> Scott Nichol
> 
> ----- Original Message -----
> From: "Scott Nichol" <sn...@scottnichol.com>
> To: <so...@xml.apache.org>
> Sent: Tuesday, November 19, 2002 10:27 AM
> Subject: Re: Accessing web service from an applet
> 
> 
> > For security reasons, an applet can only connect to the host from
> which
> > is was loaded.  See, e.g., http://java.sun.com/sfaq/#socket.
> >
> > The two things I have done to get around this are (1) set up a proxy
> on
> > that host or (2) delegate actions to servlets.  In your case, you
> could
> > also consider writing proxy SOAP service classes.  Your applet would
> > make SOAP calls to the host from which it was loaded.  The services on
> > that host would be clients of the real services, forwarding parameters
> > received from the applet to the real service, then forwarding
> responses
> > from the real service to your applet.
> >
> > Scott Nichol
> >
> > ----- Original Message -----
> > From: "John Kirksey" <jo...@verizon.net>
> > To: <so...@xml.apache.org>
> > Sent: Tuesday, November 19, 2002 10:03 AM
> > Subject: Accessing web service from an applet
> >
> >
> > Hello, I am new to Java web services; all of my experience is with
> > Microsoft's SOAP toolkit.
> >
> > Is it possible to access a web service from an applet? I am a part
> time
> > Information Systems student, and I want to have an applet that
> connects
> > to a stock quote service (among other things).
> >
> > I have installed the Apache toolkit and tested the sample stock quote
> > client, and it works perfectly. I have even used several other web
> > services on Xmethods.com, each successfully. When I convert the code
> to
> > an applet, I am now getting:
> >
> > java.security.AccessControlException: access denied
> > (java.net.SocketPermission 66.28.98.121:9090 connect,resolve)
> >
> > How can I overcome this?
> >
> > Thanks in advance,
> >
> > John Kirksey
> >
> >
> >
> > --
> > To unsubscribe, e-mail:
> <ma...@xml.apache.org>
> > For additional commands, e-mail:
> <ma...@xml.apache.org>
> >
> >
> 
> 
> --
> To unsubscribe, e-mail:   <ma...@xml.apache.org>
> For additional commands, e-mail: <ma...@xml.apache.org>
> 


Re: Accessing web service from an applet

Posted by John Kirksey <jo...@verizon.net>.
Scott,

Thanks for the advice. I created a servlet to handle my web service
requests, and it works perfectly! What an education for a Microsoft geek...

Incidentally, does anyone know if Javadoc should work for applets and
servlets? I am getting a java.lang.NullPointerException at
java.util.zip.ZipFile.getInputStream() when I run it. The only common
denominator I notice is that it only happens on applets and servlets, but
not with applications.

Regards,

John Kirksey


> ----- Original Message -----
> From: "Scott Nichol" <sn...@scottnichol.com>
> To: <so...@xml.apache.org>
> Sent: Tuesday, November 19, 2002 10:27 AM
> Subject: Re: Accessing web service from an applet
>
>
> > For security reasons, an applet can only connect to the host from
> which
> > is was loaded.  See, e.g., http://java.sun.com/sfaq/#socket.
> >
> > The two things I have done to get around this are (1) set up a proxy
> on
> > that host or (2) delegate actions to servlets.  In your case, you
> could
> > also consider writing proxy SOAP service classes.  Your applet would
> > make SOAP calls to the host from which it was loaded.  The services on
> > that host would be clients of the real services, forwarding parameters
> > received from the applet to the real service, then forwarding
> responses
> > from the real service to your applet.
> >
> > Scott Nichol
> >
> > ----- Original Message -----
> > From: "John Kirksey" <jo...@verizon.net>
> > To: <so...@xml.apache.org>
> > Sent: Tuesday, November 19, 2002 10:03 AM
> > Subject: Accessing web service from an applet
> >
> >
> > Hello, I am new to Java web services; all of my experience is with
> > Microsoft's SOAP toolkit.
> >
> > Is it possible to access a web service from an applet? I am a part
> time
> > Information Systems student, and I want to have an applet that
> connects
> > to a stock quote service (among other things).
> >
> > I have installed the Apache toolkit and tested the sample stock quote
> > client, and it works perfectly. I have even used several other web
> > services on Xmethods.com, each successfully. When I convert the code
> to
> > an applet, I am now getting:
> >
> > java.security.AccessControlException: access denied
> > (java.net.SocketPermission 66.28.98.121:9090 connect,resolve)
> >
> > How can I overcome this?
> >
> > Thanks in advance,
> >
> > John Kirksey
> >
> >
> >
> > --
> > To unsubscribe, e-mail:
> <ma...@xml.apache.org>
> > For additional commands, e-mail:
> <ma...@xml.apache.org>
> >
> >
>
>
> --
> To unsubscribe, e-mail:   <ma...@xml.apache.org>
> For additional commands, e-mail: <ma...@xml.apache.org>
>


Re: Accessing web service from an applet

Posted by Scott Nichol <sn...@scottnichol.com>.
Information on the Java plug-in is at
http://java.sun.com/j2se/1.4.1/docs/guide/plugin/developer_guide/overvie
w.html.  As suggested by Alex, you can probably use this and signed
applets to get around the original applet security restrictions.

Scott Nichol

----- Original Message -----
From: "Scott Nichol" <sn...@scottnichol.com>
To: <so...@xml.apache.org>
Sent: Tuesday, November 19, 2002 10:27 AM
Subject: Re: Accessing web service from an applet


> For security reasons, an applet can only connect to the host from
which
> is was loaded.  See, e.g., http://java.sun.com/sfaq/#socket.
>
> The two things I have done to get around this are (1) set up a proxy
on
> that host or (2) delegate actions to servlets.  In your case, you
could
> also consider writing proxy SOAP service classes.  Your applet would
> make SOAP calls to the host from which it was loaded.  The services on
> that host would be clients of the real services, forwarding parameters
> received from the applet to the real service, then forwarding
responses
> from the real service to your applet.
>
> Scott Nichol
>
> ----- Original Message -----
> From: "John Kirksey" <jo...@verizon.net>
> To: <so...@xml.apache.org>
> Sent: Tuesday, November 19, 2002 10:03 AM
> Subject: Accessing web service from an applet
>
>
> Hello, I am new to Java web services; all of my experience is with
> Microsoft's SOAP toolkit.
>
> Is it possible to access a web service from an applet? I am a part
time
> Information Systems student, and I want to have an applet that
connects
> to a stock quote service (among other things).
>
> I have installed the Apache toolkit and tested the sample stock quote
> client, and it works perfectly. I have even used several other web
> services on Xmethods.com, each successfully. When I convert the code
to
> an applet, I am now getting:
>
> java.security.AccessControlException: access denied
> (java.net.SocketPermission 66.28.98.121:9090 connect,resolve)
>
> How can I overcome this?
>
> Thanks in advance,
>
> John Kirksey
>
>
>
> --
> To unsubscribe, e-mail:
<ma...@xml.apache.org>
> For additional commands, e-mail:
<ma...@xml.apache.org>
>
>


--
To unsubscribe, e-mail:   <ma...@xml.apache.org>
For additional commands, e-mail: <ma...@xml.apache.org>


Re: Accessing web service from an applet

Posted by Scott Nichol <sn...@scottnichol.com>.
Information on the Java plug-in is at
http://java.sun.com/j2se/1.4.1/docs/guide/plugin/developer_guide/overvie
w.html.  As suggested by Alex, you can probably use this and signed
applets to get around the original applet security restrictions.

Scott Nichol

----- Original Message -----
From: "Scott Nichol" <sn...@scottnichol.com>
To: <so...@xml.apache.org>
Sent: Tuesday, November 19, 2002 10:27 AM
Subject: Re: Accessing web service from an applet


> For security reasons, an applet can only connect to the host from
which
> is was loaded.  See, e.g., http://java.sun.com/sfaq/#socket.
>
> The two things I have done to get around this are (1) set up a proxy
on
> that host or (2) delegate actions to servlets.  In your case, you
could
> also consider writing proxy SOAP service classes.  Your applet would
> make SOAP calls to the host from which it was loaded.  The services on
> that host would be clients of the real services, forwarding parameters
> received from the applet to the real service, then forwarding
responses
> from the real service to your applet.
>
> Scott Nichol
>
> ----- Original Message -----
> From: "John Kirksey" <jo...@verizon.net>
> To: <so...@xml.apache.org>
> Sent: Tuesday, November 19, 2002 10:03 AM
> Subject: Accessing web service from an applet
>
>
> Hello, I am new to Java web services; all of my experience is with
> Microsoft's SOAP toolkit.
>
> Is it possible to access a web service from an applet? I am a part
time
> Information Systems student, and I want to have an applet that
connects
> to a stock quote service (among other things).
>
> I have installed the Apache toolkit and tested the sample stock quote
> client, and it works perfectly. I have even used several other web
> services on Xmethods.com, each successfully. When I convert the code
to
> an applet, I am now getting:
>
> java.security.AccessControlException: access denied
> (java.net.SocketPermission 66.28.98.121:9090 connect,resolve)
>
> How can I overcome this?
>
> Thanks in advance,
>
> John Kirksey
>
>
>
> --
> To unsubscribe, e-mail:
<ma...@xml.apache.org>
> For additional commands, e-mail:
<ma...@xml.apache.org>
>
>


Re: Accessing web service from an applet

Posted by Scott Nichol <sn...@scottnichol.com>.
For security reasons, an applet can only connect to the host from which
is was loaded.  See, e.g., http://java.sun.com/sfaq/#socket.

The two things I have done to get around this are (1) set up a proxy on
that host or (2) delegate actions to servlets.  In your case, you could
also consider writing proxy SOAP service classes.  Your applet would
make SOAP calls to the host from which it was loaded.  The services on
that host would be clients of the real services, forwarding parameters
received from the applet to the real service, then forwarding responses
from the real service to your applet.

Scott Nichol

----- Original Message -----
From: "John Kirksey" <jo...@verizon.net>
To: <so...@xml.apache.org>
Sent: Tuesday, November 19, 2002 10:03 AM
Subject: Accessing web service from an applet


Hello, I am new to Java web services; all of my experience is with
Microsoft's SOAP toolkit.

Is it possible to access a web service from an applet? I am a part time
Information Systems student, and I want to have an applet that connects
to a stock quote service (among other things).

I have installed the Apache toolkit and tested the sample stock quote
client, and it works perfectly. I have even used several other web
services on Xmethods.com, each successfully. When I convert the code to
an applet, I am now getting:

java.security.AccessControlException: access denied
(java.net.SocketPermission 66.28.98.121:9090 connect,resolve)

How can I overcome this?

Thanks in advance,

John Kirksey



Re: Accessing web service from an applet

Posted by Tom Myers <to...@dreamscape.com>.
John Kirksey wrote:

> Is it possible to access a web service from an applet? I am a part time
> Information Systems student, and I want to have an applet that connects
> to a stock quote service (among other things)....
>
> java.security.AccessControlException: access denied
> (java.net.SocketPermission 66.28.98.121:9090 connect,resolve)

If you're not at all concerned about security, you can probably get it
to work by putting your applet jar in your lib/ext directory, which by
default gives it AllPermissions. Note that you may have more than one
lib/ext directory, e.g. one for the JDK and one for the JRE; for play
purposes it may be easier to drop it into all than figure out which
is being used by the browser, but if you're using the Java Plug-In
it's not hard. (On Windows: Start/Settings/Control Panel/Java Plug-In,
click Advanced tab, choose a specific "Java Runtime Environment".)
   If you are concerned about security, then the problem with this
solution is that you may then also need to move other jars into the
same directory, e.g. soap.jar and so forth; if they are "below" your
applet's own jar in the classloader hierarchy, then they won't be
seen even though they are on the classpath. Life is difficult; do
you want to give these guys AllPermissions? You can't write a
distributable app that way unless everybody you distribute it to
trusts you completely...but it may be what you want, for now.

Tom Myers



Re: Accessing web service from an applet

Posted by Alex Dovlecel <do...@kbs.twi.tudelft.nl>.
Hi

This is all that I know and in fact I never used applets. So if there is 
someone qualified to explain this better... 

All I can say is this is related to java architecture. In fact this is the 
way it should happen. An appled is runned in a sandbox. That means that you 
are not allowed to do certain things like: accessing the local disk, use 
internet connections (except to the server where the applet was downloaded 
from), access informations from local machine... and so on. 

If you HAVE TO create an Applet, you could download the Java Plugin that 
allow the applet to run with the jre installed from java (and not default 
java machine from the browser) and provide some security mechanisms that 
allows trusted applets to access several services (like allow it to open an 
internet connection, or access the local information and so on). 

there is another posibility... to sign your jar (or cab if for windows)... 
but never understood how. :o((( 

Hope it (somehow) helps
dovle


 
> Hello, I am new to Java web services; all of my experience is with
> Microsoft's SOAP toolkit.
>
> Is it possible to access a web service from an applet? I am a part time
> Information Systems student, and I want to have an applet that connects to
> a stock quote service (among other things).
>
> I have installed the Apache toolkit and tested the sample stock quote
> client, and it works perfectly. I have even used several other web services
> on Xmethods.com, each successfully. When I convert the code to an applet, I
> am now getting:
>
> java.security.AccessControlException: access denied
> (java.net.SocketPermission 66.28.98.121:9090 connect,resolve)
>
> How can I overcome this?
>
> Thanks in advance,
>
> John Kirksey

Re: Accessing web service from an applet

Posted by Tom Myers <to...@dreamscape.com>.
John Kirksey wrote:

> Is it possible to access a web service from an applet? I am a part time
> Information Systems student, and I want to have an applet that connects
> to a stock quote service (among other things)....
>
> java.security.AccessControlException: access denied
> (java.net.SocketPermission 66.28.98.121:9090 connect,resolve)

If you're not at all concerned about security, you can probably get it
to work by putting your applet jar in your lib/ext directory, which by
default gives it AllPermissions. Note that you may have more than one
lib/ext directory, e.g. one for the JDK and one for the JRE; for play
purposes it may be easier to drop it into all than figure out which
is being used by the browser, but if you're using the Java Plug-In
it's not hard. (On Windows: Start/Settings/Control Panel/Java Plug-In,
click Advanced tab, choose a specific "Java Runtime Environment".)
   If you are concerned about security, then the problem with this
solution is that you may then also need to move other jars into the
same directory, e.g. soap.jar and so forth; if they are "below" your
applet's own jar in the classloader hierarchy, then they won't be
seen even though they are on the classpath. Life is difficult; do
you want to give these guys AllPermissions? You can't write a
distributable app that way unless everybody you distribute it to
trusts you completely...but it may be what you want, for now.

Tom Myers



--
To unsubscribe, e-mail:   <ma...@xml.apache.org>
For additional commands, e-mail: <ma...@xml.apache.org>


Re: Accessing web service from an applet

Posted by Alex Dovlecel <do...@kbs.twi.tudelft.nl>.
Hi

This is all that I know and in fact I never used applets. So if there is 
someone qualified to explain this better... 

All I can say is this is related to java architecture. In fact this is the 
way it should happen. An appled is runned in a sandbox. That means that you 
are not allowed to do certain things like: accessing the local disk, use 
internet connections (except to the server where the applet was downloaded 
from), access informations from local machine... and so on. 

If you HAVE TO create an Applet, you could download the Java Plugin that 
allow the applet to run with the jre installed from java (and not default 
java machine from the browser) and provide some security mechanisms that 
allows trusted applets to access several services (like allow it to open an 
internet connection, or access the local information and so on). 

there is another posibility... to sign your jar (or cab if for windows)... 
but never understood how. :o((( 

Hope it (somehow) helps
dovle


 
> Hello, I am new to Java web services; all of my experience is with
> Microsoft's SOAP toolkit.
>
> Is it possible to access a web service from an applet? I am a part time
> Information Systems student, and I want to have an applet that connects to
> a stock quote service (among other things).
>
> I have installed the Apache toolkit and tested the sample stock quote
> client, and it works perfectly. I have even used several other web services
> on Xmethods.com, each successfully. When I convert the code to an applet, I
> am now getting:
>
> java.security.AccessControlException: access denied
> (java.net.SocketPermission 66.28.98.121:9090 connect,resolve)
>
> How can I overcome this?
>
> Thanks in advance,
>
> John Kirksey

--
To unsubscribe, e-mail:   <ma...@xml.apache.org>
For additional commands, e-mail: <ma...@xml.apache.org>


Re: Accessing web service from an applet

Posted by Scott Nichol <sn...@scottnichol.com>.
For security reasons, an applet can only connect to the host from which
is was loaded.  See, e.g., http://java.sun.com/sfaq/#socket.

The two things I have done to get around this are (1) set up a proxy on
that host or (2) delegate actions to servlets.  In your case, you could
also consider writing proxy SOAP service classes.  Your applet would
make SOAP calls to the host from which it was loaded.  The services on
that host would be clients of the real services, forwarding parameters
received from the applet to the real service, then forwarding responses
from the real service to your applet.

Scott Nichol

----- Original Message -----
From: "John Kirksey" <jo...@verizon.net>
To: <so...@xml.apache.org>
Sent: Tuesday, November 19, 2002 10:03 AM
Subject: Accessing web service from an applet


Hello, I am new to Java web services; all of my experience is with
Microsoft's SOAP toolkit.

Is it possible to access a web service from an applet? I am a part time
Information Systems student, and I want to have an applet that connects
to a stock quote service (among other things).

I have installed the Apache toolkit and tested the sample stock quote
client, and it works perfectly. I have even used several other web
services on Xmethods.com, each successfully. When I convert the code to
an applet, I am now getting:

java.security.AccessControlException: access denied
(java.net.SocketPermission 66.28.98.121:9090 connect,resolve)

How can I overcome this?

Thanks in advance,

John Kirksey



--
To unsubscribe, e-mail:   <ma...@xml.apache.org>
For additional commands, e-mail: <ma...@xml.apache.org>