Package org.apache.axis2.addressing

Examples of org.apache.axis2.addressing.AnyContentType


                    }
                    fileObject.close();
                    if (!fileObject.delete()) {
                        String msg = "Cannot delete file : " + fileObject;
                        log.error(msg);
                        throw new AxisFault(msg);
                    }
                } catch (FileSystemException e) {
                    log.error("Error deleting file : " + fileObject, e);
                }
            }
View Full Code Here


                public void run() {
                    MessageReceiver mr = mc.getAxisOperation().getMessageReceiver();
                    try {
                        // This AxisFault is created to create the fault message context
                        // noinspection ThrowableInstanceNeverThrown
                        AxisFault axisFault = exceptionToRaise != null ?
                                new AxisFault(errorMessage, exceptionToRaise) :
                                new AxisFault(errorMessage);

                        MessageContext nioFaultMessageContext =
                            MessageContextBuilder.createFaultMessageContext(mc, axisFault);

                        SOAPEnvelope envelope = nioFaultMessageContext.getEnvelope();
View Full Code Here

        return endpoints;
    }

    private void handleException(String msg, Exception e) throws AxisFault {
        log.error(msg, e);
        throw new AxisFault(msg, e);
    }
View Full Code Here

        throw new AxisFault(msg, e);
    }

    private void handleException(String msg) throws AxisFault {
        log.error(msg);
        throw new AxisFault(msg);
    }
View Full Code Here

    public void executeImpl(boolean block) throws AxisFault {

            // if the MEP is completed, throw a fault
            if (completed) {
        throw new AxisFault(Messages.getMessage("mepiscomplted"));
      }

            // if the OUT message is not set on the operation context, throw a fault
            MessageContext outMsgCtx = oc.getMessageContext(WSDLConstants.MESSAGE_LABEL_OUT_VALUE);
      if (outMsgCtx == null) {
        throw new AxisFault(Messages.getMessage("outmsgctxnull"));
      }

            ConfigurationContext cfgCtx = sc.getConfigurationContext();

            // set ClientOptions to the current outgoing message
View Full Code Here

                            sc.setTargetEPR(responseMessageContext.getReplyTo());
                        }

                        complete(msgctx);
                    } else {
                        throw new AxisFault(
                                Messages.getMessage("blockingInvocationExpectsResponse"));
                    }
                }
            }
        }
View Full Code Here

            if (transportInfo != null) {
                transportInfo.setContentType(
                messageFormatter.getContentType(msgContext, format, msgContext.getSoapAction()));
            } else {
                throw new AxisFault(Constants.OUT_TRANSPORT_INFO + " has not been set");
            }
        }

        try {
            messageFormatter.writeTo(msgContext, format, out, false);
View Full Code Here

        return false;
    }

    private void handleException(String msg, Exception e) throws AxisFault {
        log.error(msg, e);
        throw new AxisFault(msg, e);
    }
View Full Code Here

        throw new AxisFault(msg, e);
    }

    private void handleException(String msg) throws AxisFault {
        log.error(msg);
        throw new AxisFault(msg);
    }
View Full Code Here

                SOAPHeaderBlock toHeaderBlock = soapHeader.addHeaderBlock(
                        WSA_TO, addressingNamespaceObject);
                toHeaderBlock.setText(address);
            }

            AnyContentType referenceParameters = epr.getReferenceParameters();
            if (referenceParameters != null) {
                processAnyContentType(referenceParameters, soapHeader);
            }

            addToHeader(epr, soapHeader);
        }

        String action = messageInformationHeaders.getAction();
        if (action != null) {
            processStringInfo(action, WSA_ACTION, soapHeader);
        }

        epr = messageInformationHeaders.getReplyTo();
        if (epr == null) {//optional
            // setting anonymous URI. Defaulting to Final.
            String anonymousURI = Final.WSA_ANONYMOUS_URL;
            if (Submission.WSA_NAMESPACE.equals(addressingNamespace)) {
                anonymousURI = Submission.WSA_ANONYMOUS_URL;
            }
            epr = new EndpointReference(anonymousURI);
        }
        // add the service group id as a reference parameter
        String serviceGroupContextId = msgContext.getServiceGroupContextId();
        if (serviceGroupContextId != null && !"".equals(serviceGroupContextId)) {
            if(epr.getReferenceParameters() == null){
                epr.setReferenceParameters(new AnyContentType());
            }
            epr.getReferenceParameters().addReferenceValue(new QName(Constants.AXIS2_NAMESPACE_URI,
                    Constants.SERVICE_GROUP_ID, Constants.AXIS2_NAMESPACE_PREFIX), serviceGroupContextId);
        }
        addToSOAPHeader(epr, AddressingConstants.WSA_REPLY_TO, soapHeader);
View Full Code Here

TOP

Related Classes of org.apache.axis2.addressing.AnyContentType

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.