Link to home
Start Free TrialLog in
Avatar of koppcha
koppchaFlag for United States of America

asked on

WebServices on weblogic

Hi
I am writing web services on EJB.I am using the servicegen of weblogic to build the file.When i build the file i am getting the following error.Please let me know what could be the reason.

weblogic.xml.schema.binding.BindingException: Invalid class received: interface java.util
.Map loaded from file:/C:/j2sdk1.4.1_06/jre/lib/rt.jar!/java/util/Map.clas All classes that will be serialized or deserialized must be non-interface, non-abstract classes that provide a public default constructor
Avatar of limaideal
limaideal

Check parameter and return value of methods in your web serivce class to make sure all those data types are:
"non-interface, non-abstract classes that provide a public default constructor ".

Because those data type need to be encapsulated by webservice layer into SOAP message, they must be compliant to those requirements.
Avatar of koppcha

ASKER

Hi
 Thanks for the response.
  I know that the return type of one of my EJB methods is of type Map which is no one of the supported built not data types by weblogic servicegen utility.I want to know how to oversome this and how to write the Non Buit in data type for java.util.Map
Hi,

If you use the clientgen or autotype Ant tasks with the wsdl attribute to generate client or data type components from a WSDL file, you might sometimes get the following exception:

weblogic.webservice.tools.build.WSBuildException: Failed to do type mapping - with nested exception: [weblogic.xml.schema.binding.BindingException: unable to find a definition for type datatype
This exception means that there is an undefined data type in the section of the WSDL file that describes the XML Schema data types used by the Web Service. The solution to this problem is to add the data type definition to the WSDL file.

For more info about this....you may refer here...
http://e-docs.bea.com/wls/docs81/webserv/trouble.html

I hope you it may help you..

R.K
Avatar of koppcha

ASKER

The java.util.Map data type is not in the list of supported non built in data type by servigen .So there are two options available either to wrap your methods to return a simple type or a bean which is supported by servicegen or to develop from the first principles  without using servigen task of weblogic....
Avatar of koppcha

ASKER

The last comment provided by me is the solution.Probably it will help someone else with the same problem.
ASKER CERTIFIED SOLUTION
Avatar of DarthMod
DarthMod
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial