9786. EPMO Open Source Coordination Office Redaction File Detail Report

Produced by Araxis Merge on 4/27/2017 3:22:17 PM Eastern Daylight Time. See www.araxis.com for information about Merge. This report uses XHTML and CSS2, and is best viewed with a modern standards-compliant browser. For optimum results when printing this report, use landscape orientation and enable printing of background images and colours in your browser.

9786.1 Files compared

# Location File Last Modified
1 PRE-Inbound-eRx-2.0.3.040.zip\PS_INB_ERX_WS\src\main\java\gov\va\med\pharmacy\jaxrs\eAnde\services\impl EESummary_Client.java Sun Dec 18 21:39:16 2016 UTC
2 PRE-Inbound-eRx-2.0.3.040.zip\PS_INB_ERX_WS\src\main\java\gov\va\med\pharmacy\jaxrs\eAnde\services\impl EESummary_Client.java Thu Apr 27 01:47:37 2017 UTC

9786.2 Comparison summary

Description Between
Files 1 and 2
Text Blocks Lines
Unchanged 2 238
Changed 1 2
Inserted 0 0
Removed 0 0

9786.3 Comparison options

Whitespace
Character case Differences in character case are significant
Line endings Differences in line endings (CR and LF characters) are ignored
CR/LF characters Not shown in the comparison detail

9786.4 Active regular expressions

No regular expressions were active.

9786.5 Comparison detail

  1   package go v.va.med.p harmacy.ja xrs.eAnde. services.i mpl;
  2  
  3   import jav a.io.File;
  4   import jav a.io.Input Stream;
  5   import jav a.net.Malf ormedURLEx ception;
  6   import jav a.net.URL;
  7   import jav a.util.Has hMap;
  8   import jav a.util.Map ;
  9   import jav a.util.Pro perties;
  10  
  11   import jav ax.xml.nam espace.QNa me;
  12   import jav ax.xml.ws. BindingPro vider;
  13  
  14   import org .apache.cx f.endpoint .Client;
  15   import org .apache.cx f.endpoint .Endpoint;
  16   import org .apache.cx f.frontend .ClientPro xy;
  17   import org .apache.cx f.ws.secur ity.wss4j. WSS4JOutIn terceptor;
  18   import org .apache.ws s4j.dom.WS Constants;
  19   import org .apache.ws s4j.dom.ha ndler.WSHa ndlerConst ants;
  20  
  21   import gov .va.med.ph armacy.uti lity.Strea mUtilities ;
  22   import gov .va.med.ph armacy.wsc lients.eAn de.ClientP asswordCal lback;
  23   import gov .va.med.ph armacy.wsc lients.eAn de.EeSumma ryPort;
  24   import gov .va.med.ph armacy.wsc lients.eAn de.EeSumma ryPortServ ice;
  25   import gov .va.med.ph armacy.wsc lients.eAn de.GetEESu mmaryReque st;
  26   import gov .va.med.ph armacy.wsc lients.eAn de.getEESu mmaryRespo nse;
  27  
  28  
  29   /**
  30    * JAX-WS  Client for  EESummary  (Enrollme nt and Eli gibility S ervice).
  31    *
  32    */
  33   public fin al class E ESummary_C lient {
  34  
  35       privat e static f inal Strin g E_AND_E_ REQUEST_NA ME = "eAnd e.request. name";
  36           pr ivate stat ic final S tring E_AN D_E_USERNA ME = "eAnd e.username ";
  37           pr ivate stat ic final S tring E_AN D_E_CLIENT _ENDPOINT  = "eAnde.c lient.endp oint";
  38           pr ivate stat ic final Q Name SERVI CE_NAME =  new QName( "http:// DNS . URL         /schemas",  "eeSummar yPortServi ce");
  39  
  40       public  getEESumm aryRespons e returnRe sponse(Str ing key) t hrows java .lang.Exce ption {
  41           
  42           Pr operties p roperties  = new Prop erties();
  43           
  44           St ring usern ame = null ;
  45           St ring eAnde Endpoint =  null;
  46           St ring eAnde RequestNam e = null;
  47                    
  48                    Inpu tStream in putStream  = null;
  49                    
  50                    inpu tStream =  this.getCl ass().getC lassLoader ().getReso urceAsStre am("gov.va .med.pharm acy.wsclie nts.proper ties");
  51                    try{
  52                             if(nul l!=inputSt ream){
  53                                      properti es.load(in putStream) ;
  54                             }
  55                    }
  56                    fina lly{
  57                             if (nu ll != inpu tStream) {
  58                                      StreamUt ilities.sa feClose(in putStream) ;
  59                             }
  60                    }
  61                    eAnd eEndpoint  = properti es.getProp erty(E_AND _E_CLIENT_ ENDPOINT). trim();
  62                    
  63                    user name = pro perties.ge tProperty( E_AND_E_US ERNAME).tr im();
  64           
  65                    eAnd eRequestNa me = prope rties.getP roperty(E_ AND_E_REQU EST_NAME). trim();
  66           
  67                    Stri ng url = " ";
  68  
  69           
  70           UR L wsdlURL  = EeSummar yPortServi ce.WSDL_LO CATION;
  71        
  72           if  (url.leng th() > 0 & & url != n ull && !"" .equals(ur l)) { 
  73                File wsd lFile = ne w File(url );
  74                try {
  75                    if ( wsdlFile.e xists()) {
  76                         wsdlURL =  wsdlFile.t oURI().toU RL();
  77                    } el se {
  78                         wsdlURL =  new URL(ur l);
  79                    }
  80                } catch  (Malformed URLExcepti on e) {                  
  81                    
  82                    thro w new Exce ption(e);  // let the  exception  go all th e way up.
  83                }
  84           }
  85         
  86          EeS ummaryPort Service ss  = new EeS ummaryPort Service(ws dlURL, SER VICE_NAME) ;
  87        
  88          EeS ummaryPort  port = ss .getEeSumm aryPortSoa p11(); 
  89         
  90          ((B indingProv ider)port) .getReques tContext() .put(Bindi ngProvider .ENDPOINT_ ADDRESS_PR OPERTY,eAn deEndpoint );
  91                    
  92          Get EESummaryR equest eeS ummaryRequ est = null ;
  93     
  94          Cli ent client  = ClientP roxy.getCl ient(port) ;
  95          End point cxfE ndpoint =  client.get Endpoint() ;
  96    
  97           Ma p<String,  Object> ou tProps = n ew HashMap <String, O bject>();
  98           ou tProps.put (WSHandler Constants. ACTION, WS HandlerCon stants.USE RNAME_TOKE N);
  99           ou tProps.put (WSHandler Constants. USER, user name);
  100           ou tProps.put (WSHandler Constants. PASSWORD_T YPE, WSCon stants.PW_ TEXT);
  101           Cl ientPasswo rdCallback  handler =  new Clien tPasswordC allback();
  102           ou tProps.put (WSHandler Constants. PW_CALLBAC K_REF, han dler);
  103  
  104           WS S4JOutInte rceptor ws sOut = new  WSS4JOutI nterceptor (outProps) ;
  105          
  106           cx fEndpoint. getOutInte rceptors() .add(wssOu t);
  107           
  108           ee SummaryReq uest= new  GetEESumma ryRequest( );
  109           
  110           ee SummaryReq uest.setKe y(key);
  111  
  112           ee SummaryReq uest.setRe questName( eAndeReque stName);
  113           
  114           ge tEESummary Response e eSummaryRe sponse = p ort.getEES ummary(eeS ummaryRequ est);
  115        
  116           re turn eeSum maryRespon se;
  117       }
  118       
  119  
  120   }