Refine search
private void loadParameters( Operation op ) throws KettleStepException { Input input = op.getInput(); if ( input != null ) { Message in = input.getMessage(); List<Object> paramOrdering = op.getParameterOrdering(); List<Part> inParts = in.getOrderedParts( paramOrdering ); Output output = op.getOutput(); if ( output != null ) { Message out = output.getMessage(); List<Part> outParts = out.getOrderedParts( null );
&& wsdlOperation == null; ) { WsdlOperation vCurrentOperation = vItOperation.next(); if ( vCurrentOperation.getOperationQName().getLocalPart().equals( anOperationName ) ) { wsdlOperation = vCurrentOperation; WsdlOpParameterList parameters = wsdlOperation.getParameters(); if ( parameters != null && parameters.getOperation() != null && parameters.getOperation().getInput() != null && parameters.getOperation().getInput().getName() != null ) { request = wsdlOperation.getParameters().getOperation().getInput().getName().toString(); String attributeName = itrType.next(); QName attributeType = type.getElementType( attributeName ); if ( !WebServiceMeta.XSD_NS_URI.equals( attributeType.getNamespaceURI() ) ) { throw new KettleStepException( BaseMessages.getString( PKG, "WebServiceDialog.ERROR0007.UnsupporteOperation.ComplexType" ) ); + param.getName().getLocalPart() + ", mode=" + param.getMode().toString() + ", is not considered" );
input.setName(name); message.setQName(messageName); def.addMessage(message); input.setMessage(message); input.setDocumentationElement(tempEl); input.addExtensibilityElement( parseExtensibilityElement(Input.class, tempEl, def));
protected void printInput(Input input, Definition def, PrintWriter pw) throws WSDLException { if (input != null) { String tagName = DOMUtils.getQualifiedValue(Constants.NS_URI_WSDL, Constants.ELEM_INPUT, def); pw.print(" <" + tagName); DOMUtils.printAttribute(Constants.ATTR_NAME, input.getName(), pw); Message message = input.getMessage(); if (message != null) { DOMUtils.printQualifiedAttribute(Constants.ATTR_MESSAGE, message.getQName(), def, pw); } printExtensibilityAttributes(Input.class, input, def, pw); pw.println('>'); printDocumentation(input.getDocumentationElement(), def, pw); List extElements = input.getExtensibilityElements(); printExtensibilityElements(Input.class, extElements, def, pw); pw.println(" </" + tagName + '>'); } }
private Message getMessage(boolean isInput) { Operation operation = bindingOp.getOperation(); if (operation == null) { return null; } if (isInput) { final Input input = operation.getInput(); return input == null ? null : input.getMessage(); } final Output output = operation.getOutput(); return output == null ? null : output.getMessage(); } private SOAPBody getSOAPBody(boolean input) {
public static QName getInputPartName(Operation op) { Input input = op.getInput(); Map parts = input.getMessage().getParts(); // // one message, one part, one XSD element - that's the system // if (parts.size() != 1) { Object[] filler = { op.getName() }; throw new RuntimeException(_MESSAGES.get("NotDocLiteral", filler)); } Part docLiteralPart = (Part)parts.values().iterator().next(); QName partName = docLiteralPart.getElementName(); // // HACK: this is for Axis/Axiom - they don't handle the default // namespace/prefix well, so we always use a prefix // String prefix = partName.getPrefix(); if (prefix == null || prefix.length() == 0) partName = new QName(partName.getNamespaceURI(), partName.getLocalPart(), "muse-op"); return partName; }
flat.setTargetNamespace(name.getNamespaceURI()); addNamespaces(flat, _definition); Operation defOper = (Operation) itOper.next(); Operation flatOper = flat.createOperation(); flatOper.setName(defOper.getName()); flatOper.setStyle(defOper.getStyle()); flatOper.setUndefined(false); if (defOper.getInput() != null) { Input flatInput = flat.createInput(); flatInput.setName(defOper.getInput().getName()); if (defOper.getInput().getMessage() != null) { Message flatInputMsg = copyMessage(defOper.getInput().getMessage(), flat); flatInput.setMessage(flatInputMsg); flat.addMessage(flatInputMsg); if (defOper.getOutput() != null) { Output flatOutput = flat.createOutput(); flatOutput.setName(defOper.getOutput().getName()); if (defOper.getOutput().getMessage() != null) { Message flatOutputMsg = copyMessage(defOper.getOutput().getMessage(), flat); flatOutput.setMessage(flatOutputMsg); javax.wsdl.extensions.schema.Schema imp = new SchemaImpl(); imp.setElement(((Schema)it.next()).getRoot()); imp.setElementType(new QName("http://www.w3.org/2001/XMLSchema", "schema")); types.addExtensibilityElement(imp);
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); 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()); fault = def.createFault(); addDocumentation(fault, faultInfo.getDocumentation()); fault.setName(faultInfo.getFaultName().getLocalPart()); message = def.createMessage(); buildMessage(message, faultInfo, def);
protected void visit(Input input) { if (isWrapped) { Part part = (Part) input.getMessage().getParts().values().iterator().next(); MessageInfo info = opInfo.createMessage(new QName(part.getElementName().getNamespaceURI(), input.getMessage().getQName().getLocalPart())); winput2msg.put(input, info); opInfo.setInputMessage(info); createMessageParts(info, getWrappedSchema(input.getMessage())); } else { MessageInfo info = opInfo.createMessage(input.getMessage().getQName()); winput2msg.put(input, info); opInfo.setInputMessage(info); createMessageParts(info, input.getMessage()); } }
if (!documentStyle && (elementName.getLocalPart().equals(operation.getName()))) { return operation; } else { if ((operation.getInput() != null) && (operation.getInput().getMessage() != null) && (operation.getInput().getMessage().getParts() != null) && !operation.getInput().getMessage().getParts().isEmpty()) { Part part = (Part)operation.getInput().getMessage().getParts().values().iterator().next(); if ((part.getElementName() != null) && elementName.equals(part.getElementName()) || (part.getTypeName() != null) && elementName.equals(part.getTypeName())) { return operation; } else if (elementName.getLocalPart().equals(operation.getName())) {
/** * Called after the {@link javax.wsdl.Input} has been created, but it's added to the operation. Subclasses can * override this method to define the input name. * * <p>Default implementation sets the input name to the message name. * * @param definition the WSDL4J {@code Definition} * @param input the WSDL4J {@code Input} */ protected void populateInput(Definition definition, Input input) { input.setName(input.getMessage().getQName().getLocalPart()); }
private void buildInterfaceOperation(InterfaceInfo inf, Operation op) { OperationInfo opInfo = inf.addOperation(new QName(inf.getName().getNamespaceURI(), op.getName())); if (recordOriginal) { opInfo.setProperty(WSDL_OPERATION, op); List<String> porderList = CastUtils.cast((List<?>)op.getParameterOrdering()); opInfo.setParameterOrdering(porderList); this.copyExtensors(opInfo, op.getExtensibilityElements()); this.copyExtensionAttributes(opInfo, op); Input input = op.getInput(); if (input != null) { if (input.getMessage() == null) { throw new WSDLRuntimeException(LOG, "NO_MESSAGE", "input", op.getName(), input.getName()); MessageInfo minfo = opInfo.createMessage(input.getMessage().getQName(), MessageInfo.Type.INPUT); opInfo.setInput(input.getName(), minfo); buildMessage(minfo, input.getMessage()); copyExtensors(minfo, input.getExtensibilityElements()); copyExtensionAttributes(minfo, input); Output output = op.getOutput(); if (output != null) { if (output.getMessage() == null) { throw new WSDLRuntimeException(LOG, "NO_MESSAGE", "output", op.getName(), output.getName()); MessageInfo minfo = opInfo.createMessage(output.getMessage().getQName(), MessageInfo.Type.OUTPUT); opInfo.setOutput(output.getName(), minfo); buildMessage(minfo, output.getMessage());
Message msg = writeRequestMessage(def, desc, bindingOper); input.setMessage(msg); String name = msg.getQName().getLocalPart(); input.setName(name); bindingOper.getBindingInput().setName(name); oper.setInput(input); def.addMessage(msg); output.setMessage(msg); name = msg.getQName().getLocalPart(); output.setName(name); bindingOper.getBindingOutput().setName(name); oper.setOutput(output); def.addMessage(msg); oper.addFault(fault); bindingOper.addBindingFault(bFault); if (def.getMessage(msg.getQName()) == null) { def.addMessage(msg);
log.info("\tPortType: {}", qname.getLocalPart()); clazzDef.setPackageName(toPackageName(qname.getNamespaceURI())); clazzDef.setClassName(qname.getLocalPart()); portTypeMap.put(qname, clazzDef); String opName = op.getName(); log.info("\t\tOperation: {}", opName); MethodInfoImpl methodInf = new MethodInfoImpl(opName); BindingOperation bop = binding.getBindingOperation(opName, null, null); for (Object aux : bop.getExtensibilityElements()) { if (aux instanceof SOAPOperation) { SOAPOperation soap = (SOAPOperation) aux; Input in = op.getInput(); Output out = op.getOutput(); Map<QName, Fault> f = op.getFaults(); if (in.getName() == null) { in.setName(opName); processMessages(def, portType, in.getMessage(), opName, 0); if (out.getName() == null) { out.setName(opName + "Response"); processMessages(def, portType, out.getMessage(), opName, 1);
Operation operation) { Input input = operation.getInput(); Output output = operation.getOutput(); Collection parts = input.getMessage().getParts().values(); for (Iterator i = parts.iterator(); i.hasNext();) { Part part = (Part)i.next(); OperationWebParam p = new OperationWebParam(part.getElementName().getLocalPart(), part.getName(), Mode.IN, part.getElementName().getNamespaceURI()); parms.add(p); parmMap.put(part.getName(), p); parts = output.getMessage().getParts().values(); for (Iterator i = parts.iterator(); i.hasNext();) { Part part = (Part)i.next(); p = new OperationWebParam(part.getElementName().getLocalPart(), part.getName(), Mode.OUT,
Collection<Binding> bindings = definition.getBindings().values(); for (Binding entry : bindings) { if (entry.getPortType().getQName().equals(portTypeName)) { binding = entry; break; for (Object element : bindingOperation.getExtensibilityElements()) { if (element instanceof SOAPOperation) { soapOperation = (SOAPOperation) element; Operation portTypeOperation = null; for (Operation entry : portTypeOperations) { if (entry.getName().equals(m.getName())) { portTypeOperation = entry; av.visit("name", portTypeOperation.getOutput().getMessage().getQName().getLocalPart()); Collection<Part> parts = portTypeOperation.getOutput().getMessage().getParts().values(); av.visit("partName", parts.iterator().next().getName()); av.visitEnd(); parts = portTypeOperation.getInput().getMessage().getParts().values(); String partName = parts.iterator().next().getName(); av.visit("name", partName);
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; }
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; }
public QName getOperationQname(String operationName) throws UnknownOperationException { if (getStyle().equals("document")) { try { // Get the QName of the first element of the input message return ((Part) getBindingOperation(operationName) .getOperation().getInput().getMessage() .getOrderedParts(null).get(0)).getElementName(); } catch (RuntimeException e) { logger.warn("Could not find qname of message for operation " + operationName, e); String ns = getDefinition().getTargetNamespace(); return new QName(ns, operationName); } } else { String ns = getOperationNamespaceURI(operationName); return new QName(ns, operationName); } }
private String getWrapperNamespace(String operationName, boolean input) { String ns = null; if (_wsdlPort != null) { Operation operation = WSDLUtil.getOperationByName(_wsdlPort, operationName); if (!_documentStyle) { ns = input ? operation.getInput().getMessage().getQName().getNamespaceURI() : operation.getOutput().getMessage().getQName().getNamespaceURI(); } else { // Note: WS-I Profile allows only one child under SOAPBody. Part part = input ? (Part)operation.getInput().getMessage().getParts().values().iterator().next() : (Part)operation.getOutput().getMessage().getParts().values().iterator().next(); if (part.getElementName() != null) { ns = part.getElementName().getNamespaceURI(); } else if (part.getTypeName() != null) { ns = part.getTypeName().getNamespaceURI(); } } } return ns; }