Package org.apache.xmlbeans

Examples of org.apache.xmlbeans.XmlCursor.dispose()


        XmlCursor rawCursor = plan.newCursor();
        try {
            if (SchemaConversionUtils.findNestedElement(rawCursor, "web-app")) {
                XmlCursor temp = rawCursor.newCursor();
                String namespace = temp.getName().getNamespaceURI();
                temp.dispose();
                if(!namespace.equals(GENERIC_NAMESPACE) && !namespace.equals(this.namespace) && !namespace.equals(OLD_GENERIC_NAMESPACE)) {
                    throw new DeploymentException("Cannot handle web plan with namespace "+namespace+" -- expecting "+GENERIC_NAMESPACE+" or "+this.namespace);
                }

                XmlObject webPlan = rawCursor.getObject().copy();
View Full Code Here


                            if (source.toChild(configNamespace, element)) {
                                source.copyXmlContents(cursor);
                            }

                        } finally {
                            source.dispose();
                        }
                        cursor.pop();
                        cursor.removeXml();
                    }
                    cursor.pop();
View Full Code Here

                            cursor.push();
                            if (cursor.toChild(SECURITY_QNAME)) {
                                cursor.moveXml(other);
                            }
                        } finally {
                            other.dispose();
                        }
                    }
                    cursor.pop();
                    return webPlan;
                } finally {
View Full Code Here

                                SchemaDocument.Schema schema = (SchemaDocument.Schema) typeCursor.getObject();
                                rewriteSchema(schema, contextURI, key);
                            } while (typeCursor.toNextSibling(SCHEMA_QNAME));
                        }
                    } finally {
                        typeCursor.dispose();
                    }
                }
                String docString = xmlObjectToString(doc);
                wsdlMap.put(key.toString(), docString);
            } else {
View Full Code Here

            }
            cursor.toNextToken();
        }
        } finally {
            if (source != null) {
                source.dispose();
            }
        }
    }
}
View Full Code Here

            for (Iterator namespaces = namespaceMap.entrySet().iterator(); namespaces.hasNext();) {
                Map.Entry entry = (Map.Entry) namespaces.next();
                cursor.insertNamespace((String) entry.getKey(), (String) entry.getValue());
            }
        } finally {
            cursor.dispose();
        }
        return parsed;
    }

    /**
 
View Full Code Here

                            return servletLocation;
                        }
                    } catch (URISyntaxException e) {
                        throw new DeploymentException("Could not construct URI for ejb location in wsdl", e);
                    } finally {
                        portCursor.dispose();
                    }
                }
            }
        }
        throw new DeploymentException("No port found with name " + portComponentName + " expected at " + servletLocation);
View Full Code Here

                            dest.toEndToken();
                            if(!source.moveXml(dest)) {
                                throw new RuntimeException("Unable to move admin object instance");
                            }
                            source.dispose();
                            dest.dispose();
                            dcb.addAdminObjectInstance(old.getAdminobjectInstanceArray(oldCount+j));
                        }
                    }
                    continue;
                }
View Full Code Here

        try {
            String schemaLocationURL = "http://java.sun.com/xml/ns/j2ee/application_1_4.xsd";
            String version = "1.4";
            assertFalse(SchemaConversionUtils.convertToSchema(cursor2, SchemaConversionUtils.J2EE_NAMESPACE, schemaLocationURL, version));
        } finally {
            cursor2.dispose();
        }
        boolean ok2 = compareXmlObjects(xmlObject, expected, problems);
        assertTrue("Differences after reconverting to schema: " + problems, ok2);
        //do the whole transform twice...
        xmlObject = SchemaConversionUtils.convertToApplicationClientSchema(xmlObject);
View Full Code Here

        try {
            String schemaLocationURL = "http://java.sun.com/xml/ns/j2ee/application_1_4.xsd";
            String version = "1.4";
            assertFalse(SchemaConversionUtils.convertToSchema(cursor2, SchemaConversionUtils.J2EE_NAMESPACE, schemaLocationURL, version));
        } finally {
            cursor2.dispose();
        }
        boolean ok2 = compareXmlObjects(xmlObject, expected, problems);
        assertTrue("Differences after reconverting to schema: " + problems, ok2);
        //do the whole transform twice...
        xmlObject = SchemaConversionUtils.convertToApplicationSchema(xmlObject);
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. 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.