use of org.apache.cxf.binding.corba.wsdl.ParamType in project cxf by apache.
the class AttributeVisitor method generateSetter.
private void generateSetter(AST typeNode, AST nameNode) {
// generate wrapped doc element in parameter
XmlSchemaElement inParameters = generateWrappedDocElement(typeNode, SETTER_PREFIX + nameNode.toString(), PARAM_NAME);
// generate wrapped doc element out parameter
XmlSchemaElement outParameters = generateWrappedDocElement(null, SETTER_PREFIX + nameNode.toString() + RESULT_POSTFIX, RETURN_PARAM_NAME);
// generate input message
Message inMsg = generateMessage(inParameters, SETTER_PREFIX + nameNode.toString());
// generate output message
Message outMsg = generateMessage(outParameters, SETTER_PREFIX + nameNode.toString() + RESPONSE_POSTFIX);
// generate operation
String name = SETTER_PREFIX + nameNode.toString();
Operation op = generateOperation(name, inMsg, outMsg);
// generate corba return param
ParamType corbaParam = generateCorbaParam(typeNode);
// generate corba operation
OperationType corbaOp = generateCorbaOperation(op, corbaParam, null);
// generate binding
generateCorbaBindingOperation(binding, op, corbaOp);
}
use of org.apache.cxf.binding.corba.wsdl.ParamType in project cxf by apache.
the class ParamDclVisitor method addCorbaParam.
private void addCorbaParam(CorbaType corbaType, ModeType mode, String partName, Scope fullyQualifiedName) {
ParamType param = new ParamType();
param.setName(partName);
param.setMode(mode);
if (corbaType == null) {
ParamDeferredAction paramAction = new ParamDeferredAction(param);
wsdlVisitor.getDeferredActions().add(fullyQualifiedName, paramAction);
} else {
param.setIdltype(corbaType.getQName());
}
corbaOperation.getParam().add(param);
}
use of org.apache.cxf.binding.corba.wsdl.ParamType in project cxf by apache.
the class WSDLParameter method processWrappedOutputParam.
private void processWrappedOutputParam(WSDLToCorbaBinding wsdlToCorbaBinding, XmlSchemaElement el, List<ParamType> inputs, List<ParamType> outputs) throws Exception {
ParamType paramtype = null;
for (int i = 0; i < inputs.size(); i++) {
if (inputs.get(i).getName().equals(el.getQName().getLocalPart())) {
inputs.remove(i);
QName typeName = el.getSchemaTypeName();
if (typeName == null) {
typeName = el.getQName();
}
QName idltype = getIdlType(wsdlToCorbaBinding, el.getSchemaType(), typeName, el.isNillable());
paramtype = createParam(wsdlToCorbaBinding, "inout", el.getQName().getLocalPart(), idltype);
if (paramtype != null) {
inputs.add(paramtype);
}
}
}
if (paramtype == null) {
QName typeName = el.getSchemaTypeName();
if (typeName == null) {
typeName = el.getQName();
}
QName idltype = getIdlType(wsdlToCorbaBinding, el.getSchemaType(), typeName, el.isNillable());
paramtype = createParam(wsdlToCorbaBinding, "out", el.getQName().getLocalPart(), idltype);
if (paramtype != null) {
outputs.add(paramtype);
}
}
}
use of org.apache.cxf.binding.corba.wsdl.ParamType in project cxf by apache.
the class WSDLParameter method createParam.
private static ParamType createParam(WSDLToCorbaBinding wsdlToCorbaBinding, String mode, String name, QName idltype) throws Exception {
ParamType paramtype = new ParamType();
ModeType modeType = ModeType.fromValue(mode);
paramtype.setName(name);
paramtype.setMode(modeType);
paramtype.setIdltype(idltype);
return paramtype;
}
use of org.apache.cxf.binding.corba.wsdl.ParamType in project cxf by apache.
the class WSDLParameter method processWrappedInputParams.
private void processWrappedInputParams(WSDLToCorbaBinding wsdlToCorbaBinding, Operation operation, SchemaCollection xmlSchemaList, List<ParamType> inputs) throws Exception {
Input input = operation.getInput();
if (input != null) {
Message msg = input.getMessage();
Part part = (Part) msg.getOrderedParts(null).iterator().next();
XmlSchemaElement el = getElement(part, xmlSchemaList);
if (el == null) {
return;
}
XmlSchemaComplexType schemaType = null;
if (el.getSchemaType() != null) {
schemaType = (XmlSchemaComplexType) el.getSchemaType();
}
XmlSchemaSequence seq = (XmlSchemaSequence) schemaType.getParticle();
if (seq != null) {
for (XmlSchemaSequenceMember seqItem : seq.getItems()) {
if (seqItem instanceof XmlSchemaElement) {
el = (XmlSchemaElement) seqItem;
// REVISIT, handle element ref's?
QName typeName = el.getSchemaTypeName();
if (typeName == null) {
typeName = el.getQName();
}
QName idltype = getIdlType(wsdlToCorbaBinding, el.getSchemaType(), typeName, el.isNillable());
ParamType paramtype = createParam(wsdlToCorbaBinding, "in", el.getQName().getLocalPart(), idltype);
if (paramtype != null) {
inputs.add(paramtype);
}
}
}
}
}
}
Aggregations