com.sun.xml.internal.ws.encoding.soap.streaming.SOAPNamespaceConstants Java Examples

The following examples show how to use com.sun.xml.internal.ws.encoding.soap.streaming.SOAPNamespaceConstants. 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 TencentKona-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 #2
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 #3
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 #4
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 #5
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 #6
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 #7
Source File: AbstractSEIModelImpl.java    From openjdk-jdk8u-backup 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-jdk9 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: NamespaceSupport.java    From openjdk-8 with GNU General Public License v2.0 3 votes vote down vote up
/**
 * Declare a Namespace prefix.
 *
 * <p>This method declares a prefix in the current Namespace
 * context; the prefix will remain in force until this context
 * is popped, unless it is shadowed in a descendant context.</p>
 *
 * <p>To declare a default Namespace, use the empty string.  The
 * prefix must not be "xml" or "xmlns".</p>
 *
 * <p>Note that you must <em>not</em> declare a prefix after
 * you've pushed and popped another Namespace.</p>
 *
 * <p>Note that there is an asymmetry in this library: while {@link
 * #getPrefix getPrefix} will not return the default "" prefix,
 * even if you have declared one; to check for a default prefix,
 * you have to look it up explicitly using {@link #getURI getURI}.
 * This asymmetry exists to make it easier to look up prefixes
 * for attribute names, where the default prefix is not allowed.</p>
 *
 * @param prefix The prefix to declare, or null for the empty
 *        string.
 * @param uri The Namespace URI to associate with the prefix.
 * @return true if the prefix was legal, false otherwise
 * @see #processName
 * @see #getURI
 * @see #getPrefix
 */
public boolean declarePrefix(String prefix, String uri) {
    // bugfix#: 4989753
    if ((prefix.equals("xml") && !uri.equals(SOAPNamespaceConstants.XMLNS))
        || prefix.equals("xmlns")) {
        return false;
    } else {
        currentContext.declarePrefix(prefix, uri);
        return true;
    }
}
 
Example #10
Source File: NamespaceSupport.java    From openjdk-8-source with GNU General Public License v2.0 3 votes vote down vote up
/**
 * Declare a Namespace prefix.
 *
 * <p>This method declares a prefix in the current Namespace
 * context; the prefix will remain in force until this context
 * is popped, unless it is shadowed in a descendant context.</p>
 *
 * <p>To declare a default Namespace, use the empty string.  The
 * prefix must not be "xml" or "xmlns".</p>
 *
 * <p>Note that you must <em>not</em> declare a prefix after
 * you've pushed and popped another Namespace.</p>
 *
 * <p>Note that there is an asymmetry in this library: while {@link
 * #getPrefix getPrefix} will not return the default "" prefix,
 * even if you have declared one; to check for a default prefix,
 * you have to look it up explicitly using {@link #getURI getURI}.
 * This asymmetry exists to make it easier to look up prefixes
 * for attribute names, where the default prefix is not allowed.</p>
 *
 * @param prefix The prefix to declare, or null for the empty
 *        string.
 * @param uri The Namespace URI to associate with the prefix.
 * @return true if the prefix was legal, false otherwise
 * @see #processName
 * @see #getURI
 * @see #getPrefix
 */
public boolean declarePrefix(String prefix, String uri) {
    // bugfix#: 4989753
    if ((prefix.equals("xml") && !uri.equals(SOAPNamespaceConstants.XMLNS))
        || prefix.equals("xmlns")) {
        return false;
    } else {
        currentContext.declarePrefix(prefix, uri);
        return true;
    }
}
 
Example #11
Source File: NamespaceSupport.java    From hottub with GNU General Public License v2.0 3 votes vote down vote up
/**
 * Declare a Namespace prefix.
 *
 * <p>This method declares a prefix in the current Namespace
 * context; the prefix will remain in force until this context
 * is popped, unless it is shadowed in a descendant context.</p>
 *
 * <p>To declare a default Namespace, use the empty string.  The
 * prefix must not be "xml" or "xmlns".</p>
 *
 * <p>Note that you must <em>not</em> declare a prefix after
 * you've pushed and popped another Namespace.</p>
 *
 * <p>Note that there is an asymmetry in this library: while {@link
 * #getPrefix getPrefix} will not return the default "" prefix,
 * even if you have declared one; to check for a default prefix,
 * you have to look it up explicitly using {@link #getURI getURI}.
 * This asymmetry exists to make it easier to look up prefixes
 * for attribute names, where the default prefix is not allowed.</p>
 *
 * @param prefix The prefix to declare, or null for the empty
 *        string.
 * @param uri The Namespace URI to associate with the prefix.
 * @return true if the prefix was legal, false otherwise
 * @see #processName
 * @see #getURI
 * @see #getPrefix
 */
public boolean declarePrefix(String prefix, String uri) {
    // bugfix#: 4989753
    if ((prefix.equals("xml") && !uri.equals(SOAPNamespaceConstants.XMLNS))
        || prefix.equals("xmlns")) {
        return false;
    } else {
        currentContext.declarePrefix(prefix, uri);
        return true;
    }
}
 
Example #12
Source File: NamespaceSupport.java    From openjdk-jdk9 with GNU General Public License v2.0 3 votes vote down vote up
/**
 * Declare a Namespace prefix.
 *
 * <p>This method declares a prefix in the current Namespace
 * context; the prefix will remain in force until this context
 * is popped, unless it is shadowed in a descendant context.</p>
 *
 * <p>To declare a default Namespace, use the empty string.  The
 * prefix must not be "xml" or "xmlns".</p>
 *
 * <p>Note that you must <em>not</em> declare a prefix after
 * you've pushed and popped another Namespace.</p>
 *
 * <p>Note that there is an asymmetry in this library: while {@link
 * #getPrefix getPrefix} will not return the default "" prefix,
 * even if you have declared one; to check for a default prefix,
 * you have to look it up explicitly using {@link #getURI getURI}.
 * This asymmetry exists to make it easier to look up prefixes
 * for attribute names, where the default prefix is not allowed.</p>
 *
 * @param prefix The prefix to declare, or null for the empty
 *        string.
 * @param uri The Namespace URI to associate with the prefix.
 * @return true if the prefix was legal, false otherwise
 * @see #processName
 * @see #getURI
 * @see #getPrefix
 */
public boolean declarePrefix(String prefix, String uri) {
    // bugfix#: 4989753
    if ((prefix.equals("xml") && !uri.equals(SOAPNamespaceConstants.XMLNS))
        || prefix.equals("xmlns")) {
        return false;
    } else {
        currentContext.declarePrefix(prefix, uri);
        return true;
    }
}
 
Example #13
Source File: NamespaceSupport.java    From openjdk-jdk8u-backup with GNU General Public License v2.0 3 votes vote down vote up
/**
 * Declare a Namespace prefix.
 *
 * <p>This method declares a prefix in the current Namespace
 * context; the prefix will remain in force until this context
 * is popped, unless it is shadowed in a descendant context.</p>
 *
 * <p>To declare a default Namespace, use the empty string.  The
 * prefix must not be "xml" or "xmlns".</p>
 *
 * <p>Note that you must <em>not</em> declare a prefix after
 * you've pushed and popped another Namespace.</p>
 *
 * <p>Note that there is an asymmetry in this library: while {@link
 * #getPrefix getPrefix} will not return the default "" prefix,
 * even if you have declared one; to check for a default prefix,
 * you have to look it up explicitly using {@link #getURI getURI}.
 * This asymmetry exists to make it easier to look up prefixes
 * for attribute names, where the default prefix is not allowed.</p>
 *
 * @param prefix The prefix to declare, or null for the empty
 *        string.
 * @param uri The Namespace URI to associate with the prefix.
 * @return true if the prefix was legal, false otherwise
 * @see #processName
 * @see #getURI
 * @see #getPrefix
 */
public boolean declarePrefix(String prefix, String uri) {
    // bugfix#: 4989753
    if ((prefix.equals("xml") && !uri.equals(SOAPNamespaceConstants.XMLNS))
        || prefix.equals("xmlns")) {
        return false;
    } else {
        currentContext.declarePrefix(prefix, uri);
        return true;
    }
}
 
Example #14
Source File: NamespaceSupport.java    From openjdk-jdk8u with GNU General Public License v2.0 3 votes vote down vote up
/**
 * Declare a Namespace prefix.
 *
 * <p>This method declares a prefix in the current Namespace
 * context; the prefix will remain in force until this context
 * is popped, unless it is shadowed in a descendant context.</p>
 *
 * <p>To declare a default Namespace, use the empty string.  The
 * prefix must not be "xml" or "xmlns".</p>
 *
 * <p>Note that you must <em>not</em> declare a prefix after
 * you've pushed and popped another Namespace.</p>
 *
 * <p>Note that there is an asymmetry in this library: while {@link
 * #getPrefix getPrefix} will not return the default "" prefix,
 * even if you have declared one; to check for a default prefix,
 * you have to look it up explicitly using {@link #getURI getURI}.
 * This asymmetry exists to make it easier to look up prefixes
 * for attribute names, where the default prefix is not allowed.</p>
 *
 * @param prefix The prefix to declare, or null for the empty
 *        string.
 * @param uri The Namespace URI to associate with the prefix.
 * @return true if the prefix was legal, false otherwise
 * @see #processName
 * @see #getURI
 * @see #getPrefix
 */
public boolean declarePrefix(String prefix, String uri) {
    // bugfix#: 4989753
    if ((prefix.equals("xml") && !uri.equals(SOAPNamespaceConstants.XMLNS))
        || prefix.equals("xmlns")) {
        return false;
    } else {
        currentContext.declarePrefix(prefix, uri);
        return true;
    }
}
 
Example #15
Source File: NamespaceSupport.java    From jdk8u60 with GNU General Public License v2.0 3 votes vote down vote up
/**
 * Declare a Namespace prefix.
 *
 * <p>This method declares a prefix in the current Namespace
 * context; the prefix will remain in force until this context
 * is popped, unless it is shadowed in a descendant context.</p>
 *
 * <p>To declare a default Namespace, use the empty string.  The
 * prefix must not be "xml" or "xmlns".</p>
 *
 * <p>Note that you must <em>not</em> declare a prefix after
 * you've pushed and popped another Namespace.</p>
 *
 * <p>Note that there is an asymmetry in this library: while {@link
 * #getPrefix getPrefix} will not return the default "" prefix,
 * even if you have declared one; to check for a default prefix,
 * you have to look it up explicitly using {@link #getURI getURI}.
 * This asymmetry exists to make it easier to look up prefixes
 * for attribute names, where the default prefix is not allowed.</p>
 *
 * @param prefix The prefix to declare, or null for the empty
 *        string.
 * @param uri The Namespace URI to associate with the prefix.
 * @return true if the prefix was legal, false otherwise
 * @see #processName
 * @see #getURI
 * @see #getPrefix
 */
public boolean declarePrefix(String prefix, String uri) {
    // bugfix#: 4989753
    if ((prefix.equals("xml") && !uri.equals(SOAPNamespaceConstants.XMLNS))
        || prefix.equals("xmlns")) {
        return false;
    } else {
        currentContext.declarePrefix(prefix, uri);
        return true;
    }
}
 
Example #16
Source File: NamespaceSupport.java    From TencentKona-8 with GNU General Public License v2.0 3 votes vote down vote up
/**
 * Declare a Namespace prefix.
 *
 * <p>This method declares a prefix in the current Namespace
 * context; the prefix will remain in force until this context
 * is popped, unless it is shadowed in a descendant context.</p>
 *
 * <p>To declare a default Namespace, use the empty string.  The
 * prefix must not be "xml" or "xmlns".</p>
 *
 * <p>Note that you must <em>not</em> declare a prefix after
 * you've pushed and popped another Namespace.</p>
 *
 * <p>Note that there is an asymmetry in this library: while {@link
 * #getPrefix getPrefix} will not return the default "" prefix,
 * even if you have declared one; to check for a default prefix,
 * you have to look it up explicitly using {@link #getURI getURI}.
 * This asymmetry exists to make it easier to look up prefixes
 * for attribute names, where the default prefix is not allowed.</p>
 *
 * @param prefix The prefix to declare, or null for the empty
 *        string.
 * @param uri The Namespace URI to associate with the prefix.
 * @return true if the prefix was legal, false otherwise
 * @see #processName
 * @see #getURI
 * @see #getPrefix
 */
public boolean declarePrefix(String prefix, String uri) {
    // bugfix#: 4989753
    if ((prefix.equals("xml") && !uri.equals(SOAPNamespaceConstants.XMLNS))
        || prefix.equals("xmlns")) {
        return false;
    } else {
        currentContext.declarePrefix(prefix, uri);
        return true;
    }
}
 
Example #17
Source File: BindingID.java    From openjdk-jdk9 with GNU General Public License v2.0 2 votes vote down vote up
/**
 * Returns wsdl:binding@transport attribute. Sub classes
 * are expected to override this method to provide their transport
 * attribute.
 *
 * @return wsdl:binding@transport attribute
 * @since JAX-WS RI 2.1.6
 */
public @NotNull String getTransport() {
    return SOAPNamespaceConstants.TRANSPORT_HTTP;
}
 
Example #18
Source File: BindingID.java    From openjdk-jdk8u-backup with GNU General Public License v2.0 2 votes vote down vote up
/**
 * Returns wsdl:binding@transport attribute. Sub classes
 * are expected to override this method to provide their transport
 * attribute.
 *
 * @return wsdl:binding@transport attribute
 * @since JAX-WS RI 2.1.6
 */
public @NotNull String getTransport() {
    return SOAPNamespaceConstants.TRANSPORT_HTTP;
}
 
Example #19
Source File: BindingID.java    From hottub with GNU General Public License v2.0 2 votes vote down vote up
/**
 * Returns wsdl:binding@transport attribute. Sub classes
 * are expected to override this method to provide their transport
 * attribute.
 *
 * @return wsdl:binding@transport attribute
 * @since JAX-WS RI 2.1.6
 */
public @NotNull String getTransport() {
    return SOAPNamespaceConstants.TRANSPORT_HTTP;
}
 
Example #20
Source File: BindingID.java    From openjdk-jdk8u with GNU General Public License v2.0 2 votes vote down vote up
/**
 * Returns wsdl:binding@transport attribute. Sub classes
 * are expected to override this method to provide their transport
 * attribute.
 *
 * @return wsdl:binding@transport attribute
 * @since JAX-WS RI 2.1.6
 */
public @NotNull String getTransport() {
    return SOAPNamespaceConstants.TRANSPORT_HTTP;
}
 
Example #21
Source File: BindingID.java    From openjdk-8-source with GNU General Public License v2.0 2 votes vote down vote up
/**
 * Returns wsdl:binding@transport attribute. Sub classes
 * are expected to override this method to provide their transport
 * attribute.
 *
 * @return wsdl:binding@transport attribute
 * @since JAX-WS RI 2.1.6
 */
public @NotNull String getTransport() {
    return SOAPNamespaceConstants.TRANSPORT_HTTP;
}
 
Example #22
Source File: BindingID.java    From jdk8u60 with GNU General Public License v2.0 2 votes vote down vote up
/**
 * Returns wsdl:binding@transport attribute. Sub classes
 * are expected to override this method to provide their transport
 * attribute.
 *
 * @return wsdl:binding@transport attribute
 * @since JAX-WS RI 2.1.6
 */
public @NotNull String getTransport() {
    return SOAPNamespaceConstants.TRANSPORT_HTTP;
}
 
Example #23
Source File: BindingID.java    From openjdk-8 with GNU General Public License v2.0 2 votes vote down vote up
/**
 * Returns wsdl:binding@transport attribute. Sub classes
 * are expected to override this method to provide their transport
 * attribute.
 *
 * @return wsdl:binding@transport attribute
 * @since JAX-WS RI 2.1.6
 */
public @NotNull String getTransport() {
    return SOAPNamespaceConstants.TRANSPORT_HTTP;
}
 
Example #24
Source File: BindingID.java    From TencentKona-8 with GNU General Public License v2.0 2 votes vote down vote up
/**
 * Returns wsdl:binding@transport attribute. Sub classes
 * are expected to override this method to provide their transport
 * attribute.
 *
 * @return wsdl:binding@transport attribute
 * @since JAX-WS RI 2.1.6
 */
public @NotNull String getTransport() {
    return SOAPNamespaceConstants.TRANSPORT_HTTP;
}