• Post Reply Bookmark Topic Watch Topic
  • New Topic

java.lang.SecurityException: Prohibited package name: java.util.xsd

 
Mat Anthony
Ranch Hand
Posts: 261
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi All,
I'm constantly getting the following error within an operation associated with my webservice skeleton implementation class.

java.lang.SecurityException: Prohibited package name: java.util.xsd
java.lang.ClassLoader.preDefineClass(ClassLoader.java:479)

I currently use antscript to call an Axis2 Java2WSDL task that generates a wsdl.
The wsdl contains the following name space:-
xmlns:ax25="http://util.java/xsd"



If I use WSDL2Java to generate the Skeleton & Stub and dependency classes, I get a package
called java.util.xsd being created. This contains Collection, Map and Set implementations.

I checked the code in Class Loader and it states the following:



To me this means that you cannot name a package that starts with a Java keyword (i.e.java.util.xsd)

If I attempt to carry out the following :-
BeanUtils.copyProperties(wdsl2javaGeneratedPersonDetails, myPersonDetails)
within a webservice operation, I get the following error.
java.lang.SecurityException: Prohibited package name: java.util.xsd

How can I get the generated object content into it’s counterpart within my application
(i.e. wdsl2javaGeneratedPersonDetails data into myPersonDetails)
without hand cranking it out calling each of the individual getter and setters on each object.

Mat
 
Ivan Krizsan
Ranch Hand
Posts: 2198
1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi!
If needed, take a look at this page containing documentation of the WSDL2Java command:
http://publib.boulder.ibm.com/infocenter/wsdoc400/v6r0/topic/com.ibm.websphere.iseries.doc/info/ae/ae/rwbs_wsdl2java.html

There is an option -NStoPkg, which I suspect may be able to help you.
Best wishes!
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!