Posts

CMD vs EntryPoint

 CMD vs Entry point: CMD is used to set default parameters which can be overriden by parameters sent via docker run ENTRYPOINT is used to set parameters which cannot be changed,but if you want to add more parameters they can be added using CMD along with ENTRYPOINT

XML

 Xml NameSpace: The name space concept of xml is equal to package concept in java. In XML, element names are defined by the developer. This often results in a conflict when trying to mix XML documents from different XML applications.So we use name spaces to uniquely identify them. targetNamespace: For every xsd file we can define 1 targetNamespace It is an attribute which is used inside the schema element The namespace can be any nale start with any proocol and some text and end with some domain name. Eg:<schema targetNamespace="http://anyname.com">         .........       </schema> If we define name space in xsd document,then in corresponding xml file we need to prefix same namespace with all elements  All the elements in the xsd belongs to " http://anyname.com " name space, so we need to prefix same namespace in all the ements of xml file in which we want to use this xsd. Eg:<http://anyname.com:employee>     ...

Web Services by durgasoft

Image
 Session 1:(Introduction) Web Service is not an api it is a specification which contains rules for establishing communication between 2 interoperable applications Before web services we have:                    1.Socket Programming                    2.Remote Method Invocation(RMI)                    3.EJB(Enterprise Java Beans)                    4.CORBA(Common Object Request Broker Architecture) ATM example, If we want to withdraw money using SBI Atm card from ICICI Bank ATM, then customer details are valid or not and other information of sbi cusomer is checked by ICICI ATM  using web services. Session 2:(Web Services Architecture) Main Components of web services Architecture: 1.Skeleton(Pre defined class) 2.Wsdl generation ool(Pre defined class) 3.UDDI registry 4.Stub Generatio...

Encrypt the properties file key in selenium project

 Encrypt the properties file key in selenium project: Solution 1:(Very Basic Encryption) Refer this video : It Base64 Encrypion, which is very basic one. It uses Apache commen codecs utility Get the maven repository for the same, by clicking here Refer this video :  Code: Code for Encryption and decryption public static void setKey(String myKey) { MessageDigest sha = null; try { key = myKey.getBytes("UTF-8"); sha = MessageDigest.getInstance("SHA-1"); key = sha.digest(key); key = Arrays.copyOf(key, 16); secretKey = new SecretKeySpec(key, "AES"); } catch (NoSuchAlgorithmException e) { e.printStackTrace(); } catch (UnsupportedEncodingException e) { e.printStackTrace(); } } public static String encrypt(String strToEncrypt, String secret) { try { setKey(secret); ...