[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [xmlblaster] How to set the address of the xmlBlaster Server in cpp code



Bjoern Ruff wrote:
Hello,

can anybody tell what's wrong with the following cpp excerpt:

=======
This is a bug (or a future feature for multiple addresses?),
in the dump we see to address configurations.

A workaround is:

   global_.getProperty().setProperty("protocol", "SOCKET");
   global_.getProperty().setProperty("dispatch/connection/plugin/socket/hostname", "194.120.23.2");
   global_.getProperty().setProperty("dispatch/connection/plugin/socket/port", "7607");


		ConnectQos qos;
		.
		.
		.
		qos.setPtp(true);

		::org::xmlBlaster::util::qos::address::Address adr(global_);

		adr.set("194.120.23.2");
		adr.setType("SOCKET");
		adr.setPort(7607);
		qos.setAddress(adr);


		ConnectReturnQos retQos = con->connect(qos, this);

=======


The resulting connect qos looks like following, and the client tries to connect to the local server:

 <qos>
  <securityService type="htpasswd" version="1.0">
   <![CDATA[
   <user>com.forstware at TTW</user>
   <passwd>abrakadabra</passwd>
   ]]>
  </securityService>
  <ptp>true</ptp>
  <duplicateUpdates>false</duplicateUpdates>
  <session name='client/de.forstware at TTW/1' timeout='0' maxSessions='1'
clearSessions='false' reconnectSameClientOnly='false'/>

  <!-- QueuePropertyBase -->
  <queue relating='connection' storeSwapLevel='1468006'
storeSwapBytes='524288' reloadSwapLevel='629145' reloadSwapBytes='524288'>
   <address type='SOCKET' bootstrapHostname='194.120.23.2'
bootstrapPort='7607'>
      socket://194.120.23.2:7607
   </address>
   <address type='SOCKET' bootstrapHostname='127.0.0.1'>
      socket://127.0.0.1:3412
   </address>
  </queue>
  <!-- QueuePropertyBase -->
  <queue relating='callback' storeSwapLevel='1468006'
storeSwapBytes='524288' reloadSwapLevel='629145' reloadSwapBytes='524288'>
   <callback type='SOCKET' bootstrapHostname='127.0.0.1'>
      socket://127.0.0.1:3412
   </callback>
  </queue>
 </qos>


=====================

Cheers, Bjoern
br at forstware.de






--
http://www.xmlBlaster.org