• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    公众号

Java AddressingProperties类代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

本文整理汇总了Java中org.apache.cxf.ws.addressing.AddressingProperties的典型用法代码示例。如果您正苦于以下问题:Java AddressingProperties类的具体用法?Java AddressingProperties怎么用?Java AddressingProperties使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。



AddressingProperties类属于org.apache.cxf.ws.addressing包,在下文中一共展示了AddressingProperties类的11个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的Java代码示例。

示例1: testServletRequestAvailability

import org.apache.cxf.ws.addressing.AddressingProperties; //导入依赖的package包/类
@Test
@RunAsClient
public void testServletRequestAvailability() throws Exception
{
   Greeter greeter = initPort();

   AddressingProperties addrProperties = new AddressingProperties();

   EndpointReferenceType replyTo = new EndpointReferenceType();
   AttributedURIType replyToURI = new AttributedURIType();
   replyToURI.setValue(baseURL + "/target/replyTo");
   replyTo.setAddress(replyToURI);
   addrProperties.setReplyTo(replyTo);

   BindingProvider provider = (BindingProvider)greeter;
   Map<String, Object> requestContext = provider.getRequestContext();
   requestContext.put(JAXWSAConstants.CLIENT_ADDRESSING_PROPERTIES, addrProperties);

   greeter.sayHi("Foo");
   Thread.sleep(1500);
   String result = getTargetServletResult();
   assertTrue("Expected ReplyTo:", result.startsWith("ReplyTo:"));
   assertTrue("Expected <return>http</return>:", result.indexOf("<return>http</return>") > 0);
}
 
开发者ID:jbossws,项目名称:jbossws-cxf,代码行数:25,代码来源:JBWS3773TestCase.java


示例2: getEndpointAddress

import org.apache.cxf.ws.addressing.AddressingProperties; //导入依赖的package包/类
private String getEndpointAddress(Message message) {
    AddressingProperties addressProp = (AddressingProperties) message.get(ADDRESSING_PROPERTIES_INBOUND);
    if (addressProp == null) {
        return null;
    }

    EndpointReferenceType from = addressProp.getFrom();
    if (ContextUtils.isGenericAddress(from)) {
        return null;
    } else {
        return from.getAddress().getValue();
    }
}
 
开发者ID:RWTH-i5-IDSG,项目名称:steve-plugsurfing,代码行数:14,代码来源:FromAddressInterceptor.java


示例3: handleMessage

import org.apache.cxf.ws.addressing.AddressingProperties; //导入依赖的package包/类
@Override
public void handleMessage(Message message) throws Fault {
    AddressingProperties addressProp = (AddressingProperties) message.get(ADDRESSING_PROPERTIES_INBOUND);

    // Ws-Addressing is not used in the message. Early exit
    if (addressProp == null) {
        return;
    }

    if (addressProp.getMessageID() == null) {
        log.debug("The required MessageID element is missing! Adding one to the incoming message");
        addressProp.setMessageID(ContextUtils.getAttributedURI(ContextUtils.generateUUID()));
    }
}
 
开发者ID:RWTH-i5-IDSG,项目名称:steve-plugsurfing,代码行数:15,代码来源:MessageIdInterceptor.java


示例4: testOneWayFaultTo

import org.apache.cxf.ws.addressing.AddressingProperties; //导入依赖的package包/类
@Test
@RunAsClient
public void testOneWayFaultTo() throws Exception
{
   Greeter greeter = initPort();
   AddressingProperties addrProperties = new AddressingProperties();
   EndpointReferenceType faultTo = new EndpointReferenceType();
   AttributedURIType epr = new AttributedURIType();
   String serverHost = getServerHost();
   int serverPort = getServerPort();
   epr.setValue("http://" + serverHost + ":" + serverPort + "/jaxws-cxf-jbws3516/target/faultTo");
   faultTo.setAddress(epr);
   addrProperties.setFaultTo(faultTo);

   EndpointReferenceType replyTo = new EndpointReferenceType();
   AttributedURIType replyToURI = new AttributedURIType();
   replyToURI.setValue("http://" + serverHost + ":" + serverPort + "/jaxws-cxf-jbws3516/target/replyTo");
   replyTo.setAddress(replyToURI);
   addrProperties.setReplyTo(replyTo);
   
   BindingProvider provider = (BindingProvider)greeter;
   Map<String, Object> requestContext = provider.getRequestContext();
   requestContext.put(JAXWSAConstants.CLIENT_ADDRESSING_PROPERTIES, addrProperties);
   
   greeter.pingMe();
   Thread.sleep(1000);
   String result = getTargetServletResult();
   assertTrue("Expected FaultTo:", result.startsWith("FaultTo:"));
   assertTrue("Expected PingMeFault:", result.indexOf("Intended PingMe Fault") > 0);
}
 
开发者ID:jbossws,项目名称:jbossws-cxf,代码行数:31,代码来源:JBWS3516TestCase.java


示例5: testRequestResponseFaultTo

import org.apache.cxf.ws.addressing.AddressingProperties; //导入依赖的package包/类
@Test
@RunAsClient
public void testRequestResponseFaultTo() throws Exception
{
   Greeter greeter = initPort();

   AddressingProperties addrProperties = new AddressingProperties();

   EndpointReferenceType faultTo = new EndpointReferenceType();
   AttributedURIType epr = new AttributedURIType();
   String serverHost = getServerHost();
   int serverPort = getServerPort();
   epr.setValue("http://" + serverHost + ":" + serverPort + "/jaxws-cxf-jbws3516/target/faultTo");
   faultTo.setAddress(epr);
   addrProperties.setFaultTo(faultTo);

   EndpointReferenceType replyTo = new EndpointReferenceType();
   AttributedURIType replyToURI = new AttributedURIType();
   replyToURI.setValue("http://" + serverHost + ":" + serverPort + "/jaxws-cxf-jbws3516/target/replyTo");
   replyTo.setAddress(replyToURI);
   addrProperties.setReplyTo(replyTo);

   BindingProvider provider = (BindingProvider)greeter;
   Map<String, Object> requestContext = provider.getRequestContext();
   requestContext.put(JAXWSAConstants.CLIENT_ADDRESSING_PROPERTIES, addrProperties);

   greeter.sayHi("hello");
   Thread.sleep(1000);
   String result = getTargetServletResult();
   assertTrue("Expected Replyto:", result.startsWith("ReplyTo:"));
   assertTrue("Expected sayHiResponse:", result.indexOf("sayHiResponse") > 0);
   
   greeter.sayHi("fault");
   Thread.sleep(1000);
   result = getTargetServletResult();
   assertTrue("Expected FaultTo:", result.startsWith("FaultTo:"));
   assertTrue("Expected sayHiFault:", result.indexOf("Intended SayHi Fault") > 0);
}
 
开发者ID:jbossws,项目名称:jbossws-cxf,代码行数:39,代码来源:JBWS3516TestCase.java


示例6: installOutboundMapOnClientSide

import org.apache.cxf.ws.addressing.AddressingProperties; //导入依赖的package包/类
public void installOutboundMapOnClientSide(Map<String, Object> requestContext, MAP map)
{
   if (!(map instanceof CXFMAP))
   {
      throw MESSAGES.unsupportedMap(map);
   }
   AddressingProperties addressingProperties = ((CXFMAP)map).implementation;

   requestContext.put(CXFMAPConstants.CLIENT_ADDRESSING_PROPERTIES, addressingProperties);
   requestContext.put(CXFMAPConstants.CLIENT_ADDRESSING_PROPERTIES_OUTBOUND, addressingProperties);
}
 
开发者ID:jbossws,项目名称:jbossws-cxf,代码行数:12,代码来源:CXFMAP.java


示例7: installOutboundMapOnServerSide

import org.apache.cxf.ws.addressing.AddressingProperties; //导入依赖的package包/类
public void installOutboundMapOnServerSide(Map<String, Object> requestContext, MAP map)
{
   if (!(map instanceof CXFMAP))
   {
      throw MESSAGES.unsupportedMap(map);
   }
   AddressingProperties addressingProperties = ((CXFMAP)map).implementation;

   requestContext.put(CXFMAPConstants.SERVER_ADDRESSING_PROPERTIES_OUTBOUND, addressingProperties);
}
 
开发者ID:jbossws,项目名称:jbossws-cxf,代码行数:11,代码来源:CXFMAP.java


示例8: createAddressingPropertiesMap

import org.apache.cxf.ws.addressing.AddressingProperties; //导入依赖的package包/类
private static AddressingProperties createAddressingPropertiesMap() {
    AddressingProperties maps = new AddressingProperties();
    AttributedURIType address = WSA_OBJECT_FACTORY.createAttributedURIType();
    EndpointReferenceType ref = WSA_OBJECT_FACTORY.createEndpointReferenceType();
    address.setValue(VersionTransformer.Names200408.WSA_ANONYMOUS_ADDRESS);
    ref.setAddress(address);
    maps.setReplyTo(ref);
    maps.setFaultTo(ref);
    return maps;
}
 
开发者ID:OpenNMS,项目名称:wsman,代码行数:11,代码来源:CXFWSManClient.java


示例9: newMap

import org.apache.cxf.ws.addressing.AddressingProperties; //导入依赖的package包/类
public MAP newMap()
{
   AddressingProperties implementation = new AddressingProperties();
   return new CXFMAP(implementation);
}
 
开发者ID:jbossws,项目名称:jbossws-cxf,代码行数:6,代码来源:CXFMAPBuilder.java


示例10: inboundMap

import org.apache.cxf.ws.addressing.AddressingProperties; //导入依赖的package包/类
/**
 * retrieve the inbound server message address properties attached to a message context
 * @param ctx the server message context
 * @return
 */
public MAP inboundMap(Map<String, Object> ctx)
{
   AddressingProperties implementation = (AddressingProperties)ctx.get(CXFMAPConstants.SERVER_ADDRESSING_PROPERTIES_INBOUND);
   return newMap(implementation);
}
 
开发者ID:jbossws,项目名称:jbossws-cxf,代码行数:11,代码来源:CXFMAPBuilder.java


示例11: CXFMAP

import org.apache.cxf.ws.addressing.AddressingProperties; //导入依赖的package包/类
CXFMAP(AddressingProperties implementation)
{
   this.implementation = implementation;
}
 
开发者ID:jbossws,项目名称:jbossws-cxf,代码行数:5,代码来源:CXFMAP.java



注:本文中的org.apache.cxf.ws.addressing.AddressingProperties类示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
Java PersistentBag类代码示例发布时间:2022-05-22
下一篇:
Java OkHttpOAuthConsumer类代码示例发布时间:2022-05-22
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap