public static String encodeEndpoint ( String uri , String operation ) { StringBuilder buf = new StringBuilder ( ) ; if ( uri != null && ! uri . trim ( ) . isEmpty ( ) ) { buf . append ( uri ) ; } if ( operation != null && ! operation . trim ( ) . isEmpty ( ) ) { buf . append ( ' ' ) ; buf . append ( operation ) ; buf . append ( ' ' ) ; } return buf . toString ( ) ; }
This method converts the supplied URI and optional operation into an endpoint descriptor .