消息部分{http://example.com/}methodName未被识别。 (它是否存在于服务WSDL中?)

时间:2015-04-09 15:32:35

标签: java spring web-services wsdl

我将一个Spring bean“InterfaceA”暴露为一个web服务,并通过注入它在UI支持bean内部使用相同的bean。

 @javax.jws.WebService
    public interface InterfaceA{
      public String methodA();
    }

    public Class AImpl{

      @WebMethod(exclude=true)
       public String methodA();
    }

我正在自动装配上面的bean并在我的UI支持bean中使用它。

 @Component
    @Scope("view")
    public class BeanA {

        @Autowired
        private transient InterfaceA  serviceA;

       public void example(){
          serviceA.methodA();
       }
    }

当我在tc服务器上部署并运行它时,它会抛出以下异常..

javax.xml.ws.soap.SOAPFaultException: Message part {http://example.com/}methodA was not recognized.  (Does it exist in service WSDL?)
    at org.apache.cxf.jaxws.JaxWsClientProxy.invoke(JaxWsClientProxy.java:155)
    at com.sun.proxy.$Proxy105.getInboxRefundIds(Unknown Source)
    at 

当我将它作为bean注入并使用bean ref来进行调用时,为什么使用WSDL?我们不能自动上传像上面这样的Web服务类吗?

0 个答案:

没有答案