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


Java W3CEndpointReferenceBuilder.build方法代码示例

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


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

示例1: testParsedInterfaceName

import javax.xml.ws.wsaddressing.W3CEndpointReferenceBuilder; //导入方法依赖的package包/类
@Test
public void testParsedInterfaceName() throws Exception
{
   W3CEndpointReferenceBuilder builder = new W3CEndpointReferenceBuilder(); 
   builder = builder.address(URL);
   Element element = DOMUtils.parse(XML_INTERFACE_NAME);
   builder = builder.metadata(element);
   builder = builder.serviceName(SERVICE_QNAME);
   builder = builder.endpointName(PORT_QNAME);
   builder = builder.wsdlDocumentLocation(WSDL_URL);
   element = DOMUtils.parse(XML_REF_PARAM1);
   builder = builder.referenceParameter(element);
   element = DOMUtils.parse(XML_REF_PARAM2);
   builder = builder.referenceParameter(element);
   W3CEndpointReference epr = builder.build();
   DOMResult dr = new DOMResult(); 
   epr.writeTo(dr);
   Node endpointReferenceElement = dr.getNode();
   Logger.getLogger(this.getClass()).info(DOMUtils.node2String(endpointReferenceElement));
   assertMetaData(endpointReferenceElement);
   assertRefParam(endpointReferenceElement, PARAM1_QNAME, "Hello");
   assertRefParam(endpointReferenceElement, PARAM2_QNAME, "World");
}
 
开发者ID:jbossws,项目名称:jbossws-cxf,代码行数:24,代码来源:EndpointReferenceBuilderTestCase.java

示例2: testConstructedInterfaceName

import javax.xml.ws.wsaddressing.W3CEndpointReferenceBuilder; //导入方法依赖的package包/类
@Test
public void testConstructedInterfaceName() throws Exception
{
   W3CEndpointReferenceBuilder builder = new W3CEndpointReferenceBuilder(); 
   builder = builder.address(URL);
   builder = builder.serviceName(SERVICE_QNAME);
   builder = builder.endpointName(PORT_QNAME);
   builder = builder.interfaceName(PORT_TYPE_QNAME);
   builder = builder.wsdlDocumentLocation(WSDL_URL);
   Element element = DOMUtils.parse(XML_REF_PARAM1);
   builder = builder.referenceParameter(element);
   element = DOMUtils.parse(XML_REF_PARAM2);
   builder = builder.referenceParameter(element);
   W3CEndpointReference epr = builder.build();
   DOMResult dr = new DOMResult(); 
   epr.writeTo(dr);
   Node endpointReferenceElement = dr.getNode();
   Logger.getLogger(this.getClass()).info(DOMUtils.node2String(endpointReferenceElement));
   assertMetaData(endpointReferenceElement);
   assertRefParam(endpointReferenceElement, PARAM1_QNAME, "Hello");
   assertRefParam(endpointReferenceElement, PARAM2_QNAME, "World");
}
 
开发者ID:jbossws,项目名称:jbossws-cxf,代码行数:23,代码来源:EndpointReferenceBuilderTestCase.java

示例3: AbstractResultSetAwareWebServiceFacade

import javax.xml.ws.wsaddressing.W3CEndpointReferenceBuilder; //导入方法依赖的package包/类
/**
 * Instantiates underlying service.
 * @param clazz webservice class
 * @param serviceLocation webservice location
 * @param serviceReadTimeout service read timeout
 * @param serviceConnectionTimeout service connection timeout
 * @param resultSetReadTimeout resultset read timeout
 * @param resultSetConnectionTimeout resultset connection timeout
 * @param resultSetPageSize resultset page size
 */
protected AbstractResultSetAwareWebServiceFacade(Class<T> clazz, String serviceLocation,
        long serviceReadTimeout, long serviceConnectionTimeout, 
        long resultSetReadTimeout, long resultSetConnectionTimeout, int resultSetPageSize) {
    W3CEndpointReferenceBuilder eprBuilder = new W3CEndpointReferenceBuilder();
    eprBuilder.address(serviceLocation);
    eprBuilder.build();
    this.service = new JaxwsServiceResolverImpl().getService(clazz, eprBuilder.build());
    if (this.service instanceof BindingProvider) {
        log.info(String.format("setting timeouts for %s: read timeout (%s) and connect timeout (%s)", 
                BindingProvider.class, serviceReadTimeout, serviceConnectionTimeout));
        final Map<String, Object> requestContext = ((BindingProvider) service).getRequestContext();

        // can't be sure about which will be used. Set them all.
        requestContext.put("com.sun.xml.internal.ws.request.timeout", serviceReadTimeout);
        requestContext.put("com.sun.xml.internal.ws.connect.timeout", serviceConnectionTimeout);

        requestContext.put("com.sun.xml.ws.request.timeout", serviceReadTimeout);
        requestContext.put("com.sun.xml.ws.connect.timeout", serviceConnectionTimeout);

        requestContext.put("javax.xml.ws.client.receiveTimeout", serviceReadTimeout);
        requestContext.put("javax.xml.ws.client.connectionTimeout", serviceConnectionTimeout);
    }
    
    this.resultSetReadTimeout = resultSetReadTimeout;
    this.resultSetConnectionTimeout = resultSetConnectionTimeout;
    this.resultSetPageSize = resultSetPageSize;
}
 
开发者ID:openaire,项目名称:iis,代码行数:38,代码来源:AbstractResultSetAwareWebServiceFacade.java

示例4: setUp

import javax.xml.ws.wsaddressing.W3CEndpointReferenceBuilder; //导入方法依赖的package包/类
@Override
public void setUp() throws Exception {
    super.setUp();
    
    W3CEndpointReferenceBuilder w3cBuilder = new W3CEndpointReferenceBuilder();
    w3cBuilder = w3cBuilder.address("http://somewhere.com/somehow");
    w3cBuilder = w3cBuilder.serviceName(new QName("http://test", "TestService"));
    w3cBuilder = w3cBuilder.endpointName(new QName("http://test", "TestPort"));
    w3cEPR = w3cBuilder.build();
    
    SubmissionEndpointReferenceBuilder subBuilder = new SubmissionEndpointReferenceBuilder();
    subBuilder = subBuilder.address("http://somewhere.com/somehow");
    subBuilder = subBuilder.serviceName(new QName("http://test", "TestService"));
    subBuilder = subBuilder.endpointName(new QName("http://test", "TestPort"));
    subEPR = subBuilder.build();
}
 
开发者ID:wso2,项目名称:wso2-axis2,代码行数:17,代码来源:MessageTests.java

示例5: setUp

import javax.xml.ws.wsaddressing.W3CEndpointReferenceBuilder; //导入方法依赖的package包/类
@Override
public void setUp() throws Exception {
    super.setUp();
   
    W3CEndpointReferenceBuilder w3cBuilder = new W3CEndpointReferenceBuilder();
    w3cBuilder = w3cBuilder.address("http://somewhere.com/somehow");
    w3cBuilder = w3cBuilder.serviceName(new QName("http://test", "ProxyAddressingService"));
    w3cBuilder = w3cBuilder.endpointName(new QName("http://test", "TestPort"));
    w3cEPR = w3cBuilder.build();
    
    SubmissionEndpointReferenceBuilder subBuilder = new SubmissionEndpointReferenceBuilder();
    subBuilder = subBuilder.address("http://somewhere.com/somehow");
    subBuilder = subBuilder.serviceName(new QName("http://test", "ProxyAddressingService"));
    subBuilder = subBuilder.endpointName(new QName("http://test", "TestPort"));
    subEPR = subBuilder.build();
}
 
开发者ID:wso2,项目名称:wso2-axis2,代码行数:17,代码来源:ProxyAddressingFeatureTest.java

示例6: setUp

import javax.xml.ws.wsaddressing.W3CEndpointReferenceBuilder; //导入方法依赖的package包/类
@Override
public void setUp() throws Exception {
    super.setUp();
   
    W3CEndpointReferenceBuilder w3cBuilder = new W3CEndpointReferenceBuilder();
    w3cBuilder = w3cBuilder.address("http://somewhere.com/somehow");
    w3cBuilder = w3cBuilder.serviceName(new QName("http://test", "ProxySessionService"));
    w3cBuilder = w3cBuilder.endpointName(new QName("http://test", "TestPort"));
    w3cEPR = w3cBuilder.build();
    
    SubmissionEndpointReferenceBuilder subBuilder = new SubmissionEndpointReferenceBuilder();
    subBuilder = subBuilder.address("http://somewhere.com/somehow");
    subBuilder = subBuilder.serviceName(new QName("http://test", "ProxySessionService"));
    subBuilder = subBuilder.endpointName(new QName("http://test", "TestPort"));
    subEPR = subBuilder.build();
}
 
开发者ID:wso2,项目名称:wso2-axis2,代码行数:17,代码来源:ProxySharedSessionTest.java

示例7: setUp

import javax.xml.ws.wsaddressing.W3CEndpointReferenceBuilder; //导入方法依赖的package包/类
@Override
public void setUp() throws Exception {
    super.setUp();
    
    W3CEndpointReferenceBuilder builder = new W3CEndpointReferenceBuilder();
    builder = builder.address("http://somewhere.com/somehow");
    builder = builder.serviceName(new QName("http://test", "ProxyAddressingService"));
    builder = builder.endpointName(new QName("http://test", "TestPort"));
    w3cEPR = builder.build();
    
    SubmissionEndpointReferenceBuilder subBuilder = new SubmissionEndpointReferenceBuilder();
    subBuilder = subBuilder.address("http://somewhere.com/somehow");
    subBuilder = subBuilder.serviceName(new QName("http://test", "ProxyAddressingService"));
    subBuilder = subBuilder.endpointName(new QName("http://test", "TestPort"));
    subEPR = subBuilder.build();
}
 
开发者ID:wso2,项目名称:wso2-axis2,代码行数:17,代码来源:ProxySubmissionAddressingFeatureTest.java

示例8: setUp

import javax.xml.ws.wsaddressing.W3CEndpointReferenceBuilder; //导入方法依赖的package包/类
@Override
public void setUp() throws Exception {
    super.setUp();
    
    W3CEndpointReferenceBuilder w3cBuilder = new W3CEndpointReferenceBuilder();
    w3cBuilder = w3cBuilder.address("http://somewhere.com/somehow");
    w3cBuilder = w3cBuilder.serviceName(new QName("http://test", "TestService"));
    w3cBuilder = w3cBuilder.endpointName(new QName("http://test", "TestPort"));
    w3cEPR = w3cBuilder.build();
    
    SubmissionEndpointReferenceBuilder subBuilder = new SubmissionEndpointReferenceBuilder();
    subBuilder = subBuilder.address("http://somewhere.com/somehow");
    subBuilder = subBuilder.serviceName(new QName("http://test", "TestService"));
    subBuilder = subBuilder.endpointName(new QName("http://test", "TestPort"));
    subBuilder.build();
}
 
开发者ID:wso2,项目名称:wso2-axis2,代码行数:17,代码来源:DispatchSharedSessionTest.java

示例9: getEndpointReference

import javax.xml.ws.wsaddressing.W3CEndpointReferenceBuilder; //导入方法依赖的package包/类
public EndpointReference getEndpointReference(Element... referenceParameters) {
    org.apache.cxf.message.Message msg = getWrappedMessage();
    Endpoint ep = msg.getExchange().get(Endpoint.class);

    W3CEndpointReferenceBuilder builder = new W3CEndpointReferenceBuilder();
    builder.address(ep.getEndpointInfo().getAddress());
    builder.serviceName(ep.getService().getName());
    builder.endpointName(ep.getEndpointInfo().getName());

    if (referenceParameters != null) {
        for (Element referenceParameter : referenceParameters) {
            builder.referenceParameter(referenceParameter);
        }
    }

    return builder.build();
}
 
开发者ID:apache,项目名称:tomee,代码行数:18,代码来源:EjbMessageContext.java

示例10: testEmptyMetadataDropped

import javax.xml.ws.wsaddressing.W3CEndpointReferenceBuilder; //导入方法依赖的package包/类
@Test
@RunAsClient
public void testEmptyMetadataDropped() 
{
   W3CEndpointReferenceBuilder builder = new W3CEndpointReferenceBuilder();
   builder.address("http://bar");
   W3CEndpointReference epr = builder.build();
   StringWriter writer = new StringWriter();
   epr.writeTo(new StreamResult(writer));
   String eprString = writer.toString();
   assertTrue(eprString.contains("EndpointReference"));
   assertTrue(eprString.contains("Address"));
   assertFalse(eprString.contains("Metadata"));
}
 
开发者ID:jbossws,项目名称:jbossws-cxf,代码行数:15,代码来源:JBWS2942TestCase.java

示例11: main

import javax.xml.ws.wsaddressing.W3CEndpointReferenceBuilder; //导入方法依赖的package包/类
public static void main(String[] args) {
    String objectStoreServiceLocation = "http://beta.services.openaire.eu:8280/is/services/objectStore";
    W3CEndpointReferenceBuilder eprBuilder = new W3CEndpointReferenceBuilder();
    eprBuilder.address(objectStoreServiceLocation);
    eprBuilder.build();
    ObjectStoreService objectStore = new JaxwsServiceResolverImpl().getService(ObjectStoreService.class,
            eprBuilder.build());
    System.out.println(StringUtils.join(objectStore.getListOfObjectStores(), ','));
}
 
开发者ID:openaire,项目名称:iis,代码行数:10,代码来源:ObjectStoresProvider.java

示例12: getEndpointReferenceAsW3C

import javax.xml.ws.wsaddressing.W3CEndpointReferenceBuilder; //导入方法依赖的package包/类
/**
 * @return the endpoint reference of the Web Service in the form of a {@link javax.xml.ws.wsaddressing.W3CEndpointReference} object.
 */
public W3CEndpointReference getEndpointReferenceAsW3C() {
    W3CEndpointReferenceBuilder builder = new W3CEndpointReferenceBuilder();
    builder.address(endpointReference);
    return builder.build();
}
 
开发者ID:tOgg1,项目名称:WS-Nu,代码行数:9,代码来源:WebService.java

示例13: createEndpointReference

import javax.xml.ws.wsaddressing.W3CEndpointReferenceBuilder; //导入方法依赖的package包/类
/**
 * Create a new endpoint reference for the given address, using the
 * specified reference parameters.
 * 
 * @param sAddress
 *            The address to use. May not be <code>null</code>.
 * @param aReferenceParameters
 *            The non-<code>null</code> list of reference parameters. May
 *            not be <code>null</code>.
 * @return The non-<code>null</code> endpoint reference for the given
 *         address
 */
public static W3CEndpointReference createEndpointReference(
		final String sAddress, final List<Element> aReferenceParameters) {
	W3CEndpointReferenceBuilder aBuilder = new W3CEndpointReferenceBuilder()
			.address(sAddress);
	for (final Element aReferenceParameter : aReferenceParameters) {
		aBuilder = aBuilder.referenceParameter(aReferenceParameter);
	}
	return aBuilder.build();
}
 
开发者ID:whummer,项目名称:service-prefetching,代码行数:22,代码来源:W3CEndpointReferenceUtils.java


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