You can have this with Axis2 RC or above :)
You have to follow the following procedure for doing this
- When you creating stub , it has a constructor which take
configuration context as argument.
- So pass that as "ListenerManager.defaultConfigurationContext"
- In this case client will be created using server configuration context
- And this will work in axis2 war distribution out of the box
Note : In the case of AxisServlet , it will create a ListenerManager and
will set defaultConfigurationContext as the server configuration context.
If you are using some other thing say simpleHTTPServer then you have to
do the following procedure.
- Create a ConfigurationConetx using some axis2.xml and that
axis2.xml can have all the transport listeners that you want
- Then create a ListenerManager
- and call startSystem
- and finally
ListenerManager.defaultConfigurationContext= configurationcotext;
Ali Sadik Kumlali wrote:
>Hi all,
>
>Since there is no response yet, I assume that my posting had a lack of
>information :)
>
>Here is my scenario:
>1) I have serviceA.wsdl and serviceB.wsdl.
>2) I generate skeletons and stubs with WSDL2Java
>3) I have serviceA.aar which has serviceB.wsdl's stub
>4) When I call serviceB's stub from a class found in serviceA.aar, my
>soap message does not have addressing and security headers.
>5) When I explicitly pass a repository location to constructor of
>serviceB's stub, it fails saying double initialization of addressing
>and security modules.
>6) It cannot find the modules and gives me error when I try to engage
>the addressing and security modules by following code:
> stubB._getServiceClient().engageModule(new QName("addressing"));
> stubB._getServiceClient().engageModule(new QName("security"));
>
>Thanks again.
>
>Ali Sadik Kumlali
>
>
>--- Ali Sadik Kumlali <[EMAIL PROTECTED]> wrote:
>
>
>
>>Hi all,
>>
>>I need my service to call another service. But, it somehow cannot see
>>modules and thus doesn't add security/addressing headers.
>>
>>I tried engaging the modules manually as in test client. But, it
>>couldn't find the modules.
>>
>>Any help would be appreciated.
>>
>>Thanks,
>>
>>Ali Sadik Kumlali
>>
>>__________________________________________________
>>Do You Yahoo!?
>>Tired of spam? Yahoo! Mail has the best spam protection around
>>http://mail.yahoo.com
>>
>>
>>
>
>
>__________________________________________________
>Do You Yahoo!?
>Tired of spam? Yahoo! Mail has the best spam protection around
>http://mail.yahoo.com
>
>
>
>
--
Thanks,
Deepal
................................................................
~Future is Open~