code: public static String decodeEndpointURI(String endpoint) {
          int ind=endpoint.indexOf('[');
          if (ind == 0) {
              return null;
          } else if (ind != -1) {
              return endpoint.substring(0, ind);
          }
          return endpoint;
      }
docs: This method returns the URI part of the supplied endpoint.
  
  @param endpoint The endpoint
  @return The URI, or null if endpoint starts with '[' (operation prefix)