IBM®
跳转到主要内容
    中国 [选择]    使用条款
 
 
Select a scope: Search for:    
    首页    产品    服务与解决方案     支持与下载    个性化服务    
跳转到主要内容

developerWorks 中国  >  SOA and Web services  >

Web 服务编程的技巧与诀窍: 提高 J2EE 技术和 .NET 之间的互操作性,第 3 部分

Handling namespaces

developerWorks

返回原文


Listing 11. The helper class binds the Product field to the Order Web service namespace

public class ArrayOfProduct_Helper {
    // Type metadata
    private static com.ibm.ws.webservices.engine.description.TypeDesc typeDesc =
        new com.ibm.ws.webservices.engine.description.TypeDesc(ArrayOfProduct.class);

    static {
        com.ibm.ws.webservices.engine.description.FieldDesc field = new com.ibm.ws.webservices.engine.description.ElementDesc();
        field.setFieldName("product");
        field.setXmlName(com.ibm.ws.webservices.engine.utils.QNameTable.createQName("http://order.warehouse.com/service", "Product"));
        field.setXmlType(com.ibm.ws.webservices.engine.utils.QNameTable.createQName("http://product.warehouse.com", "Product"));
        field.setMinOccursIs0(true);
        typeDesc.addFieldDesc(field);
    };


返回原文

    关于 IBM 隐私条约 联系 IBM 使用条款