[
https://issues.apache.org/jira/browse/AXIS2-4926?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12985053#action_12985053
]
Isuru Eranga Suriarachchi commented on AXIS2-4926:
--------------------------------------------------
What do you mean by it doesn't compile when there's no target ns? Compilation
of your java classes doesn't depend on the JAX-WS annotations.
Actually this issue has occured because the Student class is in the default
package. You can have the service class in the default package without any
issue. You can try a simple service without complex types in the default
package. It works fine if you've specified the target ns.
So the issue is, we can't have other classes in the default package. That issue
exists in JDK wsgen tool. So we can't fix this at Axis2 level.
Thanks,
~Isuru
> Can't view WSDL when service class in the default package
> ---------------------------------------------------------
>
> Key: AXIS2-4926
> URL: https://issues.apache.org/jira/browse/AXIS2-4926
> Project: Axis2
> Issue Type: Bug
> Components: jaxws
> Environment: Linux
> Reporter: Kasun Weranga Gunathilake
> Assignee: Isuru Eranga Suriarachchi
> Attachments: jaxwsSample.jar, Student.java, StudentMarksService.java
>
>
> WSDL can't be accessed, if deployed service class is not inside a package.
> In this case I have used two classes Student.java and
> StudentMarksService.java, When I used this classes inside a package I can
> access the WSDL. otherwise it will give the following error. Java classes and
> jar file has been attached.
> This is the exception.
> /tmp/_axis2StudentMarksService/jaxws/GetHighestMarks.java:16: cannot find
> symbol
> symbol : class Student
> location: class jaxws.GetHighestMarks
> private Student student;
> ^
> /tmp/_axis2StudentMarksService/jaxws/GetHighestMarks.java:23: cannot find
> symbol
> symbol : class Student
> location: class jaxws.GetHighestMarks
> public Student getStudent() {
> ^
> /tmp/_axis2StudentMarksService/jaxws/GetHighestMarks.java:32: cannot find
> symbol
> symbol : class Student
> location: class jaxws.GetHighestMarks
> public void setStudent(Student student) {
> ^
> /tmp/_axis2StudentMarksService/jaxws/GetAverage.java:16: cannot find symbol
> symbol : class Student
> location: class jaxws.GetAverage
> private Student student;
> ^
> /tmp/_axis2StudentMarksService/jaxws/GetAverage.java:23: cannot find symbol
> symbol : class Student
> location: class jaxws.GetAverage
> public Student getStudent() {
> ^
> /tmp/_axis2StudentMarksService/jaxws/GetAverage.java:32: cannot find symbol
> symbol : class Student
> location: class jaxws.GetAverage
> public void setStudent(Student student) {
> ^
> 6 errors
> [ERROR] Error occurred generating WSDL file for Web service implementation
> class {StudentMarksService}: {java.lang.Exception: A WSDL Definition could
> not be generated for the implementation class: StudentMarksService}
> java.lang.Exception: A WSDL Definition could not be generated for the
> implementation class: StudentMarksService
> at
> org.apache.axis2.jaxws.description.builder.JAXWSRIWSDLGenerator.generateWsdl(JAXWSRIWSDLGenerator.java:185)
> at
> org.apache.axis2.jaxws.description.builder.JAXWSRIWSDLGenerator.initialize(JAXWSRIWSDLGenerator.java:379)
> at
> org.apache.axis2.jaxws.description.builder.JAXWSRIWSDLGenerator.getWSDL(JAXWSRIWSDLGenerator.java:372)
> at
> org.apache.axis2.description.AxisService.printWSDL(AxisService.java:1394)
> at
> org.apache.axis2.transport.http.HTTPWorker.service(HTTPWorker.java:149)
> at
> org.apache.axis2.transport.http.server.AxisHttpService.doService(AxisHttpService.java:281)
> at
> org.apache.axis2.transport.http.server.AxisHttpService.handleRequest(AxisHttpService.java:187)
> at
> org.apache.axis2.transport.http.server.HttpServiceProcessor.run(HttpServiceProcessor.java:82)
> at
> java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886)
> at
> java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908)
> at java.lang.Thread.run(Thread.java:619)
>
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]