Skip to content

Instantly share code, notes, and snippets.

@hgoebl
Last active January 2, 2016 13:58
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save hgoebl/8313248 to your computer and use it in GitHub Desktop.
Save hgoebl/8313248 to your computer and use it in GitHub Desktop.
Example using DavidWebb for Stackoverflow Question 20987525 http://stackoverflow.com/questions/20987525/
import com.goebl.david.Webb;
import org.json.JSONObject;
import org.junit.Test;
public class TestSO20987525 {
static final String SOAP_ACTION = "http://888topup.com/ImageProcess.svc/UploadImage";
@Test
public void dotNetCall() throws Exception {
JSONObject imageRequest = new JSONObject();
imageRequest.put("Value", "myValue");
Webb webb = Webb.create();
JSONObject imageResponse = webb.post(SOAP_ACTION)
.header("Accept", "*/*")
.header("Accept-Encoding", "gzip deflate sdch")
.ensureSuccess()
.asJsonObject()
.getBody();
}
}
@hgoebl
Copy link
Author

hgoebl commented Jan 8, 2014

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment