当前位置: 首页>>代码示例>>Java>>正文


Java Message类代码示例

本文整理汇总了Java中javax.wsdl.Message的典型用法代码示例。如果您正苦于以下问题:Java Message类的具体用法?Java Message怎么用?Java Message使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。


Message类属于javax.wsdl包,在下文中一共展示了Message类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: addWsdlPortTypeOperation

import javax.wsdl.Message; //导入依赖的package包/类
private static void addWsdlPortTypeOperation(Definition definition, QName portTypeQName, String operationName, String operationComment, QName inputQName, QName ouptutQName) {
Message inputMessage = definition.createMessage();
inputMessage.setQName(inputQName);
Input input = definition.createInput();
input.setMessage(inputMessage);

Message outpuMessage = definition.createMessage();
outpuMessage.setQName(ouptutQName);
Output output = definition.createOutput();
output.setMessage(outpuMessage);

Operation operation = definition.createOperation();
operation.setName(operationName);
operation.setInput(input);
operation.setOutput(output);
operation.setUndefined(false);
addWsdLDocumentation(definition, operation, operationComment);

PortType portType = definition.getPortType(portTypeQName);
portType.addOperation(operation);
  }
 
开发者ID:convertigo,项目名称:convertigo-engine,代码行数:22,代码来源:WebServiceServlet.java

示例2: addOWOperation2PT

import javax.wsdl.Message; //导入依赖的package包/类
private Operation addOWOperation2PT(Definition def, PortType pt, OneWayOperationDeclaration op) {
    Operation wsdlOp = def.createOperation();

    wsdlOp.setName(op.id());
    wsdlOp.setStyle(OperationType.ONE_WAY);
    wsdlOp.setUndefined(false);

    Input in = def.createInput();
    Message msg_req = addRequestMessage(localDef, op);
    msg_req.setUndefined(false);
    in.setMessage(msg_req);
    wsdlOp.setInput(in);
    wsdlOp.setUndefined(false);

    pt.addOperation(wsdlOp);

    return wsdlOp;
}
 
开发者ID:jolie,项目名称:jolie,代码行数:19,代码来源:WSDLDocCreator.java

示例3: addParamsToPath

import javax.wsdl.Message; //导入依赖的package包/类
private static void addParamsToPath(final QName portType, Operation oper, Message msg, final Set<String> paths,
        final Set<QName> alreadyCreated) throws URISyntaxException {
    if (msg != null) {
        List<QName> messageParts = getMessageParts(msg);
        if (messageParts.isEmpty()) {
            return;
        }
        for(QName messagePart : messageParts) {
            if (alreadyCreated.add(messagePart)) {
                String folderPath = FolderNameUtil.getImportedXmlSchemaPath(messagePart.getNamespaceURI(),
                        portType.getLocalPart(), oper.getName());
                paths.add(folderPath);
            }
        }
    }
}
 
开发者ID:Talend,项目名称:tesb-studio-se,代码行数:17,代码来源:PublishMetadataRunnable.java

示例4: getMessageParts

import javax.wsdl.Message; //导入依赖的package包/类
private static List<QName> getMessageParts(Message msg) {
    @SuppressWarnings("unchecked")
    Collection<Part> values = msg.getParts().values();
    if (values == null || values.isEmpty()) {
        return null;
    }
    List<QName> result = new ArrayList<QName>();
    Iterator<Part> iterator = values.iterator();
    while (iterator.hasNext()) {
        Part part = iterator.next();
        if (part.getElementName() != null) {
            result.add(part.getElementName());
        } else if (part.getTypeName() != null) {
            result.add(part.getTypeName());
        }
    }
    return result;
}
 
开发者ID:Talend,项目名称:tesb-studio-se,代码行数:19,代码来源:PublishMetadataRunnable.java

示例5: OperationInfo

import javax.wsdl.Message; //导入依赖的package包/类
public OperationInfo(Operation operation) {
    targetMethodName = operation.getName();

    Input inDef = operation.getInput();
    if (inDef != null) {
        Message inMsg = inDef.getMessage();
        if (inMsg != null) {
            input = getParameterFromMessage(inMsg);
        }
    }
    Output outDef = operation.getOutput();
    if (outDef != null) {
        Message outMsg = outDef.getMessage();
        if (outMsg != null) {
            output = getParameterFromMessage(outMsg);
        }
    }
    for (Fault fault : (Collection<Fault>) operation.getFaults().values()) {
        Message faultMsg = fault.getMessage();
        if (faultMsg != null) {
            faults.add(getParameterFromMessage(faultMsg));
        }
    }
}
 
开发者ID:Talend,项目名称:tesb-studio-se,代码行数:25,代码来源:OperationInfo.java

示例6: extractSoapHeaderParts

import javax.wsdl.Message; //导入依赖的package包/类
private static void extractSoapHeaderParts(org.apache.ode.bpel.iapi.Message message,
                                           Definition wsdl,
                                           org.apache.axiom.soap.SOAPHeader soapHeader,
                                           List<javax.wsdl.extensions.soap.SOAPHeader> headerDefs,
                                           Message msg) throws BPELFault {
    // Checking that the definitions we have are at least there
    for (javax.wsdl.extensions.soap.SOAPHeader headerDef : headerDefs) {
        handleSoapHeaderPartDef(message, wsdl, soapHeader, headerDef, msg);
    }

    // Extracting whatever header elements we find in the message, binding and abstract parts
    // aren't reliable enough given what people do out there.
    Iterator headersIter = soapHeader.getChildElements();
    while (headersIter.hasNext()) {
        OMElement header = (OMElement) headersIter.next();
        String partName = findHeaderPartName(headerDefs, wsdl, header.getQName());
        message.setHeaderPart(partName, OMUtils.toDOM(header));
    }
}
 
开发者ID:wso2,项目名称:carbon-business-process,代码行数:20,代码来源:SOAPUtils.java

示例7: findHeaderPartName

import javax.wsdl.Message; //导入依赖的package包/类
private String findHeaderPartName(List<SOAPHeader> headerDefs, QName elementName) {
        for (SOAPHeader headerDef : headerDefs) {
            Message hdrMsg = wsdlDef.getMessage(headerDef.getMessage());
            for (Object o : hdrMsg.getParts().values()) {
                Part p = (Part) o;
                if (p.getElementName().equals(elementName)) {
                    return p.getName();
                }
            }
        }
        //The following commented fix, avoids adding any of the headers. So that reverting back to old fix
        return elementName.getLocalPart();
//        // Fix to avoid unwanted headers getting copied to input Message to ODE.
//        // JIRA - https://wso2.org/jira/browse/CARBON-5499
//        return null;
    }
 
开发者ID:wso2,项目名称:carbon-business-process,代码行数:17,代码来源:WSDLAwareSOAPProcessor.java

示例8: createSoapBody

import javax.wsdl.Message; //导入依赖的package包/类
public void createSoapBody(org.apache.axiom.soap.SOAPBody sb, SOAPBody soapBody, Message msgDef,
                           Element message, String rpcWrapper) throws AxisFault {
    OMElement partHolder = isRPC ? soapFactory
            .createOMElement(new QName(soapBody.getNamespaceURI(), rpcWrapper, "odens"), sb) : sb;
    List<Part> parts = msgDef.getOrderedParts(soapBody.getParts());

    for (Part part : parts) {
        Element srcPartEl = DOMUtils.findChildByName(message, new QName(null, part.getName()));
        if (srcPartEl == null) {
            throw new AxisFault("Missing required part in ODE Message");
        }

        OMElement omPart = OMUtils.toOM(srcPartEl, soapFactory);
        if (isRPC) {
            partHolder.addChild(omPart);
        } else {
            for (Iterator<OMNode> i = omPart.getChildren(); i.hasNext(); ) {
                partHolder.addChild(i.next());
            }
        }
    }

}
 
开发者ID:wso2,项目名称:carbon-business-process,代码行数:24,代码来源:SOAPHelper.java

示例9: addQNameReference

import javax.wsdl.Message; //导入依赖的package包/类
/**
 * Add the QName for the binding output
 *
 * @param outMessage
 * @param wsdl4jOperation
 * @param isWrapped
 */
private void addQNameReference(AxisMessage outMessage,
                               Operation wsdl4jOperation, BindingOutput bindingOutput,
                               boolean isWrapped) {

    if (bindingOutput != null) {
        List extensibilityElements = bindingOutput.getExtensibilityElements();
        if (wsdl4jOperation.getOutput() == null) {
            return;
        }
        Message wsdl4jMessage = wsdl4jOperation.getOutput().getMessage();

        addQNameReference(outMessage,
                          wsdl4jOperation,
                          isWrapped,
                          extensibilityElements,
                          wsdl4jMessage,
                          wsdl4jOperation.getName() + WRAPPED_OUTPUTNAME_SUFFIX);
    }
}
 
开发者ID:wso2,项目名称:wso2-axis2,代码行数:27,代码来源:WSDL11ToAxisServiceBuilder.java

示例10: removeMessage

import javax.wsdl.Message; //导入依赖的package包/类
public Message removeMessage(QName name) {
    if (isDebugEnabled) {
        log.debug(myClassName + ".removeMessage(" + name + ")");
    }

    getWrappedDefinitionForUse();

    Message results = null;

    if (wsdlDefinition != null) {
        if (hasBeenSaved) {
            hasBeenUpdatedSinceSaving = true;
        }
        results = wsdlDefinition.removeMessage(name);
    }
    doneUsingWrappedDefinition();
    return results;
}
 
开发者ID:wso2,项目名称:wso2-axis2,代码行数:19,代码来源:WSDLWrapperSaveImpl.java

示例11: createMessage

import javax.wsdl.Message; //导入依赖的package包/类
public Message createMessage() {
    if (isDebugEnabled) {
        log.debug(myClassName + ".createMessage()");
    }

    getWrappedDefinitionForUse();

    Message results = null;

    if (wsdlDefinition != null) {
        if (hasBeenSaved) {
            hasBeenUpdatedSinceSaving = true;
        }
        results = wsdlDefinition.createMessage();
    }
    doneUsingWrappedDefinition();
    return results;
}
 
开发者ID:wso2,项目名称:wso2-axis2,代码行数:19,代码来源:WSDLWrapperSaveImpl.java

示例12: getFault

import javax.wsdl.Message; //导入依赖的package包/类
/**
    * Create a WsdlOpFault from the Fault.
    *
    * @param fault Fault to process.
    * @return WsdlOpFault Result of processing.
    */
   @SuppressWarnings("unchecked")
private WsdlOpFault getFault(Fault fault) {
       Message m = fault.getMessage();

       // a fault should only have one message part.
       Map<?, Part> partMap = m.getParts();
       if (partMap.size() != 1)
       {
           throw new IllegalArgumentException("Invalid part count for fault!!");
       }
       Part faultPart = partMap.values().iterator().next();
       boolean complexType = false;

       // type of fault is specified either in Part's type or element attribute.
       QName type = faultPart.getTypeName();
       if (type == null) {
           type = faultPart.getElementName();
           Element schemaElement = _wsdlTypes.findNamedElement(type);
           type = _wsdlTypes.getTypeQName(schemaElement.getAttribute("type"));
           complexType = true;
       }
       return new WsdlOpFault(fault.getName(), type, complexType, _wsdlTypes);
   }
 
开发者ID:icholy,项目名称:geokettle-2.0,代码行数:30,代码来源:WsdlOpFaultList.java

示例13: getFault

import javax.wsdl.Message; //导入依赖的package包/类
/**
    * Create a WsdlOpFault from the Fault.
    *
    * @param fault Fault to process.
    * @return WsdlOpFault Result of processing.
    */
   @SuppressWarnings("unchecked")
private WsdlOpFault getFault(Fault fault) 
       throws KettleStepException {
       Message m = fault.getMessage();

       // a fault should only have one message part.
       Map<?, Part> partMap = m.getParts();
       if (partMap.size() != 1)
       {
           throw new IllegalArgumentException("Invalid part count for fault!!");
       }
       Part faultPart = partMap.values().iterator().next();
       boolean complexType = false;

       // type of fault is specified either in Part's type or element attribute.
       QName type = faultPart.getTypeName();
       if (type == null) {
           type = faultPart.getElementName();
           Element schemaElement = _wsdlTypes.findNamedElement(type);
           type = _wsdlTypes.getTypeQName(schemaElement.getAttribute("type"));
           complexType = true;
       }
       return new WsdlOpFault(fault.getName(), type, complexType, _wsdlTypes);
   }
 
开发者ID:yintaoxue,项目名称:read-open-source-code,代码行数:31,代码来源:WsdlOpFaultList.java

示例14: getFault

import javax.wsdl.Message; //导入依赖的package包/类
/**
 * Create a WsdlOpFault from the Fault.
 *
 * @param fault
 *          Fault to process.
 * @return WsdlOpFault Result of processing.
 */
@SuppressWarnings( "unchecked" )
private WsdlOpFault getFault( Fault fault ) throws KettleStepException {
  Message m = fault.getMessage();

  // a fault should only have one message part.
  Map<?, Part> partMap = m.getParts();
  if ( partMap.size() != 1 ) {
    throw new IllegalArgumentException( "Invalid part count for fault!!" );
  }
  Part faultPart = partMap.values().iterator().next();
  boolean complexType = false;

  // type of fault is specified either in Part's type or element attribute.
  QName type = faultPart.getTypeName();
  if ( type == null ) {
    type = faultPart.getElementName();
    Element schemaElement = _wsdlTypes.findNamedElement( type );
    type = _wsdlTypes.getTypeQName( schemaElement.getAttribute( "type" ) );
    complexType = true;
  }
  return new WsdlOpFault( fault.getName(), type, complexType, _wsdlTypes );
}
 
开发者ID:pentaho,项目名称:pentaho-kettle,代码行数:30,代码来源:WsdlOpFaultList.java

示例15: addWsdlMessage

import javax.wsdl.Message; //导入依赖的package包/类
private static void addWsdlMessage(Definition definition, QName messageQName, QName partElementQName) {
Message message = definition.createMessage();
message.setQName(messageQName);
message.setUndefined(false);
Part part = definition.createPart();
part.setName("parameters");
part.setElementName(partElementQName);
message.addPart(part);
definition.addMessage(message);
  }
 
开发者ID:convertigo,项目名称:convertigo-engine,代码行数:11,代码来源:WebServiceServlet.java


注:本文中的javax.wsdl.Message类示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。