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 Lorenzo <ce...@gmail.com> on 2007/09/05 15:42:24 UTC

[AXIS2] Engage module problem

I have to add a module to a service.

All go fine id i engage it globally in axis.xml, but how to engage it
programmatically?

--- CODE START ---
 
AxisConfiguration axisCfg = configurationContext.getAxisConfiguration();
AxisService openspcoopService = new
AxisService(OPENSPCOOP_SERVICE_NAME);
AxisOperation operation = new InOutAxisOperation(OPERATION_Q_NAME);
operation.setMessageReceiver(new OpenSPCoopMessageReceiver());
openspcoopService.addOperation(operation);
List transports = new ArrayList();
transports.add(org.apache.axis2.Constants.TRANSPORT_HTTP);
transports.add("https");
openspcoopService.setExposedTransports(transports);
axisCfg.addService(openspcoopService);

--- CODE END ---

i tryed with 

openspcoopService.engageModule(axisCfg.getModule("PD"), axisCfg);

(PD is the name of the module) but it log that it is just engaged (but
it not work)

openspcoopService.addModuleref("PD");

doesn't work too...


any suggestion?

thx, Lorenzo



---------------------------------------------------------------------
To unsubscribe, e-mail: axis-user-unsubscribe@ws.apache.org
For additional commands, e-mail: axis-user-help@ws.apache.org


Re: [AXIS2] Engage module problem

Posted by Sanka Samaranayke <ss...@gmail.com>.
Hi Lorenzo,

Pls find my comments inlined ..



Lorenzo wrote:
> I have to add a module to a service.
>
> All go fine id i engage it globally in axis.xml, but how to engage it
> programmatically?
>
> --- CODE START ---
>  
> AxisConfiguration axisCfg = configurationContext.getAxisConfiguration();
> AxisService openspcoopService = new
> AxisService(OPENSPCOOP_SERVICE_NAME);
> AxisOperation operation = new InOutAxisOperation(OPERATION_Q_NAME);
> operation.setMessageReceiver(new OpenSPCoopMessageReceiver());
> openspcoopService.addOperation(operation);
> List transports = new ArrayList();
> transports.add(org.apache.axis2.Constants.TRANSPORT_HTTP);
> transports.add("https");
> openspcoopService.setExposedTransports(transports);
> axisCfg.addService(openspcoopService);
>
> --- CODE END ---
>
> i tryed with 
>
> openspcoopService.engageModule(axisCfg.getModule("PD"), axisCfg);
>   

try openspcoopService.engageModule(axisCfg.getModule("PD")); instead 
of the above.

Best,
Sanka





> (PD is the name of the module) but it log that it is just engaged (but
> it not work)
>
> openspcoopService.addModuleref("PD");
>
> doesn't work too...
>
>
> any suggestion?
>
> thx, Lorenzo
>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: axis-user-unsubscribe@ws.apache.org
> For additional commands, e-mail: axis-user-help@ws.apache.org
>
>
>   


-- 
Sanka Samaranayake
WSO2 Inc.

http://www.bloglines.com/blog/sanka
http://www.wso2.org/


---------------------------------------------------------------------
To unsubscribe, e-mail: axis-user-unsubscribe@ws.apache.org
For additional commands, e-mail: axis-user-help@ws.apache.org


RE: [AXIS2] Engage module problem

Posted by Ted Jones <Tj...@metamatrix.com>.
Lorenzo,

To engage programmatically:

stub._getServiceClient().engageModule("PD");

This assumes that the module is "available" as well, meaning it is in
your repository.

Thanks,
Ted 

-----Original Message-----
From: Lorenzo [mailto:cencio1980@gmail.com] 
Sent: Wednesday, September 05, 2007 8:42 AM
To: AXIS
Subject: [AXIS2] Engage module problem

I have to add a module to a service.

All go fine id i engage it globally in axis.xml, but how to engage it
programmatically?

--- CODE START ---
 
AxisConfiguration axisCfg = configurationContext.getAxisConfiguration();
AxisService openspcoopService = new
AxisService(OPENSPCOOP_SERVICE_NAME);
AxisOperation operation = new InOutAxisOperation(OPERATION_Q_NAME);
operation.setMessageReceiver(new OpenSPCoopMessageReceiver());
openspcoopService.addOperation(operation);
List transports = new ArrayList();
transports.add(org.apache.axis2.Constants.TRANSPORT_HTTP);
transports.add("https");
openspcoopService.setExposedTransports(transports);
axisCfg.addService(openspcoopService);

--- CODE END ---

i tryed with 

openspcoopService.engageModule(axisCfg.getModule("PD"), axisCfg);

(PD is the name of the module) but it log that it is just engaged (but
it not work)

openspcoopService.addModuleref("PD");

doesn't work too...


any suggestion?

thx, Lorenzo



---------------------------------------------------------------------
To unsubscribe, e-mail: axis-user-unsubscribe@ws.apache.org
For additional commands, e-mail: axis-user-help@ws.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: axis-user-unsubscribe@ws.apache.org
For additional commands, e-mail: axis-user-help@ws.apache.org