本文整理了Java中org.apache.tuscany.sca.interfacedef.wsdl.WSDLInterface
类的一些代码示例,展示了WSDLInterface
类的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。WSDLInterface
类的具体详情如下:
包路径:org.apache.tuscany.sca.interfacedef.wsdl.WSDLInterface
类名称:WSDLInterface
[英]Represents a WSDL interface.
[中]表示WSDL接口。
代码示例来源:origin: org.apache.tuscany.sca/tuscany-implementation-bpel-runtime
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
代码示例来源:origin: org.apache.tuscany.sca/tuscany-implementation-bpel-runtime
/**
* 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
代码示例来源:origin: org.apache.tuscany.sca/tuscany-interface-wsdl
/**
* Process an extension @callback attribute on a WSDL portType declaration
* - the callback attribute must contain the QName of another portType
* @param portType the portType
* @return
*/
private WSDLInterface processCallbackAttribute( PortType portType, ModelResolver resolver, Monitor monitor ) {
Object o = portType.getExtensionAttribute(CALLBACK_ATTRIBUTE);
if(o != null && o instanceof QName) {
WSDLInterface wsdlInterface = wsdlFactory.createWSDLInterface();
wsdlInterface.setUnresolved(true);
wsdlInterface.setName( (QName)o );
wsdlInterface = WSDLInterfaceProcessor.resolveWSDLInterface( wsdlInterface, resolver, monitor, wsdlFactory );
return wsdlInterface;
} else {
return null;
} // end if
} // end method processCallbackAttribute
代码示例来源:origin: org.apache.tuscany.sca/tuscany-interface-wsdl
public void introspectPortType(WSDLInterface wsdlInterface, PortType portType, WSDLDefinition wsdlDefinition, ModelResolver resolver, Monitor monitor) throws InvalidWSDLException {
processIntents(wsdlInterface, portType);
WSDLInterface callback = processCallbackAttribute( portType, resolver, monitor );
wsdlInterface.setPortType(portType);
wsdlInterface.setCallbackInterface(callback);
wsdlInterface.getOperations().addAll(introspectOperations(portType, wsdlDefinition, resolver, monitor));
}
代码示例来源:origin: org.apache.tuscany.sca/tuscany-interface-wsdl
wsdlInterface.getWsdlDefinition() == null){
try {
WSDLInterface newWSDLInterface = wsdlFactory.createWSDLInterface(portType, wsdlDefinition, resolver, monitor);
newWSDLInterface.getRequiredIntents().addAll(wsdlInterface.getRequiredIntents());
newWSDLInterface.getPolicySets().addAll(wsdlInterface.getPolicySets());
wsdlInterface = newWSDLInterface;
} catch (InvalidInterfaceException e) {
wsdlInterface.setWsdlDefinition(wsdlDefinition);
wsdlInterfaceContract.setInterface(wsdlInterface);
WSDLInterface intrinsicWSDLCallbackInterface = wsdlInterface.getCallbackInterface();
Monitor.error(context.getMonitor(), WSDLInterfaceProcessor.class.getName(),
"interface-wsdlxml-validation-messages", "IncompatibleCallbacks",
intrinsicWSDLCallbackInterface.getName().toString(),
wsdlCallbackInterface.getName().toString() );
代码示例来源:origin: org.apache.tuscany.sca/tuscany-binding-ws-wsdlgen
wsdlInterface.setWsdlDefinition(wsdlDefinition);
wsdlInterface.setRemotable(true);
wsdlInterface.setUnresolved(false);
wsdlInterface.setRemotable(true);
PortType portType = (PortType)def.getAllPortTypes().values().iterator().next();
wsdlInterface.setPortType(portType);
for(Operation wsdlOperation : wsdlInterface.getOperations()){
if (wsdlOperation.getName().equals(javaOperation.getName())){
wsdlOperation.getRequiredIntents().addAll(javaOperation.getRequiredIntents());
代码示例来源:origin: org.apache.tuscany.sca/tuscany-base-runtime
if (wsdlInterface != null && wsdlInterface.isUnresolved()) {
Monitor monitor = context.getMonitor();
if (wsdlInterface.isUnresolved()) {
wsdlDefinition.setNamespace(wsdlInterface.getName().getNamespaceURI());
wsdlDefinition.setNameOfPortTypeToResolve(wsdlInterface.getName());
WSDLDefinition resolved = null;
try {
wsdlDefinition.getXmlSchemas().addAll(resolved.getXmlSchemas());
wsdlDefinition.setUnresolved(false);
WSDLObject<PortType> portType = wsdlDefinition.getWSDLObject(PortType.class, wsdlInterface.getName());
if (portType != null) {
wsdlDefinition.setDefinition(portType.getDefinition());
WSDLInterface newWSDLInterface = wsdlFactory.createWSDLInterface(portType.getElement(), wsdlDefinition, resolver, monitor);
newWSDLInterface.setWsdlDefinition(wsdlDefinition);
newWSDLInterface.getRequiredIntents().addAll(wsdlInterface.getRequiredIntents());
newWSDLInterface.getPolicySets().addAll(wsdlInterface.getPolicySets());
resolver.addModel(newWSDLInterface, context);
wsdlInterface = newWSDLInterface;
warning(monitor, "WsdlInterfaceDoesNotMatch", wsdlDefinition, wsdlInterface.getName());
"interface-wsdlxml-validation-messages",
"WSDLDefinitionUnresolved");
message = message.replace("{0}", wsdlInterface.getName().toString());
代码示例来源:origin: org.apache.tuscany.sca/tuscany-interface-java
wsdlInterface.setUnresolved(true);
wsdlInterface.setRemotable(true);
javaInterface.getPolicySets().addAll(wsdlInterface.getPolicySets());
javaInterface.getRequiredIntents().addAll(wsdlInterface.getRequiredIntents());
代码示例来源:origin: org.apache.tuscany.sca/tuscany-interface-wsdl
public static WSDLInterface resolveWSDLInterface( WSDLInterface wsdlInterface, ModelResolver resolver,
Monitor monitor, WSDLFactory wsdlFactory) {
if (wsdlInterface != null && wsdlInterface.isUnresolved()) {
if (wsdlInterface.isUnresolved()) {
wsdlDefinition.setNamespace(wsdlInterface.getName().getNamespaceURI());
WSDLDefinition resolved = resolver.resolveModel(WSDLDefinition.class, wsdlDefinition, context);
if (!resolved.isUnresolved()) {
wsdlDefinition.getXmlSchemas().addAll(resolved.getXmlSchemas());
wsdlDefinition.setUnresolved(false);
WSDLObject<PortType> portType = wsdlDefinition.getWSDLObject(PortType.class, wsdlInterface.getName());
if (portType != null) {
wsdlDefinition.setDefinition(portType.getDefinition());
wsdlInterface = wsdlFactory.createWSDLInterface(portType.getElement(), wsdlDefinition, resolver, monitor);
wsdlInterface.setWsdlDefinition(wsdlDefinition);
resolver.addModel(wsdlInterface, context);
} catch (InvalidInterfaceException e) {
Monitor.warning(monitor, WSDLInterfaceProcessor.class.getName(),
"interface-wsdlxml-validation-messages", "WsdlInterfaceDoesNotMatch",
wsdlDefinition.getNamespace(), wsdlInterface.getName().toString() );
"interface-wsdlxml-validation-messages",
"WSDLDefinitionUnresolved");
message = message.replace("{0}", wsdlInterface.getName().toString());
ContributionResolveException ce = new ContributionResolveException(message);
Monitor.error(monitor, WSDLInterfaceProcessor.class.getName(),
代码示例来源:origin: org.apache.tuscany.sca/tuscany-binding-ws
public WSDLDefinition getUserSpecifiedWSDLDefinition() {
if (userSpecifiedWSDLDefinition == null) {
Interface iface = bindingInterfaceContract.getInterface();
if (iface instanceof WSDLInterface) {
userSpecifiedWSDLDefinition = ((WSDLInterface)iface).getWsdlDefinition();
}
}
return userSpecifiedWSDLDefinition;
}
代码示例来源:origin: org.apache.tuscany.sca/tuscany-base-runtime
wsdlInterface = wsdlFactory.createWSDLInterface(portType, wsdlDefinition, resolver, context.getMonitor());
wsdlInterface.setWsdlDefinition(wsdlDefinition);
interfaceContract.setInterface(wsdlInterface);
interfaceContract.setCallbackInterface(wsdlInterface.getCallbackInterface());
model.setBindingInterfaceContract(interfaceContract);
} catch (InvalidInterfaceException e) {
代码示例来源:origin: org.apache.tuscany.sca/tuscany-base-runtime
if (wsdlInterface.isUnresolved()){
javaInterface.getPolicySets().addAll(wsdlInterface.getPolicySets());
javaInterface.getRequiredIntents().addAll(wsdlInterface.getRequiredIntents());
service.getPolicySets().addAll(wsdlInterface.getPolicySets());
service.getRequiredIntents().addAll(wsdlInterface.getRequiredIntents());
代码示例来源:origin: org.apache.tuscany.sca/tuscany-base-runtime
wsdlFileName.length() > 0){
WSDLInterface callInterface = wsdlFactory.createWSDLInterface();
callInterface.setUnresolved(true);
callInterface.setRemotable(true);
代码示例来源:origin: org.apache.tuscany.sca/tuscany-base-runtime
wsdlInterface.setWsdlDefinition(theWSDL);
} catch (InvalidInterfaceException e) {
ContributionResolveException ce =
代码示例来源:origin: org.apache.tuscany.sca/tuscany-base-runtime
intent.setName(intentName);
wsdlInterface.getRequiredIntents().add(intent);
intent.setName(intentName);
wsdlInterface.getRequiredIntents().add(intent);
代码示例来源:origin: org.apache.tuscany.sca/tuscany-base-runtime
wsdlInterface.getWsdlDefinition() == null){
try {
WSDLInterface newWSDLInterface = wsdlFactory.createWSDLInterface(portType, wsdlDefinition, resolver, monitor);
newWSDLInterface.getRequiredIntents().addAll(wsdlInterface.getRequiredIntents());
newWSDLInterface.getPolicySets().addAll(wsdlInterface.getPolicySets());
wsdlInterface = newWSDLInterface;
} catch (InvalidInterfaceException e) {
wsdlInterface.setWsdlDefinition(wsdlDefinition);
wsdlInterfaceContract.setInterface(wsdlInterface);
WSDLInterface intrinsicWSDLCallbackInterface = wsdlInterface.getCallbackInterface();
Monitor.error(context.getMonitor(), WSDLInterfaceProcessor.class.getName(),
"interface-wsdlxml-validation-messages", "IncompatibleCallbacks",
intrinsicWSDLCallbackInterface.getName().toString(),
wsdlCallbackInterface.getName().toString() );
代码示例来源:origin: org.apache.tuscany.sca/tuscany-base-runtime
wsdlInterface.setWsdlDefinition(wsdlDefinition);
wsdlInterface.setRemotable(true);
wsdlInterface.setUnresolved(false);
wsdlInterface.setRemotable(true);
PortType portType = (PortType)def.getAllPortTypes().values().iterator().next();
wsdlInterface.setPortType(portType);
for(Operation wsdlOperation : wsdlInterface.getOperations()){
if (wsdlOperation.getName().equals(javaOperation.getName())){
wsdlOperation.getRequiredIntents().addAll(javaOperation.getRequiredIntents());
代码示例来源:origin: org.apache.tuscany.sca/tuscany-interface-wsdl
if (wsdlInterface != null && wsdlInterface.isUnresolved()) {
Monitor monitor = context.getMonitor();
if (wsdlInterface.isUnresolved()) {
wsdlDefinition.setNamespace(wsdlInterface.getName().getNamespaceURI());
wsdlDefinition.setNameOfPortTypeToResolve(wsdlInterface.getName());
WSDLDefinition resolved = null;
try {
wsdlDefinition.getXmlSchemas().addAll(resolved.getXmlSchemas());
wsdlDefinition.setUnresolved(false);
WSDLObject<PortType> portType = wsdlDefinition.getWSDLObject(PortType.class, wsdlInterface.getName());
if (portType != null) {
wsdlDefinition.setDefinition(portType.getDefinition());
WSDLInterface newWSDLInterface = wsdlFactory.createWSDLInterface(portType.getElement(), wsdlDefinition, resolver, monitor);
newWSDLInterface.setWsdlDefinition(wsdlDefinition);
newWSDLInterface.getRequiredIntents().addAll(wsdlInterface.getRequiredIntents());
newWSDLInterface.getPolicySets().addAll(wsdlInterface.getPolicySets());
resolver.addModel(newWSDLInterface, context);
wsdlInterface = newWSDLInterface;
warning(monitor, "WsdlInterfaceDoesNotMatch", wsdlDefinition, wsdlInterface.getName());
"interface-wsdlxml-validation-messages",
"WSDLDefinitionUnresolved");
message = message.replace("{0}", wsdlInterface.getName().toString());
代码示例来源:origin: org.apache.tuscany.sca/tuscany-base-runtime
wsdlInterface.setUnresolved(true);
wsdlInterface.setRemotable(true);
javaInterface.getPolicySets().addAll(wsdlInterface.getPolicySets());
javaInterface.getRequiredIntents().addAll(wsdlInterface.getRequiredIntents());
代码示例来源:origin: org.apache.tuscany.sca/tuscany-base-runtime
public static WSDLInterface resolveWSDLInterface( WSDLInterface wsdlInterface, ModelResolver resolver,
Monitor monitor, WSDLFactory wsdlFactory) {
if (wsdlInterface != null && wsdlInterface.isUnresolved()) {
if (wsdlInterface.isUnresolved()) {
wsdlDefinition.setNamespace(wsdlInterface.getName().getNamespaceURI());
WSDLDefinition resolved = resolver.resolveModel(WSDLDefinition.class, wsdlDefinition, context);
if (!resolved.isUnresolved()) {
wsdlDefinition.getXmlSchemas().addAll(resolved.getXmlSchemas());
wsdlDefinition.setUnresolved(false);
WSDLObject<PortType> portType = wsdlDefinition.getWSDLObject(PortType.class, wsdlInterface.getName());
if (portType != null) {
wsdlDefinition.setDefinition(portType.getDefinition());
wsdlInterface = wsdlFactory.createWSDLInterface(portType.getElement(), wsdlDefinition, resolver, monitor);
wsdlInterface.setWsdlDefinition(wsdlDefinition);
resolver.addModel(wsdlInterface, context);
} catch (InvalidInterfaceException e) {
Monitor.warning(monitor, WSDLInterfaceProcessor.class.getName(),
"interface-wsdlxml-validation-messages", "WsdlInterfaceDoesNotMatch",
wsdlDefinition.getNamespace(), wsdlInterface.getName().toString() );
"interface-wsdlxml-validation-messages",
"WSDLDefinitionUnresolved");
message = message.replace("{0}", wsdlInterface.getName().toString());
ContributionResolveException ce = new ContributionResolveException(message);
Monitor.error(monitor, WSDLInterfaceProcessor.class.getName(),
内容来源于网络,如有侵权,请联系作者删除!