You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@cxf.apache.org by "Michael Klimiuk (JIRA)" <ji...@apache.org> on 2009/10/02 10:23:23 UTC
[jira] Issue Comment Edited: (CXF-2429) wsdl2java tool generates
client stub which always uses default (JAXB) databinding while another one
style is specified in the command line (-db argument)
[ https://issues.apache.org/jira/browse/CXF-2429?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12757180#action_12757180 ]
Michael Klimiuk edited comment on CXF-2429 at 10/2/09 1:22 AM:
---------------------------------------------------------------
Thanks for the reply, Daniel
My workaround solution is something like your 2nd and 3rd points.
In our case:
- XmlBeans databinding is used;
- and WSDL location is not specified, so the service will be "built from the class".
The following patch is applied on generated artifacts:
- the most important change in XXXService class is:
public MyPortInterface createPort(String address) {
JaxWsProxyFactoryBean factory = new JaxWsProxyFactoryBean();
factory.setServiceClass(MyPortInterface.class);
factory.setDataBinding(new XmlBeansDataBinding());
factory.setBindingId(BINDING_ID);
factory.setEndpointName(PORT_NAME);
factory.setServiceName(SERVICE);
factory.setAddress(address);
return (MyPortInterface) factory.create();
}
After that the XXXClass is actually not an extension of javax.xml.ws.Service, because we need only generated SERVICE and PORT_NAME Qname values in the inserted method.
was (Author: mklimiuk):
Thanks for the reply, Daniel
My workaround solution is something like your 2nd and 3rd points.
In our case:
- the simple front-end is used;
- XmlBeans databinding is used;
- and WSDL location is not specified, so the service will be "built from the class".
The following patch is applied on generated artifacts:
- the annotations are removed from the generated web service interface (just to disable warnings when using ReflectionServiceFactoryBean);
- the most important change in XXXService class is:
public MyPortInterface createPort(String address) {
ClientProxyFactoryBean factory = new ClientProxyFactoryBean();
factory.setServiceClass(MyPortInterface.class);
factory.setDataBinding(new XmlBeansDataBinding());
factory.setBindingId(BINDING_ID);
factory.setEndpointName(PORT_NAME);
factory.setServiceName(SERVICE);
factory.setAddress(address);
return (MyPortInterface) factory.create();
}
After that the XXXClass is actually not an extension of javax.xml.ws.Service, because we need only generated SERVICE and PORT_NAME Qname values in the inserted method.
> wsdl2java tool generates client stub which always uses default (JAXB) databinding while another one style is specified in the command line (-db argument)
> ---------------------------------------------------------------------------------------------------------------------------------------------------------
>
> Key: CXF-2429
> URL: https://issues.apache.org/jira/browse/CXF-2429
> Project: CXF
> Issue Type: Bug
> Components: Tooling
> Affects Versions: 2.1.6, 2.2.3
> Environment: the issue is not environment related
> Reporter: Michael Klimiuk
> Assignee: Daniel Kulp
> Fix For: 2.2.4
>
>
> SCENARIO:
> The following ant task is executed to generate client artifacts:
> <java classname="org.apache.cxf.tools.wsdlto.WSDLToJava" fork="true">
> <arg value="-client" />
> <arg value="-db" />
> <arg value="xmlbeans" />
> <arg value="-d" />
> <arg value="${gen.dir}" />
> <arg value="${wsdl.file}" />
> <classpath>
> <path refid="ws.classpath" />
> </classpath>
> </java>
> ACTUAL RESULT:
> Generated class XXXService.java uses default databinding style (JAXB) for creation of a service client while the XmlBeans style is specified. Furthermore, the databinding style cannot even be changed programmatically using available interfaces.
> EXPECTED RESULT:
> Generated class XXXService.java must use the specified databinding style for creation of a service client.
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.