Esempio n. 1
0
 private void writeBody(XmlOutputStream xout, QName requestElement, XMLizable request)
     throws IOException {
   xout.writeStartTag(Constants.SOAP_ENVELOPE_NS, "Body");
   xout.setPrefix("m", requestElement.getNamespaceURI());
   if (objectNamespace != null) xout.setPrefix("sobj", objectNamespace);
   request.write(requestElement, xout, typeMapper);
   xout.writeEndTag(Constants.SOAP_ENVELOPE_NS, "Body");
 }
Esempio n. 2
0
  private void writeHeaders(XmlOutputStream xout) throws IOException {
    xout.writeStartTag(Constants.SOAP_ENVELOPE_NS, "Header");

    for (Map.Entry<QName, Object> entry : headers.entrySet()) {
      xout.setPrefix(null, entry.getKey().getNamespaceURI());
      Object value = entry.getValue();

      if (value instanceof XMLizable) {
        ((XMLizable) value).write(entry.getKey(), xout, typeMapper);
      } else {
        // todo: add simple type
      }
    }

    xout.writeEndTag(Constants.SOAP_ENVELOPE_NS, "Header");
  }