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

Java AddressingUtils类代码示例

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

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



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

示例1: isAddressingEngagedOrRequired

import com.sun.xml.internal.ws.api.message.AddressingUtils; //导入依赖的package包/类
final boolean isAddressingEngagedOrRequired(Packet packet, WSBinding binding) {
    if (AddressingVersion.isRequired(binding))
        return true;

    if (packet == null)
        return false;

    if (packet.getMessage() == null)
        return false;

    if (packet.getMessage().getHeaders() != null)
        return false;

    String action = AddressingUtils.getAction(
            packet.getMessage().getHeaders(),
            addressingVersion, soapVersion);
    if (action == null)
        return true;

    return true;
}
 
开发者ID:SunburstApps,项目名称:OpenJSharp,代码行数:22,代码来源:WsaTube.java


示例2: validateAction

import com.sun.xml.internal.ws.api.message.AddressingUtils; //导入依赖的package包/类
@Override
protected void validateAction(Packet packet) {
    //There may not be a WSDL operation.  There may not even be a WSDL.
    //For instance this may be a RM CreateSequence message.
    WSDLBoundOperation wbo = getWSDLBoundOperation(packet);

    if (wbo == null)    return;

    String gotA = AddressingUtils.getAction(
            packet.getMessage().getHeaders(),
            addressingVersion, soapVersion);
    if (gotA == null)
        throw new WebServiceException(AddressingMessages.VALIDATION_CLIENT_NULL_ACTION());

    String expected = helper.getOutputAction(packet);

    if (expected != null && !gotA.equals(expected))
        throw new ActionNotSupportedException(gotA);
}
 
开发者ID:SunburstApps,项目名称:OpenJSharp,代码行数:20,代码来源:WsaClientTube.java


示例3: checkMandatoryHeaders

import com.sun.xml.internal.ws.api.message.AddressingUtils; //导入依赖的package包/类
@Override
protected void checkMandatoryHeaders(Packet packet, boolean foundAction, boolean foundTo, boolean foundReplyTo,
                                     boolean foundFaultTo, boolean foundMessageID, boolean foundRelatesTo) {
    super.checkMandatoryHeaders(packet,foundAction,foundTo,foundReplyTo,foundFaultTo,foundMessageID,foundRelatesTo);

    // if no wsa:To header is found
    if (!foundTo) {
        throw new MissingAddressingHeaderException(addressingVersion.toTag,packet);
    }

    if (!validation.equals(MemberSubmissionAddressing.Validation.LAX)) {

        // if it is not one-way, response must contain wsa:RelatesTo
        // RelatesTo required as per
        // Table 5-3 of http://www.w3.org/TR/2006/WD-ws-addr-wsdl-20060216/#wsdl11requestresponse
        if (expectReply && (packet.getMessage() != null) && !foundRelatesTo) {
            String action = AddressingUtils.getAction(packet.getMessage().getHeaders(), addressingVersion, soapVersion);
            // Don't check for AddressingFaults as
            // Faults for requests with duplicate MessageId will have no wsa:RelatesTo
            if (!packet.getMessage().isFault() || !action.equals(addressingVersion.getDefaultFaultAction())) {
                throw new MissingAddressingHeaderException(addressingVersion.relatesToTag,packet);
            }
        }
    }
}
 
开发者ID:SunburstApps,项目名称:OpenJSharp,代码行数:26,代码来源:MemberSubmissionWsaClientTube.java


示例4: checkMandatoryHeaders

import com.sun.xml.internal.ws.api.message.AddressingUtils; //导入依赖的package包/类
@Override
protected void checkMandatoryHeaders(Packet packet, boolean foundAction, boolean foundTo, boolean foundReplyTo,
                                     boolean foundFaultTo, boolean foundMessageID, boolean foundRelatesTo) {
    super.checkMandatoryHeaders(packet, foundAction, foundTo, foundReplyTo, foundFaultTo, foundMessageID, foundRelatesTo);

    // if it is not one-way, response must contain wsa:RelatesTo
    // RelatesTo required as per
    // Table 5-3 of http://www.w3.org/TR/2006/WD-ws-addr-wsdl-20060216/#wsdl11requestresponse
    if (expectReply && (packet.getMessage() != null) && !foundRelatesTo) {
        String action = AddressingUtils.getAction(packet.getMessage().getHeaders(), addressingVersion, soapVersion);
        // Don't check for AddressingFaults as
        // Faults for requests with duplicate MessageId will have no wsa:RelatesTo
        if (!packet.getMessage().isFault() || !action.equals(addressingVersion.getDefaultFaultAction())) {
            throw new MissingAddressingHeaderException(addressingVersion.relatesToTag,packet);
        }
    }

}
 
开发者ID:SunburstApps,项目名称:OpenJSharp,代码行数:19,代码来源:W3CWsaClientTube.java


示例5: dumpParam

import com.sun.xml.internal.ws.api.message.AddressingUtils; //导入依赖的package包/类
private void dumpParam(T param, String method) {
  if (param instanceof Packet) {
    Packet message = (Packet)param;

    String action;
    String msgId;
    if (LOGGER.isLoggable(Level.FINE)) {
      AddressingVersion av = DispatchImpl.this.getBinding().getAddressingVersion();
      SOAPVersion sv = DispatchImpl.this.getBinding().getSOAPVersion();
      action =
        av != null && message.getMessage() != null ?
          AddressingUtils.getAction(message.getMessage().getHeaders(), av, sv) : null;
      msgId =
        av != null && message.getMessage() != null ?
          AddressingUtils.getMessageID(message.getMessage().getHeaders(), av, sv) : null;
      LOGGER.fine("In DispatchImpl." + method + " for message with action: " + action + " and msg ID: " + msgId + " msg: " + message.getMessage());

      if (message.getMessage() == null) {
        LOGGER.fine("Dispatching null message for action: " + action + " and msg ID: " + msgId);
      }
    }
  }
}
 
开发者ID:SunburstApps,项目名称:OpenJSharp,代码行数:24,代码来源:DispatchImpl.java


示例6: dumpFiberContext

import com.sun.xml.internal.ws.api.message.AddressingUtils; //导入依赖的package包/类
private void dumpFiberContext(String desc) {
    if(isTraceEnabled()) {
        String action = null;
        String msgId = null;
        if (packet != null) {
            for (SOAPVersion sv: SOAPVersion.values()) {
                for (AddressingVersion av: AddressingVersion.values()) {
                    action = packet.getMessage() != null ? AddressingUtils.getAction(packet.getMessage().getHeaders(), av, sv) : null;
                    msgId = packet.getMessage() != null ? AddressingUtils.getMessageID(packet.getMessage().getHeaders(), av, sv) : null;
                    if (action != null || msgId != null) {
                       break;
                    }
                }
                if (action != null || msgId != null) {
                    break;
                }
            }
        }
        String actionAndMsgDesc;
        if (action == null && msgId == null) {
            actionAndMsgDesc = "NO ACTION or MSG ID";
        } else {
            actionAndMsgDesc = "'" + action + "' and msgId '" + msgId + "'";
        }

        String tubeDesc;
        if (next != null) {
            tubeDesc = next.toString() + ".processRequest()";
        } else {
            tubeDesc = peekCont() + ".processResponse()";
        }

        LOGGER.log(Level.FINE, "{0} {1} with {2} and ''current'' tube {3} from thread {4} with Packet: {5}", new Object[]{getName(), desc, actionAndMsgDesc, tubeDesc, Thread.currentThread().getName(), packet != null ? packet.toShortString() : null});
    }
}
 
开发者ID:SunburstApps,项目名称:OpenJSharp,代码行数:36,代码来源:Fiber.java


示例7: validateSOAPAction

import com.sun.xml.internal.ws.api.message.AddressingUtils; //导入依赖的package包/类
protected void validateSOAPAction(Packet packet) {
    String gotA = AddressingUtils.getAction(
            packet.getMessage().getHeaders(),
            addressingVersion, soapVersion);
    if (gotA == null)
        throw new WebServiceException(AddressingMessages.VALIDATION_SERVER_NULL_ACTION());
    if(packet.soapAction != null && !packet.soapAction.equals("\"\"") && !packet.soapAction.equals("\""+gotA+"\"")) {
        throw new InvalidAddressingHeaderException(addressingVersion.actionTag, addressingVersion.actionMismatchTag);
    }
}
 
开发者ID:SunburstApps,项目名称:OpenJSharp,代码行数:11,代码来源:WsaTube.java


示例8: validateAction

import com.sun.xml.internal.ws.api.message.AddressingUtils; //导入依赖的package包/类
@Override
protected void validateAction(Packet packet) {
    //There may not be a WSDL operation.  There may not even be a WSDL.
    //For instance this may be a RM CreateSequence message.
    WSDLBoundOperation wsdlBoundOperation = getWSDLBoundOperation(packet);

    if (wsdlBoundOperation == null) {
        return;
    }

    String gotA = AddressingUtils.getAction(
            packet.getMessage().getHeaders(),
            addressingVersion, soapVersion);

    if (gotA == null) {
        throw new WebServiceException(AddressingMessages.VALIDATION_SERVER_NULL_ACTION());
    }

    String expected = helper.getInputAction(packet);
    String soapAction = helper.getSOAPAction(packet);
    if (helper.isInputActionDefault(packet) && (soapAction != null && !soapAction.equals(""))) {
        expected = soapAction;
    }

    if (expected != null && !gotA.equals(expected)) {
        throw new ActionNotSupportedException(gotA);
    }
}
 
开发者ID:SunburstApps,项目名称:OpenJSharp,代码行数:29,代码来源:WsaServerTube.java


示例9: processResponse

import com.sun.xml.internal.ws.api.message.AddressingUtils; //导入依赖的package包/类
@Override
public @NotNull NextAction processResponse(Packet response) {
    // if one-way then, no validation
    if (response.getMessage() != null) {
        response = validateInboundHeaders(response);
        response.addSatellite(new WsaPropertyBag(addressingVersion,soapVersion,response));
        String msgId = AddressingUtils.
          getMessageID(response.getMessage().getHeaders(),
                  addressingVersion, soapVersion);
        response.put(WsaPropertyBag.WSA_MSGID_FROM_REQUEST, msgId);
    }

    return doReturnWith(response);
}
 
开发者ID:SunburstApps,项目名称:OpenJSharp,代码行数:15,代码来源:WsaClientTube.java


示例10: getMessageID

import com.sun.xml.internal.ws.api.message.AddressingUtils; //导入依赖的package包/类
/**
 * Gets the <tt>wsa:MessageID</tt> header content as String.
 *
 * @return
 *      null if the incoming SOAP message didn't have the header.
 */
// WsaServerTube.REQUEST_MESSAGE_ID is exposed for backward compatibility with 2.1
@Property({JAXWSProperties.ADDRESSING_MESSAGEID,WsaServerTube.REQUEST_MESSAGE_ID})
public String getMessageID() {
    if (packet.getMessage() == null) {
      return null;
    }
    return AddressingUtils.getMessageID(packet.getMessage().getHeaders(), addressingVersion,soapVersion);
}
 
开发者ID:SunburstApps,项目名称:OpenJSharp,代码行数:15,代码来源:WsaPropertyBag.java


示例11: configureRequestPacket

import com.sun.xml.internal.ws.api.message.AddressingUtils; //导入依赖的package包/类
private void configureRequestPacket(Packet packet, RequestContext requestContext) {
    // fill in Packet
    packet.proxy = this;
    packet.handlerConfig = binding.getHandlerConfig();

    // to make it multi-thread safe we need to first get a stable snapshot
    Header[] hl = userOutboundHeaders;
    if (hl != null) {
        MessageHeaders mh = packet.getMessage().getHeaders();
        for (Header h : hl) {
            mh.add(h);
        }
    }

    requestContext.fill(packet, (binding.getAddressingVersion() != null));
    packet.addSatellite(wsdlProperties);

    if (addrVersion != null) {
        // populate request WS-Addressing headers
        MessageHeaders headerList = packet.getMessage().getHeaders();
        AddressingUtils.fillRequestAddressingHeaders(headerList, wsdlPort, binding, packet);


        // Spec is not clear on if ReferenceParameters are to be added when addressing is not enabled,
        // but the EPR has ReferenceParameters.
        // Current approach: Add ReferenceParameters only if addressing enabled.
        if (endpointReference != null) {
            endpointReference.addReferenceParametersToList(packet.getMessage().getHeaders());
        }
    }
}
 
开发者ID:SunburstApps,项目名称:OpenJSharp,代码行数:32,代码来源:Stub.java



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


鲜花

握手

雷人

路过

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

请发表评论

全部评论

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

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

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

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

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