javax.xml.ws.Action类的使用及代码示例

x33g5p2x  于2022-01-16 转载在 其他  
字(10.1k)|赞(0)|评价(0)|浏览(191)

本文整理了Java中javax.xml.ws.Action类的一些代码示例,展示了Action类的具体用法。这些代码示例主要来源于Github/Stackoverflow/Maven等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Action类的具体详情如下:
包路径:javax.xml.ws.Action
类名称:Action

Action介绍

暂无

代码示例

代码示例来源:origin: apache/cxf

@Oneway
  @Action(input = EventingConstants.ACTION_NOTIFY_EVENT_WRAPPED_DELIVERY)
  @WebMethod(operationName = EventingConstants.OPERATION_NOTIFY_EVENT)
  void notifyEvent(
    @WebParam(partName = EventingConstants.PARAMETER, name = EventingConstants.NOTIFY,
         targetNamespace = EventingConstants.EVENTING_2011_03_NAMESPACE)
    EventType parameter
  );
}

代码示例来源:origin: org.apache.cxf/cxf-rt-frontend-jaxws

String inputAction = "";
if (action != null) {
  inputAction = action.input();
  inputAction = wm.action();
  MessageInfo input = operation.getInput();
  input.addExtensionAttribute(JAXWSAConstants.WSAM_ACTION_QNAME, inputAction);
  if (!StringUtils.isEmpty(action.input())) {
    input.addExtensionAttribute(JAXWSAConstants.WSAW_ACTION_QNAME, inputAction);
  if (output != null && !StringUtils.isEmpty(action.output())) {
    output.addExtensionAttribute(JAXWSAConstants.WSAW_ACTION_QNAME, action.output());
    output.addExtensionAttribute(JAXWSAConstants.WSAM_ACTION_QNAME, action.output());
  } else if (output != null) {
    output.addExtensionAttribute(JAXWSAConstants.WSAM_ACTION_QNAME, computeAction(operation,
  FaultAction[] faultActions = action.fault();
  if (faultActions != null && faultActions.length > 0 && operation.getFaults() != null) {
    for (FaultAction faultAction : faultActions) {

代码示例来源:origin: com.sun.xml.ws/jaxws-rt

private void setWsaActions(MetadataReader metadataReader) {
  Action action = (metadataReader != null)? metadataReader.getAnnotation(Action.class, seiMethod):seiMethod.getAnnotation(Action.class);
  if(action != null) {
    inputAction = action.input();
    outputAction = action.output();
  }
  //@Action(input) =="", get it from @WebMethod(action)
  WebMethod webMethod = (metadataReader != null)? metadataReader.getAnnotation(WebMethod.class, seiMethod):seiMethod.getAnnotation(WebMethod.class);
  soapAction = "";
  if (webMethod != null )
    soapAction = webMethod.action();
  if(!soapAction.equals("")) {
    //non-empty soapAction
    if(inputAction.equals(""))
      // set input action to non-empty soapAction
      inputAction = soapAction;
    else if(!inputAction.equals(soapAction)){
      //both are explicitly set via annotations, make sure @Action == @WebMethod.action
      //http://java.net/jira/browse/JAX_WS-1108
     //throw new WebServiceException("@Action and @WebMethod(action=\"\" does not match on operation "+ method.getName());
    }
  }
}

代码示例来源:origin: org.apache.cxf/cxf-rt-frontend-jaxws

@Override
public String getAction(OperationInfo op, Method method) {
  method = getDeclaredMethod(method);
  WebMethod wm = method.getAnnotation(WebMethod.class);
  String action = "";
  if (wm != null) {
    action = wm.action();
  }
  if (StringUtils.isEmpty(action)) {
    Action act = method.getAnnotation(Action.class);
    if (act != null) {
      action = act.input();
    }
  }
  return action;
}
public Boolean isHolder(Class<?> cls, Type type) {

代码示例来源:origin: org.apache.axis2/axis2-metadata

if (action != null) {
  ActionAnnot actionAnnot = ActionAnnot.createActionAnnotImpl();
  FaultAction[] faults = action.fault();
  actionAnnot.setInput(action.input());
  actionAnnot.setOutput(action.output());
  mdc.setActionAnnot(actionAnnot);

代码示例来源:origin: org.apache.axis2/axis2-metadata

private FaultAction[] getFaultActions() {
  FaultAction[] faultActions = null;
  Action action = getAnnoAction();
  
  if (action !=  null) {
    faultActions = action.fault();
  }
  
  if (log.isDebugEnabled()) {
    log.debug("getFaultActions: " + Arrays.toString(faultActions));
  }
  
  return faultActions;
}

代码示例来源:origin: com.sun.xml.ws/jaxws-rt

@Override
public void addOperationOutputExtension(TypedXmlWriter output, JavaMethod method) {
  if (!enabled)
    return;
  Action a = method.getSEIMethod().getAnnotation(Action.class);
  if (a != null && !a.output().equals("")) {
    addAttribute(output, a.output());
  }
}

代码示例来源:origin: org.apache.axis2/axis2-metadata

private String getInputAction() {
  String inputAction = null;
  Action action = getAnnoAction();
  
  if (action != null) {
    inputAction = action.input();
  }
  
  if (log.isDebugEnabled()) {
    log.debug("getInputAction: " + inputAction);
  }
  
  return inputAction;
}

代码示例来源:origin: com.sun.xml.ws/rt

private void setWsaActions(MetadataReader metadataReader) {
  Action action = (metadataReader != null)? metadataReader.getAnnotation(Action.class, seiMethod):seiMethod.getAnnotation(Action.class);
  if(action != null) {
    inputAction = action.input();
    outputAction = action.output();
  }
  //@Action(input) =="", get it from @WebMethod(action)
  WebMethod webMethod = (metadataReader != null)? metadataReader.getAnnotation(WebMethod.class, seiMethod):seiMethod.getAnnotation(WebMethod.class);
  soapAction = "";
  if (webMethod != null )
    soapAction = webMethod.action();
  if(!soapAction.equals("")) {
    //non-empty soapAction
    if(inputAction.equals(""))
      // set input action to non-empty soapAction
      inputAction = soapAction;
    else if(!inputAction.equals(soapAction)){
      //both are explicitly set via annotations, make sure @Action == @WebMethod.action
      //http://java.net/jira/browse/JAX_WS-1108
     //throw new WebServiceException("@Action and @WebMethod(action=\"\" does not match on operation "+ method.getName());
    }
  }
}

代码示例来源:origin: apache/cxf

@Override
public String getAction(OperationInfo op, Method method) {
  method = getDeclaredMethod(method);
  WebMethod wm = method.getAnnotation(WebMethod.class);
  String action = "";
  if (wm != null) {
    action = wm.action();
  }
  if (StringUtils.isEmpty(action)) {
    Action act = method.getAnnotation(Action.class);
    if (act != null) {
      action = act.input();
    }
  }
  return action;
}
public Boolean isHolder(Class<?> cls, Type type) {

代码示例来源:origin: apache/axis2-java

if (action != null) {
  ActionAnnot actionAnnot = ActionAnnot.createActionAnnotImpl();
  FaultAction[] faults = action.fault();
  actionAnnot.setInput(action.input());
  actionAnnot.setOutput(action.output());
  mdc.setActionAnnot(actionAnnot);

代码示例来源:origin: apache/axis2-java

private FaultAction[] getFaultActions() {
  FaultAction[] faultActions = null;
  Action action = getAnnoAction();
  
  if (action !=  null) {
    faultActions = action.fault();
  }
  
  if (log.isDebugEnabled()) {
    log.debug("getFaultActions: " + Arrays.toString(faultActions));
  }
  
  return faultActions;
}

代码示例来源:origin: org.apache.axis2/axis2-metadata

private String getOutputAction() {
  String outputAction = null;
  Action action = getAnnoAction();
  
  if (action != null) {
    outputAction = action.output();
  }
  
  if (log.isDebugEnabled()) {
    log.debug("getOutputAction: " + outputAction);
  }
  
  return outputAction;
}

代码示例来源:origin: apache/axis2-java

private String getInputAction() {
  String inputAction = null;
  Action action = getAnnoAction();
  
  if (action != null) {
    inputAction = action.input();
  }
  
  if (log.isDebugEnabled()) {
    log.debug("getInputAction: " + inputAction);
  }
  
  return inputAction;
}

代码示例来源:origin: sitewhere/sitewhere

@Oneway
@Action(input = "urn:deleteRole")
@RequestWrapper(localName = "deleteRole", targetNamespace = "http://service.ws.um.carbon.wso2.org", className = "com.sitewhere.wso2.identity.ws.DeleteRole")
@WebMethod(action = "urn:deleteRole")
public void deleteRole(
  @WebParam(name = "roleName", targetNamespace = "http://service.ws.um.carbon.wso2.org")
  java.lang.String roleName
);

代码示例来源:origin: javaee/metro-jax-ws

private void setWsaActions(MetadataReader metadataReader) {
  Action action = (metadataReader != null)? metadataReader.getAnnotation(Action.class, seiMethod):seiMethod.getAnnotation(Action.class);
  if(action != null) {
    inputAction = action.input();
    outputAction = action.output();
  }
  //@Action(input) =="", get it from @WebMethod(action)
  WebMethod webMethod = (metadataReader != null)? metadataReader.getAnnotation(WebMethod.class, seiMethod):seiMethod.getAnnotation(WebMethod.class);
  soapAction = "";
  if (webMethod != null )
    soapAction = webMethod.action();
  if(!soapAction.equals("")) {
    //non-empty soapAction
    if(inputAction.equals(""))
      // set input action to non-empty soapAction
      inputAction = soapAction;
    else if(!inputAction.equals(soapAction)){
      //both are explicitly set via annotations, make sure @Action == @WebMethod.action
      //http://java.net/jira/browse/JAX_WS-1108
     //throw new WebServiceException("@Action and @WebMethod(action=\"\" does not match on operation "+ method.getName());
    }
  }
}

代码示例来源:origin: apache/cxf

String inputAction = "";
if (action != null) {
  inputAction = action.input();
  inputAction = wm.action();
  MessageInfo input = operation.getInput();
  input.addExtensionAttribute(JAXWSAConstants.WSAM_ACTION_QNAME, inputAction);
  if (!StringUtils.isEmpty(action.input())) {
    input.addExtensionAttribute(JAXWSAConstants.WSAW_ACTION_QNAME, inputAction);
  if (output != null && !StringUtils.isEmpty(action.output())) {
    output.addExtensionAttribute(JAXWSAConstants.WSAW_ACTION_QNAME, action.output());
    output.addExtensionAttribute(JAXWSAConstants.WSAM_ACTION_QNAME, action.output());
  } else if (output != null) {
    output.addExtensionAttribute(JAXWSAConstants.WSAM_ACTION_QNAME, computeAction(operation,
  FaultAction[] faultActions = action.fault();
  if (faultActions != null && faultActions.length > 0 && operation.getFaults() != null) {
    for (FaultAction faultAction : faultActions) {

代码示例来源:origin: com.sun.xml.ws/jaxws-rt

@Override
public void addOperationFaultExtension(TypedXmlWriter fault, JavaMethod method, CheckedException ce) {
  if (!enabled)
    return;
  Action a = method.getSEIMethod().getAnnotation(Action.class);
  Class[] exs = method.getSEIMethod().getExceptionTypes();
  if (exs == null)
    return;
  if (a != null && a.fault() != null) {
    for (FaultAction fa : a.fault()) {
      if (fa.className().getName().equals(ce.getExceptionClass().getName())) {
        if (fa.value().equals(""))
          return;
        addAttribute(fault, fa.value());
        return;
      }
    }
  }
}

代码示例来源:origin: com.sun.xml.ws/rt

@Override
public void addOperationOutputExtension(TypedXmlWriter output, JavaMethod method) {
  if (!enabled)
    return;
  Action a = method.getSEIMethod().getAnnotation(Action.class);
  if (a != null && !a.output().equals("")) {
    addAttribute(output, a.output());
  }
}

代码示例来源:origin: com.sun.xml.ws/jaxws-rt

@Override
public void addOperationInputExtension(TypedXmlWriter input, JavaMethod method) {
  if (!enabled)
    return;
  Action a = method.getSEIMethod().getAnnotation(Action.class);
  if (a != null && !a.input().equals("")) {
    addAttribute(input, a.input());
  } else {
    String soapAction = method.getBinding().getSOAPAction();
    // in SOAP 1.2 soapAction is optional ...
    if (soapAction == null || soapAction.equals("")) {
      //hack: generate default action for interop with .Net3.0 when soapAction is non-empty
      String defaultAction = getDefaultAction(method);
      addAttribute(input, defaultAction);
    }
  }
}

相关文章