Examples of MessagePart


Examples of org.glassfish.api.ActionReport.MessagePart

                        + "s";


        // no linefeed at the end!!!
        boolean first = true;
        MessagePart topMsg = report.getTopMessagePart();
        Properties properties = report.getExtraProperties();
        if (properties == null) {
            properties = new Properties();
            report.setExtraProperties(properties);
        }
        List<Properties> jobs = new ArrayList<Properties>();
        properties.put("jobs", jobs);
        for (JobInfo info : jobInfoList) {
            if (first)    {
                topMsg.setMessage(String.format(formattedLine, NAME, JOBID, TIME, STATE,USER ));
                first = false;
            }

            MessagePart msg = topMsg.addChild();
            msg.setMessage(String.format(formattedLine, info.jobName, info.jobId,  new SimpleDateFormat("yyyy-MM-dd HH:mm:ss").format(info.commandExecutionDate), info.exitCode,info.user));
            Properties p = new Properties();
            p.setProperty(NAME, info.jobName);
            p.setProperty("ID", info.jobId);
            p.setProperty(TIME, new SimpleDateFormat("yyyy-MM-dd HH:mm:ss").format(info.commandExecutionDate));
            p.setProperty(STATE, info.exitCode);
View Full Code Here

Examples of org.glassfish.api.ActionReport.MessagePart

        final String path = (basePath.endsWith(".")) ? basePath.substring(0, basePath.length()-1) : basePath;
        RestActionReporter gr = ResourceUtil.runCommand("get", new ParameterMap() {{
            add ("DEFAULT", path);
        }}, habitat, "");

        MessagePart top = gr.getTopMessagePart();
        for (MessagePart child : top.getChildren()) {
            String message = child.getMessage();
            if (message.contains("=")) {
                String[] parts = message.split("=");
                values.put(parts[0], (parts.length > 1) ? parts[1] : "");
            }
View Full Code Here

Examples of org.jibx.ws.wsdl.model.MessagePart

               
            }
           
            // add part definition to message (if present)
            if (rqelem != null) {
                MessagePart part = new MessagePart("part", rqelem);
                rqmsg.getParts().add(part);
                def.addNamespace(rqelem.getUri());
            }
           
            // generate output message information
            Message rsmsg = new Message(odef.getResponseMessageName(), wns);
            op.addOutputMessage(rsmsg);
            def.addMessage(rsmsg);
            ValueCustom rtrn = odef.getReturn();
            QName rselem = null;
            if (m_generationParameters.isDocLit()) {
               
                // check if return value defined for method
                if (!"void".equals(rtrn.getWorkingType())) {
                   
                    // check for existing element definition matching the return type
                    rselem = (QName)classelems.get(rtrn.getWorkingType());
                    if (rselem == null) {
                       
                        // create new element for return
                        ElementElement relem = buildValueElement(rtrn, ptypemap, typeschemas, holder);
                        schema.getTopLevelChildren().add(relem);
                        rselem = relem.getQName();
                       
                    } else {
                       
                        // import and use existing element definition
                        imports.add(elemschemas.get(rselem));
                        addSchemaReference(rqelem, elemschemas, holder);
                       
                    }
                }
               
            } else {
               
                // add corresponding schema definition to schema
                SequenceElement seq = new SequenceElement();
                if (!"void".equals(rtrn.getWorkingType())) {
                    ElementElement relem = buildValueElement(rtrn, ptypemap, typeschemas, holder);
                    seq.getParticleList().add(relem);
                }
                ComplexTypeElement tdef = new ComplexTypeElement();
                tdef.setContentDefinition(seq);
                ElementElement elem = new ElementElement();
                String wname = odef.getResponseWrapperName();
                elem.setName(wname);
                elem.setTypeDefinition(tdef);
                schema.getTopLevelChildren().add(elem);
                rselem = new QName(sns, wname);
               
            }
           
            // add part definition to message (if present)
            if (rselem != null) {
                MessagePart part = new MessagePart("part", rselem);
                rsmsg.getParts().add(part);
                def.addNamespace(rselem.getUri());
            }
           
            // process fault message(s) for operation
            ArrayList thrws = odef.getThrows();
            WsdlCustom wsdlcustom = m_generationParameters.getWsdlCustom();
            for (int j = 0; j < thrws.size(); j++) {
                ThrowsCustom thrw = (ThrowsCustom)thrws.get(j);
                String type = thrw.getType();
                Message fmsg = (Message)fltmap.get(type);
                if (fmsg == null) {
                   
                    // first time for this throwable, create the message
                    FaultCustom fault = wsdlcustom.forceFaultCustomization(type);
                    QName fqname = new QName(sns, fault.getElementName());
                    MessagePart part = new MessagePart("fault", fqname);
                    fmsg = new Message(fault.getFaultName(), wns);
                    fmsg.getParts().add(part);
                    def.addMessage(fmsg);
                    def.addNamespace(sns);
                   
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.