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


Java ServerMessages.DISPATCH_CANNOT_FIND_METHOD属性代码示例

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


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

示例1: getWSDLOperationMapping

public @NotNull WSDLOperationMapping getWSDLOperationMapping(Packet request) throws DispatchException {
    WSDLOperationMapping opName;
    for(WSDLOperationFinder finder: opFinders) {
        opName = finder.getWSDLOperationMapping(request);
        if(opName != null)
            return opName;
    }
    //No way to dispatch this request
    String err = MessageFormat.format("Request=[SOAPAction={0},Payload='{'{1}'}'{2}]",
            request.soapAction, request.getMessage().getPayloadNamespaceURI(),
            request.getMessage().getPayloadLocalPart());
    String faultString = ServerMessages.DISPATCH_CANNOT_FIND_METHOD(err);
    Message faultMsg = SOAPFaultBuilder.createSOAPFaultMessage(
            binding.getSOAPVersion(), faultString, binding.getSOAPVersion().faultCodeClient);
    throw new DispatchException(faultMsg);
}
 
开发者ID:SunburstApps,项目名称:OpenJSharp,代码行数:16,代码来源:OperationDispatcher.java

示例2: getWSDLOperationMapping

/**
     *
     * @return not null if it finds a unique handler for the request
     *         null if it cannot idenitify a unique wsdl operation from the Payload QName.
     *
     * @throws DispatchException if the payload itself is incorrect, this happens when the payload is not accepted by
     *          any operation in the port.
     */
//  public QName getWSDLOperationQName(Packet request) throws DispatchException{

    public WSDLOperationMapping getWSDLOperationMapping(Packet request) throws DispatchException {
        Message message = request.getMessage();
        String localPart = message.getPayloadLocalPart();
        String nsUri;
        if (localPart == null) {
            localPart = EMPTY_PAYLOAD_LOCAL;
            nsUri = EMPTY_PAYLOAD_NSURI;
        } else {
            nsUri = message.getPayloadNamespaceURI();
            if(nsUri == null)
                nsUri = EMPTY_PAYLOAD_NSURI;
        }
        WSDLOperationMapping op = methodHandlers.get(nsUri, localPart);

        // Check if payload itself is correct. Usually it is, so let us check last
        if (op == null && !unique.containsKey(nsUri,localPart)) {
            String dispatchKey = "{" + nsUri + "}" + localPart;
            String faultString = ServerMessages.DISPATCH_CANNOT_FIND_METHOD(dispatchKey);
            throw new DispatchException(SOAPFaultBuilder.createSOAPFaultMessage(
                 binding.getSOAPVersion(), faultString, binding.getSOAPVersion().faultCodeClient));
        }
        return op;
    }
 
开发者ID:SunburstApps,项目名称:OpenJSharp,代码行数:33,代码来源:PayloadQNameBasedOperationFinder.java

示例3: getWSDLOperationQName

/**
 *
 * @param request Packet
 * @return QName of the wsdl operation.
 * @throws DispatchException if a unique operartion cannot be associated with this packet.
 */
public @NotNull QName getWSDLOperationQName(Packet request) throws DispatchException {
    QName opName;
    for(WSDLOperationFinder finder: opFinders) {
        opName = finder.getWSDLOperationQName(request);
        if(opName != null)
            return opName;
    }
    //No way to dispatch this request
    String err = MessageFormat.format("Request=[SOAPAction={0},Payload='{'{1}'}'{2}]",
            request.soapAction, request.getMessage().getPayloadNamespaceURI(),
            request.getMessage().getPayloadLocalPart());
    String faultString = ServerMessages.DISPATCH_CANNOT_FIND_METHOD(err);
    Message faultMsg = SOAPFaultBuilder.createSOAPFaultMessage(
            binding.getSOAPVersion(), faultString, binding.getSOAPVersion().faultCodeClient);
    throw new DispatchException(faultMsg);

}
 
开发者ID:alexkasko,项目名称:openjdk-icedtea7,代码行数:23,代码来源:OperationDispatcher.java

示例4: getWSDLOperationQName

/**
 *
 * @return not null if it finds a unique handler for the request
 *         null if it cannot idenitify a unique wsdl operation from the Payload QName.
 *
 * @throws DispatchException if the payload itself is incorrect, this happens when the payload is not accepted by
 *          any operation in the port.
 */
public QName getWSDLOperationQName(Packet request) throws DispatchException{
    Message message = request.getMessage();
    String localPart = message.getPayloadLocalPart();
    String nsUri;
    if (localPart == null) {
        localPart = EMPTY_PAYLOAD_LOCAL;
        nsUri = EMPTY_PAYLOAD_NSURI;
    } else {
        nsUri = message.getPayloadNamespaceURI();
        if(nsUri == null)
            nsUri = EMPTY_PAYLOAD_NSURI;
    }
    QName op = methodHandlers.get(nsUri, localPart);

    // Check if payload itself is correct. Usually it is, so let us check last
    if (op == null && !unique.containsKey(nsUri,localPart)) {
        String dispatchKey = "{" + nsUri + "}" + localPart;
        String faultString = ServerMessages.DISPATCH_CANNOT_FIND_METHOD(dispatchKey);
        throw new DispatchException(SOAPFaultBuilder.createSOAPFaultMessage(
             binding.getSOAPVersion(), faultString, binding.getSOAPVersion().faultCodeClient));
    }
    return op;
}
 
开发者ID:alexkasko,项目名称:openjdk-icedtea7,代码行数:31,代码来源:PayloadQNameBasedOperationFinder.java


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