Hi,
We need to integrate SOAP API in AEM. I followed the below blog for the integration
https://one-inside.com/soap-web-services-aem/
This is working fine, and the classes are generated.
In my pom.xml I am adding a plugin with the wsdl url, which generates the class.
I have a scenario to this where we need to access the WSDL url, after authentication.
Any idea on how to do that.
Thanks,
Sweta
Solved! Go to Solution.
Views
Replies
Total Likes
Please check this below example for reading the version from a property file. You can do similar to a property for WSDL URL and configure it and use it POM -> wsdlUrls config and access it in java code too. Give it a try
https://stackoverflow.com/questions/3697449/retrieve-version-from-maven-pom-xml-in-code
Create a .properties
file in (most commonly) your src/main/resources
directory (but in step 4 you could tell it to look elsewhere).
Set the value of some property in your .properties
file using the standard Maven property for project version:
foo.bar=${project.version}
In your Java code, load the value from the properties file as a resource from the classpath (google for copious examples of how to do this, but here's an example for starters).
In Maven, enable resource filtering. This will cause Maven to copy that file into your output classes and translate the resource during that copy, interpreting the property. You can find some info here but you mostly just do this in your pom:
<build>
<resources>
<resource>
<directory>src/main/resources</directory>
<filtering>true</filtering>
</resource>
</resources>
</build>
Please check this below example for reading the version from a property file. You can do similar to a property for WSDL URL and configure it and use it POM -> wsdlUrls config and access it in java code too. Give it a try
https://stackoverflow.com/questions/3697449/retrieve-version-from-maven-pom-xml-in-code
Create a .properties
file in (most commonly) your src/main/resources
directory (but in step 4 you could tell it to look elsewhere).
Set the value of some property in your .properties
file using the standard Maven property for project version:
foo.bar=${project.version}
In your Java code, load the value from the properties file as a resource from the classpath (google for copious examples of how to do this, but here's an example for starters).
In Maven, enable resource filtering. This will cause Maven to copy that file into your output classes and translate the resource during that copy, interpreting the property. You can find some info here but you mostly just do this in your pom:
<build>
<resources>
<resource>
<directory>src/main/resources</directory>
<filtering>true</filtering>
</resource>
</resources>
</build>
@SwetaB -
You can can store wsdl url/username/password etc in properties files and read them
https://medium.com/bb-tutorials-and-thoughts/how-to-read-properties-file-in-java-6651fe2c6cbf
Views
Likes
Replies