You are viewing a plain text version of this content. The canonical link for it is here.
Posted to java-user@axis.apache.org by Håkon Sagehaug <Ha...@bccs.uib.no> on 2009/09/25 15:02:24 UTC
Axis client not listning to correct port when sertting the replayTo
header
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:10000/"));
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)
Re: Axis client not listning to correct port when sertting the
replayTo header
Posted by Håkon Sagehaug <Ha...@bccs.uib.no>.
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 <am...@gmail.com>
>
>
> 2009/9/25 Håkon Sagehaug <Ha...@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:10000/"));
>>
>> 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
Posted by Amila Suriarachchi <am...@gmail.com>.
2009/9/25 Håkon Sagehaug <Ha...@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:10000/"));
>
> 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/