Java Code Examples for javax.wsdl.Output#setName()
The following examples show how to use
javax.wsdl.Output#setName() .
You can vote up the ones you like or vote down the ones you don't like,
and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
Source File: AttributeVisitor.java From cxf with Apache License 2.0 | 6 votes |
private Operation generateOperation(String name, Message inputMsg, Message outputMsg) { Input input = definition.createInput(); input.setName(inputMsg.getQName().getLocalPart()); input.setMessage(inputMsg); Output output = definition.createOutput(); output.setName(outputMsg.getQName().getLocalPart()); output.setMessage(outputMsg); Operation result = definition.createOperation(); result.setName(name); result.setInput(input); result.setOutput(output); result.setUndefined(false); portType.addOperation(result); return result; }
Example 2
Source File: OperationVisitor.java From cxf with Apache License 2.0 | 5 votes |
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; }
Example 3
Source File: ServiceWSDLBuilder.java From cxf with Apache License 2.0 | 4 votes |
protected void buildPortTypeOperation(PortType portType, Collection<OperationInfo> operationInfos, final Definition def) { for (OperationInfo operationInfo : operationInfos) { Operation operation = null; try { operation = operationInfo.getProperty( WSDLServiceBuilder.WSDL_OPERATION, Operation.class); } catch (ClassCastException e) { // do nothing } if (operation == null) { operation = def.createOperation(); addDocumentation(operation, operationInfo.getDocumentation()); operation.setUndefined(false); operation.setName(operationInfo.getName().getLocalPart()); addNamespace(operationInfo.getName().getNamespaceURI(), def); if (operationInfo.isOneWay()) { operation.setStyle(OperationType.ONE_WAY); } addExtensibilityElements(def, operation, getWSDL11Extensors(operationInfo)); Input input = def.createInput(); addDocumentation(input, operationInfo.getInput().getDocumentation()); input.setName(operationInfo.getInputName()); Message message = def.createMessage(); buildMessage(message, operationInfo.getInput(), def); this.addExtensibilityAttributes(def, input, getInputExtensionAttributes(operationInfo)); this.addExtensibilityElements(def, input, getWSDL11Extensors(operationInfo.getInput())); input.setMessage(message); operation.setInput(input); operation.setParameterOrdering(operationInfo.getParameterOrdering()); if (operationInfo.getOutput() != null) { Output output = def.createOutput(); addDocumentation(output, operationInfo.getOutput().getDocumentation()); output.setName(operationInfo.getOutputName()); message = def.createMessage(); buildMessage(message, operationInfo.getOutput(), def); this.addExtensibilityAttributes(def, output, getOutputExtensionAttributes(operationInfo)); this.addExtensibilityElements(def, output, getWSDL11Extensors(operationInfo.getOutput())); output.setMessage(message); operation.setOutput(output); } //loop to add fault Collection<FaultInfo> faults = operationInfo.getFaults(); Fault fault = null; for (FaultInfo faultInfo : faults) { fault = def.createFault(); addDocumentation(fault, faultInfo.getDocumentation()); fault.setName(faultInfo.getFaultName().getLocalPart()); message = def.createMessage(); buildMessage(message, faultInfo, def); this.addExtensibilityAttributes(def, fault, faultInfo.getExtensionAttributes()); this.addExtensibilityElements(def, fault, getWSDL11Extensors(faultInfo)); fault.setMessage(message); operation.addFault(fault); } } portType.addOperation(operation); } }