本文整理了Java中javax.wsdl.Message.setQName()
方法的一些代码示例,展示了Message.setQName()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Message.setQName()
方法的具体详情如下:
包路径:javax.wsdl.Message
类名称:Message
方法名:setQName
[英]Set the name of this message.
[中]设置此邮件的名称。
代码示例来源:origin: wsdl4j/wsdl4j
msg.setQName(messageName);
代码示例来源:origin: wsdl4j/wsdl4j
message.setQName(messageName);
def.addMessage(message);
代码示例来源:origin: wsdl4j/wsdl4j
message.setQName(messageName);
def.addMessage(message);
代码示例来源:origin: wsdl4j/wsdl4j
message.setQName(messageName);
def.addMessage(message);
代码示例来源:origin: org.springframework.ws/org.springframework.ws
/**
* Called after the {@link Message} has been created.
* <p/>
* Default implementation sets the name of the message to the element name.
*
* @param definition the WSDL4J <code>Definition</code>
* @param message the WSDL4J <code>Message</code>
* @param elementName the element name
* @throws WSDLException in case of errors
*/
protected void populateMessage(Definition definition, Message message, QName elementName) throws WSDLException {
QName messageName = new QName(definition.getTargetNamespace(), elementName.getLocalPart());
if (logger.isDebugEnabled()) {
logger.debug("Creating message [" + messageName + "]");
}
message.setQName(messageName);
}
代码示例来源:origin: org.springframework.ws/spring-ws-core
/**
* Called after the {@link Message} has been created.
*
* <p>Default implementation sets the name of the message to the element name.
*
* @param definition the WSDL4J {@code Definition}
* @param message the WSDL4J {@code Message}
* @param elementName the element name
* @throws WSDLException in case of errors
*/
protected void populateMessage(Definition definition, Message message, QName elementName) throws WSDLException {
QName messageName = new QName(definition.getTargetNamespace(), elementName.getLocalPart());
if (logger.isDebugEnabled()) {
logger.debug("Creating message [" + messageName + "]");
}
message.setQName(messageName);
}
代码示例来源:origin: spring-projects/spring-ws
/**
* Called after the {@link Message} has been created.
*
* <p>Default implementation sets the name of the message to the element name.
*
* @param definition the WSDL4J {@code Definition}
* @param message the WSDL4J {@code Message}
* @param elementName the element name
* @throws WSDLException in case of errors
*/
protected void populateMessage(Definition definition, Message message, QName elementName) throws WSDLException {
QName messageName = new QName(definition.getTargetNamespace(), elementName.getLocalPart());
if (logger.isDebugEnabled()) {
logger.debug("Creating message [" + messageName + "]");
}
message.setQName(messageName);
}
代码示例来源:origin: apache/servicemix-bundles
/**
* Called after the {@link Message} has been created.
*
* <p>Default implementation sets the name of the message to the element name.
*
* @param definition the WSDL4J {@code Definition}
* @param message the WSDL4J {@code Message}
* @param elementName the element name
* @throws WSDLException in case of errors
*/
protected void populateMessage(Definition definition, Message message, QName elementName) throws WSDLException {
QName messageName = new QName(definition.getTargetNamespace(), elementName.getLocalPart());
if (logger.isDebugEnabled()) {
logger.debug("Creating message [" + messageName + "]");
}
message.setQName(messageName);
}
代码示例来源:origin: org.wso2.wsdl.validator/wsdl-validator
public Object put(Object key, Object val)
{
QName name = (QName)key;
QName value = (QName)val;
String lName = name.getLocalPart();
String nSpace = name.getNamespaceURI();
if (NS_URI_PART_EXTENSIONS.equals(nSpace) && ATTR_MESSAGE.equals(lName))
{
javax.wsdl.Message messageProxy = new MessageImpl();
messageProxy.setQName(value);
setEMessage((Message)messageProxy);
}
return super.put(key, value);
}
}
代码示例来源: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.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: net.open-esb.core/wsdl
public Message getStatusMessage() throws WrapperProcessingException {
Message msg = null;
try {
WSDLFactory factory = javax.wsdl.factory.WSDLFactory.newInstance();
Definition def = factory.newDefinition();
msg = def.createMessage();
msg.setQName(new QName(WrapperBuilder.STATUS_TAG));
Part part = def.createPart();
part.setName(WrapperBuilder.RESULT_TAG);
msg.addPart(part);
} catch (WSDLException ex) {
throw new WrapperProcessingException(ex);
}
return msg;
}
代码示例来源: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);
}
}
内容来源于网络,如有侵权,请联系作者删除!