Package org.apache.axiom.soap

Examples of org.apache.axiom.soap.SOAPBody


    @SuppressWarnings("deprecation")
    protected OperationClient createOperationClient(Message msg) throws AxisFault {
        SOAPEnvelope env = soapFactory.getDefaultEnvelope();
        Object[] args = (Object[])msg.getBody();
        if (args != null && args.length > 0) {
            SOAPBody body = env.getBody();
            for (Object bc : args) {
                if (bc instanceof OMElement) {
                    body.addChild((OMElement)bc);
                } else {
                    throw new IllegalArgumentException(
                                                       "Can't handle mixed payloads between OMElements and other types.");
                }
            }
View Full Code Here


   * Even if MTOM is enabled we need to specify that the content needs to be optimized
   */
  public static void convertBase64_TO_MTOM(AXIOMXPath xpath, String mimeType, MessageContext synCtx) throws SynapseException{
    log.debug("Converting Base64 to MTOM");
   
    SOAPBody soapBody = synCtx.getEnvelope().getBody();
    //OMElementUtils.addNameSpaces(xpath, soapBody.getFirstElement(), log);   
    OMElement attachmentNode = getMatchingElement(xpath, soapBody);
   
    OMText binaryNode = factory.createOMText(attachmentNode.getText(),mimeType,true);
    attachmentNode.addChild(binaryNode);   
View Full Code Here

          // send the request and wait for reponse
          MessageContext response = send(msgctx);
          // call the callback
          if (response != null) {
            SOAPEnvelope resenvelope = response.getEnvelope();
            SOAPBody body = resenvelope.getBody();
            if (body.hasFault()) {
              Exception ex = body.getFault().getException();

              if (ex != null) {
                callback.onError(ex);
              } else {
                callback.onError(new Exception(body.getFault()
                    .getReason().getText()));
              }
            } else {
              AsyncResult asyncResult = new AsyncResult(response);
View Full Code Here

                    } else {
                        throw new IllegalArgumentException( "Can't handle mixed payloads between OMElements and other types for endpoint reference " + endpointReference);
                    }
                }
               
                SOAPBody body = env.getBody();
                body.addChild(operationNameElement);
               
            } else if (wsBinding.isRpcEncoded()){
                throw new ServiceRuntimeException("rpc/encoded WSDL style not supported for endpoint reference " + endpointReference);
            } else if (wsBinding.isDocEncoded()){
                throw new ServiceRuntimeException("doc/encoded WSDL style not supported for endpoint reference " + endpointReference);
           // } else if (wsBinding.isDocLiteralUnwrapped()){
           //     throw new ServiceRuntimeException("doc/literal/unwrapped WSDL style not supported for endpoint reference " + endpointReference);
            } else if (wsBinding.isDocLiteralWrapped() ||
                       wsBinding.isDocLiteralUnwrapped()){
                // it's doc/lit
                SOAPBody body = env.getBody();
                for (Object bc : args) {
                    if (bc instanceof OMElement) {
                        body.addChild((OMElement)bc);
                    } else {
                        throw new IllegalArgumentException( "Can't handle mixed payloads between OMElements and other types for endpoint reference " + endpointReference);
                    }
                }
            } else {
View Full Code Here

      this.name = name;
    }
   
    public void onComplete(AsyncResult result) {
      //System.out.println("On Complete Called for " + text);
      SOAPBody body = result.getResponseEnvelope().getBody();
     
      OMElement echoStringResponseElem = body.getFirstChildWithName(new QName (applicationNamespaceName,echoStringResponse));
      if (echoStringResponseElem==null) {
        System.out.println("Error: SOAPBody does not have a 'echoStringResponse' child");
        return;
      }
     
View Full Code Here

      this.name = name;
    }
   
    public void onComplete(AsyncResult result) {
      //System.out.println("On Complete Called for " + text);
      SOAPBody body = result.getResponseEnvelope().getBody();
     
      OMElement echoStringResponseElem = body.getFirstChildWithName(new QName (applicationNamespaceName,echoStringResponse));
      if (echoStringResponseElem==null) {
        System.out.println("Error: SOAPBody does not have a 'echoStringResponse' child");
        return;
      }
     
View Full Code Here

      this.name = name;
    }
   
    public void onComplete(AsyncResult result) {

      SOAPBody body = result.getResponseEnvelope().getBody();
     
      OMElement echoStringResponseElem = body.getFirstChildWithName(new QName (applicationNamespaceName,echoStringResponse));
      if (echoStringResponseElem==null) {
        log.error("Error: SOAPBody does not have a 'echoStringResponse' child");
        return;
      }
     
View Full Code Here

      this.name = name;
    }
   
    public void onComplete(AsyncResult result) {
      //System.out.println("On Complete Called for " + text);
      SOAPBody body = result.getResponseEnvelope().getBody();
      this.resultStr = checkEchoOMBlock(body.getFirstElement());
      completed = true;
    }
View Full Code Here

      this.name = name;
    }
   
    public void onComplete(AsyncResult result) {
      //System.out.println("On Complete Called for " + text);
      SOAPBody body = result.getResponseEnvelope().getBody();
     
      OMElement echoStringResponseElem = body.getFirstChildWithName(new QName (applicationNamespaceName,echoStringResponse));
      if (echoStringResponseElem==null) {
        System.out.println("Error: SOAPBody does not have a 'echoStringResponse' child");
        return;
      }
     
View Full Code Here

      this.name = name;
    }
   
    public void onComplete(AsyncResult result) {
      //System.out.println("On Complete Called for " + text);
      SOAPBody body = result.getResponseEnvelope().getBody();
     
      OMElement echoStringResponseElem = body.getFirstChildWithName(new QName (applicationNamespaceName,echoStringResponse));
      if (echoStringResponseElem==null) {
        System.out.println("Error: SOAPBody does not have a 'echoStringResponse' child");
        return;
      }
     
View Full Code Here

TOP

Related Classes of org.apache.axiom.soap.SOAPBody

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.