Configure wsimport plugin to POM.xml:
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>jaxws-maven-plugin</artifactId>
<version>1.12</version>
<executions>
<execution>
<goals>
<goal>wsimport</goal>
</goals>
</execution>
</executions>
<configuration>
<verbose>true</verbose>
<args>
<arg>-B-XautoNameResolution</arg>
</args>
<wsdlUrls>
<wsdlUrl>http://localhost:8080/services/AddressService_1.0.wsdl</wsdlUrl>
</wsdlUrls>
<sourceDestDir>src/main/java/</sourceDestDir>
<packageName>com.ws.address.validation</packageName>
</configuration>
</plugin>
Change the wsdlurl,sourceDestDir, and packageName accordingly.
Execute the generate-source target
AddressServiceV01_Service service = new AddressServiceV01_Service();
AddressServiceV01 port = service.getAddressServiceV01();
BindingProvider bindingProvider = (BindingProvider) port;
bindingProvider.getRequestContext().put("http://localhost:8080/services/AddressService");
String response = port.method(input);
Change the service and the endpoint accordingly.
Add com.sun.xml.internal.ws.* to sling.properties org.osgi.framework.bootdelegation property.
org.osgi.framework.bootdelegation=com.yourkit.*, ${org.apache.sling.launcher.bootdelegation}, com.sun.xml.internal.ws.*
AddressServiceV01 port = service.getAddressServiceV01();
BindingProvider bindingProvider = (BindingProvider) port;
bindingProvider.getRequestContext().put("http://localhost:8080/services/AddressService");
String response = port.method(input);
Change the service and the endpoint accordingly.
Add com.sun.xml.internal.ws.* to sling.properties org.osgi.framework.bootdelegation property.
org.osgi.framework.bootdelegation=com.yourkit.*, ${org.apache.sling.launcher.bootdelegation}, com.sun.xml.internal.ws.*
No comments:
Post a Comment
If you have any doubts or questions, please let us know.