我正在创建将调用 soap webservice 的消费者服务。早些时候我们使用的是 javax,即 java ee,现在我们搬到了雅加达,并且没有调用 Web 服务。以下是配置:
JaxWsProxyFactoryBean jaxWsProxyFactoryBean = new JaxWsProxyFactoryBean();
jaxWsProxyFactoryBean.setServiceClass(AKKIPortType.class);
jaxWsProxyFactoryBean.setAddress(serviceURL);
Map<String, Object> props = new HashMap<String, Object>();
props.put("mtom-enabled", Boolean.TRUE);
jaxWsProxyFactoryBean.setProperties(props);
SoapBindingConfiguration sbc = new SoapBindingConfiguration();
sbc.setVersion(Soap12.getInstance());
jaxWsProxyFactoryBean.setBindingConfig(sbc);
和错误:
警告:{http://xmldefs.akki.com/Applications/service/V1}AkkiService#{http://xmldefs.akki.com/Applications/service/V1} 报告的拦截器已抛出异常,现在展开 org. apache.cxf.interceptor.Fault:无法发送消息。在 org.apache.cxf.interceptor.MessageSenderInterceptor$MessageSenderEndingInterceptor.handleMessage(MessageSenderInterceptor.java:67) 在 org.apache.cxf.phase.PhaseInterceptorChain.doIntercept(PhaseInterceptorChain.java:307) 在 org.apache.cxf.endpoint.ClientImpl .doInvoke(ClientImpl.java:528) 在 org.apache.cxf.endpoint.ClientImpl.invoke(ClientImpl.java:439)