function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion

Unable to create JAXBContext due to the security restriction..

I upgraded to Enterprise.wsdl 17. I regenerated the code but when I want to get the port I get this error:
Error creating salesForce port  Unable to create JAXBContext due to the security restriction
Here is my connection code snippet:
FileHandler handler = new FileHandler('SalesForceReader.log');
     try {
         URL wsdlLocation = SalesForceConnection.class.getResource('enterprise.wsdl');
            if (wsdlLocation == null) {
                WebServiceException e = new WebServiceException('enterprise.wsdl not found!');
                exceptionLogger(e.getMessage(), e);
                throw e;
            port = new SforceService(wsdlLocation, new QName('', 'SforceService')).getSoap();
        } catch (WebServiceException wse) {
            exceptionLogger('Error creating salesForce port', wse);
            throw wse;   
What am I doing wrong? Thanks for your help 
Message Edited by EclipseTalk on 10-07-2009 07:59 PM
What's the security restriction? And how are you running the code?
I don't know what the security restriction is all about. I'm running from Eclipse. Everything worked fine before I got the latest enterprise.wsld. I regenerated the code using JAX-WB. I noticed that some classes have changed...