Posts

Showing posts from August, 2022

Consuming wsdl into spring boot

Image
  Steps to consume SOAP wsdl into Spring Boot 1.        Create a standard spring boot project 2.        Copy the wsdl file content into <file-name>.wsdl file, saved in resources folder.   https://apiservices.balady.gov.sa/v1/gsb/wasel-address-service 1.        In project window create an empty folders to store generated wsdl stub files. Here, com.example.consumewebservice1.stubs   is the empty directory created. 1.        In pom.xml add dependencies spring web and spring web service and to convert WSDL to stub add jaxb plug-ins <build>     <plugins>         <plugin>             <groupId> org.jvnet.jaxb2.maven2 </groupId>             <artifactId...

Java 8 Handy Notes

Image
Lambda Expression - it helps in implementation of functional interface, lambda expression is treated as a function, so compiler does not create .class file Java Method References – Method reference is used to refer method of functional interface or class. It is compact and easy form of lambda expression. There are 3-types of method references in java 1.        Reference to a static method 2.        Reference to a instance method 3.        Reference to a constructor Syntax for above each type of method references. 1.        Syntax of static Method Reference <Class name> :: <static method name> 2.        Syntax of instance Method Reference <Class name> :: <instance method name> 3.        Syntax of Constructor Method Reference <Class name> :: <new> (it is...