cxf-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Slobodan Marjanovic (JIRA)" <>
Subject [jira] Created: (CXF-1875) CXF adds @WebMethod annotation without import section when async binding is turned on
Date Thu, 16 Oct 2008 09:46:46 GMT
CXF adds @WebMethod annotation without import section when async binding is turned on

                 Key: CXF-1875
             Project: CXF
          Issue Type: Bug
    Affects Versions: 2.1.2
         Environment: Windows XP 64-bit, Java JDK 1.5. update 14 (32-bit)
            Reporter: Slobodan Marjanovic
            Priority: Minor

I use CXF to generate a WS client classes. There are some smaller issues in generated code.
CXF uses @WebMethod annotation but it doesn't adds it to the import section of the class.
 This happens only when async-binding is turned on.

CXF ant task:
<target name="generate">
		<java classname="" fork="true">
			<arg value="-client" />
			<arg value="-b" />
			<arg value="async_binding.xml" />
			<arg value="-d" />
			<arg value="src" />
			<arg value="${wsdl.url}" />
				<fileset dir="${basedir}/lib">
					<include name="*.jar" />


    <bindings node="wsdl:definitions">

WSDL in question:

<definitions name='HelloWorldSecurityService' targetNamespace=''
xmlns='' xmlns:soap12=''
xmlns:tns='' xmlns:xsd=''>
 <message name='HelloWorldSecurityBean_helloWorldResponse'>
  <part name='return' type='xsd:string'></part>
 <message name='HelloWorldSecurityBean_helloWorld'></message>
 <portType name='HelloWorldSecurityBean'>
  <operation name='helloWorld'>
   <input message='tns:HelloWorldSecurityBean_helloWorld'></input>
   <output message='tns:HelloWorldSecurityBean_helloWorldResponse'></output>
 <binding name='HelloWorldSecurityBeanBinding' type='tns:HelloWorldSecurityBean'>
  <soap12:binding style='rpc' transport=''/>
  <operation name='helloWorld'>
   <soap12:operation soapAction=''/>
    <soap12:body namespace='' use='literal'/>
    <soap12:body namespace='' use='literal'/>
 <service name='HelloWorldSecurityService'>
  <port binding='tns:HelloWorldSecurityBeanBinding' name='HelloWorldSecurityPort'>
   <soap12:address location=''/>

Problematic generate class:
package com.prozone.poc.session;

import java.util.concurrent.Future;
import javax.jws.WebMethod;
import javax.jws.WebResult;
import javax.jws.WebService;
import javax.jws.soap.SOAPBinding;
import javax.jws.soap.SOAPBinding.Style;

 * This class was generated by Apache CXF 2.1.2
 * Thu Oct 16 11:33:29 CEST 2008
 * Generated source version: 2.1.2
@WebService(targetNamespace = "", name = "HelloWorldSecurityBean")
@SOAPBinding(style = SOAPBinding.Style.RPC)
public interface HelloWorldSecurityBean {

    @WebResult(name = "return", targetNamespace = "", partName
= "return")
    public java.lang.String helloWorld();

    @WebMethod(operationName = "helloWorld")
    public Response<java.lang.String> helloWorldAsync();

    @WebMethod(operationName = "helloWorld")
    public Future<?> helloWorldAsync(
        @WebParam(name = "asyncHandler", targetNamespace = "")
        AsyncHandler<java.lang.String> asyncHandler

As you can see annotation @WebMethod has no import declaration in class, so it has to be imported
manually when ever the client is generated.

This message is automatically generated by JIRA.
You can reply to this email to add a comment to the issue online.

View raw message