Description
When sending a request in the form of the example below, I recieve a no such method Body error.
<soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/">
<soap:Body>
<getProductDetails xmlns="http://warehouse.example.com/ws">
<productID>827635</productID>
</getProductDetails>
</soap:Body>
</soap:Envelope>
This is caused by a .getLocalName() call returning the <soap:Body> element in WrappedInInterceptor.java. As far as I am aware, all SOAP messages require a body, so the following should fix it:
WrappedInInterceptor.java
public void handleMessage(Message message) { ...
if (operation == null) {
// Added code
try
// End of added code
String local = xmlReader.getLocalName(); ...
If I am mistaken and a Body element is not always required :
public void handleMessage(Message message) { ...
if (operation == null) {
// Added code
if (xmlReader.getLocalName().equals("Body")) {
try { xmlReader.nextTag(); }
catch (Exception e)
{ throw new Fault(new org.apache.cxf.common.i18n.Message("NO_OPERATION_ELEMENT", BUNDLE)); }
}
// End of added code
String local = xmlReader.getLocalName(); ...