Package org.codehaus.enunciate.contract.jaxws

Examples of org.codehaus.enunciate.contract.jaxws.WebMethod


  private WebMethod webMethod;
  private String var = "webFault";

  //Inherited.
  protected Iterator<WebFault> getLoop(TemplateModel model) throws TemplateException {
    WebMethod webMethod = this.webMethod;
    if (webMethod == null) {
      throw new MissingParameterException("webMethod");
    }

    return webMethod.getWebFaults().iterator();
  }
View Full Code Here


  private WebMethod webMethod;
  private WsdlInfo wsdl;

  // Inherited.
  protected Iterator<WebMessage> getLoop(TemplateModel model) throws TemplateException {
    WebMethod webMethod = this.webMethod;
    WsdlInfo wsdlInfo = this.wsdl;
    if ((webMethod == null) && (wsdlInfo == null)) {
      throw new MissingParameterException("Either a webMethod or a wsdl must be specified to iterate over web messages.", "webMethod");
    }

    Collection<WebMessage> messages;
    if (webMethod != null) {
      messages = webMethod.getMessages();
    }
    else {
      messages = new ArrayList<WebMessage>();
      HashSet<String> foundFaults = new HashSet<String>();
      for (EndpointInterface ei : wsdlInfo.getEndpointInterfaces()) {
View Full Code Here

    Object unwrapped = BeansWrapper.getDefaultInstance().unwrap(from);
    if (!(unwrapped instanceof WebMethod)) {
      throw new TemplateModelException("A web method must be provided.");
    }

    WebMethod webMethod = (WebMethod) unwrapped;
    if (webMethod.getSoapBindingStyle() != SOAPBinding.Style.DOCUMENT || webMethod.getSoapUse() != SOAPBinding.Use.LITERAL) {
      throw new TemplateModelException("No request document qname available for a " + webMethod.getSoapBindingStyle() + "/" + webMethod.getSoapUse() + " web method.");
    }
    if (webMethod.getRequestWrapper() != null) {
      return new QName(webMethod.getRequestWrapper().getElementNamespace(), webMethod.getRequestWrapper().getElementName());
    }
    else if (webMethod.getSoapParameterStyle() == SOAPBinding.ParameterStyle.BARE) {
      Collection<WebParam> params = webMethod.getWebParameters();
      for (WebParam param : params) {
        if (!param.isHeader()) {
          return new QName(webMethod.getDeclaringEndpointInterface().getTargetNamespace(), param.getElementName());
        }
      }
    }

    return null;
View Full Code Here

    Object unwrapped = BeansWrapper.getDefaultInstance().unwrap(from);
    if (!(unwrapped instanceof WebMethod)) {
      throw new TemplateModelException("A web method must be provided.");
    }

    WebMethod webMethod = (WebMethod) unwrapped;
    if (webMethod.getSoapBindingStyle() != SOAPBinding.Style.DOCUMENT || webMethod.getSoapUse() != SOAPBinding.Use.LITERAL) {
      throw new TemplateModelException("No response document qname available for a " + webMethod.getSoapBindingStyle() + "/" + webMethod.getSoapUse() + " web method.");
    }
    if (webMethod.getResponseWrapper() != null) {
      return new QName(webMethod.getResponseWrapper().getElementNamespace(), webMethod.getResponseWrapper().getElementName());
    }
    else if (webMethod.getSoapParameterStyle() == SOAPBinding.ParameterStyle.BARE) {
      WebResult wr = webMethod.getWebResult();
      if (!wr.isHeader()) {
        return new QName(wr.getTargetNamespace(), wr.getElementName());
      }
    }
View Full Code Here

      public boolean isWebMethod(MethodDeclaration method) {
        return true;
      }
    };

    WebMethod privateMethod = null;
    WebMethod protectedMethod = null;
    WebMethod excludedMethod = null;
    WebMethod encodedMethod = null;
    WebMethod nonVoidOneWayMethod = null;
    WebMethod exceptionThrowingOneWayMethod = null;
    WebMethod headerCollectionParam = null;
    WebMethod headerCollectionReturn = null;
    WebMethod rpcBareMethod = null;
    WebMethod docBare2ParamMethod = null;
    WebMethod docBare2OutputMethod = null;
    WebMethod docBareWithHeadersMethod = null;
    WebMethod docBareVoidMethod = null;
    WebMethod docBareVoid2OutputMethod = null;
    WebMethod rpcCollectionParam = null;
    WebMethod invalidInOutParameter = null;
    Collection<WebMethod> webMethods = ei.getWebMethods();
    for (WebMethod webMethod : webMethods) {
      if ("privateMethod".equals(webMethod.getSimpleName())) {
        privateMethod = webMethod;
      }
View Full Code Here

TOP

Related Classes of org.codehaus.enunciate.contract.jaxws.WebMethod

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.