Guest User

Untitled

a guest
Oct 20th, 2017
79
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.02 KB | None | 0 0
  1. @WebService
  2. @HandlerChain(file = "WebService_handler.xml")
  3. public class WSservice {
  4.  
  5. @Resource
  6. private javax.xml.ws.WebServiceContext wsContext;
  7.  
  8. @WebMethod(operationName = "Calculate")
  9. public ResultList сalculate(@WebParam(name = "parameter") InputParameters iparameters) throws DatatypeConfigurationException, Exception {
  10.  
  11. javax.xml.ws.handler.MessageContext messageCntx = wsContext.getMessageContext(); --NULLPOINTER
  12. ......
  13. }
  14.  
  15. @Override
  16. public boolean handleMessage(SOAPMessageContext messageContext) {
  17.  
  18. Hashtable hashTable = new Hashtable(); hashTable.put(Context.INITIAL_CONTEXT_FACTORY,"weblogic.jndi.WLInitialContextFactory");
  19. hashTable.put(Context.PROVIDER_URL, url);
  20. appContext = new InitialContext(hashTable);
  21. Object obj = appContext.lookup("TestingBean");
  22. TestingBeanHome = (CarModelsHome)PortableRemoteObject.narrow(obj, TestingBeanHome.class);
  23. ....
  24. }
Add Comment
Please, Sign In to add comment