Author: asankaa Date: Mon Nov 24 03:12:26 2008 New Revision: 24703 URL: http://wso2.org/svn/browse/wso2?view=rev&revision=24703
Log: stubs for the responces Modified: branches/synapse/1.2.wso2v1/modules/core/src/main/java/org/apache/synapse/eventing/builders/ResponseMessageBuilder.java Modified: branches/synapse/1.2.wso2v1/modules/core/src/main/java/org/apache/synapse/eventing/builders/ResponseMessageBuilder.java URL: http://wso2.org/svn/browse/wso2/branches/synapse/1.2.wso2v1/modules/core/src/main/java/org/apache/synapse/eventing/builders/ResponseMessageBuilder.java?rev=24703&r1=24702&r2=24703&view=diff ============================================================================== --- branches/synapse/1.2.wso2v1/modules/core/src/main/java/org/apache/synapse/eventing/builders/ResponseMessageBuilder.java (original) +++ branches/synapse/1.2.wso2v1/modules/core/src/main/java/org/apache/synapse/eventing/builders/ResponseMessageBuilder.java Mon Nov 24 03:12:26 2008 @@ -99,7 +99,7 @@ EventingConstants.WSE_EVENTING_PREFIX), AddressingConstants.Submission.WSA_NAMESPACE); subscribeResponseElement.addChild(subscriptionManagerElement); - message.getBody().addChild(subscribeResponseElement); + message.getBody().addChild(subscribeResponseElement); } catch (AxisFault axisFault) { handleException("unable to create subscription response", axisFault); } @@ -137,13 +137,74 @@ */ public SOAPEnvelope genUnSubscribeResponse(Subscription subscription) { SOAPEnvelope message = factory.getDefaultEnvelope(); - OMNamespace addressNamespace = factory.createOMNamespace("http://schemas.xmlsoap.org/ws/2004/08/addressing","wsa"); + OMNamespace addressNamespace = factory.createOMNamespace("http://schemas.xmlsoap.org/ws/2004/08/addressing", "wsa"); OMElement relateToElement = factory.createOMElement("RelatesTo", addressNamespace); - factory.createOMText(relateToElement,subscription.getId()); - + factory.createOMText(relateToElement, subscription.getId()); message.getHeader().addChild(relateToElement); - OMElement dummyBody = factory.createOMElement("UnSunscribeResponce",null); + OMElement dummyBody = factory.createOMElement("UnSunscribeResponce", null); message.getBody().addChild(dummyBody); return message; } + + /** + * (01) <s12:Envelope + * (02) xmlns:s12="http://www.w3.org/2003/05/soap-envelope" + * (03) xmlns:wsa="http://schemas.xmlsoap.org/ws/2004/08/addressing" + * (04) xmlns:wse="http://schemas.xmlsoap.org/ws/2004/08/eventing" + * (05) xmlns:ow="http://www.example.org/oceanwatch" > + * (06) <s12:Header> + * (07) <wsa:Action> + * (08) http://schemas.xmlsoap.org/ws/2004/08/eventing/RenewResponse + * (09) </wsa:Action> + * (10) <wsa:RelatesTo> + * (11) uuid:bd88b3df-5db4-4392-9621-aee9160721f6 + * (12) </wsa:RelatesTo> + * (13) <wsa:To>http://www.example.com/MyEventSink</wsa:To> + * (14) </s12:Header> + * (15) <s12:Body> + * (16) <wse:RenewResponse> + * (17) <wse:Expires>2004-06-26T12:00:00.000-00:00</wse:Expires> + * (18) </wse:RenewResponse> + * (19) </s12:Body> + * (20) </s12:Envelope> + * + * @param subscription + * @return + */ + public SOAPEnvelope genRenewSubscriptionResponse(Subscription subscription) { + SOAPEnvelope message = factory.getDefaultEnvelope(); + //TODO : build message stub + return message; + } + + /** + * (01) <s12:Envelope + * (02) xmlns:s12="http://www.w3.org/2003/05/soap-envelope" + * (03) xmlns:wsa="http://schemas.xmlsoap.org/ws/2004/08/addressing" + * (04) xmlns:wse="http://schemas.xmlsoap.org/ws/2004/08/eventing" + * (05) xmlns:ow="http://www.example.org/oceanwatch" > + * (06) <s12:Header> + * (07) <wsa:Action> + * (08) http://schemas.xmlsoap.org/ws/2004/08/eventing/GetStatusResponse + * (09) </wsa:Action> + * (10) <wsa:RelatesTo> + * (11) uuid:bd88b3df-5db4-4392-9621-aee9160721f6 + * (12) </wsa:RelatesTo> + * (13) <wsa:To>http://www.example.com/MyEventSink</wsa:To> + * (14) </s12:Header> + * (15) <s12:Body> + * (16) <wse:GetStatusResponse> + * (17) <wse:Expires>2004-06-26T12:00:00.000-00:00</wse:Expires> + * (18) </wse:GetStatusResponse> + * (19) </s12:Body> + * (20) </s12:Envelope> + * + * @param subscription + * @return + */ + public SOAPEnvelope genGetStatusResponse(Subscription subscription) { + SOAPEnvelope message = factory.getDefaultEnvelope(); + //TODO : build message stub + return message; + } } _______________________________________________ Esb-java-dev mailing list [email protected] https://wso2.org/cgi-bin/mailman/listinfo/esb-java-dev
