public Node replaceChild(Node newChild, Node oldChild) throws DOMException { if (needsConversionToBodyElement(newChild)) newChild = isFault(newChild) ? convertToSOAPFault(newChild) : convertToBodyElement(newChild); return super.replaceChild(newChild, oldChild); }
@Override public SOAPFault createFault() throws SOAPException { assertEnvNamespace(); SOAPFaultImpl soapFault = new SOAPFaultImpl(SOAPConstants.SOAP_ENV_PREFIX, envNamespace); soapFault.setFaultCode(soapFault.getDefaultFaultCode()); return soapFault; }
/** * Creates a new SOAPElement object initialized with the specified local name and adds the new element to this SOAPElement object. * * @param name a String giving the local name for the element * @return the new SOAPElement object that was created * @throws javax.xml.soap.SOAPException if there is an error in creating the SOAPElement object */ public SOAPElement addChildElement(String name) throws SOAPException { Name nameImp = new NameImpl(name); return addChildElement(nameImp); }
public Node appendChild(Node newChild) throws DOMException { if (needsConversionToBodyElement(newChild)) newChild = isFault(newChild) ? convertToSOAPFault(newChild) : convertToBodyElement(newChild); return super.appendChild(newChild); }
public Node insertBefore(Node newChild, Node refChild) throws DOMException { if (needsConversionToBodyElement(newChild)) newChild = isFault(newChild) ? convertToSOAPFault(newChild) : convertToBodyElement(newChild); return super.insertBefore(newChild, refChild); }
/** Convert the child into a SOAPBodyElement */ public SOAPElement addChildElement(SOAPElement child) throws SOAPException { if (!(child instanceof SOAPBodyElement)) { child = isFault(child) ? convertToSOAPFault(child) : convertToBodyElement(child); } child = super.addChildElement(child); return child; }
@Override public SOAPFault createFault(String reasonText, QName faultCode) throws SOAPException { assertEnvNamespace(); SOAPFaultImpl soapFault = new SOAPFaultImpl(SOAPConstants.SOAP_ENV_PREFIX, envNamespace); soapFault.setFaultCode(faultCode); soapFault.setFaultString(reasonText); return soapFault; }
public Node insertBefore(Node newChild, Node refChild) throws DOMException { if (needsConversionToHeaderElement(newChild)) newChild = convertToHeaderElement(newChild); return super.insertBefore(newChild, refChild); }
public Node replaceChild(Node newChild, Node oldChild) throws DOMException { if (needsConversionToHeaderElement(newChild)) newChild = convertToHeaderElement(newChild); return super.replaceChild(newChild, oldChild); }
public Node appendChild(Node newChild) throws DOMException { if (needsConversionToHeaderElement(newChild)) newChild = convertToHeaderElement(newChild); return super.appendChild(newChild); }
public UnMarshaller getUnmarshaller(boolean oneway) { if(oneway) return new OneWayUnMarshallerHTTP(); else return new SOAPMessageUnMarshallerHTTP(); }
public Document getOwnerDocument() { // Climb the tree in hopes of finding the soap envelope. // If it's not there (a detached subtree), then we return a non-associated document if (soapParent == null) return new SOAPDocument(); return soapParent.getOwnerDocument(); }
/** * Gets the mandatory SOAP 1.1 fault code for this SOAPFault object as a SAAJ Name object. */ public Name getFaultCodeAsName() { return new NameImpl(getFaultCodeAsQName()); }
@Override public SOAPElement addChildElement(SOAPElement child) throws SOAPException { if (!(child instanceof SOAPFaultElement)) child = convertToFaultElement((SOAPElementImpl)child); return super.addChildElement(child); }
/** Get the payload as source. */ public XMLFragment getXMLFragment() { transitionTo(State.XML_VALID); return soapContent.getXMLFragment(); }
public Object getObjectValue() { transitionTo(State.OBJECT_VALID); return soapContent.getObjectValue(); }
public void setObjectValue(Object objValue) { soapContent = new ObjectContent(this); soapContent.setObjectValue(objValue); }
@Override protected State transitionTo(State nextState) { State prevState = soapContent.getState(); if (nextState != prevState) { prevState = super.transitionTo(nextState); } return prevState; } }
@Override public SOAPElement createElement(QName qname) throws SOAPException { return createElement(new NameImpl(qname)); }
public void setXMLFragment(XMLFragment xmlFragment) { soapContent = new XMLContent(this); soapContent.setXMLFragment(xmlFragment); }