You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@cxf.apache.org by "maomaode (JIRA)" <ji...@apache.org> on 2007/03/08 07:38:24 UTC
[jira] Commented: (CXF-337) Java2WSDL fails to generate wsdl from
POJO
[ https://issues.apache.org/jira/browse/CXF-337?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12479242 ]
maomaode commented on CXF-337:
------------------------------
tools2 should already support POJO, but the runtime will fail with the exception:
java.lang.NullPointerException
at org.apache.cxf.jaxb.JAXBSchemaInitializer.begin(JAXBSchemaInitializer
.java:63)
at org.apache.cxf.service.ServiceModelVisitor.visitOperation(ServiceMode
lVisitor.java:85)
at org.apache.cxf.service.ServiceModelVisitor.visitOperation(ServiceMode
lVisitor.java:95)
at org.apache.cxf.service.ServiceModelVisitor.walk(ServiceModelVisitor.j
ava:48)
at org.apache.cxf.jaxb.JAXBDataBinding.initialize(JAXBDataBinding.java:3
10)
at org.apache.cxf.service.factory.ReflectionServiceFactoryBean.buildServ
iceFromClass(ReflectionServiceFactoryBean.java:211)
at org.apache.cxf.service.factory.ReflectionServiceFactoryBean.initializ
eServiceModel(ReflectionServiceFactoryBean.java:228)
at org.apache.cxf.service.factory.ReflectionServiceFactoryBean.create(Re
flectionServiceFactoryBean.java:126)
at org.apache.cxf.frontend.AbstractEndpointFactory.createEndpoint(Abstra
ctEndpointFactory.java:61)
at org.apache.cxf.tools.java2wsdl.processor.internal.ServiceBuilder.buil
d(ServiceBuilder.java:41)
at org.apache.cxf.tools.java2wsdl.processor.JavaToProcessor.process(Java
ToProcessor.java:58)
at org.apache.cxf.tools.java2wsdl.processor.JavaToProcessorTest.testCalc
ulator(JavaToProcessorTest.java:69)
at org.apache.cxf.tools.java2wsdl.processor.JavaToProcessorTest.testCalc
ulator(JavaToProcessorTest.java:69)
The runtime has problem with the exception handling.
I haded the tests, and will fail if we fix the issue, then fix the test.
> Java2WSDL fails to generate wsdl from POJO
> ------------------------------------------
>
> Key: CXF-337
> URL: https://issues.apache.org/jira/browse/CXF-337
> Project: CXF
> Issue Type: Bug
> Components: Tooling
> Affects Versions: 2.0-M1, 2.0-RC
> Reporter: Bharath Ganesh
> Assigned To: maomaode
>
> I could also see the java2wsdl tool is buggy for a number of cases. For exampple I have a POJO annotated with JSR 181 annotations to be exposed as a WS.
> import javax.jws.*;
> @WebService
> public class Calculator
> {
> public int add (int a, int b) throws AddException{
> if(a<0 || b<0){
> throw new AddException("No negetive please");
> }
> return a+b;
> }
> }
> When I run the java2wsdl tool by providing the above class, I get the following error.
> Error : Can not load the request wrapper class com.pramati.rs.ws.jaxws.Add, please check the @Reque
> stWrapper annotation and see if the class is in your classpath
> The @RequestWrapper annotation is not mandatory. The container could have well used RPC/Literal.
> Later when I annotated the Service with @SOAPBinding(style= SOAPBinding.Style.RPC, use= SOAPBinding.Use.LITERAL) , the problem I faced was:
> Error : com.pramati.rs.ws.AddException.getFaultInfo()
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.