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


Java WSDLOperationMapping类代码示例

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


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

示例1: getWSDLOperationMapping

import com.sun.xml.internal.ws.api.model.WSDLOperationMapping; //导入依赖的package包/类
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,代码行数:17,代码来源:OperationDispatcher.java

示例2: getWSDLOperationMapping

import com.sun.xml.internal.ws.api.model.WSDLOperationMapping; //导入依赖的package包/类
/**
     *
     * @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,代码行数:34,代码来源:PayloadQNameBasedOperationFinder.java

示例3: getWSDLOperationMapping

import com.sun.xml.internal.ws.api.model.WSDLOperationMapping; //导入依赖的package包/类
public WSDLOperationMapping getWSDLOperationMapping() {
    if (wsdlOperationMapping != null) return wsdlOperationMapping;
    OperationDispatcher opDispatcher = null;
    if (endpoint != null) {
        opDispatcher = endpoint.getOperationDispatcher();
    } else if (proxy != null) {
        opDispatcher = ((Stub) proxy).getOperationDispatcher();
    }
    //OpDispatcher is null when there is no WSDLModel
    if (opDispatcher != null) {
        try {
            wsdlOperationMapping = opDispatcher.getWSDLOperationMapping(this);
        } catch (DispatchException e) {
            //Ignore, this might be a protocol message which may not have a wsdl operation
            //LOGGER.info("Cannot resolve wsdl operation that this Packet is targeted for.");
        }
    }
    return wsdlOperationMapping;
}
 
开发者ID:SunburstApps,项目名称:OpenJSharp,代码行数:20,代码来源:Packet.java

示例4: getFaultAction

import com.sun.xml.internal.ws.api.model.WSDLOperationMapping; //导入依赖的package包/类
public String getFaultAction(Packet requestPacket, Packet responsePacket) {
    String action = null;
    if(seiModel != null) {
        action = getFaultActionFromSEIModel(requestPacket,responsePacket);
    }
    if (action != null) {
        return action;
    } else {
        action = addVer.getDefaultFaultAction();
    }
    if (wsdlPort != null) {
        WSDLOperationMapping wsdlOp = requestPacket.getWSDLOperationMapping();
        if (wsdlOp != null) {
            WSDLBoundOperation wbo = wsdlOp.getWSDLBoundOperation();
            return getFaultAction(wbo, responsePacket);
        }
    }
    return action;
}
 
开发者ID:SunburstApps,项目名称:OpenJSharp,代码行数:20,代码来源:WsaTubeHelper.java

示例5: getEffectiveInputAction

import com.sun.xml.internal.ws.api.model.WSDLOperationMapping; //导入依赖的package包/类
/**
 * This method gives the Input addressing Action for a message.
 * It gives the Action set in the wsdl operation for the corresponding payload.
 * If it is not explicitly set, it gives the soapAction
 * @param packet
 * @return input Action
 */
public String getEffectiveInputAction(Packet packet) {
    //non-default SOAPAction beomes wsa:action
    if(packet.soapAction != null && !packet.soapAction.equals("")) {
        return packet.soapAction;
    }
    String action;

    if (wsdlPort != null) {
        WSDLOperationMapping wsdlOp = packet.getWSDLOperationMapping();
        if (wsdlOp != null) {
            WSDLBoundOperation wbo = wsdlOp.getWSDLBoundOperation();
            WSDLOperation op = wbo.getOperation();
            action = op.getInput().getAction();
        } else {
            action = packet.soapAction;
        }
    } else {
        action = packet.soapAction;
    }
    return action;
}
 
开发者ID:SunburstApps,项目名称:OpenJSharp,代码行数:29,代码来源:WsaTubeHelper.java

示例6: getSOAPAction

import com.sun.xml.internal.ws.api.model.WSDLOperationMapping; //导入依赖的package包/类
public String getSOAPAction(Packet packet) {
    String action = "";

    if (packet == null || packet.getMessage() == null) {
        return action;
    }

    if (wsdlPort == null) {
        return action;
    }

    WSDLOperationMapping wsdlOp = packet.getWSDLOperationMapping();
    if (wsdlOp == null) {
        return action;
    }

    WSDLBoundOperation op = wsdlOp.getWSDLBoundOperation();
    action = op.getSOAPAction();
    return action;
}
 
开发者ID:SunburstApps,项目名称:OpenJSharp,代码行数:21,代码来源:WsaTubeHelper.java

示例7: getOutputAction

import com.sun.xml.internal.ws.api.model.WSDLOperationMapping; //导入依赖的package包/类
public String getOutputAction(Packet packet) {
    //String action = AddressingVersion.UNSET_OUTPUT_ACTION;
    String action = null;
    WSDLOperationMapping wsdlOp = packet.getWSDLOperationMapping();
    if (wsdlOp != null) {
        JavaMethod javaMethod = wsdlOp.getJavaMethod();
        if (javaMethod != null) {
            JavaMethodImpl jm = (JavaMethodImpl) javaMethod;
            if (jm != null && jm.getOutputAction() != null && !jm.getOutputAction().equals("")) {
                return jm.getOutputAction();
            }
        }
        WSDLBoundOperation wbo = wsdlOp.getWSDLBoundOperation();
        if (wbo != null) return getOutputAction(wbo);
    }
    return action;
}
 
开发者ID:SunburstApps,项目名称:OpenJSharp,代码行数:18,代码来源:WsaTubeHelper.java


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