I am using apache cxf webclient to use a service written in .NET
JSON sample to be sent to the request body of the web service
{
"Conditions":
[
{
"Field":"TextBody",
"Comparer":"ContainsAny",
"Values":["stocks","retire"],
"Proximity":0
},
{
"Field":"SentAt",
"Comparer":"LessThan",
"Values":["1331769600"],
"Proximity":0
},
],
"Operator":"And",
"ExpireResultIn":3600
}
Is there a way if I want to send data from both forms and to the Json body on one request? Apache CXF web client API -
web client API document
WebClient client = WebClient.create("http://mylocalhost.com:8989/CXFTest/cxfws/rest/restservice/json");
client.type(MediaType.APPLICATION_JSON).accept(MediaType.APPLICATION_JSON);
After that, what method and how to use?
client.form(...form object )
client.post(...JSON string )
They did not share the Conditions object in JSON, which I can annotate and pass to the clientβs mail method
source
share