你好,我正在尝试实现一个肥皂客户端。 JBoss EAP 7.2
JaxWsProxyFactoryBean proxyFactory = new JaxWsProxyFactoryBean();
proxyFactory.setBindingId(SOAPBinding.SOAP12HTTP_BINDING);
proxyFactory.setServiceClass(ManagementPortType.class);
proxyFactory.setAddress(address);
ManagementPortType managementPortType = (ManagementPortType) proxyFactory.create();
@WebService(targetNamespace = "http://xoev.de/transport/xta/211", name = "managementPortType")
@XmlSeeAlso({eu.osci.ws._2008._05.transport.ObjectFactory.class, org.oasis_open.docs.wss._2004._01.oasis_200401_wss_wssecurity_secext_1_0.ObjectFactory.class, de.xoev.schemata.basisdatentypen._1_1.ObjectFactory.class, org.w3.ns.ws_policy.ObjectFactory.class, org.w3._2000._09.xmldsig_.ObjectFactory.class, org.apache.cxf.ws.addressing.ObjectFactory.class, org.oasis_open.docs.wss._2004._01.oasis_200401_wss_wssecurity_utility_1_0.ObjectFactory.class, eu.osci.ws._2014._10.transport.ObjectFactory.class, org.w3._2001._04.xmlenc_.ObjectFactory.class, ObjectFactory.class, org.w3._2003._05.soap_envelope.ObjectFactory.class})
@SOAPBinding(parameterStyle = SOAPBinding.ParameterStyle.BARE)
public interface ManagementPortType {
创建ManagementPortType的行将引发
java.lang.IllegalArgumentException: can't parse argument number: ''{0}''
at java.text.MessageFormat.makeFormat(MessageFormat.java:1429)
at java.text.MessageFormat.applyPattern(MessageFormat.java:479)
at java.text.MessageFormat.<init>(MessageFormat.java:362)
at java.text.MessageFormat.format(MessageFormat.java:840)
at com.sun.xml.bind.v2.model.impl.Messages.format(Messages.java:132)
at com.sun.xml.bind.v2.model.impl.TypeInfoSetImpl.add(TypeInfoSetImpl.java:306)
at com.sun.xml.bind.v2.model.impl.RegistryInfoImpl.<init>(RegistryInfoImpl.java:121)
at com.sun.xml.bind.v2.model.impl.ModelBuilder.addRegistry(ModelBuilder.java:417)
我不知道该如何解决。 我使用的类是使用wsimport生成的。
<dependency>
<groupId>org.apache.cxf</groupId>
<artifactId>cxf-rt-frontend-jaxws</artifactId>
<version>${cxf.version}</version>
</dependency>
<dependency>
<groupId>org.apache.cxf</groupId>
<artifactId>cxf-rt-transports-http</artifactId>
<version>${cxf.version}</version>
</dependency>
<dependency>
<groupId>org.apache.cxf</groupId>
<artifactId>cxf-rt-ws-security</artifactId>
<version>${cxf.version}</version>
</dependency>