Package com.sun.xml.bind.api

Examples of com.sun.xml.bind.api.JAXBRIContext


        }

        // RPC

        if (method.getSoapStyle() == SOAPBinding.Style.RPC) {
            JAXBRIContext jxbcontext = wmodel.getJaxbContext();
            if (request != null && request.getChildren().size() > 0) {
                Iterator ite2 = request.getChildren().iterator();
                while (ite2.hasNext()) {
                    JavaParameter jp = (JavaParameter)ite2.next();
                    QName qname = jxbcontext.getTypeName(jp.getTypeReference());                 
                    addPartByTypeName(inputMessage, jp.getName(), qname);
                }

            }
        }
View Full Code Here


        }

        // RPC

        if (method.getSoapStyle() == SOAPBinding.Style.RPC) {
            JAXBRIContext jxbcontext = wmodel.getJaxbContext();
            if (response != null && response.getChildren().size() > 0) {
                Iterator ite2 = response.getChildren().iterator();
                while (ite2.hasNext()) {
                    JavaParameter jp = (JavaParameter)ite2.next();
                    QName qname = jxbcontext.getTypeName(jp.getTypeReference());
                    addPartByTypeName(outputMessage, jp.getName(), qname);
                }

            }
View Full Code Here

        List<TypeReference> typeRefs = new ArrayList<TypeReference>();
        typeRefs.add(ref);
        List<Class<?>> clses = new ArrayList<Class<?>>(ctxClasses);
        clses.add(ref.type.getClass());
        try {
            JAXBRIContext riContext = JAXBRIContext.newInstance(clses.toArray(new Class[clses.size()]),
                                                                    typeRefs, null, null, true, null);
            Bridge bridge = riContext.createBridge(ref);

            if (source instanceof XMLStreamWriter) {
                bridge.marshal(elValue, (XMLStreamWriter)source);
            } else if (source instanceof OutputStream) {
                //the namespace is missing when marshal the xsd:QName type
View Full Code Here

        List<TypeReference> typeRefs = new ArrayList<TypeReference>();
        typeRefs.add(ref);
        List<Class<?>> clses = new ArrayList<Class<?>>(ctxClasses);
        clses.add(ref.type.getClass());
        try {
            JAXBRIContext riContext = JAXBRIContext.newInstance(clses.toArray(new Class[clses.size()]),
                                                                    typeRefs, null, null, true, null);
            Bridge bridge = riContext.createBridge(ref);
          
            if (source instanceof XMLStreamReader) {
                //DOMUtils.writeXml(StaxUtils.read((XMLStreamReader)source), System.out);
                return bridge.unmarshal((XMLStreamReader)source);              
            } else if (source instanceof InputStream) {
View Full Code Here

            types.add(retParam.getJavaType());
         }
      }

      // Create a JAXBContext for those types
      JAXBRIContext jaxbCtx = null;
      if (useJAXBAccessorFactory)
      {
         Class[] typeArr = new Class[types.size()];
         jaxbCtx = (JAXBRIContext)JAXBContextFactory.newInstance().createContext(types.toArray(typeArr));
      }
View Full Code Here

        List<TypeReference> typeRefs = new ArrayList<TypeReference>();
        typeRefs.add(ref);
        List<Class<?>> clses = new ArrayList<Class<?>>(ctxClasses);
        clses.add(ref.type.getClass());
        try {
            JAXBRIContext riContext = JAXBRIContext.newInstance(clses.toArray(new Class[clses.size()]),
                                                                    typeRefs, null, null, true, null);
            Bridge bridge = riContext.createBridge(ref);

            if (source instanceof XMLStreamWriter) {
                bridge.marshal(elValue, (XMLStreamWriter)source);
            } else if (source instanceof OutputStream) {
                //the namespace is missing when marshal the xsd:QName type
View Full Code Here

        List<TypeReference> typeRefs = new ArrayList<TypeReference>();
        typeRefs.add(ref);
        List<Class<?>> clses = new ArrayList<Class<?>>(ctxClasses);
        clses.add(ref.type.getClass());
        try {
            JAXBRIContext riContext = JAXBRIContext.newInstance(clses.toArray(new Class[clses.size()]),
                                                                    typeRefs, null, null, true, null);
            Bridge bridge = riContext.createBridge(ref);
          
            if (source instanceof XMLStreamReader) {
                //DOMUtils.writeXml(StaxUtils.read((XMLStreamReader)source), System.out);
                return bridge.unmarshal((XMLStreamReader)source);              
            } else if (source instanceof InputStream) {
View Full Code Here

        }

        // RPC

        if (method.getSoapStyle() == SOAPBinding.Style.RPC) {
            JAXBRIContext jxbcontext = wmodel.getJaxbContext();
            if (request != null && request.getChildren().size() > 0) {
                Iterator ite2 = request.getChildren().iterator();
                while (ite2.hasNext()) {
                    JavaParameter jp = (JavaParameter)ite2.next();
                    QName qname = jxbcontext.getTypeName(jp.getTypeReference());                 
                    addPartByTypeName(inputMessage, jp.getPartName(), qname);
                }

            }
        }
View Full Code Here

        }

        // RPC

        if (method.getSoapStyle() == SOAPBinding.Style.RPC) {
            JAXBRIContext jxbcontext = wmodel.getJaxbContext();
            if (response != null && response.getChildren().size() > 0) {
                Iterator ite2 = response.getChildren().iterator();
                while (ite2.hasNext()) {
                    JavaParameter jp = (JavaParameter)ite2.next();
                    QName qname = jxbcontext.getTypeName(jp.getTypeReference());
                    addPartByTypeName(outputMessage, jp.getPartName(), qname);
                }

            }
View Full Code Here

        List<TypeReference> typeRefs = new ArrayList<TypeReference>();
        typeRefs.add(ref);
        List<Class<?>> clses = new ArrayList<Class<?>>(ctxClasses);
        clses.add(ref.type.getClass());
        try {
            JAXBRIContext riContext = JAXBRIContext.newInstance(clses.toArray(new Class[clses.size()]),
                                                                    typeRefs, null, null, true, null);
            Bridge bridge = riContext.createBridge(ref);

            if (source instanceof XMLStreamWriter) {
                bridge.marshal(elValue, (XMLStreamWriter)source);
            } else if (source instanceof OutputStream) {
                //the namespace is missing when marshal the xsd:QName type
View Full Code Here

TOP

Related Classes of com.sun.xml.bind.api.JAXBRIContext

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.