I have written a build.xml using clientGen task taking input as WSDL , to consume subscribepresence webservice , when i run the build.xml, I got all the presence webservice related stubs ,Implmentation classes and interfaces .
Now i have written a main program, and by utilizing generated stubs and implmentation classes, i am trying to call a webservice
Below is my main program
PresenceConsumerService_Impl pcs_impl = new PresenceConsumerService_Impl("http://localhost:8002/parlayx21/presence/PresenceConsumer?WSDL");
PresenceConsumer pc = (PresenceConsumer) pcs_impl.getPresenceConsumer();
SimpleReference rf = new SimpleReference();
SubscribePresence sb = new SubscribePresence();
System.out.println(" Before calling subscribe presence ");
SubscribePresenceResponse spr = pc.subscribePresence(sb);
System.out.println(" Hi There here 2226678565");
System.out.println(" Hi There here 333");
System.out.println(" Hi There here 444 ");
System.out.println(" Exception Cause =="+e.getCause());
When i run above main program, I am getting below exception
Before calling subscribe presence
Exception Cause ==weblogic.wsee.jaxrpc.soapfault.WLSOAPFaultException: Unable to add security token for identity
Please tell me where I am going wrong, where to add security parameters, I checked in stubs and classes for security related parameters, but i could not find them
From google, I found that there is presenceconsumerclient class from oracle.sdp.paralyx....PresenceConsumerClient class, where we has username and password varaibles which can be set , but i am using pte.jar which does not contain that package.
Please let me know what more classes or jars required to add security parameters
Is there any way of adding security credentials to interact with webservice .
subject: How to apply security paramters in a main program to interact with webservice with weblogic10.3