本文整理汇总了Java中org.apache.cxf.jaxws.endpoint.dynamic.JaxWsDynamicClientFactory类的典型用法代码示例。如果您正苦于以下问题:Java JaxWsDynamicClientFactory类的具体用法?Java JaxWsDynamicClientFactory怎么用?Java JaxWsDynamicClientFactory使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
JaxWsDynamicClientFactory类属于org.apache.cxf.jaxws.endpoint.dynamic包,在下文中一共展示了JaxWsDynamicClientFactory类的6个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的Java代码示例。
示例1: testCxfForSun
import org.apache.cxf.jaxws.endpoint.dynamic.JaxWsDynamicClientFactory; //导入依赖的package包/类
/**
* 这是孙希望使用纯动态调用时,前来咨询修改URL的API时做的测试。
* 忽略
* @throws Exception
*/
@Test
@Ignore
public void testCxfForSun() throws Exception{
JaxWsDynamicClientFactory dcf = JaxWsDynamicClientFactory.newInstance();
org.apache.cxf.endpoint.Client client = dcf.createClient("http://pc-sunyingjie/cxf/services/cxfTestService?wsdl");
//////////////// KEY!!!!!!!!!!!!!!!!! ////////////////
client.getConduit().getTarget().getAddress().setValue("http://pc-sunyingjie/cxf/services/cxfTestService");
//////////////KEY!!!!!!!!!!!!!!!!! ////////////////
QName name=new QName("http://foo/","hello");
List<String> emails=new ArrayList<String>();
emails.add("[email protected]");
emails.add("[email protected]");
Object[] objects=client.invoke(name,new Object[]{"sun",15,emails,15l});
System.out.println(objects[0].toString());
}
开发者ID:GeeQuery,项目名称:cxf-plus,代码行数:23,代码来源:DynamicCall.java
示例2: CxfWebServiceClient
import org.apache.cxf.jaxws.endpoint.dynamic.JaxWsDynamicClientFactory; //导入依赖的package包/类
public CxfWebServiceClient(String wsdl) {
JaxWsDynamicClientFactory dcf = JaxWsDynamicClientFactory.newInstance();
Enumeration<URL> xjcBindingUrls;
try {
xjcBindingUrls = Thread.currentThread().getContextClassLoader()
.getResources(CxfWSDLImporter.JAXB_BINDINGS_RESOURCE);
if (xjcBindingUrls.hasMoreElements()) {
final URL xjcBindingUrl = xjcBindingUrls.nextElement();
if (xjcBindingUrls.hasMoreElements()) {
throw new FlowableException("Several JAXB binding definitions found for flowable-cxf: "
+ CxfWSDLImporter.JAXB_BINDINGS_RESOURCE);
}
this.client = dcf.createClient(wsdl, Arrays.asList(new String[] { xjcBindingUrl.toString() }));
this.client.getRequestContext().put("org.apache.cxf.stax.force-start-document", Boolean.TRUE);
} else {
throw new FlowableException("The JAXB binding definitions are not found for flowable-cxf: "
+ CxfWSDLImporter.JAXB_BINDINGS_RESOURCE);
}
} catch (IOException e) {
throw new FlowableException("An error occurs creating a web-service client for WSDL '" + wsdl + "'.", e);
}
}
开发者ID:flowable,项目名称:flowable-engine,代码行数:23,代码来源:CxfWebServiceClient.java
示例3: testWsdlGeneration
import org.apache.cxf.jaxws.endpoint.dynamic.JaxWsDynamicClientFactory; //导入依赖的package包/类
/**
* Tests WSDL generation from a URL.
*
* This is similar to another KEW test but it is good to have it as part of the KSB tests. Note that the
* {@link Client} modifies the current thread's class loader.
*
* @throws Exception for any errors connecting to the client
*/
@Test
public void testWsdlGeneration() throws Exception {
ClassLoader originalClassLoader = Thread.currentThread().getContextClassLoader();
try {
JaxWsDynamicClientFactory dcf = JaxWsDynamicClientFactory.newInstance();
Client client = dcf.createClient(new URI(getWsdlUrl()).toString());
client.getInInterceptors().add(new LoggingInInterceptor());
client.getOutInterceptors().add(new LoggingOutInterceptor());
Object[] results = client.invoke("echo", "testing");
assertNotNull(results);
assertEquals(1, results.length);
assertEquals("testing", results[0]);
} finally {
Thread.currentThread().setContextClassLoader(originalClassLoader);
}
}
开发者ID:kuali,项目名称:kc-rice,代码行数:26,代码来源:SOAPServiceTest.java
示例4: CxfWebServiceClient
import org.apache.cxf.jaxws.endpoint.dynamic.JaxWsDynamicClientFactory; //导入依赖的package包/类
public CxfWebServiceClient(String wsdl) {
JaxWsDynamicClientFactory dcf = JaxWsDynamicClientFactory.newInstance();
this.client = dcf.createClient(wsdl);
}
开发者ID:logicalhacking,项目名称:SecureBPMN,代码行数:5,代码来源:CxfWebServiceClient.java
示例5: SoapClient
import org.apache.cxf.jaxws.endpoint.dynamic.JaxWsDynamicClientFactory; //导入依赖的package包/类
public SoapClient(URL wsdlUrl) {
super(wsdlUrl);
JaxWsDynamicClientFactory dcf = JaxWsDynamicClientFactory.newInstance();
client = dcf.createClient(this.httpUrl);
}
开发者ID:yiyongfei,项目名称:jea,代码行数:7,代码来源:SoapClient.java
示例6: getJaxWsDynamicClientFactory
import org.apache.cxf.jaxws.endpoint.dynamic.JaxWsDynamicClientFactory; //导入依赖的package包/类
/**
* 获取JaxWs动态客服端工厂
*
* @return {@link JaxWsDynamicClientFactory}
*/
public static JaxWsDynamicClientFactory getJaxWsDynamicClientFactory() {
return jaxWsDynamicClientFactory;
}
开发者ID:extion,项目名称:base-framework,代码行数:9,代码来源:JaxWsFactoryUtils.java
注:本文中的org.apache.cxf.jaxws.endpoint.dynamic.JaxWsDynamicClientFactory类示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论