Exception in thread "Main Thread" java.lang.NoSuchMethodError: read
       at
org.apache.cxf.common.xmlschema.SchemaCollection.read(SchemaCollection.java:130)
       at
org.apache.cxf.databinding.AbstractDataBinding.addSchemaDocument(AbstractDataBinding.java:177)
       at
org.apache.cxf.jaxb.JAXBDataBinding.initialize(JAXBDataBinding.java:344)
       at
org.apache.cxf.service.factory.AbstractServiceFactoryBean.initializeDataBindings(AbstractServiceFactoryBean.java:86)
       at
org.apache.cxf.service.factory.ReflectionServiceFactoryBean.buildServiceFromClass(ReflectionServiceFactoryBean.java:438)
       at
org.apache.cxf.service.factory.ReflectionServiceFactoryBean.initializeServiceModel(ReflectionServiceFactoryBean.java:501)
       at
org.apache.cxf.service.factory.ReflectionServiceFactoryBean.create(ReflectionServiceFactoryBean.java:241)
       at
org.apache.cxf.frontend.AbstractWSDLBasedEndpointFactory.createEndpoint(AbstractWSDLBasedEndpointFactory.java:101)
       at
org.apache.cxf.frontend.ClientFactoryBean.create(ClientFactoryBean.java:90)
       at
org.apache.cxf.frontend.ClientProxyFactoryBean.create(ClientProxyFactoryBean.java:152)
       at
org.apache.cxf.frontend.ClientProxyFactoryBean.create(ClientProxyFactoryBean.java:89)
       at cxf.service.Client.main(Client.java:39)
client code is :
     public static void main(String args[]) throws Exception {
                
        ClientProxyFactoryBean factory = new ClientProxyFactoryBean();
       
factory.setAddress("http://localhost:8080/pm/services/approvalService";);
        ApprovalService approvalService =
factory.create(ApprovalService.class); 
        System.out.println("Invoke getApprovalItems()....");
        ApprovalItem[] items =
approvalService.getApprovalItems("wangxiaoyan");
        for (int i = 0; items!=null && i < items.length; i++) {
                        System.out.println(items[i].getCurrentApprovers());
        }
   }

--
View this message in context: 
http://cxf.547215.n5.nabble.com/cxf-server-publishing-success-but-client-error-tp4497582p4497582.html
Sent from the cxf-user mailing list archive at Nabble.com.

Reply via email to