Any complex objects being passed across the wire need to be standard bean types 
(getters/setters) with a default constructor in each.  java.util.List and 
net.sf.hibernate.Interceptor will not qualify because axis cannot marshall/unmarshall 
them into platform-independent/soap-compliant types.

Sample complex object for web service:

Class Product
{
        private String name;
        private String type;

        public Product(){}  //A default constructor takes not parameters
        
        public String getName()
        {
                return this.name;
        }

        public void setName(String name)
        {
                this.name = name;
        }

        public String getType()
        {
                return this.type;
        }

        public void setType(String type)
        {
                this.type = type;
        } 
} 

Sample web-service method using complex object Product:

Public Product getProduct(String productName)
{
        Product product = new Product();
        ... //Your code
        return product;
}

If you want to use List and Interceptor(Hibernate) the design pattern is to use them 
inside your web-service, but do not expose them to web service clients (Remote Fa�ade 
pattern).  So if you are doing some sort of object-relational mapping, do so, but 
don't use the tool's objects to be return types.  Use the tool to create your 
"Product" bean and then let the web-service return it to the client.  Remember, web 
services are for interoperability.  A .NET client wouldn't know how to operate on a 
Java List or Hibernate Interceptor.

Go through Java2Wsdl and Wsdl2Java again, and then see what happens.

Best Regards,

Tami Wright

-----Original Message-----
From: Koney, Satish [mailto:[EMAIL PROTECTED] 
Sent: Wednesday, October 20, 2004 10:00 AM
To: [EMAIL PROTECTED]
Subject: how to get rid of these warnings?

I am trying to develop the service using Spring and Hibernate.
When I try to get the WSDL from the java classes I am getting the following
warnings:

WARNING: The class java.util.List is defined in a java or javax package and cann ot be 
converted into an xml schema type.  An xml schema anyType will be used to define this 
class in the wsdl file.


WARNING: The class net.sf.hibernate.Interceptor does not contain a default const 
ructor, which is a requirement for a bean class.  The class cannot be converted into 
an xml schema type.  An xml schema anyType will be used to define this clas s in the 
wsdl file.


I ignored the warnings and executed WSDL2Java command and the WSDD file was generated.
When I tried to deploy the service with that WSDD, I am getting error
message:


Null Response Message  

So I think the problem is with those warnings that I ignored earlier...

Can someone plz tell me how to remove those warnings??

Thanks,
SSSS


____________________________________________
Confidential:  This electronic message and all contents contain information from 
Syntel, Inc. which may be privileged, confidential or otherwise protected from 
disclosure. The information is intended to be for the addressee only. If you are not 
the addressee, any disclosure, copy, distribution or use of the contents of this 
message is prohibited.  If you have received this electronic message in error, please 
notify the sender immediately and destroy the original message and all copies.


Reply via email to