The soap service is one from a SmsGateWay in Bangladesh - Onno Rokom Sms
When you consume a soap service, the idea is following:
-
Put the wsdl in pom (direct link) or copy the wsdl file in the resource
- In case of direct link (full pom is available in source code):
<configuration> <schemaLanguage>WSDL</schemaLanguage> <generatePackage>com.impostercorp.soap.wsdl</generatePackage> <schemas> <schema> <url>http://api.onnorokomsms.com/sendsms.asmx?WSDL</url> </schema> </schemas> </configuration> - In case of wsdl in local resource
<configuration> <schemaLanguage>WSDL</schemaLanguage> <generatePackage>com.impostercorp.soap.wsdl</generatePackage> <schemaDirectory>${project.basedir}/src/main/resources/wsdl</schemaDirectory> <schemaIncludes> <include>*.wsdl</include> </schemaIncludes> </configuration> ```
- In case of direct link (full pom is available in source code):
-
run
mvn clean compileormvn clean installto generate the stub -
after that the generated objects can be used to call soap service using
WebServiceTemplate.