Xfile 以对象作为参数

在对象传递的时候出现了 JAXBElement<String>

 

客户端代码如下

 

 public static void main(String[] args)
    {

        xxxClient client = new xxxClient();
        // create a default service endpoint
        xxxPortType service = client.getxxxHttpPort();
        ObjectFactory objFac = new ObjectFactory();
        JAXBElement<String> a1 = objFac.createBeanA1("a1");
        JAXBElement<String> a2 = objFac.createBeanA2("b1");
        Bean in0 = new Bean();
        in0.setA1(a1);
        in0.setA2(a2);
        System.out.println(service.getBean(in0));

 

服务端的接口为

 public String getBean(Bean b);

 

 

你可能感兴趣的:(bean)