Advertisement
Guest User

Untitled

a guest
Feb 7th, 2018
213
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Java 0.79 KB | None | 0 0
  1. private UploadXMLResponse uploadXMLFile(pt.ine._2013._10.UploadXMLInput parameters) {
  2.     pt.ine._2013._10.WCFUploadXmlService service = new pt.ine._2013._10.WCFUploadXmlService();
  3.     pt.ine._2013._10.IWCFUploadXmlService port = service.getWSHttpBindingIWCFUploadXmlService();
  4.  
  5.     BindingProvider bp = (BindingProvider) port;
  6.     bp.getRequestContext().put(BindingProvider.ENDPOINT_ADDRESS_PROPERTY, "https://uploadTESTES.ine.pt/WCF_UploadXml/WCFUploadXmlService.svc");
  7.  
  8.     final Binding binding = bp.getBinding();
  9.  
  10.     List<Handler> handlerList = binding.getHandlerChain();
  11.     if (handlerList == null) {
  12.         handlerList = new ArrayList<Handler>();
  13.     }
  14.  
  15.     handlerList.add(new ActionHandler());
  16.  
  17.     binding.setHandlerChain(handlerList);
  18.  
  19.     return port.uploadXMLFile(parameters);
  20. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement