Hi,

First of all, I'm a happy CXF user. Everything is working perfectly ;-)

On the project I'm working on I need to do some optimizations on the
bandwidth usage.

One "easy" way will be to reduce the size of  the generated SOAP
requests by removing redundant namespaces declarations.
(I'm talking about a CXF client)

In the provided sample (generated request that has been logged), is
there a way to put all the namespaces declarations in the <Envelope> tag
once and so avoid identical declarations below ?

Thanks in advance

--
Tom

<soap:Envelope xmlns:soap="http://www.w3.org/2003/05/soap-envelope";>
	<soap:Header>
		<Action xmlns="http://schemas.xmlsoap.org/ws/2004/08/addressing";>XXX</Action>
		<MessageID xmlns="http://schemas.xmlsoap.org/ws/2004/08/addressing";>XXX</MessageID>
		<To xmlns="http://schemas.xmlsoap.org/ws/2004/08/addressing";>XXX</To>
		<ReplyTo xmlns="http://schemas.xmlsoap.org/ws/2004/08/addressing";>
			<Address>XXX</Address>
			<ReferenceProperties>
				<mws:DeviceAddress xmlns:mws="http://schemas.live.com/mws/2006/10/core";>XXX</mws:DeviceAddress>
			</ReferenceProperties>
		</ReplyTo>
		<ns3:Application xmlns:ns13="http://schemas.xmlsoap.org/ws/2005/08/ssync";
			xmlns:ns12="http://schemas.xmlsoap.org/ws/2004/08/addressing";
			xmlns:ns11="http://schemas.live.com/mws/2006/10/profile"; xmlns:ns10="http://schemas.live.com/mws/2006/10/mail";
			xmlns:ns9="http://schemas.xmlsoap.org/ws/2005/02/trust"; xmlns:ns8="http://www.w3.org/2000/09/xmldsig#";
			xmlns:ns7="http://schemas.xmlsoap.org/ws/2005/02/sc/ws-secureconversation.xsd";
			xmlns:ns6="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd";
			xmlns:ns5="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd";
			xmlns:ns4="http://schemas.xmlsoap.org/ws/2005/08/billing"; xmlns:ns3="http://schemas.live.com/mws/2006/10/core";
			xmlns:ns2="http://schemas.live.com/mws/2006/10/messaging"; xmlns:ns1="http://schemas.live.com/mws/2006/10/contacts";>
			<ns3:Name>XXX</ns3:Name>
			<ns3:Vendor>XXX</ns3:Vendor>
			<ns3:Version>XXX</ns3:Version>
		</ns3:Application>
		<ns4:Billing xmlns:ns13="http://schemas.xmlsoap.org/ws/2005/08/ssync";
			xmlns:ns12="http://schemas.xmlsoap.org/ws/2004/08/addressing";
			xmlns:ns11="http://schemas.live.com/mws/2006/10/profile"; xmlns:ns10="http://schemas.live.com/mws/2006/10/mail";
			xmlns:ns9="http://schemas.xmlsoap.org/ws/2005/02/trust"; xmlns:ns8="http://www.w3.org/2000/09/xmldsig#";
			xmlns:ns7="http://schemas.xmlsoap.org/ws/2005/02/sc/ws-secureconversation.xsd";
			xmlns:ns6="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd";
			xmlns:ns5="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd";
			xmlns:ns4="http://schemas.xmlsoap.org/ws/2005/08/billing"; xmlns:ns3="http://schemas.live.com/mws/2006/10/core";
			xmlns:ns2="http://schemas.live.com/mws/2006/10/messaging"; xmlns:ns1="http://schemas.live.com/mws/2006/10/contacts";>
			<ns4:OperatorID>XXX</ns4:OperatorID>
			<ns4:GatewayID>XXX</ns4:GatewayID>
			<ns4:OperatorCustomerRef>XXX</ns4:OperatorCustomerRef>
			<ns4:TransactionID>XXX</ns4:TransactionID>
			<ns4:TransactionStart>XXX</ns4:TransactionStart>
		</ns4:Billing>
		<ns3:DeviceOptions xmlns:ns13="http://schemas.xmlsoap.org/ws/2005/08/ssync";
			xmlns:ns12="http://schemas.xmlsoap.org/ws/2004/08/addressing";
			xmlns:ns11="http://schemas.live.com/mws/2006/10/profile"; xmlns:ns10="http://schemas.live.com/mws/2006/10/mail";
			xmlns:ns9="http://schemas.xmlsoap.org/ws/2005/02/trust"; xmlns:ns8="http://www.w3.org/2000/09/xmldsig#";
			xmlns:ns7="http://schemas.xmlsoap.org/ws/2005/02/sc/ws-secureconversation.xsd";
			xmlns:ns6="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd";
			xmlns:ns5="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd";
			xmlns:ns4="http://schemas.xmlsoap.org/ws/2005/08/billing"; xmlns:ns3="http://schemas.live.com/mws/2006/10/core";
			xmlns:ns2="http://schemas.live.com/mws/2006/10/messaging"; xmlns:ns1="http://schemas.live.com/mws/2006/10/contacts";>
			<ns3:Locale>XXX</ns3:Locale>
			<ns3:UserAgent>
				<ns3:Manufacturer>XXX</ns3:Manufacturer>
				<ns3:Model>XXX</ns3:Model>
				<ns3:OS>
					<ns3:Name>XXX</ns3:Name>
					<ns3:Version>XXX</ns3:Version>
				</ns3:OS>
				<ns3:IMSI>XXX</ns3:IMSI>
				<ns3:MSISDN>XXX</ns3:MSISDN>
			</ns3:UserAgent>
		</ns3:DeviceOptions>
		<ns6:Security xmlns:ns13="http://schemas.xmlsoap.org/ws/2005/08/ssync";
			xmlns:ns12="http://schemas.xmlsoap.org/ws/2004/08/addressing";
			xmlns:ns11="http://schemas.live.com/mws/2006/10/profile"; xmlns:ns10="http://schemas.live.com/mws/2006/10/mail";
			xmlns:ns9="http://schemas.xmlsoap.org/ws/2005/02/trust"; xmlns:ns8="http://www.w3.org/2000/09/xmldsig#";
			xmlns:ns7="http://schemas.xmlsoap.org/ws/2005/02/sc/ws-secureconversation.xsd";
			xmlns:ns6="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd";
			xmlns:ns5="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd";
			xmlns:ns4="http://schemas.xmlsoap.org/ws/2005/08/billing"; xmlns:ns3="http://schemas.live.com/mws/2006/10/core";
			xmlns:ns2="http://schemas.live.com/mws/2006/10/messaging"; xmlns:ns1="http://schemas.live.com/mws/2006/10/contacts";>
			<ns6:Timestamp Id="Timestamp">
				<ns5:Created>XXX</ns5:Created>
			</ns6:Timestamp>
			<ns6:SecurityContextToken>
				<ns7:Identifier>XXX</ns7:Identifier>
			</ns6:SecurityContextToken>
		</ns6:Security>
	</soap:Header>
	<soap:Body>
		<ns2:RegisterRequest xmlns:ns1="http://schemas.live.com/mws/2006/10/contacts";
			xmlns:ns2="http://schemas.live.com/mws/2006/10/messaging"; xmlns:ns3="http://schemas.live.com/mws/2006/10/core";
			xmlns:ns4="http://schemas.xmlsoap.org/ws/2005/08/billing";
			xmlns:ns5="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd";
			xmlns:ns6="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd";
			xmlns:ns7="http://schemas.xmlsoap.org/ws/2005/02/sc/ws-secureconversation.xsd";
			xmlns:ns8="http://www.w3.org/2000/09/xmldsig#"; xmlns:ns9="http://schemas.xmlsoap.org/ws/2005/02/trust";
			xmlns:ns10="http://schemas.live.com/mws/2006/10/mail"; xmlns:ns11="http://schemas.live.com/mws/2006/10/profile";
			xmlns:ns12="http://schemas.xmlsoap.org/ws/2004/08/addressing";
			xmlns:ns13="http://schemas.xmlsoap.org/ws/2005/08/ssync";>
			<ns2:Expires>XXX</ns2:Expires>
			<ns2:NotificationUrl>XXX</ns2:NotificationUrl>
		</ns2:RegisterRequest>
	</soap:Body>
</soap:Envelope>

Reply via email to