File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes BEA/Weblogic and the fly likes using weblogic servigen ant task Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Soft Skills this week in the Jobs Discussion forum!
JavaRanch » Java Forums » Products » BEA/Weblogic
Bookmark "using weblogic servigen ant task" Watch "using weblogic servigen ant task" New topic
Author

using weblogic servigen ant task

Rashmi Tambe
Ranch Hand

Joined: Aug 07, 2001
Posts: 418
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

Joined: Jul 18, 2001
Posts: 2712
Are you trying to define any of your code in the java.util package?
Rashmi Tambe
Ranch Hand

Joined: Aug 07, 2001
Posts: 418
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

Joined: Aug 07, 2001
Posts: 418
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]
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: using weblogic servigen ant task