当前位置: 首页>>代码示例>>Java>>正文


Java Port.getBinding方法代码示例

本文整理汇总了Java中javax.wsdl.Port.getBinding方法的典型用法代码示例。如果您正苦于以下问题:Java Port.getBinding方法的具体用法?Java Port.getBinding怎么用?Java Port.getBinding使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在javax.wsdl.Port的用法示例。


在下文中一共展示了Port.getBinding方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: _toDumpData

import javax.wsdl.Port; //导入方法依赖的package包/类
private DumpData _toDumpData(PageContext pageContext, int maxlevel, DumpProperties dp) throws RPCException {
            
	DumpTable functions = new DumpTable("webservice","#99cc99","#ccffcc","#000000");
	functions.setTitle("Web Service (JAX WS)");
    if(dp.getMetainfo())functions.setComment(wsdlUrl);
    
    Port port = WSUtil.getSoapPort(service);
    Binding binding = port.getBinding();
    List<BindingOperation> operations = binding.getBindingOperations();
    
    Iterator<BindingOperation> it = operations.iterator();
    BindingOperation bo;
    while(it.hasNext()){
    	bo=it.next();
    	functions.appendRow(1, new SimpleDumpData(bo.getName()), toDumpData(bo));
    }
    
    return functions;
}
 
开发者ID:lucee,项目名称:Lucee4,代码行数:20,代码来源:JaxWSClient.java

示例2: getOperationStyle

import javax.wsdl.Port; //导入方法依赖的package包/类
@Override
public String getOperationStyle(String portName, String operationName) throws UnknownOperationException {
    if (portName == null) {
        portName = findPort(operationName);
    }

    BindingOperation bindingOperation = getBindingOperation(portName, operationName);
    
    String style = getStyle(bindingOperation);
    if (style == null) {
        Port port = getPort(portName);
        Binding binding = port.getBinding();
        style = getStyle(binding);
    }
    
    return style;
}
 
开发者ID:apache,项目名称:incubator-taverna-common-activities,代码行数:18,代码来源:WSDL11Parser.java

示例3: getBindingOperations

import javax.wsdl.Port; //导入方法依赖的package包/类
private List<BindingOperation> getBindingOperations(String portName) {
    
    Port port = getPort(portName);
    if (port != null) {
        Binding binding = port.getBinding();
        if (binding != null) {
            List<ExtensibilityElement> bindingExElements = binding.getExtensibilityElements();
            for (ExtensibilityElement bindingExElement : bindingExElements) {
                if (bindingExElement instanceof SOAPBinding ||
                    bindingExElement instanceof SOAP12Binding) {
                    return binding.getBindingOperations();
                }
            }
        }
    }

    return Collections.EMPTY_LIST;
}
 
开发者ID:apache,项目名称:incubator-taverna-common-activities,代码行数:19,代码来源:WSDL11Parser.java

示例4: inferBinding

import javax.wsdl.Port; //导入方法依赖的package包/类
private void inferBinding() {
    Service serviceDef = wsdl.getService(serviceName);
    if (serviceDef == null) {
        throw new NullPointerException(Messages.msgServiceDefinitionNotFound(
                serviceName.getLocalPart()));
    }
    Port port = serviceDef.getPort(portName);

    if (port == null) {
        throw new NullPointerException(Messages.msgServicePortNotFound(
                serviceName.getLocalPart(), portName));
    }

    httpBinding = port.getBinding();
    if (httpBinding == null) {
        throw new NullPointerException(Messages.msgBindingNotFound(
                serviceName.getLocalPart(), portName));
    }
}
 
开发者ID:wso2,项目名称:carbon-business-process,代码行数:20,代码来源:HTTPBindingHandler.java

示例5: inferBindingInformation

import javax.wsdl.Port; //导入方法依赖的package包/类
private void inferBindingInformation() {
    Service serviceDef = wsdlDefinition.getService(serviceName);
    if (serviceDef == null) {
        throw new NullPointerException(Messages.msgServiceDefinitionNotFound(
                serviceName.getLocalPart()));
    }
    Port port = serviceDef.getPort(portName);
    if (port == null) {
        throw new NullPointerException(Messages.msgServicePortNotFound(
                serviceName.getLocalPart(), portName));
    }

    binding = port.getBinding();
    if (binding == null) {
        throw new NullPointerException(Messages.msgBindingNotFound(
                serviceName.getLocalPart(), portName));
    }

}
 
开发者ID:wso2,项目名称:carbon-business-process,代码行数:20,代码来源:PartnerService.java

示例6: getBinding

import javax.wsdl.Port; //导入方法依赖的package包/类
public Binding getBinding() throws FaultException {
    Service serviceDef = hiWSDL.getService(serviceName);
    if (serviceDef == null) {
        throw new FaultException(BPEL4PeopleConstants.B4P_FAULT,
                "Service definition is not available for service " + serviceName);
    }
    Port port = serviceDef.getPort(getServicePort());
    if (port == null) {
        throw new FaultException(BPEL4PeopleConstants.B4P_FAULT,
                "Service port is not available for service " + serviceName + " and port " +
                        getServicePort());
    }

    Binding binding = port.getBinding();

    if (binding == null) {
        throw new FaultException(BPEL4PeopleConstants.B4P_FAULT,
                "Service binding is not available for service " + serviceName + " and port " +
                        getServicePort());
    }

    return binding;
}
 
开发者ID:wso2,项目名称:carbon-business-process,代码行数:24,代码来源:PeopleActivity.java

示例7: getFirstPortBinding

import javax.wsdl.Port; //导入方法依赖的package包/类
public Binding getFirstPortBinding(QName serviceQname) {
    Service service = getService(serviceQname);
    if (service == null) {
        return null;
    }
    Map map = getService(serviceQname).getPorts();
    if (map == null || map.isEmpty()) {
        return null;
    }
    for (Object listObject : map.values()) {
        Port wsdlPort = (Port)listObject;
        return wsdlPort.getBinding();

    }
    return null;

}
 
开发者ID:wso2,项目名称:wso2-axis2,代码行数:18,代码来源:WSDL4JWrapper.java

示例8: getPortBinding

import javax.wsdl.Port; //导入方法依赖的package包/类
public ArrayList getPortBinding(QName serviceQname) {
    Map map = this.getService(serviceQname).getPorts();
    if (map == null || map.isEmpty()) {
        return null;
    }
    ArrayList<Binding> portBindings = new ArrayList<Binding>();
    for (Object listObject : map.values()) {
        Port wsdlPort = (Port)listObject;
        Binding binding = wsdlPort.getBinding();
        if (binding != null) {
            portBindings.add(binding);
        }

    }
    return portBindings;

}
 
开发者ID:wso2,项目名称:wso2-axis2,代码行数:18,代码来源:WSDL4JWrapper.java

示例9: getSOAPAction

import javax.wsdl.Port; //导入方法依赖的package包/类
public String getSOAPAction(QName serviceQname, QName portQname) {
    Port port = getPort(serviceQname, portQname);
    if (port == null) {
        return null;
    }
    Binding binding = port.getBinding();
    if (binding == null) {
        return null;
    }
    List operations = binding.getBindingOperations();
    for (Object opObj : operations) {
        BindingOperation operation = (BindingOperation)opObj;
        List exElements = operation.getExtensibilityElements();
        for (Object elObj : exElements) {
            ExtensibilityElement exElement = (ExtensibilityElement)elObj;
            if (isSoapOperation(exElement)) {
                SOAPOperation soapOperation = (SOAPOperation)exElement;
                return soapOperation.getSoapActionURI();
            }
        }
    }
    return null;
}
 
开发者ID:wso2,项目名称:wso2-axis2,代码行数:24,代码来源:WSDL4JWrapper.java

示例10: getFaultAction

import javax.wsdl.Port; //导入方法依赖的package包/类
/**
 * Get the fault action value for a given operation.
 *
 * @param fault The WSDL Fault.
 * @param port The WSDL service port.
 * @param operationName The SOAP Operation element QName.
 * @return the fault action value.
 */
public static String getFaultAction(final Fault fault, final Port port, final QName operationName) {
    String action = null;
    String targetNamespace = operationName.getNamespaceURI();
    Object value = fault.getExtensionAttribute(WSDL_ACTION_QNAME);
    if (value != null) {
        action = ((QName)value).getLocalPart();
    }

    if (action == null) {
        // http://www.w3.org/TR/2006/WD-ws-addr-wsdl-20060216/#defactionwsdl11
        // [target namespace][delimiter][port type name][delimiter][operation name][delimiter]Fault[delimiter][fault name]
        String delimiter = targetNamespace.startsWith(SCHEME_URN) ? STR_COLON : STR_SLASH;
        String namespace = targetNamespace.endsWith(delimiter) ? targetNamespace.substring(0, targetNamespace.length()-2) : targetNamespace;
        action = namespace + delimiter + port.getBinding().getPortType().getQName().getLocalPart() + delimiter
                        + operationName.getLocalPart() + delimiter + STR_FAULT + delimiter + fault.getName();
        System.out.println("5." + action);
        StringBuffer test = new StringBuffer(namespace);
        test.append(delimiter);
        if ((port.getBinding() != null)
            && (port.getBinding().getPortType() != null)
            && (port.getBinding().getPortType().getQName() != null)
            && (port.getBinding().getPortType().getQName().getLocalPart() != null)) {
            test.append(port.getBinding().getPortType().getQName().getLocalPart());
        }
        test.append(delimiter);
        test.append(operationName.getLocalPart());
        test.append(delimiter);
        test.append(STR_FAULT);
        test.append(delimiter);
        if (fault != null) {
            test.append(fault.getName());
        }
        action = test.toString();
        System.out.println("5a." + action);
    }

    return action;
}
 
开发者ID:jboss-switchyard,项目名称:switchyard,代码行数:47,代码来源:WSDLUtil.java

示例11: isOperationInBinding

import javax.wsdl.Port; //导入方法依赖的package包/类
public static boolean isOperationInBinding(Definition definition, String portTypeName, String operationName)
        throws CoreException {
    Collection<?> services = definition.getServices().values();
    for (Object s : services) {
        Service service = (Service) s;
        Collection<?> ports = service.getPorts().values();
        for (Object p : ports) {
            Port port = (Port) p;
            Binding binding = port.getBinding();
            if (binding == null) {
                continue;
            }
            PortType portType = binding.getPortType();
            if (portType == null || !portTypeName.equals(portType.getQName().getLocalPart())) {
                continue;
            }
            List<?> bindingOperations = binding.getBindingOperations();
            for (Object o : bindingOperations) {
                BindingOperation bo = (BindingOperation) o;
                if (operationName.equals(bo.getName())) {
                    return true;
                }
            }
        }
    }
    return false;
}
 
开发者ID:Talend,项目名称:tesb-studio-se,代码行数:28,代码来源:WSDLUtils.java

示例12: getWSDLBinding

import javax.wsdl.Port; //导入方法依赖的package包/类
public Binding getWSDLBinding() {
    Binding wsdlBinding = null;
    Port wsdlPort = getWSDLPort();
    Definition wsdlDef = getWSDLDefinition();
    if (wsdlPort != null && wsdlDef != null) {
        wsdlBinding = wsdlPort.getBinding();
    }
    return wsdlBinding;
}
 
开发者ID:wso2,项目名称:wso2-axis2,代码行数:10,代码来源:EndpointDescriptionImpl.java

示例13: getOperationName

import javax.wsdl.Port; //导入方法依赖的package包/类
public String getOperationName(QName serviceQname, QName portQname) {
    Port port = getPort(serviceQname, portQname);
    Binding binding = port.getBinding();
    if (binding == null) {
        return null;
    }

    List operations = binding.getBindingOperations();
    for (Object opObj : operations) {
        BindingOperation operation = (BindingOperation)opObj;
        return operation.getName();
    }
    return null;
}
 
开发者ID:wso2,项目名称:wso2-axis2,代码行数:15,代码来源:WSDL4JWrapper.java

示例14: populateComponent

import javax.wsdl.Port; //导入方法依赖的package包/类
private ServiceInfo populateComponent(ServiceInfo component, Service service) {
	System.out.println("***************************");
	System.out.println("");
	System.out.println("***开始构建系统的Web服务对象:ServiceInfo***");
	QName qName = service.getQName();
	String namespace = qName.getNamespaceURI();
	System.out.println("namespace为:"+namespace);
	String name = qName.getLocalPart();
	System.out.println("name为:"+name);
	component.setName(name);
	Map ports=service.getPorts();
	Iterator portIter = ports.values().iterator();
	while (portIter.hasNext()) {
		Port port = (Port) portIter.next();
		Binding binding = port.getBinding();
		List operations=buildOperations(binding);
		Iterator operIter = operations.iterator();
		while (operIter.hasNext()) {
			OperationInfo operation = (OperationInfo) operIter.next();
			Vector addrElems = findExtensibilityElement(port
					.getExtensibilityElements(), "address");
			ExtensibilityElement element = (ExtensibilityElement) addrElems
					.elementAt(0);
			if (element != null && element instanceof SOAPAddress) {
				SOAPAddress soapAddr = (SOAPAddress) element;
				operation.setTargetURL(soapAddr.getLocationURI());
			}
			component.addOperation(operation);
		}
	}
	return component;
}
 
开发者ID:winture,项目名称:wt-studio,代码行数:33,代码来源:ComponentBuilder.java

示例15: convertPort

import javax.wsdl.Port; //导入方法依赖的package包/类
private void convertPort( Port port )
	throws IOException
{
	String comment = "";
	String name = port.getName();
	String protocol = "soap";
	String location = "socket://localhost:80/";
	if ( port.getDocumentationElement() != null ) {
		comment = port.getDocumentationElement().getNodeValue();
	}
	List< ExtensibilityElement > extElements = port.getExtensibilityElements();
	for( ExtensibilityElement element : extElements ) {
		if ( element instanceof SOAPAddress ) {
			location = ((SOAPAddress)element).getLocationURI().toString();
			StringBuilder builder = new StringBuilder();
			builder.append( "soap {\n" )
				.append( "\t.wsdl = \"" )
				.append( definition.getDocumentBaseURI() )
				.append( "\";\n" )
				.append( "\t.wsdl.port = \"" )
				.append( port.getName() )
				.append( "\"\n}");
			protocol = builder.toString();

		} else if ( element instanceof HTTPAddress ) {
			location = ((HTTPAddress)element).getLocationURI().toString();
			protocol = "http";
		}
	}
	try {
		URI uri = new URI( location );
		uri = new URI(
			"socket",
			uri.getUserInfo(),
			uri.getHost(),
			( uri.getPort() < 1 ) ? 80 : uri.getPort(),
			uri.getPath(),
			uri.getQuery(),
			uri.getFragment()
		);
		location = uri.toString();
	} catch( URISyntaxException e ) {
		e.printStackTrace();
	}
	Binding binding = port.getBinding();
	PortType portType = binding.getPortType();
	convertPortType( portType, binding );
	outputPorts.put( name, new OutputPort(
		name, location, protocol, portType.getQName().getLocalPart(), comment
	) );
}
 
开发者ID:jolie,项目名称:jolie,代码行数:52,代码来源:WSDLConverter.java


注:本文中的javax.wsdl.Port.getBinding方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。