public String toString() { StringBuilder builder = new StringBuilder("SaajSoapMessage"); try { SOAPEnvelope envelope = getImplementation().getEnvelope(saajMessage); if (envelope != null) { SOAPBody body = getImplementation().getBody(envelope); if (body != null) { SOAPElement bodyElement = getImplementation().getFirstBodyElement(body); if (bodyElement != null) { builder.append(' '); builder.append(getImplementation().getName(bodyElement)); } } } } catch (SOAPException ex) { // ignore } return builder.toString(); }
public SoapBody getBody() { if (body == null) { try { SOAPBody saajBody = getImplementation().getBody(getSaajEnvelope()); if (getImplementation().getName(saajBody).getNamespaceURI() .equals(SoapVersion.SOAP_11.getEnvelopeNamespaceUri())) { body = new SaajSoap11Body(saajBody, langAttributeOnSoap11FaultString); } else { body = new SaajSoap12Body(saajBody); } } catch (SOAPException ex) { throw new SaajSoapBodyException(ex); } } return body; }