Granny's Programming Pearls
"inside of every large program is a small program struggling to get out"
JavaRanch.com/granny.jsp
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

using weblogic servigen ant task

 
Rashmi Tambe
Ranch Hand
Posts: 418
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,
I am using "servicegen" ant task of weblogic to generate web service wrapper arround the EJB. However i am getting following eror-


i am using jdk131_08 that comes along with weblogic 7.0.2

can anybody tell me whats wrong?
[ June 19, 2004: Message edited by: Rashmi Tambe ]
 
Chris Mathews
Ranch Hand
Posts: 2712
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Are you trying to define any of your code in the java.util package?
 
Rashmi Tambe
Ranch Hand
Posts: 418
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Originally posted by Chris Mathews:
Are you trying to define any of your code in the java.util package?


No, I am not
I also tried following that was suggested in one of the google posts -
Make sure "java.util" has permissions granted in
weblogic.policy file.

Ex:

grant codeBase
"file:C:${/}bea${/}weblogic81/samples/server/config/examples/-"
{
permission java.security.AllPermission "java.util";
};
[ June 21, 2004: Message edited by: Rashmi Tambe ]
 
Rashmi Tambe
Ranch Hand
Posts: 418
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Originally posted by Rashmi Tambe:
[servicegen] java.lang.SecurityException: Prohibited package name: java.util
i am using jdk131_08 that comes along with weblogic 7.0.2
can anybody tell me whats wrong?


I finally found out the answer
Many of the APIs in EJB have parameters with data type
"java.util.HashTable" or "java.util.Properties". Servicegen was givijng exception for these parametes. so when I removed such APIs, things are working fine now.

THe reason behind this is: servicegen has to map the Java types in the interface to corresponding types in XML Schema in order to do the marshalling (serialization) of data.There are certain built in types for which direct mappings between Java and XML are defined. There are also some non-built in types that are supported by servicegen.However, For all other data types, the serialization has to be defined by the programmer explicitly. The classes java.util.Hashtable and java.util.Properties are not built-in, and they do not figure in the list of supported non-built in types. SO the solution to this is to write the serialization classes (XML and Java and the mapping) yourself.

This link gives more info abt this.[/QB]
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic