Skip to content

sinall/soapor

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

45 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

soapor

SOAPor is a java SOAP client.

Build Status

  • Build a payload based on template and a map
  • Send the payload to a web service and get response
  • Extract the response result by XPath

The mvn dependency:

<dependency>
    <groupId>com.github.sinall</groupId>
    <artifactId>soapor-core</artifactId>
    <version>1.1.3</version>
</dependency>

<dependency>
    <groupId>com.github.sinall</groupId>
    <artifactId>soapor-matchers</artifactId>
    <version>1.1.3</version>
</dependency>

Usage:

Basic usage:
import com.github.sinall.soapor.*;
// ...
SOAPParameters params = new SOAPParameters();
params.put("param1", "123");
SOAPRequest request = SOAPRequest.getInstance("com/github/sinall/soapor/payload/example.xml", params);
log.info("Request soap message to {}:\n{}", endpoint, request);

SOAPClient client = new SOAPClient(endpoint);
SOAPResponse response = client.send(request);
log.info("Response soap message:\n{}", response);
Matcher:
SOAPMessage soapMessage = SOAPMessageFactory.create("com/github/sinall/soapor/payload/example.xml");
assertThat(soapMessage, hasValueInXPath("/Envelope/Body/doubleAnInteger/param1", "123"));

About

SOAPor is a java SOAP client.

Resources

Stars

Watchers

Forks

Packages

No packages published

Languages