Package org.talend.esb.mep.requestcallback.feature

Examples of org.talend.esb.mep.requestcallback.feature.CallbackInfo


  private static URL asCallbackWsdlURL(URL wsdlURL) {
    if (wsdlURL == null) {
      return null;
    }
    final CallbackInfo cbInfo = CallContext.createCallbackInfo(wsdlURL);
    if (cbInfo.getCallbackServiceName() == null) {
      // old-style callback definition without callback service.
      return null;
    }
    String protocol = wsdlURL.getProtocol();
    if (!("http".equals(protocol) || "https".equals(protocol))) {
      // not a service registry query, return as it is.
      return wsdlURL;
    }
    final String path = wsdlURL.getPath();
    if (!path.startsWith("/services/registry/lookup/wsdl/")) {
      // not a service registry query, return as it is.
      return wsdlURL;
    }
    try {
      final String urlString = wsdlURL.toExternalForm();
      final String resString =  urlString.substring(0,
          urlString.indexOf(SR_QUERY_PATH) + SR_QUERY_PATH_LEN)
          + URLEncoder.encode(cbInfo.getCallbackServiceName().toString(), "UTF-8")
          + "?mergeWithPolicies=true&participant=provider";
      return new URL(resString);
    } catch (RuntimeException e) {
      throw e;
    } catch (Exception e) {
View Full Code Here

TOP

Related Classes of org.talend.esb.mep.requestcallback.feature.CallbackInfo

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.