本文整理汇总了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);
}
示例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;
}
示例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);
}
}
}
}
示例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;
}
示例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));
}
}
}
示例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));
}
}
示例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;
}
示例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());
}
}
}
}
示例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);
}
}
示例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;
}
示例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;
}
示例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);
}
示例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);
}
示例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 );
}
示例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);
}