Re: Axis client not listning to correct port when sertting the replayTo header

2009-09-29 Thread Håkon Sagehaug
Hi Amila,

Thanks for the tip about axis2.xml, also found how to do it programmatic,
maybe to use for someone

cheers, håkon



// Make a new parameter
  Parameter transportParam = new Parameter();
  // Sets the name for the new parameter
  transportParam.setName(port);
  // Port to listen
  transportParam.setValue(6061);

  // Create a transport description object
  TransportInDescription tranportIn = new TransportInDescription(
http);
  tranportIn.addParameter(transportParam);
  // Create a transport listener object
  TransportListener transportListner = new SimpleHTTPServer();

  tranportIn.setReceiver(transportListner);

  stub._getServiceClient().getAxisConfiguration().addTransportIn(
tranportIn);

2009/9/28 Amila Suriarachchi amilasuriarach...@gmail.com



 2009/9/25 Håkon Sagehaug hakon.sageh...@bccs.uib.no

 Hi all,

 I've been playing aroung with the replyTo header that I send to my web
 service so it can respond to the port I want it to, this works fine when I
 don't set the replyto option in the service client, but when I set it lets
 say something like this


 options.setReplyTo(new EndpointReference(
 http://localhost:1/;));

 I still get this info message in my client

 INFO: Listening on port 6060

 So my question is, how can I make axis open the port on my client that I
 want

 cheers, håkon


 you need to create a configuration context by pointing to an axis2.xml.
 then configure the http listner of the axis2.xml.

 use the configuration context object to when creating the service client or
 stub.

 eg.

 ConfigurationContext configurationContext =

 ConfigurationContextFactory.createConfigurationContextFromFileSystem(
 AXIS2_REPOSITORY_LOCATION,
 AXIS2_CLIENT_CONFIG_FILE);
 ServiceClient serviceClient = new
 ServiceClient(configurationContext, null);

 thanks,
 Amila.


 --
 Håkon Sagehaug, Scientific Programmer
 Parallab, Bergen Center for Computational Science (BCCS)
 UNIFOB AS (University of Bergen Research Company)




 --
 Amila Suriarachchi
 WSO2 Inc.
 blog: http://amilachinthaka.blogspot.com/




-- 
Håkon Sagehaug, Scientific Programmer
Parallab, Bergen Center for Computational Science (BCCS)
UNIFOB AS (University of Bergen Research Company)


Re: Axis client not listning to correct port when sertting the replayTo header

2009-09-28 Thread Amila Suriarachchi
2009/9/25 Håkon Sagehaug hakon.sageh...@bccs.uib.no

 Hi all,

 I've been playing aroung with the replyTo header that I send to my web
 service so it can respond to the port I want it to, this works fine when I
 don't set the replyto option in the service client, but when I set it lets
 say something like this


 options.setReplyTo(new EndpointReference(
 http://localhost:1/;));

 I still get this info message in my client

 INFO: Listening on port 6060

 So my question is, how can I make axis open the port on my client that I
 want

 cheers, håkon


you need to create a configuration context by pointing to an axis2.xml.
then configure the http listner of the axis2.xml.

use the configuration context object to when creating the service client or
stub.

eg.

ConfigurationContext configurationContext =

ConfigurationContextFactory.createConfigurationContextFromFileSystem(
AXIS2_REPOSITORY_LOCATION,
AXIS2_CLIENT_CONFIG_FILE);
ServiceClient serviceClient = new
ServiceClient(configurationContext, null);

thanks,
Amila.


 --
 Håkon Sagehaug, Scientific Programmer
 Parallab, Bergen Center for Computational Science (BCCS)
 UNIFOB AS (University of Bergen Research Company)




-- 
Amila Suriarachchi
WSO2 Inc.
blog: http://amilachinthaka.blogspot.com/


Axis client not listning to correct port when sertting the replayTo header

2009-09-25 Thread Håkon Sagehaug
Hi all,

I've been playing aroung with the replyTo header that I send to my web
service so it can respond to the port I want it to, this works fine when I
don't set the replyto option in the service client, but when I set it lets
say something like this


options.setReplyTo(new EndpointReference(
http://localhost:1/;));

I still get this info message in my client

INFO: Listening on port 6060

So my question is, how can I make axis open the port on my client that I
want

cheers, håkon

-- 
Håkon Sagehaug, Scientific Programmer
Parallab, Bergen Center for Computational Science (BCCS)
UNIFOB AS (University of Bergen Research Company)