1 16 package org.apache.axis2.wsdl.builder.wsdl4j; 17 18 import org.apache.wsdl.WSDLConstants; 19 import org.apache.wsdl.impl.WSDLProcessingException; 20 21 import javax.wsdl.Operation; 22 import javax.wsdl.OperationType; 23 24 28 public class WSDL11MEPFinder { 29 30 public static String getMEP(Operation operation){ 31 OperationType operationType = operation.getStyle(); 52 if (null != operationType) { 53 54 if (operationType.equals(OperationType.REQUEST_RESPONSE)) 55 return WSDLConstants.MEP_URI_IN_OUT; 56 57 if (operationType.equals(OperationType.ONE_WAY)) 58 return WSDLConstants.MEP_URI_IN_ONLY; 59 60 if (operationType.equals(OperationType.NOTIFICATION)) 61 return WSDLConstants.MEP_URI_OUT_ONLY; 62 63 if (operationType.equals(OperationType.SOLICIT_RESPONSE)) 64 return WSDLConstants.MEP_URI_OUT_IN; 65 } 66 throw new WSDLProcessingException("Cannot Determine the MEP"); 67 68 } 69 } 70 | Popular Tags |