Folks
The synapse-dev team have a request for Axis2. We would like an interface SOAPMessageContext that is a subset of the MessageContext model. The subset we would like is just the getters/setters for the envelope, message addressing properties and the property bag. We would also like the MessageContext to implement SOAPMessageContext.
The reason is that we want to expose a subset of the MC to programmers. There are a lot of Axis2 engine specific aspects in MC. For example setAxisService().
We also think that an interface that exposes just those aspects would be useful more widely than just Synapse.
Here is the proposed interface:
/*
* Copyright 2004,2005 The Apache Software Foundation.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.apache.axis2.context;
import org.apache.axis2.AxisFault;
import org.apache.axis2.addressing.EndpointReference;
import org.apache.axis2.addressing.MessageInformationHeaders
;
import org.apache.axis2.addressing.miheaders.RelatesTo;
import org.apache.axis2.soap.SOAPEnvelope;
public interface SOAPMessageContext {
public EndpointReference getFaultTo();
public void setFaultTo(EndpointReference reference);
public EndpointReference getFrom();
public void setFrom(EndpointReference reference);
public boolean isInFaultFlow();
public void setInFaultFlow(boolean b);
public SOAPEnvelope getEnvelope();
public void setEnvelope(SOAPEnvelope envelope) throws AxisFault;
public String getMessageID();
public void setMessageID(String string);
public RelatesTo getRelatesTo();
public void setRelatesTo(RelatesTo reference);
public EndpointReference getReplyTo();
public void setReplyTo(EndpointReference reference);
public EndpointReference getTo();
public void setTo(EndpointReference reference);
public void setProcessingFault(boolean b);
public boolean isProcessingFault() {
public void setWSAAction(String actionURI);
public String getWSAAction();
public void setWSAMessageId(String messageID);
public String getWSAMessageId();
public MessageInformationHeaders getMessageInformationHeaders();
public void setMessageInformationHeaders(MessageInformationHeaders collection);
public Object getProperty(String key);
public void setProperty(String key, Object value);
public String getSoapAction();
public void setSoapAction(String string);
public boolean isDoingMTOM();
public void setDoingMTOM(boolean b);
public boolean isDoingREST();
public void setDoingREST(boolean b);
public boolean isSOAP11();
}
It also might be good to add a property which indicates the direction of the message (e.g. isResponse()). If we did that it would need to be in the main MC class.
Comments?
Paul
- [Axis2] SOAPMessageContext Paul Fremantle
- Re: [Axis2] SOAPMessageContext Anthony Elder
- Re: [Axis2] SOAPMessageContext Sanjiva Weerawarana
- Re: [Axis2] SOAPMessageContext Sanjiva Weerawarana
- Re: [Axis2] SOAPMessageContext Eran Chinthaka
- Re: [Axis2] SOAPMessageContext Paul Fremantle
- Re: [Axis2] SOAPMessageContext Eran Chinthaka
- Re: [Axis2] SOAPMessageContext Ajith Ranabahu
- Re: [Axis2] SOAPMessageConte... Paul Fremantle
- RE: [Axis2] SOAPMessageC... Sanjesh Pathak
- Re: [Axis2] SOAPMessageC... Ajith Ranabahu