use of org.apache.cxf.service.model.MessagePartInfo in project cxf by apache.
the class STSUtils method addCancelOperation.
private static OperationInfo addCancelOperation(InterfaceInfo ii, String namespace, String servNamespace) {
OperationInfo oi = ii.addOperation(new QName(servNamespace, "CancelSecurityToken"));
MessageInfo mii = oi.createMessage(new QName(servNamespace, "CancelSecurityTokenMsg"), MessageInfo.Type.INPUT);
oi.setInput("CancelSecurityTokenMsg", mii);
MessagePartInfo mpi = mii.addMessagePart("request");
mpi.setElementQName(new QName(namespace, "RequestSecurityToken"));
MessageInfo mio = oi.createMessage(new QName(servNamespace, "CancelSecurityTokenResponseMsg"), MessageInfo.Type.OUTPUT);
oi.setOutput("CancelSecurityTokenResponseMsg", mio);
mpi = mio.addMessagePart("response");
if (WST_NS_05_02.equals(namespace)) {
mpi.setElementQName(new QName(namespace, "RequestSecurityTokenResponse"));
} else {
mpi.setElementQName(new QName(namespace, "RequestSecurityTokenResponseCollection"));
}
return oi;
}
use of org.apache.cxf.service.model.MessagePartInfo in project cxf by apache.
the class STSUtils method addRenewOperation.
private static OperationInfo addRenewOperation(InterfaceInfo ii, String namespace, String servNamespace) {
OperationInfo oi = ii.addOperation(new QName(servNamespace, "RenewSecurityToken"));
MessageInfo mii = oi.createMessage(new QName(servNamespace, "RenewSecurityTokenMsg"), MessageInfo.Type.INPUT);
oi.setInput("RenewSecurityTokenMsg", mii);
MessagePartInfo mpi = mii.addMessagePart("request");
mpi.setElementQName(new QName(namespace, "RequestSecurityToken"));
MessageInfo mio = oi.createMessage(new QName(servNamespace, "RenewSecurityTokenResponseMsg"), MessageInfo.Type.OUTPUT);
oi.setOutput("RenewSecurityTokenResponseMsg", mio);
mpi = mio.addMessagePart("response");
if (WST_NS_05_02.equals(namespace)) {
mpi.setElementQName(new QName(namespace, "RequestSecurityTokenResponse"));
} else {
mpi.setElementQName(new QName(namespace, "RequestSecurityTokenResponseCollection"));
}
return oi;
}
use of org.apache.cxf.service.model.MessagePartInfo in project cxf by apache.
the class STSUtils method addIssueOperation.
private static OperationInfo addIssueOperation(InterfaceInfo ii, String namespace, String servNamespace) {
OperationInfo oi = ii.addOperation(new QName(servNamespace, "RequestSecurityToken"));
MessageInfo mii = oi.createMessage(new QName(servNamespace, "RequestSecurityTokenMsg"), MessageInfo.Type.INPUT);
oi.setInput("RequestSecurityTokenMsg", mii);
MessagePartInfo mpi = mii.addMessagePart("request");
mpi.setElementQName(new QName(namespace, "RequestSecurityToken"));
MessageInfo mio = oi.createMessage(new QName(servNamespace, "RequestSecurityTokenResponseMsg"), MessageInfo.Type.OUTPUT);
oi.setOutput("RequestSecurityTokenResponseMsg", mio);
mpi = mio.addMessagePart("response");
if (WST_NS_05_02.equals(namespace)) {
mpi.setElementQName(new QName(namespace, "RequestSecurityTokenResponse"));
} else {
mpi.setElementQName(new QName(namespace, "RequestSecurityTokenResponseCollection"));
}
return oi;
}
use of org.apache.cxf.service.model.MessagePartInfo in project cxf by apache.
the class ReflectionServiceFactoryBean method setIndexes.
private void setIndexes(MessageInfo m) {
int max = -1;
for (MessagePartInfo mpi : m.getMessageParts()) {
if (mpi.getIndex() > max && mpi.getIndex() != Integer.MAX_VALUE) {
max = mpi.getIndex();
}
}
for (MessagePartInfo mpi : m.getMessageParts()) {
if (mpi.getIndex() == Integer.MAX_VALUE) {
max++;
mpi.setIndex(max);
}
}
}
use of org.apache.cxf.service.model.MessagePartInfo in project cxf by apache.
the class ServiceWSDLBuilder method buildMessage.
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);
}
}
Aggregations