public DefaultImexCentralClient( String username, String password, String endPoint ) throws BridgeFailedException { this.endPoint = endPoint; try { URL url = new URL( endPoint + "?wsdl" ); log.debug( "WSDL: " + endPoint + "?wsdl" ); QName qn = new QName( "http://imex.mbi.ucla.edu/icentral/ws", "ics20" ); service = new IcentralService( url, qn ); port = service.getIcp20(); ( ( BindingProvider ) port ).getRequestContext().put( BindingProvider.ENDPOINT_ADDRESS_PROPERTY, endPoint ); ( ( BindingProvider ) port ).getRequestContext().put( BindingProvider.USERNAME_PROPERTY, username ); ( ( BindingProvider ) port ).getRequestContext().put( BindingProvider.PASSWORD_PROPERTY, password ); } catch ( MalformedURLException e ) { throw new BridgeFailedException( "Error while initializing IMEx Central Client", e ); } }
public DefaultImexCentralClient( String username, String password, String endPoint ) throws ImexCentralException { this.endPoint = endPoint; try { URL url = new URL( endPoint + "?wsdl" ); log.debug( "WSDL: " + endPoint + "?wsdl" ); QName qn = new QName( "http://imex.mbi.ucla.edu/icentral/ws", "ics20" ); service = new IcentralService( url, qn ); port = service.getIcp20(); ( ( BindingProvider ) port ).getRequestContext().put( BindingProvider.ENDPOINT_ADDRESS_PROPERTY, endPoint ); ( ( BindingProvider ) port ).getRequestContext().put( BindingProvider.USERNAME_PROPERTY, username ); ( ( BindingProvider ) port ).getRequestContext().put( BindingProvider.PASSWORD_PROPERTY, password ); } catch ( MalformedURLException e ) { throw new ImexCentralException( "Error while initializing IMEx Central Client", e ); } }