You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@cxf.apache.org by Alexandre Jaquet <al...@gmail.com> on 2010/03/09 08:38:48 UTC

name conflit when generating source

Hi,

I'm facing a little problem once I'm generating the source from wsdl in my
wsdl I've the following declaration

    <wsdl:service name="service">
        <wsdl:port name="Z_WS_CUSTOMER_CREATE_XTD"
binding="tns:Z_WS_CUSTOMER_CREATE_XTD">
            <soap:address
               ..........

And when I generate the source I got the following code generation that
provoc a name conflit between the class name and the class we need to
implement

@WebServiceClient(name = "service",
                  wsdlLocation =
"file:/C:/dev/xxxxxxxxx/src/main/resources/wsdl/Z_WS_CUSTOMER_CREATE.wsdl",
                  targetNamespace =
"urn:sap-com:document:sap:soap:functions:mc-style")

public class Service extends Service {
//fail because of the same name

//need to manually put this
public class Service extends javax.xml.ws.Service {

How can I solve this without having a manual intervention ?

Thanks in advance

Alexandre

Re: name conflit when generating source

Posted by Daniel Kulp <dk...@apache.org>.
What version of CXF?    You are describing:
https://issues.apache.org/jira/browse/CXF-1979
which was fixed a very long time ago.  Thus, this surprises me.

Dan


On Tuesday 09 March 2010 2:38:48 am Alexandre Jaquet wrote:
> Hi,
> 
> I'm facing a little problem once I'm generating the source from wsdl in my
> wsdl I've the following declaration
> 
>     <wsdl:service name="service">
>         <wsdl:port name="Z_WS_CUSTOMER_CREATE_XTD"
> binding="tns:Z_WS_CUSTOMER_CREATE_XTD">
>             <soap:address
>                ..........
> 
> And when I generate the source I got the following code generation that
> provoc a name conflit between the class name and the class we need to
> implement
> 
> @WebServiceClient(name = "service",
>                   wsdlLocation =
> "file:/C:/dev/xxxxxxxxx/src/main/resources/wsdl/Z_WS_CUSTOMER_CREATE.wsdl",
>                   targetNamespace =
> "urn:sap-com:document:sap:soap:functions:mc-style")
> 
> public class Service extends Service {
> //fail because of the same name
> 
> //need to manually put this
> public class Service extends javax.xml.ws.Service {
> 
> How can I solve this without having a manual intervention ?
> 
> Thanks in advance
> 
> Alexandre

-- 
Daniel Kulp
dkulp@apache.org
http://dankulp.com/blog