private void initializeInvocation() { __log.debug("Initializing BPELInvoker"); Interface interfaze = operation.getInterface(); if(interfaze instanceof WSDLInterface){ WSDLInterface wsdlInterface = null; wsdlInterface = (WSDLInterface) interfaze; // Fetch the service name from the service object - including the componentURI guarantees a unique service name String componentURI = component.getURI(); bpelServiceName = new QName( Base.SCA11_TUSCANY_NS, componentURI + service.getName() ); bpelOperationInputPart = (Part) wsdlInterface.getPortType().getOperation(bpelOperationName,null,null).getInput().getMessage().getParts().values().iterator().next(); bpelOperationOutputPart = (Part) wsdlInterface.getPortType().getOperation(bpelOperationName,null,null).getOutput().getMessage().getParts().values().iterator().next(); } } // end method initializeInvocation
private Message createResponseMessage(PartnerRoleMessageExchange partnerRoleMessageExchange, Operation operation, Element invocationResult) { Document dom = DOMUtils.newDocument(); String operationName = operation.getName(); Part bpelOperationOutputPart = (Part)((WSDLInterface)operation.getInterface()).getPortType().getOperation(operationName, null, null) .getOutput().getMessage().getParts().values().iterator().next(); Element contentMessage = dom.createElement("message"); Element contentPart = dom.createElement(bpelOperationOutputPart.getName()); contentPart.appendChild(dom.importNode(invocationResult, true)); contentMessage.appendChild(contentPart); dom.appendChild(contentMessage); if(__log.isDebugEnabled()) { __log.debug("Creating result message:"); __log.debug(">>>" + DOMUtils.domToString(dom.getDocumentElement())); } QName id = partnerRoleMessageExchange.getOperation().getOutput().getMessage().getQName(); Message response = partnerRoleMessageExchange.createMessage(id); response.setMessage(dom.getDocumentElement()); return response; }
/** * Return the WSDL Definition for a given PortType * @param portTypeName - the QName of the PortType */ public Definition getDefinitionForPortType( QName portTypeName ) { //System.out.println("getDefinitionForPortType called for portType: " + portTypeName ); // Find the named PortType in the list of WSDL interfaces associated with this BPEL Process Collection<WSDLInterface> theInterfaces = implementation.getProcessDefinition().getInterfaces(); for( WSDLInterface wsdlInterface : theInterfaces ) { if ( wsdlInterface.getPortType().getQName().equals( portTypeName ) ) { // Extract and return the Definition associated with the WSDLDefinition... return wsdlInterface.getWsdlDefinition().getDefinition(); } // end if } // end for return null; } // end getDefinitionforPortType
private void addWSAActionHeader( SOAPHeader sh ) { // Create wsa:Action header which is required by ws-addressing spec String action = options.getAction(); if (action == null) { PortType portType = ((WSDLInterface)wsBinding.getBindingInterfaceContract().getInterface()).getPortType(); Operation op = portType.getOperation(wsdlOperationName.getLocalPart(), null, null); action = WSDL11ActionHelper.getActionFromInputElement(wsBinding.getGeneratedWSDLDocument(), portType, op, op.getInput()); } OMElement actionOM = sh.getOMFactory().createOMElement(QNAME_WSA_ACTION); actionOM.setText(action == null ? "" : action); sh.addChild(actionOM); } // end method addWSAActionHeader
if (anInterface.getPortType().getQName().equals(callPT.getQName())) callInterface = anInterface; WSDLInterface callbackInterface = null; for (WSDLInterface anInterface : theInterfaces) { if (anInterface.getPortType().getQName().equals(callbackPT.getQName())) callbackInterface = anInterface;
if (anInterface.getPortType().getQName().equals(callPT.getQName())) callInterface = anInterface; WSDLInterface callbackInterface = null; for (WSDLInterface anInterface : theInterfaces) { if (anInterface.getPortType().getQName().equals(callbackPT.getQName())) callbackInterface = anInterface;
if (anInterface.getPortType().getQName().equals(callPT.getQName())) callInterface = anInterface; WSDLInterface callbackInterface = null; for (WSDLInterface anInterface : theInterfaces) { if (anInterface.getPortType().getQName().equals(callbackPT.getQName())) callbackInterface = anInterface;
if (anInterface.getPortType().getQName().equals(callPT.getQName())) callInterface = anInterface; WSDLInterface callbackInterface = null; for (WSDLInterface anInterface : theInterfaces) { if (anInterface.getPortType().getQName().equals(callbackPT.getQName())) callbackInterface = anInterface;
private void addWSAActionHeader(SOAPHeader sh, String action) throws SOAPException { // Create wsa:Action header which is required by ws-addressing spec if (action == null) { PortType portType = ((WSDLInterface)wsBinding.getBindingInterfaceContract().getInterface()).getPortType(); javax.wsdl.Operation op = portType.getOperation(operation.getName(), null, null); action = getActionFromInputElement(wsBinding.getGeneratedWSDLDocument(), portType, op, op.getInput()); } // OMElement actionOM = // sh.getOMFactory().createOMElement(QNAME_WSA_ACTION); // actionOM.setText(action == null ? "" : action); // sh.addChild(actionOM); SOAPHeaderElement actionH = sh.addHeaderElement(QNAME_WSA_ACTION); actionH.setTextContent(action == null ? "" : action); } // end method addWSAActionHeader
Interface interfaze = wsBinding.getBindingInterfaceContract().getInterface(); if (interfaze instanceof WSDLInterface) { PortType portType = ((WSDLInterface)interfaze).getPortType(); boolean ok = importPortType(portType, wsdlDefinition, newDef, imports); if (!ok) { new WSDLDefinitionGenerator(wsBinding); WSDLInterface wi = (WSDLInterface)wsBinding.getBindingInterfaceContract().getInterface(); PortType portType = wi.getPortType();
Interface interfaze = wsBinding.getBindingInterfaceContract().getInterface(); if (interfaze instanceof WSDLInterface) { PortType portType = ((WSDLInterface)interfaze).getPortType(); boolean ok = importPortType(portType, wsdlDefinition, newDef, imports); if (!ok) { new WSDLDefinitionGenerator(wsBinding); WSDLInterface wi = (WSDLInterface)wsBinding.getBindingInterfaceContract().getInterface(); PortType portType = wi.getPortType();