Java Code Examples for com.sun.xml.internal.ws.util.Pool#Marshaller

The following examples show how to use com.sun.xml.internal.ws.util.Pool#Marshaller . You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
Source File: AbstractSEIModelImpl.java    From openjdk-jdk8u-backup with GNU General Public License v2.0 4 votes vote down vote up
@Override
public Pool.Marshaller getMarshallerPool() {
    return marshallers;
}
 
Example 2
Source File: AbstractSEIModelImpl.java    From openjdk-8-source with GNU General Public License v2.0 4 votes vote down vote up
@Override
public Pool.Marshaller getMarshallerPool() {
    return marshallers;
}
 
Example 3
Source File: AbstractSEIModelImpl.java    From hottub with GNU General Public License v2.0 4 votes vote down vote up
private void /*JAXBRIContext*/ createJAXBContext() {
        final List<TypeInfo> types = getAllTypeInfos();
        final List<Class> cls = new ArrayList<Class>(types.size() + additionalClasses.size());

        cls.addAll(additionalClasses);
        for (TypeInfo type : types) {
            cls.add((Class) type.type);
        }

        try {
            //jaxbContext = JAXBRIContext.newInstance(cls, types, targetNamespace, false);
            // Need to avoid doPriv block once JAXB is fixed. Afterwards, use the above
            bindingContext = AccessController.doPrivileged(new PrivilegedExceptionAction<BindingContext>() {
                public BindingContext run() throws Exception {
                    if(LOGGER.isLoggable(Level.FINEST)) {
                        LOGGER.log(Level.FINEST, "Creating JAXBContext with classes={0} and types={1}", new Object[]{cls, types});
                    }
                    UsesJAXBContextFeature f = features.get(UsesJAXBContextFeature.class);
                    com.oracle.webservices.internal.api.databinding.DatabindingModeFeature dmf =
                            features.get(com.oracle.webservices.internal.api.databinding.DatabindingModeFeature.class);
                    JAXBContextFactory factory = f!=null ? f.getFactory() : null;
                    if(factory==null)   factory=JAXBContextFactory.DEFAULT;

//                    return factory.createJAXBContext(AbstractSEIModelImpl.this,cls,types);

                    databindingInfo.properties().put(JAXBContextFactory.class.getName(), factory);
                    if (dmf != null) {
                        if (LOGGER.isLoggable(Level.FINE))
                            LOGGER.log(Level.FINE, "DatabindingModeFeature in SEI specifies mode: {0}", dmf.getMode());
                        databindingInfo.setDatabindingMode(dmf
                                .getMode());
                    }

                        if (f!=null) databindingInfo.setDatabindingMode(BindingContextFactory.DefaultDatabindingMode);
                        databindingInfo.setClassLoader(classLoader);
                        databindingInfo.contentClasses().addAll(cls);
                        databindingInfo.typeInfos().addAll(types);
                        databindingInfo.properties().put("c14nSupport", Boolean.FALSE);
                        databindingInfo.setDefaultNamespace(AbstractSEIModelImpl.this.getDefaultSchemaNamespace());
                        BindingContext bc =  BindingContextFactory.create(databindingInfo);
                            if (LOGGER.isLoggable(Level.FINE))
                                LOGGER.log(Level.FINE,
                                        "Created binding context: "
                                                + bc.getClass().getName());
//                      System.out.println("---------------------- databinding " + bc);
                        return bc;
                }
            });
//          createBridgeMap(types);
            createBondMap(types);
        } catch (PrivilegedActionException e) {
            throw new WebServiceException(ModelerMessages.UNABLE_TO_CREATE_JAXB_CONTEXT(), e);
        }
        knownNamespaceURIs = new ArrayList<String>();
        for (String namespace : bindingContext.getKnownNamespaceURIs()) {
            if (namespace.length() > 0) {
                if (!namespace.equals(SOAPNamespaceConstants.XSD) && !namespace.equals(SOAPNamespaceConstants.XMLNS))
                    knownNamespaceURIs.add(namespace);
            }
        }

        marshallers = new Pool.Marshaller(jaxbContext);

        //return getJAXBContext();
    }
 
Example 4
Source File: AbstractSEIModelImpl.java    From hottub with GNU General Public License v2.0 4 votes vote down vote up
@Override
public Pool.Marshaller getMarshallerPool() {
    return marshallers;
}
 
Example 5
Source File: AbstractSEIModelImpl.java    From openjdk-8 with GNU General Public License v2.0 4 votes vote down vote up
private void /*JAXBRIContext*/ createJAXBContext() {
        final List<TypeInfo> types = getAllTypeInfos();
        final List<Class> cls = new ArrayList<Class>(types.size() + additionalClasses.size());

        cls.addAll(additionalClasses);
        for (TypeInfo type : types) {
            cls.add((Class) type.type);
        }

        try {
            //jaxbContext = JAXBRIContext.newInstance(cls, types, targetNamespace, false);
            // Need to avoid doPriv block once JAXB is fixed. Afterwards, use the above
            bindingContext = AccessController.doPrivileged(new PrivilegedExceptionAction<BindingContext>() {
                public BindingContext run() throws Exception {
                    if(LOGGER.isLoggable(Level.FINEST)) {
                        LOGGER.log(Level.FINEST, "Creating JAXBContext with classes={0} and types={1}", new Object[]{cls, types});
                    }
                    UsesJAXBContextFeature f = features.get(UsesJAXBContextFeature.class);
                    com.oracle.webservices.internal.api.databinding.DatabindingModeFeature dmf =
                            features.get(com.oracle.webservices.internal.api.databinding.DatabindingModeFeature.class);
                    JAXBContextFactory factory = f!=null ? f.getFactory() : null;
                    if(factory==null)   factory=JAXBContextFactory.DEFAULT;

//                    return factory.createJAXBContext(AbstractSEIModelImpl.this,cls,types);

                    databindingInfo.properties().put(JAXBContextFactory.class.getName(), factory);
                    if (dmf != null) {
                        if (LOGGER.isLoggable(Level.FINE))
                            LOGGER.log(Level.FINE, "DatabindingModeFeature in SEI specifies mode: {0}", dmf.getMode());
                        databindingInfo.setDatabindingMode(dmf
                                .getMode());
                    }

                        if (f!=null) databindingInfo.setDatabindingMode(BindingContextFactory.DefaultDatabindingMode);
                        databindingInfo.setClassLoader(classLoader);
                        databindingInfo.contentClasses().addAll(cls);
                        databindingInfo.typeInfos().addAll(types);
                        databindingInfo.properties().put("c14nSupport", Boolean.FALSE);
                        databindingInfo.setDefaultNamespace(AbstractSEIModelImpl.this.getDefaultSchemaNamespace());
                        BindingContext bc =  BindingContextFactory.create(databindingInfo);
                            if (LOGGER.isLoggable(Level.FINE))
                                LOGGER.log(Level.FINE,
                                        "Created binding context: "
                                                + bc.getClass().getName());
//                      System.out.println("---------------------- databinding " + bc);
                        return bc;
                }
            });
//          createBridgeMap(types);
            createBondMap(types);
        } catch (PrivilegedActionException e) {
            throw new WebServiceException(ModelerMessages.UNABLE_TO_CREATE_JAXB_CONTEXT(), e);
        }
        knownNamespaceURIs = new ArrayList<String>();
        for (String namespace : bindingContext.getKnownNamespaceURIs()) {
            if (namespace.length() > 0) {
                if (!namespace.equals(SOAPNamespaceConstants.XSD) && !namespace.equals(SOAPNamespaceConstants.XMLNS))
                    knownNamespaceURIs.add(namespace);
            }
        }

        marshallers = new Pool.Marshaller(jaxbContext);

        //return getJAXBContext();
    }
 
Example 6
Source File: AbstractSEIModelImpl.java    From openjdk-jdk9 with GNU General Public License v2.0 4 votes vote down vote up
@Override
public Pool.Marshaller getMarshallerPool() {
    return marshallers;
}
 
Example 7
Source File: AbstractSEIModelImpl.java    From openjdk-jdk8u with GNU General Public License v2.0 4 votes vote down vote up
private void /*JAXBRIContext*/ createJAXBContext() {
        final List<TypeInfo> types = getAllTypeInfos();
        final List<Class> cls = new ArrayList<Class>(types.size() + additionalClasses.size());

        cls.addAll(additionalClasses);
        for (TypeInfo type : types) {
            cls.add((Class) type.type);
        }

        try {
            //jaxbContext = JAXBRIContext.newInstance(cls, types, targetNamespace, false);
            // Need to avoid doPriv block once JAXB is fixed. Afterwards, use the above
            bindingContext = AccessController.doPrivileged(new PrivilegedExceptionAction<BindingContext>() {
                public BindingContext run() throws Exception {
                    if(LOGGER.isLoggable(Level.FINEST)) {
                        LOGGER.log(Level.FINEST, "Creating JAXBContext with classes={0} and types={1}", new Object[]{cls, types});
                    }
                    UsesJAXBContextFeature f = features.get(UsesJAXBContextFeature.class);
                    com.oracle.webservices.internal.api.databinding.DatabindingModeFeature dmf =
                            features.get(com.oracle.webservices.internal.api.databinding.DatabindingModeFeature.class);
                    JAXBContextFactory factory = f!=null ? f.getFactory() : null;
                    if(factory==null)   factory=JAXBContextFactory.DEFAULT;

//                    return factory.createJAXBContext(AbstractSEIModelImpl.this,cls,types);

                    databindingInfo.properties().put(JAXBContextFactory.class.getName(), factory);
                    if (dmf != null) {
                        if (LOGGER.isLoggable(Level.FINE))
                            LOGGER.log(Level.FINE, "DatabindingModeFeature in SEI specifies mode: {0}", dmf.getMode());
                        databindingInfo.setDatabindingMode(dmf
                                .getMode());
                    }

                        if (f!=null) databindingInfo.setDatabindingMode(BindingContextFactory.DefaultDatabindingMode);
                        databindingInfo.setClassLoader(classLoader);
                        databindingInfo.contentClasses().addAll(cls);
                        databindingInfo.typeInfos().addAll(types);
                        databindingInfo.properties().put("c14nSupport", Boolean.FALSE);
                        databindingInfo.setDefaultNamespace(AbstractSEIModelImpl.this.getDefaultSchemaNamespace());
                        BindingContext bc =  BindingContextFactory.create(databindingInfo);
                            if (LOGGER.isLoggable(Level.FINE))
                                LOGGER.log(Level.FINE,
                                        "Created binding context: "
                                                + bc.getClass().getName());
//                      System.out.println("---------------------- databinding " + bc);
                        return bc;
                }
            });
//          createBridgeMap(types);
            createBondMap(types);
        } catch (PrivilegedActionException e) {
            throw new WebServiceException(ModelerMessages.UNABLE_TO_CREATE_JAXB_CONTEXT(), e);
        }
        knownNamespaceURIs = new ArrayList<String>();
        for (String namespace : bindingContext.getKnownNamespaceURIs()) {
            if (namespace.length() > 0) {
                if (!namespace.equals(SOAPNamespaceConstants.XSD) && !namespace.equals(SOAPNamespaceConstants.XMLNS))
                    knownNamespaceURIs.add(namespace);
            }
        }

        marshallers = new Pool.Marshaller(jaxbContext);

        //return getJAXBContext();
    }
 
Example 8
Source File: AbstractSEIModelImpl.java    From openjdk-8-source with GNU General Public License v2.0 4 votes vote down vote up
private void /*JAXBRIContext*/ createJAXBContext() {
        final List<TypeInfo> types = getAllTypeInfos();
        final List<Class> cls = new ArrayList<Class>(types.size() + additionalClasses.size());

        cls.addAll(additionalClasses);
        for (TypeInfo type : types) {
            cls.add((Class) type.type);
        }

        try {
            //jaxbContext = JAXBRIContext.newInstance(cls, types, targetNamespace, false);
            // Need to avoid doPriv block once JAXB is fixed. Afterwards, use the above
            bindingContext = AccessController.doPrivileged(new PrivilegedExceptionAction<BindingContext>() {
                public BindingContext run() throws Exception {
                    if(LOGGER.isLoggable(Level.FINEST)) {
                        LOGGER.log(Level.FINEST, "Creating JAXBContext with classes={0} and types={1}", new Object[]{cls, types});
                    }
                    UsesJAXBContextFeature f = features.get(UsesJAXBContextFeature.class);
                    com.oracle.webservices.internal.api.databinding.DatabindingModeFeature dmf =
                            features.get(com.oracle.webservices.internal.api.databinding.DatabindingModeFeature.class);
                    JAXBContextFactory factory = f!=null ? f.getFactory() : null;
                    if(factory==null)   factory=JAXBContextFactory.DEFAULT;

//                    return factory.createJAXBContext(AbstractSEIModelImpl.this,cls,types);

                    databindingInfo.properties().put(JAXBContextFactory.class.getName(), factory);
                    if (dmf != null) {
                        if (LOGGER.isLoggable(Level.FINE))
                            LOGGER.log(Level.FINE, "DatabindingModeFeature in SEI specifies mode: {0}", dmf.getMode());
                        databindingInfo.setDatabindingMode(dmf
                                .getMode());
                    }

                        if (f!=null) databindingInfo.setDatabindingMode(BindingContextFactory.DefaultDatabindingMode);
                        databindingInfo.setClassLoader(classLoader);
                        databindingInfo.contentClasses().addAll(cls);
                        databindingInfo.typeInfos().addAll(types);
                        databindingInfo.properties().put("c14nSupport", Boolean.FALSE);
                        databindingInfo.setDefaultNamespace(AbstractSEIModelImpl.this.getDefaultSchemaNamespace());
                        BindingContext bc =  BindingContextFactory.create(databindingInfo);
                            if (LOGGER.isLoggable(Level.FINE))
                                LOGGER.log(Level.FINE,
                                        "Created binding context: "
                                                + bc.getClass().getName());
//                      System.out.println("---------------------- databinding " + bc);
                        return bc;
                }
            });
//          createBridgeMap(types);
            createBondMap(types);
        } catch (PrivilegedActionException e) {
            throw new WebServiceException(ModelerMessages.UNABLE_TO_CREATE_JAXB_CONTEXT(), e);
        }
        knownNamespaceURIs = new ArrayList<String>();
        for (String namespace : bindingContext.getKnownNamespaceURIs()) {
            if (namespace.length() > 0) {
                if (!namespace.equals(SOAPNamespaceConstants.XSD) && !namespace.equals(SOAPNamespaceConstants.XMLNS))
                    knownNamespaceURIs.add(namespace);
            }
        }

        marshallers = new Pool.Marshaller(jaxbContext);

        //return getJAXBContext();
    }
 
Example 9
Source File: AbstractSEIModelImpl.java    From jdk8u60 with GNU General Public License v2.0 4 votes vote down vote up
private void /*JAXBRIContext*/ createJAXBContext() {
        final List<TypeInfo> types = getAllTypeInfos();
        final List<Class> cls = new ArrayList<Class>(types.size() + additionalClasses.size());

        cls.addAll(additionalClasses);
        for (TypeInfo type : types) {
            cls.add((Class) type.type);
        }

        try {
            //jaxbContext = JAXBRIContext.newInstance(cls, types, targetNamespace, false);
            // Need to avoid doPriv block once JAXB is fixed. Afterwards, use the above
            bindingContext = AccessController.doPrivileged(new PrivilegedExceptionAction<BindingContext>() {
                public BindingContext run() throws Exception {
                    if(LOGGER.isLoggable(Level.FINEST)) {
                        LOGGER.log(Level.FINEST, "Creating JAXBContext with classes={0} and types={1}", new Object[]{cls, types});
                    }
                    UsesJAXBContextFeature f = features.get(UsesJAXBContextFeature.class);
                    com.oracle.webservices.internal.api.databinding.DatabindingModeFeature dmf =
                            features.get(com.oracle.webservices.internal.api.databinding.DatabindingModeFeature.class);
                    JAXBContextFactory factory = f!=null ? f.getFactory() : null;
                    if(factory==null)   factory=JAXBContextFactory.DEFAULT;

//                    return factory.createJAXBContext(AbstractSEIModelImpl.this,cls,types);

                    databindingInfo.properties().put(JAXBContextFactory.class.getName(), factory);
                    if (dmf != null) {
                        if (LOGGER.isLoggable(Level.FINE))
                            LOGGER.log(Level.FINE, "DatabindingModeFeature in SEI specifies mode: {0}", dmf.getMode());
                        databindingInfo.setDatabindingMode(dmf
                                .getMode());
                    }

                        if (f!=null) databindingInfo.setDatabindingMode(BindingContextFactory.DefaultDatabindingMode);
                        databindingInfo.setClassLoader(classLoader);
                        databindingInfo.contentClasses().addAll(cls);
                        databindingInfo.typeInfos().addAll(types);
                        databindingInfo.properties().put("c14nSupport", Boolean.FALSE);
                        databindingInfo.setDefaultNamespace(AbstractSEIModelImpl.this.getDefaultSchemaNamespace());
                        BindingContext bc =  BindingContextFactory.create(databindingInfo);
                            if (LOGGER.isLoggable(Level.FINE))
                                LOGGER.log(Level.FINE,
                                        "Created binding context: "
                                                + bc.getClass().getName());
//                      System.out.println("---------------------- databinding " + bc);
                        return bc;
                }
            });
//          createBridgeMap(types);
            createBondMap(types);
        } catch (PrivilegedActionException e) {
            throw new WebServiceException(ModelerMessages.UNABLE_TO_CREATE_JAXB_CONTEXT(), e);
        }
        knownNamespaceURIs = new ArrayList<String>();
        for (String namespace : bindingContext.getKnownNamespaceURIs()) {
            if (namespace.length() > 0) {
                if (!namespace.equals(SOAPNamespaceConstants.XSD) && !namespace.equals(SOAPNamespaceConstants.XMLNS))
                    knownNamespaceURIs.add(namespace);
            }
        }

        marshallers = new Pool.Marshaller(jaxbContext);

        //return getJAXBContext();
    }
 
Example 10
Source File: AbstractSEIModelImpl.java    From jdk8u60 with GNU General Public License v2.0 4 votes vote down vote up
@Override
public Pool.Marshaller getMarshallerPool() {
    return marshallers;
}
 
Example 11
Source File: AbstractSEIModelImpl.java    From openjdk-8 with GNU General Public License v2.0 4 votes vote down vote up
@Override
public Pool.Marshaller getMarshallerPool() {
    return marshallers;
}
 
Example 12
Source File: AbstractSEIModelImpl.java    From TencentKona-8 with GNU General Public License v2.0 4 votes vote down vote up
@Override
public Pool.Marshaller getMarshallerPool() {
    return marshallers;
}
 
Example 13
Source File: SEIModel.java    From openjdk-jdk8u with GNU General Public License v2.0 votes vote down vote up
Pool.Marshaller getMarshallerPool(); 
Example 14
Source File: SEIModel.java    From openjdk-jdk8u-backup with GNU General Public License v2.0 votes vote down vote up
Pool.Marshaller getMarshallerPool(); 
Example 15
Source File: SEIModel.java    From TencentKona-8 with GNU General Public License v2.0 votes vote down vote up
Pool.Marshaller getMarshallerPool(); 
Example 16
Source File: SEIModel.java    From openjdk-8 with GNU General Public License v2.0 votes vote down vote up
Pool.Marshaller getMarshallerPool(); 
Example 17
Source File: SEIModel.java    From openjdk-jdk9 with GNU General Public License v2.0 votes vote down vote up
Pool.Marshaller getMarshallerPool(); 
Example 18
Source File: SEIModel.java    From hottub with GNU General Public License v2.0 votes vote down vote up
Pool.Marshaller getMarshallerPool(); 
Example 19
Source File: SEIModel.java    From jdk8u60 with GNU General Public License v2.0 votes vote down vote up
Pool.Marshaller getMarshallerPool(); 
Example 20
Source File: SEIModel.java    From openjdk-8-source with GNU General Public License v2.0 votes vote down vote up
Pool.Marshaller getMarshallerPool();