Closed intivekks closed 8 years ago
Is your response working even without the body transformer? Also, our body transformer works with XML, but I'm not sure if it works with parsing soap calls...
According to issue #10 it should work. In my stub, I try to get value of field
my test:
Then("^I get Response massage$", () -> {
response.then().assertThat()
.body("soap:Envelope.soap:Body.c:replyMessage.c:merchantReferenceCode", equalTo("test-4"));
});
@intivekks, it needs to be tested, of course, but I hope my solution will help you: To achieve < requestMessage xmlns="xxx" > you should use $(Body.requestMessage.value). Most of all root tag (Envelope) will be omitted and soap: namespace too.
I have tried:
<c:merchantReferenceCode>$(soap:Envelope.soap:Body.requestMessage.merchantReferenceCode.value)</c:merchantReferenceCode>
<c:merchantReferenceCode>$(Envelope.Body.requestMessage.merchantReferenceCode.value)</c:merchantReferenceCode>
<c:merchantReferenceCode>$(soap:Body.requestMessage.merchantReferenceCode.value)</c:merchantReferenceCode>
<c:merchantReferenceCode>$(Body.requestMessage.merchantReferenceCode.value)</c:merchantReferenceCode>
<c:merchantReferenceCode>$(requestMessage.merchantReferenceCode.value)</c:merchantReferenceCode>
<c:merchantReferenceCode>$(merchantReferenceCode.value)</c:merchantReferenceCode>
<c:merchantReferenceCode>$(soap:Envelope.soap:Body.requestMessage.merchantReferenceCode)</c:merchantReferenceCode>
<c:merchantReferenceCode>$(Envelope.Body.requestMessage.merchantReferenceCode)</c:merchantReferenceCode>
<c:merchantReferenceCode>$(soap:Body.requestMessage.merchantReferenceCode)</c:merchantReferenceCode>
<c:merchantReferenceCode>$(Body.requestMessage.merchantReferenceCode)</c:merchantReferenceCode>
<c:merchantReferenceCode>$(requestMessage.merchantReferenceCode)</c:merchantReferenceCode>
<c:merchantReferenceCode>$(merchantReferenceCode)</c:merchantReferenceCode>
results: Expected: test-4 Actual: null, null, null, null, null, null, null, null, null, null, null, null
Shame on me! So sorry for spamming. My definition of Response was bad. Now it's working great. Thank you all for this awesome project, and thanks for commenters. Best luck!
Thanks @KRoLer! Cheers @intivekks. :)
Hi. Project looks great, thank you very much for the effort. But I've got a problem with it.
Any of my tries end up with null. Could you help me figured out what may be the problem in here please?
config:
request.xml:
response.xml: