Package org.apache.servicemix.soap.api.model

Examples of org.apache.servicemix.soap.api.model.Operation


    private void initServiceSideInfo(Set<QName> understoodQNames,
                                     Message message,
                                     Set<URI> serviceRoles) {
        // Retrieve soap headers bound to message parts
        Operation operation = message.get(Operation.class);
        if (operation instanceof Wsdl1SoapOperation) {
            Wsdl1SoapOperation soapOper = (Wsdl1SoapOperation) operation;
            for (Wsdl1SoapPart part : soapOper.getInput().getParts()) {
                if (part.isHeader()) {
                    understoodQNames.add(part.getElement());
View Full Code Here


        fromNMSHeaders(message, nm);

        if (!server) {
            MessageExchange me = message.getContent(MessageExchange.class);
            Binding binding = message.get(Binding.class);
            Operation operation = binding.getOperation(me.getOperation());
            if (operation != null) {
                if (!me.getPattern().equals(operation.getMep())) {
                    throw new Fault("Received incorrect exchange mep.  Received " + me.getPattern()
                                    + " but expected " + operation.getMep() + " for operation "
                                    + operation.getName());
                }
                message.put(Operation.class, operation);
                if (operation instanceof SoapOperation<?>) {
                    String soapAction = ((SoapOperation<?>) operation).getSoapAction();
                    message.getTransportHeaders().put(SoapConstants.SOAP_ACTION_HEADER, soapAction);
View Full Code Here

            if (name.equals(oper.getInput().getElementName())) {
                matching.add(oper);
            }
        }
        if (matching.size() == 1) {
            Operation op = matching.get(0);
            message.put(Operation.class, op);
        } else {
            StringBuilder sb = new StringBuilder();
            sb.append("No matching operation found for element: ");
            sb.append(name);
View Full Code Here

        }
        message.setContent(Source.class, new DOMSource(document));
    }

    protected Wsdl1SoapOperation getOperation(Message message) {
        Operation operation = message.get(Operation.class);
        if (operation == null) {
            throw new Fault("Operation not bound on this message");
        }
        if (operation instanceof Wsdl1SoapOperation == false) {
            throw new Fault("Message is not bound to a WSDL 1.1 SOAP operation");
View Full Code Here

        this.server = server;
    }
   
    public void handleMessage(Message message) {
        try {
            Operation operation = message.get(Operation.class);
            MessageExchange exchange;
            NormalizedMessage nm;
            // Create message
            if (server) {
                exchange = createExchange(message);
                if (operation != null) {
                    exchange.setOperation(operation.getName());
                }
                nm = exchange.createMessage();
                exchange.setMessage(nm, "in");
                message.setContent(MessageExchange.class, exchange);
            } else {
View Full Code Here

    /**
     * Create the JBI exchange
     */
    private MessageExchange createExchange(Message message) throws JBIException {
        URI mep;
        Operation operation = message.get(Operation.class);
        if (operation != null) {
            mep = operation.getMep();
        } else {
            mep = (URI) message.get(OPERATION_MEP);
        }
        if (mep == null) {
            throw new NullPointerException("MEP not found");
View Full Code Here

       
        message.setContent(Source.class, new DOMSource(document));
    }

    protected Wsdl1SoapOperation getOperation(Message message) {
        Operation operation = message.get(Operation.class);
        if (operation == null) {
            throw new Fault("Operation not bound on this message");
        }
        if (operation instanceof Wsdl1SoapOperation == false) {
            throw new Fault("Message is not bound to a WSDL 1.1 SOAP operation");
View Full Code Here

import org.apache.servicemix.soap.bindings.soap.SoapConstants;

public class SoapActionOutOperationInterceptor extends AbstractInterceptor {

    public void handleMessage(Message message) {
        Operation operation = message.get(Operation.class);
        if (!(operation instanceof SoapOperation)) {
            return;
        }
        SoapOperation soapOp = (SoapOperation) operation;
        if (soapOp.getSoapAction() != null) {
View Full Code Here

TOP

Related Classes of org.apache.servicemix.soap.api.model.Operation

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.