Thanks Tim.  The problem was that I changed some method from "protected"
to "public" so in essence public methods will be turned into Web
Methods.  Since those methods take HTTPServletRequest and MessageContext
as parameters and no custom serializers were written to serialize such
types, therefore the WSDL cannot be dynamically generated.

-David
-----Original Message-----
From: news [mailto:[EMAIL PROTECTED] On Behalf Of Tim K. (Gmane)
Sent: Tuesday, November 30, 2004 5:53 PM
To: [EMAIL PROTECTED]
Subject: Re: Problem generating WSDL from Java

David Song wrote:
> Hi all,
> 
> I am getting the following error from Java2WSDL.  It was working
before,
> I just changed some method signatures.  Many thanks for the help!
> 
> -David
> 
> - The class org.apache.axis.MessageContext does not contain a default
> constructor, 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
> class in the wsdl file.
> - The class javax.servlet.ServletContext is defined in a java or javax
> package and cannot be converted into an xml schema type.  An xml
schema
> anyType will be used to define this class in the wsdl file.
> - The class javax.servlet.http.HttpServletRequest is defined in a java
> or javax package and cannot be converted into an xml schema type.  An
> xml schema anyType will be used to define this class in the wsdl file.
> WSDLException: faultCode=OTHER_ERROR: Can't find prefix for
> 'http://http.servlet.javax'. Namespace prefixes must be set on the
> Definition object using the addNamespace(...) method.:
> 

My guess here is that you added some getMessageContext(), 
getServletContext() and getHttpServletRequest() methods somewhere in 
your beans and now Axis is trying to expose these bean properties and it

doesn't know how to serialize these classes. If that's the case just 
rename your methods so that they don't start with "set" or "get" for the

properties you do NOT want exposed.

Double check the methods you changed or added ...

Tim



Reply via email to