axis-java-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Deepal Jayasinghe <dee...@opensource.lk>
Subject Re: [Axis2] POJO annotation
Date Fri, 23 Feb 2007 05:23:46 GMT
hi  Jeff ;

As you suggested I tried to use DescriptionBuilderComposite for POJO and
I got set of exception;

Here we go , I have my Service class annotated in [1] and I used [2] to
create AxisService , and then I got the exception in [3]. After that I
changed my Service class as in [4] and got the exception in [5]. Then I
found the issue is ServiceDecriptionImpl and added following code [6] to
line number 441 , then I got the exception in [7]. So what am I suppose
to do next.

Btw there was a bug in JavaClassToDBCConverter line number 155.

Thanks
Deepal



[1]
@WebService
public class MyServiceClass {
    @WebMethod
    public String dee() {
        return "";
    }
    @WebMethod
    public void add(int a, int b) {
    }
    @WebMethod
    public String[] nothing(int a) {
        return null;
    }
}

[2]
 JavaClassToDBCConverter converter = new
JavaClassToDBCConverter(MyServiceClass.class);
 HashMap<String, DescriptionBuilderComposite> dbcMap =
converter.produceDBC();
 List list = DescriptionFactory.createServiceDescriptionFromDBCMap(dbcMap);

[3]
javax.xml.ws.WebServiceException: EndpointDescriptionImpl: Unable to
find custom WSDL generator
    at
org.apache.axis2.jaxws.ExceptionFactory.createWebServiceException(ExceptionFactory.java:177)
    at
org.apache.axis2.jaxws.ExceptionFactory.makeWebServiceException(ExceptionFactory.java:79)
    at
org.apache.axis2.jaxws.ExceptionFactory.makeWebServiceException(ExceptionFactory.java:124)
    at
org.apache.axis2.jaxws.description.impl.EndpointDescriptionImpl.generateWSDL(EndpointDescriptionImpl.java:1449)
    at
org.apache.axis2.jaxws.description.impl.EndpointDescriptionImpl.<init>(EndpointDescriptionImpl.java:296)
    at
org.apache.axis2.jaxws.description.impl.ServiceDescriptionImpl.<init>(ServiceDescriptionImpl.java:178)
    at
org.apache.axis2.jaxws.description.impl.DescriptionFactoryImpl.createServiceDescriptionFromDBCMap(DescriptionFactoryImpl.java:93)
    at
org.apache.axis2.jaxws.description.DescriptionFactory.createServiceDescriptionFromDBCMap(DescriptionFactory.java:55

[4]
@WebService(wsdlLocation = "test.wsdl")
public class MyServiceClass {
    @WebMethod
    public String dee() {
        return "";
    }
    @WebMethod
    public void add(int a, int b) {
    }
    @WebMethod
    public String[] nothing(int a) {
        return null;
    }

}

[5].
javax.xml.ws.WebServiceException: Validation error: cannot find WSDL
Definition specified by this WebService annotation. Implementation
class: MyServiceClass; WSDL location: test.wsdl
    at
org.apache.axis2.jaxws.ExceptionFactory.createWebServiceException(ExceptionFactory.java:177)
    at
org.apache.axis2.jaxws.ExceptionFactory.makeWebServiceException(ExceptionFactory.java:79)
    at
org.apache.axis2.jaxws.ExceptionFactory.makeWebServiceException(ExceptionFactory.java:124)
    at
org.apache.axis2.jaxws.description.impl.ServiceDescriptionImpl.validateIntegrity(ServiceDescriptionImpl.java:675)
    at
org.apache.axis2.jaxws.description.impl.ServiceDescriptionImpl.validateDBCLIntegrity(ServiceDescriptionImpl.java:581)
    at
org.apache.axis2.jaxws.description.impl.ServiceDescriptionImpl.<init>(ServiceDescriptionImpl.java:167)
    at
org.apache.axis2.jaxws.description.impl.DescriptionFactoryImpl.createServiceDescriptionFromDBCMap(DescriptionFactoryImpl.java:93)
    at
org.apache.axis2.jaxws.description.DescriptionFactory.createServiceDescriptionFromDBCMap(DescriptionFactory.java:55)

[6].
       else {
                 String wsdlLocation =
composite.getWebServiceAnnot().wsdlLocation();
                    if(wsdlLocation !=null&&!"".equals(wsdlLocation)){
                        File wsdlFile = new File(wsdlLocation);

                        if(wsdlFile.exists()){
                            try {
                                this.wsdlURL = wsdlFile.toURL();
                                this.wsdlWrapper = new
WSDL4JWrapper(this.wsdlURL);
                               
this.composite.setWsdlDefinition(wsdlWrapper.getDefinition());
                            } catch (Exception e) {
                                throw
ExceptionFactory.makeWebServiceException(Messages.getMessage("wsdlException",
e.getMessage()), e);
                            }
                        } else {
                            try {
                                wsdlFile.createNewFile();
                               
System.out.println(wsdlFile.getAbsolutePath());
                            } catch (IOException e) {
                                e.printStackTrace();  //To change body
of catch statement use File | Settings | File Templates.
                            }

                        }

                    }

[7].
javax.xml.ws.WebServiceException: EndpointDescriptionImpl: Unable to
find custom WSDL generator
    at
org.apache.axis2.jaxws.ExceptionFactory.createWebServiceException(ExceptionFactory.java:177)
    at
org.apache.axis2.jaxws.ExceptionFactory.makeWebServiceException(ExceptionFactory.java:79)
    at
org.apache.axis2.jaxws.ExceptionFactory.makeWebServiceException(ExceptionFactory.java:124)
    at
org.apache.axis2.jaxws.description.impl.EndpointDescriptionImpl.generateWSDL(EndpointDescriptionImpl.java:1449)
    at
org.apache.axis2.jaxws.description.impl.EndpointDescriptionImpl.<init>(EndpointDescriptionImpl.java:296)
    at
org.apache.axis2.jaxws.description.impl.ServiceDescriptionImpl.<init>(ServiceDescriptionImpl.java:178)
    at
org.apache.axis2.jaxws.description.impl.DescriptionFactoryImpl.createServiceDescriptionFromDBCMap(DescriptionFactoryImpl.java:93)
    at
org.apache.axis2.jaxws.description.DescriptionFactory.createServiceDescriptionFromDBCMap(DescriptionFactory.java:55)




---------------------------------------------------------------------
To unsubscribe, e-mail: axis-dev-unsubscribe@ws.apache.org
For additional commands, e-mail: axis-dev-help@ws.apache.org


Mime
View raw message