Examples of createPart()


Examples of javax.wsdl.Definition.createPart()

        def.addNamespace("xsd", "http://www.w3.org/2000/10/XMLSchema");
        def.addNamespace("w", "uri:hello");
        Message inMsg = def.createMessage();
        inMsg.setQName(new QName("http://porttype.test", "InMessage"));
        inMsg.setUndefined(false);
        Part part1 = def.createPart();
        part1.setName("part1");
        if (rpc) {
            part1.setTypeName(new QName("http://www.w3.org/2000/10/XMLSchema", "int"));
        } else {
            part1.setElementName(new QName("uri:hello", "world"));
View Full Code Here

Examples of javax.wsdl.Definition.createPart()

            part1.setTypeName(new QName("http://www.w3.org/2000/10/XMLSchema", "int"));
        } else {
            part1.setElementName(new QName("uri:hello", "world"));
        }
        inMsg.addPart(part1);
        Part part2 = def.createPart();
        part2.setName("part2");
        part2.setElementName(new QName("uri:hello", "world"));
        inMsg.addPart(part2);
        def.addMessage(inMsg);
        Message outMsg = def.createMessage();
View Full Code Here

Examples of javax.wsdl.Definition.createPart()

        inMsg.addPart(part2);
        def.addMessage(inMsg);
        Message outMsg = def.createMessage();
        outMsg.setQName(new QName("http://porttype.test", "OutMessage"));
        outMsg.setUndefined(false);
        Part part3 = def.createPart();
        part3.setName("part3");
        part3.setElementName(new QName("uri:hello", "world"));
        outMsg.addPart(part3);
        def.addMessage(outMsg);
        PortType type = def.createPortType();
View Full Code Here

Examples of org.apache.poi.openxml4j.opc.OPCPackage.createPart()

            // Main part
            PackagePartName corePartName = PackagingURIHelper.createPartName(XWPFRelation.DOCUMENT.getDefaultFileName());
            // Create main part relationship
            pkg.addRelationship(corePartName, TargetMode.INTERNAL, PackageRelationshipTypes.CORE_DOCUMENT);
            // Create main document part
            pkg.createPart(corePartName, XWPFRelation.DOCUMENT.getContentType());

            pkg.getPackageProperties().setCreatorProperty(DOCUMENT_CREATOR);

            return pkg;
        } catch (Exception e){
View Full Code Here

Examples of org.apache.poi.openxml4j.opc.OPCPackage.createPart()

            // Main part
            PackagePartName corePartName = PackagingURIHelper.createPartName(XSSFRelation.WORKBOOK.getDefaultFileName());
            // Create main part relationship
            pkg.addRelationship(corePartName, TargetMode.INTERNAL, PackageRelationshipTypes.CORE_DOCUMENT);
            // Create main document part
            pkg.createPart(corePartName, XSSFRelation.WORKBOOK.getContentType());

            pkg.getPackageProperties().setCreatorProperty(DOCUMENT_CREATOR);

            return pkg;
        } catch (Exception e){
View Full Code Here

Examples of org.apache.poi.openxml4j.opc.OPCPackage.createPart()

            if (rel.getRelationshipType().equals(PackageRelationshipTypes.CORE_PROPERTIES)) {
                copyProperties(pkg.getPackageProperties(), dest.getPackageProperties());
                continue;
            } else {
                dest.addRelationship(part.getPartName(), rel.getTargetMode(), rel.getRelationshipType());
                part_tgt = dest.createPart(part.getPartName(), part.getContentType());
            }

            OutputStream out = part_tgt.getOutputStream();
            IOUtils.copy(part.getInputStream(), out);
            out.close();
View Full Code Here

Examples of org.apache.poi.openxml4j.opc.OPCPackage.createPart()

            // Main part
            PackagePartName corePartName = PackagingURIHelper.createPartName(XSSFRelation.WORKBOOK.getDefaultFileName());
            // Create main part relationship
            pkg.addRelationship(corePartName, TargetMode.INTERNAL, PackageRelationshipTypes.CORE_DOCUMENT);
            // Create main document part
            pkg.createPart(corePartName, XSSFRelation.WORKBOOK.getContentType());

            pkg.getPackageProperties().setCreatorProperty("Apache POI");

            return pkg;
        } catch (Exception e){
View Full Code Here

Examples of org.apache.poi.openxml4j.opc.OPCPackage.createPart()

    try {
      PackagePartName name = PackagingURIHelper
          .createPartName("/word/document.xml");
      PackagePartName nameDerived = PackagingURIHelper
          .createPartName("/word/document.xml/image1.gif");
      pkg.createPart(name, ContentTypes.XML);
      pkg.createPart(nameDerived, ContentTypes.EXTENSION_GIF);
    } catch (InvalidOperationException e) {
      pkg.revert();
      return;
    } catch (InvalidFormatException e) {
View Full Code Here

Examples of org.apache.poi.openxml4j.opc.OPCPackage.createPart()

      PackagePartName name = PackagingURIHelper
          .createPartName("/word/document.xml");
      PackagePartName nameDerived = PackagingURIHelper
          .createPartName("/word/document.xml/image1.gif");
      pkg.createPart(name, ContentTypes.XML);
      pkg.createPart(nameDerived, ContentTypes.EXTENSION_GIF);
    } catch (InvalidOperationException e) {
      pkg.revert();
      return;
    } catch (InvalidFormatException e) {
      fail(e.getMessage());
View Full Code Here

Examples of org.apache.poi.openxml4j.opc.OPCPackage.createPart()

      name1 = PackagingURIHelper.createPartName("/word/document.xml");
      name2 = PackagingURIHelper.createPartName("/word/document.xml");
    } catch (InvalidFormatException e) {
      throw new Exception(e.getMessage());
    }
    pkg.createPart(name1, ContentTypes.XML);
    try {
      pkg.createPart(name2, ContentTypes.XML);
    } catch (InvalidOperationException e) {
      return;
    }
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.