@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 ); }
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) {
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()); } } }
@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) {
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; }
private String getInputAction() { String inputAction = null; Action action = getAnnoAction(); if (action != null) { inputAction = action.input(); } if (log.isDebugEnabled()) { log.debug("getInputAction: " + inputAction); } return inputAction; }
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()); } } }
@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) {
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; }
private String getOutputAction() { String outputAction = null; Action action = getAnnoAction(); if (action != null) { outputAction = action.output(); } if (log.isDebugEnabled()) { log.debug("getOutputAction: " + outputAction); } return outputAction; }
private String getInputAction() { String inputAction = null; Action action = getAnnoAction(); if (action != null) { inputAction = action.input(); } if (log.isDebugEnabled()) { log.debug("getInputAction: " + inputAction); } return inputAction; }
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()); } } }
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) {
@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; } } } }
@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); } } }