本文整理了Java中javax.wsdl.Message.setUndefined()
方法的一些代码示例,展示了Message.setUndefined()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Message.setUndefined()
方法的具体详情如下:
包路径:javax.wsdl.Message
类名称:Message
方法名:setUndefined
暂无
代码示例来源:origin: wsdl4j/wsdl4j
msg.setUndefined(false);
代码示例来源:origin: org.wso2.wsdl.validator/wsdl-validator
/**
* <!-- begin-user-doc -->
* Create a new message.
* @return the newly created message
* <!-- end-user-doc -->
* @generated NOT
*/
public javax.wsdl.Message createMessage()
{
javax.wsdl.Message message = WSDLFactoryImpl.eINSTANCE.createMessage();
message.setUndefined(true);
return message;
}
代码示例来源:origin: org.codehaus.xfire/xfire-core
protected Message createHeaderMessages(WSDLBuilder builder, MessageInfo msgInfo, List headers)
{
Message msg = builder.getDefinition().createMessage();
msg.setQName(new QName(builder.getTargetNamespace(),
msgInfo.getName().getLocalPart() + "Headers"));
msg.setUndefined(false);
for (Iterator itr = headers.iterator(); itr.hasNext();)
{
MessagePartInfo header = (MessagePartInfo) itr.next();
Part part = builder.createPart(header);
msg.addPart(part);
}
return msg;
}
代码示例来源:origin: org.springframework.ws/org.springframework.ws
private void createMessages(Definition definition, Element schemaElement) throws WSDLException {
String schemaTargetNamespace = schemaElement.getAttribute("targetNamespace");
Assert.hasText(schemaTargetNamespace, "No targetNamespace defined on schema");
if (logger.isDebugEnabled()) {
logger.debug("Looking for elements in schema with target namespace [" + schemaTargetNamespace + "]");
}
NodeList children = schemaElement.getChildNodes();
for (int i = 0; i < children.getLength(); i++) {
Node child = children.item(i);
if (child.getNodeType() == Node.ELEMENT_NODE) {
Element childElement = (Element) child;
if (isMessageElement(childElement)) {
QName elementName = new QName(schemaTargetNamespace, getElementName(childElement));
Message message = definition.createMessage();
populateMessage(definition, message, elementName);
Part part = definition.createPart();
populatePart(definition, part, elementName);
message.addPart(part);
message.setUndefined(false);
definition.addMessage(message);
}
}
}
}
代码示例来源:origin: spring-projects/spring-ws
private void createMessages(Definition definition, Element schemaElement) throws WSDLException {
String schemaTargetNamespace = schemaElement.getAttribute("targetNamespace");
Assert.hasText(schemaTargetNamespace, "No targetNamespace defined on schema");
if (logger.isDebugEnabled()) {
logger.debug("Looking for elements in schema with target namespace [" + schemaTargetNamespace + "]");
}
NodeList children = schemaElement.getChildNodes();
for (int i = 0; i < children.getLength(); i++) {
Node child = children.item(i);
if (child.getNodeType() == Node.ELEMENT_NODE) {
Element childElement = (Element) child;
if (isMessageElement(childElement)) {
QName elementName = new QName(schemaTargetNamespace, getElementName(childElement));
Message message = definition.createMessage();
populateMessage(definition, message, elementName);
Part part = definition.createPart();
populatePart(definition, part, elementName);
message.addPart(part);
message.setUndefined(false);
definition.addMessage(message);
}
}
}
}
代码示例来源:origin: org.springframework.ws/spring-ws-core
private void createMessages(Definition definition, Element schemaElement) throws WSDLException {
String schemaTargetNamespace = schemaElement.getAttribute("targetNamespace");
Assert.hasText(schemaTargetNamespace, "No targetNamespace defined on schema");
if (logger.isDebugEnabled()) {
logger.debug("Looking for elements in schema with target namespace [" + schemaTargetNamespace + "]");
}
NodeList children = schemaElement.getChildNodes();
for (int i = 0; i < children.getLength(); i++) {
Node child = children.item(i);
if (child.getNodeType() == Node.ELEMENT_NODE) {
Element childElement = (Element) child;
if (isMessageElement(childElement)) {
QName elementName = new QName(schemaTargetNamespace, getElementName(childElement));
Message message = definition.createMessage();
populateMessage(definition, message, elementName);
Part part = definition.createPart();
populatePart(definition, part, elementName);
message.addPart(part);
message.setUndefined(false);
definition.addMessage(message);
}
}
}
}
代码示例来源:origin: apache/servicemix-bundles
private void createMessages(Definition definition, Element schemaElement) throws WSDLException {
String schemaTargetNamespace = schemaElement.getAttribute("targetNamespace");
Assert.hasText(schemaTargetNamespace, "No targetNamespace defined on schema");
if (logger.isDebugEnabled()) {
logger.debug("Looking for elements in schema with target namespace [" + schemaTargetNamespace + "]");
}
NodeList children = schemaElement.getChildNodes();
for (int i = 0; i < children.getLength(); i++) {
Node child = children.item(i);
if (child.getNodeType() == Node.ELEMENT_NODE) {
Element childElement = (Element) child;
if (isMessageElement(childElement)) {
QName elementName = new QName(schemaTargetNamespace, getElementName(childElement));
Message message = definition.createMessage();
populateMessage(definition, message, elementName);
Part part = definition.createPart();
populatePart(definition, part, elementName);
message.addPart(part);
message.setUndefined(false);
definition.addMessage(message);
}
}
}
}
代码示例来源:origin: org.apache.ode/ode-jbi
private Message copyMessage(Message defMessage, Definition flat) {
Message flatMsg = flat.createMessage();
flatMsg.setUndefined(false);
if (defMessage.getQName() != null) {
flatMsg.setQName(new QName(flat.getTargetNamespace(), defMessage.getQName().getLocalPart()));
}
for (Iterator itPart = defMessage.getParts().values().iterator(); itPart.hasNext();) {
Part defPart = (Part) itPart.next();
Part flatPart = flat.createPart();
flatPart.setName(defPart.getName());
flatPart.setElementName(defPart.getElementName());
flatMsg.addPart(flatPart);
}
return flatMsg;
}
代码示例来源:origin: org.apache.servicemix/servicemix-common
private Message copyMessage(Message defMessage, Definition flat) {
Message flatMsg = flat.createMessage();
flatMsg.setUndefined(false);
if (defMessage.getQName() != null) {
flatMsg.setQName(new QName(flat.getTargetNamespace(), defMessage.getQName().getLocalPart()));
}
for (Iterator itPart = defMessage.getParts().values().iterator(); itPart.hasNext();) {
Part defPart = (Part) itPart.next();
Part flatPart = flat.createPart();
flatPart.setName(defPart.getName());
flatPart.setElementName(defPart.getElementName());
flatMsg.addPart(flatPart);
}
return flatMsg;
}
代码示例来源:origin: apache/cxf
private void createFaultMessage(QName qname) {
String exceptionName = qname.getLocalPart();
// messages
Message faultMsg = definition.createMessage();
faultMsg.setQName(new QName(definition.getTargetNamespace(), exceptionName));
faultMsg.setUndefined(false);
// message - part
Part part = definition.createPart();
part.setName("exception");
part.setElementName(qname);
faultMsg.addPart(part);
//add the fault element namespace to the definition
String nsURI = qname.getNamespaceURI();
manager.addWSDLDefinitionNamespace(definition, mapper.mapNSToPrefix(nsURI), nsURI);
definition.addMessage(faultMsg);
}
代码示例来源:origin: org.codehaus.xfire/xfire-core
private Message createOutputMessage(OperationInfo op)
{
// response message
Message res = getDefinition().createMessage();
res.setQName(new QName(getTargetNamespace(), op.getName() + "Response"));
res.setUndefined(false);
if (getService().getServiceInfo().isWrapped())
createWrappedOutputParts(res, op);
else
createOutputParts(res, op);
return res;
}
代码示例来源:origin: org.codehaus.xfire/xfire-core
private Message createInputMessage(OperationInfo op)
{
Message req = getDefinition().createMessage();
req.setQName(new QName(getTargetNamespace(), op.getName() + "Request"));
req.setUndefined(false);
if (getService().getServiceInfo().isWrapped())
createWrappedInputParts(req, op);
else
createInputParts(req, op);
return req;
}
代码示例来源:origin: org.codehaus.xfire/xfire-core
private Fault createFault(OperationInfo op, FaultInfo faultInfo)
{
Message faultMsg = getDefinition().createMessage();
faultMsg.setQName(new QName(getTargetNamespace(), faultInfo.getName()));
faultMsg.setUndefined(false);
getDefinition().addMessage(faultMsg);
Fault fault = getDefinition().createFault();
fault.setName(faultInfo.getName());
fault.setMessage(faultMsg);
for (Iterator itr = faultInfo.getMessageParts().iterator(); itr.hasNext();)
{
MessagePartInfo info = (MessagePartInfo) itr.next();
String uri = info.getName().getNamespaceURI();
addNamespace(getNamespacePrefix(uri), uri);
Part part = createPart(info);
faultMsg.addPart(part);
}
return fault;
}
代码示例来源:origin: apache/cxf
private Message generateMessage(XmlSchemaElement element, String name) {
Part part = definition.createPart();
part.setName(PART_NAME);
part.setElementName(element.getQName());
Message result = definition.createMessage();
QName qName = new QName(definition.getTargetNamespace(), name);
if (definition.getMessage(qName) != null) {
String newName = getScope().toString() + "." + name;
qName = new QName(definition.getTargetNamespace(), newName);
}
result.setQName(qName);
result.addPart(part);
result.setUndefined(false);
definition.addMessage(result);
return result;
}
代码示例来源:origin: org.objectweb.celtix/celtix-tools
private void generateFault(JavaMethod method, Operation operation) {
for (org.objectweb.celtix.tools.common.model.WSDLException exception : method.getWSDLExceptions()) {
String exceptionName = exception.getExcpetionClass().getSimpleName();
Message msg = definition.createMessage();
msg.setQName(new QName(wmodel.getTargetNameSpace(), exceptionName));
Part part = definition.createPart();
part.setName(exception.getDetailType().getSimpleName());
part.setElementName(exception.getDetailTypeReference().tagName);
msg.addPart(part);
msg.setUndefined(false);
definition.addMessage(msg);
Fault fault = definition.createFault();
fault.setMessage(msg);
fault.setName(exceptionName);
operation.addFault(fault);
}
}
代码示例来源:origin: apache/cxf
protected void buildMessage(Message message,
AbstractMessageContainer messageContainer,
final Definition def) {
addDocumentation(message, messageContainer.getMessageDocumentation());
message.setQName(messageContainer.getName());
message.setUndefined(false);
def.addMessage(message);
List<MessagePartInfo> messageParts = messageContainer.getMessageParts();
Part messagePart = null;
for (MessagePartInfo messagePartInfo : messageParts) {
messagePart = def.createPart();
messagePart.setName(messagePartInfo.getName().getLocalPart());
if (messagePartInfo.isElement()) {
messagePart.setElementName(messagePartInfo.getElementQName());
addNamespace(messagePartInfo.getElementQName().getNamespaceURI(), def);
} else if (messagePartInfo.getTypeQName() != null) {
messagePart.setTypeName(messagePartInfo.getTypeQName());
addNamespace(messagePartInfo.getTypeQName().getNamespaceURI(), def);
}
message.addPart(messagePart);
}
}
代码示例来源:origin: org.apache.cxf/cxf-rt-core
protected void buildMessage(Message message,
AbstractMessageContainer messageContainer,
final Definition def) {
addDocumentation(message, messageContainer.getMessageDocumentation());
message.setQName(messageContainer.getName());
message.setUndefined(false);
def.addMessage(message);
List<MessagePartInfo> messageParts = messageContainer.getMessageParts();
Part messagePart = null;
for (MessagePartInfo messagePartInfo : messageParts) {
messagePart = def.createPart();
messagePart.setName(messagePartInfo.getName().getLocalPart());
if (messagePartInfo.isElement()) {
messagePart.setElementName(messagePartInfo.getElementQName());
addNamespace(messagePartInfo.getElementQName().getNamespaceURI(), def);
} else if (messagePartInfo.getTypeQName() != null) {
messagePart.setTypeName(messagePartInfo.getTypeQName());
addNamespace(messagePartInfo.getTypeQName().getNamespaceURI(), def);
}
message.addPart(messagePart);
}
}
代码示例来源:origin: org.apache.cxf/cxf-bundle-jaxrs
protected void buildMessage(Message message,
AbstractMessageContainer messageContainer,
final Definition def) {
addDocumentation(message, messageContainer.getMessageDocumentation());
message.setQName(messageContainer.getName());
message.setUndefined(false);
def.addMessage(message);
List<MessagePartInfo> messageParts = messageContainer.getMessageParts();
Part messagePart = null;
for (MessagePartInfo messagePartInfo : messageParts) {
messagePart = def.createPart();
messagePart.setName(messagePartInfo.getName().getLocalPart());
if (messagePartInfo.isElement()) {
messagePart.setElementName(messagePartInfo.getElementQName());
addNamespace(messagePartInfo.getElementQName().getNamespaceURI(), def);
} else if (messagePartInfo.getTypeQName() != null) {
messagePart.setTypeName(messagePartInfo.getTypeQName());
addNamespace(messagePartInfo.getTypeQName().getNamespaceURI(), def);
}
message.addPart(messagePart);
}
}
代码示例来源:origin: apache/cxf
public Message generateInputMessage(Operation operation, BindingOperation bindingOperation) {
Message msg = definition.createMessage();
QName msgName;
if (!mapper.isDefaultMapping()) {
//mangle the message name
//REVISIT, do we put in the entire scope for mangling
msgName = new QName(definition.getTargetNamespace(),
getScope().tail() + "." + operation.getName());
} else {
msgName = new QName(definition.getTargetNamespace(), operation.getName());
}
msg.setQName(msgName);
msg.setUndefined(false);
String inputName = operation.getName() + REQUEST_SUFFIX;
Input input = definition.createInput();
input.setName(inputName);
input.setMessage(msg);
BindingInput bindingInput = definition.createBindingInput();
bindingInput.setName(inputName);
bindingOperation.setBindingInput(bindingInput);
operation.setInput(input);
definition.addMessage(msg);
return msg;
}
代码示例来源:origin: apache/cxf
public Message generateOutputMessage(Operation operation, BindingOperation bindingOperation) {
Message msg = definition.createMessage();
QName msgName;
if (!mapper.isDefaultMapping()) {
//mangle the message name
//REVISIT, do we put in the entire scope for mangling
msgName = new QName(definition.getTargetNamespace(),
getScope().tail() + "." + operation.getName() + RESPONSE_SUFFIX);
} else {
msgName = new QName(definition.getTargetNamespace(),
operation.getName() + RESPONSE_SUFFIX);
}
msg.setQName(msgName);
msg.setUndefined(false);
String outputName = operation.getName() + RESPONSE_SUFFIX;
Output output = definition.createOutput();
output.setName(outputName);
output.setMessage(msg);
BindingOutput bindingOutput = definition.createBindingOutput();
bindingOutput.setName(outputName);
bindingOperation.setBindingOutput(bindingOutput);
operation.setOutput(output);
definition.addMessage(msg);
return msg;
}
内容来源于网络,如有侵权,请联系作者删除!