What is the best-of-breed Java SOAP client library which can be used with dropwizard

1,487 views
Skip to first unread message

Rajendra Pawar

unread,
Aug 29, 2016, 7:32:00 PM8/29/16
to dropwizard-user
We have need to call SOAP services from my drop wizard application, Can you guys suggest the best if breed library which can be used with drop wizard.

Jonne Jyrylä

unread,
Aug 30, 2016, 5:45:25 AM8/30/16
to dropwizard-user
Hi

I don't know if there is any library especially suited for calling SOAP services from a Dropwizard application, but we are using Apache CXF[1] quite successfully. We have the following plugin definition in the build section of our POM file:

<plugin>
<groupId>org.apache.cxf</groupId>
<artifactId>cxf-codegen-plugin</artifactId>
<version>3.1.6</version>
<executions>
<execution>
<id>generate-sources</id>
<phase>validate</phase>
<configuration>
<sourceRoot>${basedir}/generated</sourceRoot>
<wsdlOptions>
<wsdlOption>
<wsdl>WSDL path or URL here</wsdl>
<extraargs>
<extraarg>-impl</extraarg>
<extraarg>-verbose</extraarg>
</extraargs>
</wsdlOption>
</wsdlOptions>
</configuration>
<goals>
<goal>wsdl2java</goal>
</goals>
</execution>
</executions>
</plugin>

The plugin loads the WSDL file and generates Java code for calling the SOAP service. You'll need to add "generated" as a source folder to your project.


2016-08-30 2:32 GMT+03:00 Rajendra Pawar <rpaw...@gmail.com>:
We have need to call SOAP services from my drop wizard application, Can you guys suggest the best if breed library which can be used with drop wizard.

--
You received this message because you are subscribed to the Google Groups "dropwizard-user" group.
To unsubscribe from this group and stop receiving emails from it, send an email to dropwizard-user+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.



--
Jonne Jyrylä
jaa...@gmail.com

victo...@gmail.com

unread,
Aug 30, 2016, 6:01:41 AM8/30/16
to dropwizard-user
You could use something like Feign or Retrofit that are made to simplify executing HTTP requests.

People usually use them for REST, but nothing prevent you to use them for SOAP, a quick googling gives some pointers on how to do that :)

Rajendra Pawar

unread,
Sep 1, 2016, 2:44:26 PM9/1/16
to dropwizard-user
Thanks Jonne,

I've used Apache CXF with dropwizard and Dagger2, Was also having requirement to sign the messages that also working using WSS4JOutInterceptor.

                 <dependency>
<groupId>org.apache.cxf</groupId>
<artifactId>cxf-rt-ws-security</artifactId>
<version>3.1.5</version>
</dependency>
<dependency>
<groupId>org.apache.cxf</groupId>
<artifactId>cxf-rt-frontend-jaxws</artifactId>
<version>3.1.5</version>
</dependency>
<dependency>
<groupId>org.apache.cxf</groupId>
<artifactId>cxf-rt-transports-http</artifactId>
<version>3.1.5</version>
</dependency>


                         <plugin>
<groupId>org.apache.cxf</groupId>
<artifactId>cxf-codegen-plugin</artifactId>
<version>3.1.5</version>
<executions>
<execution>
<id>generate-sources</id>
<phase>generate-sources</phase>
<configuration>
<defaultOptions>
<autoNameResolution>true</autoNameResolution>
</defaultOptions>
<sourceRoot>${project.build.directory}/generated-sources/</sourceRoot>
<wsdlOptions>
<wsdlOption>
<wsdl>${basedir}/src/main/resources/com/rajendra/abc.wsdl</wsdl>
<extraargs>
<extraarg>-client</extraarg>
</extraargs>
</wsdlOption>
</wsdlOptions>
</configuration>
<goals>
<goal>wsdl2java</goal>
</goals>
</execution>
</executions>
</plugin>

Maven plugin generates the class in target folder and I am using it by adding into class path.

Thanks
Rajendra
To unsubscribe from this group and stop receiving emails from it, send an email to dropwizard-us...@googlegroups.com.

For more options, visit https://groups.google.com/d/optout.



--
Jonne Jyrylä
jaa...@gmail.com
Reply all
Reply to author
Forward
0 new messages