Discussion:
SOAPException Access Denied
Qurratulain Mubarak
2005-02-25 10:11:35 UTC
Permalink
Hi,
I am using apache soap for building a java webservice on the client side. I am getting a lot of errors and exceptions. When I use the relsease version of Soap I get a Nullpointer exception in java at Transport.Read. I read that I have to set the content type to text/xml but that doesnt work either.I tried doing that by setting the content type in class transport to text/xml but that still did not work.
So now I am using the nightly build and it gives me the following error. I signed my applet and all the jar files that I am using,but still I get this exception. I even placed this in the java file.
SOAPHTTPConnection soapHTTPConnection = new SOAPHTTPConnection();
soapHTTPConnection.setProxyHost("http://localhost:7070/");
soapHTTPConnection.setProxyPort(7070);
I really dont know how to fix this anymore,since I really tried almost everything. If someone has any idea I would really appreciate it.Even though my applet and webservice are all running on the localhost.

[SOAPException: faultCode=SOAP-ENV:Client; msg=Error opening socket: java.security.AccessControlException: access denied (java.util.PropertyPermission http.proxyHost read); targetException=java.security.AccessControlException: access denied (java.util.PropertyPermission http.proxyHost read)]

at org.apache.soap.util.net.HTTPUtils.post(HTTPUtils.java:445)

at org.apache.soap.util.net.HTTPUtils.post(HTTPUtils.java:358)

at org.apache.soap.transport.http.SOAPHTTPConnection.send(SOAPHTTPConnection.java:332)

at org.apache.soap.messaging.Message.send(Message.java:102)

at newbridges.conference.ApacheSoapProxy.CheckPassword(ApacheSoapProxy.java:102)

at newbridges.conference.ConferenceClientApplet.CheckUserPassword(ConferenceClientApplet.java:175)

at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)

at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)

at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)

at java.lang.reflect.Method.invoke(Unknown Source)

at sun.plugin.com.MethodDispatcher.invoke(Unknown Source)

at sun.plugin.com.DispatchImpl.invokeImpl(Unknown Source)

at sun.plugin.com.DispatchImpl$2.run(Unknown Source)

at java.security.AccessController.doPrivileged(Native Method)

at sun.plugin.com.DispatchImpl.invoke(Unknown Source)

Caused by: java.security.AccessControlException: access denied (java.util.PropertyPermission http.proxyHost read)

at java.security.AccessControlContext.checkPermission(Unknown Source)

at java.security.AccessController.checkPermission(Unknown Source)

at java.lang.SecurityManager.checkPermission(Unknown Source)

at java.lang.SecurityManager.checkPropertyAccess(Unknown Source)

at java.lang.System.getProperty(Unknown Source)

at org.apache.soap.util.net.HTTPUtils.getSocket(HTTPUtils.java:156)

at org.apache.soap.util.net.HTTPUtils.post(HTTPUtils.java:417)

at org.apache.soap.util.net.HTTPUtils.post(HTTPUtils.java:358)

at org.apache.soap.transport.http.SOAPHTTPConnection.send(SOAPHTTPConnection.java:332)

at org.apache.soap.messaging.Message.send(Message.java:102)

at newbridges.conference.ApacheSoapProxy.CheckPassword(ApacheSoapProxy.java:102)

at newbridges.conference.ConferenceClientApplet.CheckUserPassword(ConferenceClientApplet.java:175)

at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)

at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)

at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)

at java.lang.reflect.Method.invoke(Unknown Source)

at sun.plugin.com.MethodDispatcher.invoke(Unknown Source)

at sun.plugin.com.DispatchImpl.invokeImpl(Unknown Source)

at sun.plugin.com.DispatchImpl$2.run(Unknown Source)

at java.security.AccessController.doPrivileged(Native Method)

at sun.plugin.com.DispatchImpl.invoke(Unknown Source)
Scott Nichol
2005-03-01 13:36:34 UTC
Permalink
Your approach should work. By setting the proxy values explicitly, the code should not try to read them from system properties. Did you remember to do

client.setSOAPTransport(soapHTTPConnection);

Scott Nichol

Do not send e-mail directly to this e-mail address,
because it is filtered to accept only mail from
specific mail lists.
----- Original Message -----
From: "Qurratulain Mubarak" <***@newbridges.nl>
To: <soap-***@ws.apache.org>
Sent: Friday, February 25, 2005 5:11 AM
Subject: SOAPException Access Denied


Hi,
I am using apache soap for building a java webservice on the client side. I am getting a lot of errors and exceptions. When I use the relsease version of Soap I get a Nullpointer exception in java at Transport.Read. I read that I have to set the content type to text/xml but that doesnt work either.I tried doing that by setting the content type in class transport to text/xml but that still did not work.
So now I am using the nightly build and it gives me the following error. I signed my applet and all the jar files that I am using,but still I get this exception. I even placed this in the java file.
SOAPHTTPConnection soapHTTPConnection = new SOAPHTTPConnection();
soapHTTPConnection.setProxyHost("http://localhost:7070/");
soapHTTPConnection.setProxyPort(7070);
I really dont know how to fix this anymore,since I really tried almost everything. If someone has any idea I would really appreciate it.Even though my applet and webservice are all running on the localhost.

[SOAPException: faultCode=SOAP-ENV:Client; msg=Error opening socket: java.security.AccessControlException: access denied (java.util.PropertyPermission http.proxyHost read); targetException=java.security.AccessControlException: access denied (java.util.PropertyPermission http.proxyHost read)]

at org.apache.soap.util.net.HTTPUtils.post(HTTPUtils.java:445)

at org.apache.soap.util.net.HTTPUtils.post(HTTPUtils.java:358)

at org.apache.soap.transport.http.SOAPHTTPConnection.send(SOAPHTTPConnection.java:332)

at org.apache.soap.messaging.Message.send(Message.java:102)

at newbridges.conference.ApacheSoapProxy.CheckPassword(ApacheSoapProxy.java:102)

at newbridges.conference.ConferenceClientApplet.CheckUserPassword(ConferenceClientApplet.java:175)

at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)

at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)

at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)

at java.lang.reflect.Method.invoke(Unknown Source)

at sun.plugin.com.MethodDispatcher.invoke(Unknown Source)

at sun.plugin.com.DispatchImpl.invokeImpl(Unknown Source)

at sun.plugin.com.DispatchImpl$2.run(Unknown Source)

at java.security.AccessController.doPrivileged(Native Method)

at sun.plugin.com.DispatchImpl.invoke(Unknown Source)

Caused by: java.security.AccessControlException: access denied (java.util.PropertyPermission http.proxyHost read)

at java.security.AccessControlContext.checkPermission(Unknown Source)

at java.security.AccessController.checkPermission(Unknown Source)

at java.lang.SecurityManager.checkPermission(Unknown Source)

at java.lang.SecurityManager.checkPropertyAccess(Unknown Source)

at java.lang.System.getProperty(Unknown Source)

at org.apache.soap.util.net.HTTPUtils.getSocket(HTTPUtils.java:156)

at org.apache.soap.util.net.HTTPUtils.post(HTTPUtils.java:417)

at org.apache.soap.util.net.HTTPUtils.post(HTTPUtils.java:358)

at org.apache.soap.transport.http.SOAPHTTPConnection.send(SOAPHTTPConnection.java:332)

at org.apache.soap.messaging.Message.send(Message.java:102)

at newbridges.conference.ApacheSoapProxy.CheckPassword(ApacheSoapProxy.java:102)

at newbridges.conference.ConferenceClientApplet.CheckUserPassword(ConferenceClientApplet.java:175)

at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)

at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)

at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)

at java.lang.reflect.Method.invoke(Unknown Source)

at sun.plugin.com.MethodDispatcher.invoke(Unknown Source)

at sun.plugin.com.DispatchImpl.invokeImpl(Unknown Source)

at sun.plugin.com.DispatchImpl$2.run(Unknown Source)

at java.security.AccessController.doPrivileged(Native Method)

at sun.plugin.com.DispatchImpl.invoke(Unknown Source)

Loading...