protected void access() { if (!accessedMessage) { try { envelopeAttrs = sm.getSOAPPart().getEnvelope().getAttributes(); Node body = sm.getSOAPBody(); bodyAttrs = body.getAttributes(); soapVersion = SOAPVersion.fromNsUri(body.getNamespaceURI()); //cature all the body elements bodyParts = DOMUtil.getChildElements(body); //we treat payload as the first body part payload = bodyParts.size() > 0 ? bodyParts.get(0) : null; // hope this is correct. Caching the localname and namespace of the payload should be fine // but what about if a Handler replaces the payload with something else? Weel, may be it // will be error condition anyway if (payload != null) { payloadLocalName = payload.getLocalName(); payloadNamespace = payload.getNamespaceURI(); } accessedMessage = true; } catch (SOAPException e) { throw new WebServiceException(e); } } }
protected void access() { if (!accessedMessage) { try { envelopeAttrs = sm.getSOAPPart().getEnvelope().getAttributes(); Node body = sm.getSOAPBody(); bodyAttrs = body.getAttributes(); soapVersion = SOAPVersion.fromNsUri(body.getNamespaceURI()); //cature all the body elements bodyParts = DOMUtil.getChildElements(body); //we treat payload as the first body part payload = bodyParts.size() > 0 ? bodyParts.get(0) : null; // hope this is correct. Caching the localname and namespace of the payload should be fine // but what about if a Handler replaces the payload with something else? Weel, may be it // will be error condition anyway if (payload != null) { payloadLocalName = payload.getLocalName(); payloadNamespace = payload.getNamespaceURI(); } accessedMessage = true; } catch (SOAPException e) { throw new WebServiceException(e); } } }
protected void access() { if (!accessedMessage) { try { envelopeAttrs = sm.getSOAPPart().getEnvelope().getAttributes(); Node body = sm.getSOAPBody(); bodyAttrs = body.getAttributes(); soapVersion = SOAPVersion.fromNsUri(body.getNamespaceURI()); //cature all the body elements bodyParts = DOMUtil.getChildElements(body); //we treat payload as the first body part payload = bodyParts.size() > 0 ? bodyParts.get(0) : null; // hope this is correct. Caching the localname and namespace of the payload should be fine // but what about if a Handler replaces the payload with something else? Weel, may be it // will be error condition anyway if (payload != null) { payloadLocalName = payload.getLocalName(); payloadNamespace = payload.getNamespaceURI(); } accessedMessage = true; } catch (SOAPException e) { throw new WebServiceException(e); } } }