You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@cxf.apache.org by "Reimer Prochnow (JIRA)" <ji...@apache.org> on 2011/02/01 16:22:28 UTC
[jira] Commented: (CXF-3290) wsdl2java fails to generate working
client code if web service and portType have the same name
[ https://issues.apache.org/jira/browse/CXF-3290?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12989240#comment-12989240 ]
Reimer Prochnow commented on CXF-3290:
--------------------------------------
So here's the wsdla2java call (we use the maven-cxf-plugin)
{{monospaced}}
wsdl2java -d ...\target\generated-sources\cxf -verbose -db jaxb file:/.../bug.wsdl
{{monospaced}}
I've attached the wsdls and this class ist generated:
{{monospaced}}
package cxf.bugs.services.bug1;
import java.net.MalformedURLException;
import java.net.URL;
import javax.xml.namespace.QName;
import javax.xml.ws.WebEndpoint;
import javax.xml.ws.WebServiceClient;
import javax.xml.ws.WebServiceFeature;
import cxf.bugs.services.bug2.MyBugService;
import javax.xml.ws.Service;
/**
* This class was generated by Apache CXF 2.3.2
* 2011-02-01T16:15:56.223+01:00
* Generated source version: 2.3.2
*
*/
@WebServiceClient(name = "myBugService",
wsdlLocation = "bug.wsdl",
targetNamespace = "http://bugs.cxf/services/bug1")
public class MyBugService extends Service {
...
@WebEndpoint(name = "myBug1")
public MyBugService getMyBug1(WebServiceFeature... features) {
return super.getPort(MyBug1, MyBugService.class, features);
}
{{monospaced}}
> wsdl2java fails to generate working client code if web service and portType have the same name
> ----------------------------------------------------------------------------------------------
>
> Key: CXF-3290
> URL: https://issues.apache.org/jira/browse/CXF-3290
> Project: CXF
> Issue Type: Bug
> Components: Tooling
> Affects Versions: 2.3.2
> Reporter: Reimer Prochnow
> Priority: Minor
>
> A Naming Problem similar to #CXF-1979:
> if your wsdls define:
> <wsdl:service name="CallManagement" ...
> <wsdl:portType name="CallManagement">
> wsdl2java generates
> public class CallManagement extends Service {
> but this class imports a Class CallManagement from the namespace defined in the portType.
> this leads to a compiler error (Line is the import statement)
> "CallManagement is already defined in this compilation unit"
> so the problem is:
> package bar;
> import foo.Bar;
> public class Bar {
> can be avoided only with full qualified references to foo.Bar without the import.
--
This message is automatically generated by JIRA.
-
For more information on JIRA, see: http://www.atlassian.com/software/jira