Hello
I'mtrying to do the same in axis1.3 ie my web service invoking another web service , does anyone have any code sample
Thankyou
Latha
Ali Sadik Kumlali <[EMAIL PROTECTED]> wrote:
Ali Sadik Kumlali <[EMAIL PROTECTED]> wrote:
Deepal,
I've just tried it with axis2 war distribution (RC5) and got NPE.
Here is my code snippet that uses ListenerManager:
---------------------------------------------------------
System.out.println("ListenerManager.defaultConfigurationContext: " +
ListenerManager.defaultConfigurationContext);
System.out.println("ListenerManager.defaultConfigurationContext.getServiceGroupContexts():
" +
ListenerManager.defaultConfigurationContext.getServiceGroupContexts());
com.mycompany.service.test.account.AccountServicesStub stub = new
com.mycompany.service.test.account.AccountServicesStub(ListenerManager.defaultConfigurationContext,
targetEndpoint);
---------------------------------------------------------
Here is the output:
---------------------------------------------------------
ListenerManager.defaultConfigurationContext:
[EMAIL PROTECTED]
ListenerManager.defaultConfigurationContext.getServiceGroupContexts():
{}
java.lang.NullPointerException
at
org.apache.axis2.context.ServiceGroupContext.getServiceContext(ServiceGroupContext.java:59)
at
org.apache.axis2.client.ServiceClient.(ServiceClient.java:101)
at
com.mycompany.service.test.account.AccountServicesStub.(AccountServicesStub.java:329)
at
...
---------------------------------------------------------
What I've seen from the output is
ListenerManager.defaultConfigurationContext is successfully set as it's
not null. But I cannot think furthermore :-)
What should I do?
Thanks a lot.
Ali Sadik Kumlali
--- Ali Sadik Kumlali <[EMAIL PROTECTED]>wrote:
> Thanks Deepal. I'll try it with 1.0 RC3 and let you know the result.
>
> Best regards,
>
> Ali Sadik Kumlali
>
> --- Deepal Jayasinghe <[EMAIL PROTECTED]>wrote:
>
> > 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~
> >
> >
> >
>
>
> __________________________________________________
> 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
Get amazing travel prices for air and hotel in one click on Yahoo! FareChase
