Produced by Araxis Merge on 6/9/2017 3:50:57 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.
| # | Location | File | Last Modified |
|---|---|---|---|
| 1 | Fri Jun 9 19:50:57 2017 UTC | ||
| 2 | eHealth_Exch (eHealth Exchange Enhancements) Build 3 docs & code_May_2017.zip\VAP_CIF_CODE0502.zip\VAP_CIF_CODE0502\VAP_CIF_CODE0502\nvap-server\src\main\java\gov\va\nvap\server\endpoint\esr | EnrollmentServiceEndpoint.java | Fri Apr 21 20:03:28 2017 UTC |
| Description | Between Files 1 and 2 |
|
|---|---|---|
| Text Blocks | Lines | |
| Unchanged | 0 | 0 |
| Changed | 0 | 0 |
| Inserted | 1 | 125 |
| Removed | 0 | 0 |
| 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 |
No regular expressions were active.
| 1 | /* | |||||
| 2 | * To chan ge this te mplate, ch oose Tools | Templat es | |||||
| 3 | * and ope n the temp late in th e editor. | |||||
| 4 | */ | |||||
| 5 | package go v.va.nvap. server.end point.esr; | |||||
| 6 | ||||||
| 7 | import gov .va.med.es r.webservi ces.jaxws. schemas.Ge tEESummary Request; | |||||
| 8 | import gov .va.med.es r.webservi ces.jaxws. schemas.Ge tEESummary Response; | |||||
| 9 | import gov .va.nvap.s ervice.esr .Enrollmen tService; | |||||
| 10 | ||||||
| 11 | import jav a.io.IOExc eption; | |||||
| 12 | import jav a.io.Strin gWriter; | |||||
| 13 | import jav a.io.Write r; | |||||
| 14 | import jav a.util.log ging.Level ; | |||||
| 15 | import jav a.util.log ging.Logge r; | |||||
| 16 | ||||||
| 17 | import jav ax.xml.bin d.JAXBCont ext; | |||||
| 18 | import jav ax.xml.bin d.JAXBElem ent; | |||||
| 19 | import jav ax.xml.bin d.JAXBExce ption; | |||||
| 20 | import jav ax.xml.bin d.Marshall er; | |||||
| 21 | import jav ax.xml.nam espace.QNa me; | |||||
| 22 | ||||||
| 23 | import org .springfra mework.ws. client.cor e.WebServi ceTemplate ; | |||||
| 24 | ||||||
| 25 | /** | |||||
| 26 | * Enrollm ent Servic e Endpoint (Proxy/Cl ient) | |||||
| 27 | * | |||||
| 28 | * @author Anand Sas try | |||||
| 29 | */ | |||||
| 30 | public cla ss Enrollm entService Endpoint i mplements Enrollment Service { | |||||
| 31 | ||||||
| 32 | pr ivate stat ic final L ogger logg er = Logge r | |||||
| 33 | .getLo gger(Enrol lmentServi ce.class.g etName()); | |||||
| 34 | pr ivate WebS erviceTemp late esrSe rviceTempl ate; | |||||
| 35 | ||||||
| 36 | pr ivate void dumpReque stContents (final Str ing contex t, | |||||
| 37 | final GetEESumma ryRequest req) { | |||||
| 38 | if ( Enrollment ServiceEnd point.logg er.isLogga ble(Level. INFO)) { | |||||
| 39 | final StringWrit er sw = ne w StringWr iter(); | |||||
| 40 | // Fil eWriter fw = new Fil eWriter(); | |||||
| 41 | this.f oo(context , req, sw) ; | |||||
| 42 | Enroll mentServic eEndpoint. logger.log p(Level.IN FO, | |||||
| 43 | "GetEESumm aryRequest ", context , sw.getBu ffer().toS tring()); | |||||
| 44 | try { | |||||
| 45 | sw.close (); | |||||
| 46 | } catc h (final I OException e) { | |||||
| 47 | // TODO Auto-gener ated catch block | |||||
| 48 | e.printS tackTrace( ); | |||||
| 49 | } | |||||
| 50 | } | |||||
| 51 | } | |||||
| 52 | ||||||
| 53 | pr ivate void dumpRespo nseContent s(final St ring conte xt, | |||||
| 54 | final GetEESumma ryResponse res) { | |||||
| 55 | if ( Enrollment ServiceEnd point.logg er.isLogga ble(Level. INFO)) { | |||||
| 56 | final StringWrit er sw = ne w StringWr iter(); | |||||
| 57 | // Fil eWriter fw = new Fil eWriter(); | |||||
| 58 | this.f oo(context , res, sw) ; | |||||
| 59 | Enroll mentServic eEndpoint. logger.log p(Level.IN FO, | |||||
| 60 | "GetEESumm aryRespons e", contex t, sw.getB uffer().to String()); | |||||
| 61 | try { | |||||
| 62 | sw.close (); | |||||
| 63 | } catc h (final I OException e) { | |||||
| 64 | // TODO Auto-gener ated catch block | |||||
| 65 | e.printS tackTrace( ); | |||||
| 66 | } | |||||
| 67 | } | |||||
| 68 | } | |||||
| 69 | ||||||
| 70 | pr ivate void foo(final String co ntext, fin al Object obj, final Writer wr iter) { | |||||
| 71 | try { | |||||
| 72 | if (ob j == null) { | |||||
| 73 | return; | |||||
| 74 | } | |||||
| 75 | final JAXBContex t jaxbCont ext = JAXB Context.ne wInstance( obj | |||||
| 76 | .getClass( )); | |||||
| 77 | final Marshaller m = jaxbC ontext.cre ateMarshal ler(); | |||||
| 78 | m.setP roperty(Ma rshaller.J AXB_FORMAT TED_OUTPUT , true); | |||||
| 79 | ||||||
| 80 | // m.m arshal(req , System.o ut); | |||||
| 81 | m.mars hal(new JA XBElement( new QName( "uri", "lo cal"), | |||||
| 82 | obj.getCla ss(), obj) , writer); | |||||
| 83 | } ca tch (final JAXBExcep tion e) { | |||||
| 84 | // TOD O Auto-gen erated cat ch block | |||||
| 85 | e.prin tStackTrac e(); | |||||
| 86 | } | |||||
| 87 | } | |||||
| 88 | ||||||
| 89 | @O verride | |||||
| 90 | pu blic GetEE SummaryRes ponse getE ESummaryRe quest( | |||||
| 91 | final GetEESumma ryRequest request) { | |||||
| 92 | if ( Enrollment ServiceEnd point.logg er.isLogga ble(Level. INFO)) { | |||||
| 93 | Enroll mentServic eEndpoint. logger.log p(Level.IN FO, | |||||
| 94 | "Enrollmen tServiceEn dpoint", | |||||
| 95 | "getEESumm aryRequest Before in vocation", "URI: " | |||||
| 96 | + th is.esrServ iceTemplat e.getDefau ltUri()); | |||||
| 97 | } | |||||
| 98 | ||||||
| 99 | this .dumpReque stContents ("getEESum maryReques t Before i nvocation" , | |||||
| 100 | request) ; | |||||
| 101 | GetE ESummaryRe sponse res ponse = nu ll; | |||||
| 102 | fina l Object r etVal = th is.esrServ iceTemplat e | |||||
| 103 | .marshal SendAndRec eive(reque st); | |||||
| 104 | if ( Enrollment ServiceEnd point.logg er.isLogga ble(Level. INFO)) { | |||||
| 105 | Enroll mentServic eEndpoint. logger.log p(Level.IN FO, | |||||
| 106 | "Enrollmen tServiceEn dpoint", | |||||
| 107 | "getEESumm aryRequest After inv ocation", "response class: " | |||||
| 108 | + re tVal.getCl ass()); | |||||
| 109 | } | |||||
| 110 | if ( retVal ins tanceof Ge tEESummary Response) { | |||||
| 111 | respon se = (GetE ESummaryRe sponse) re tVal; | |||||
| 112 | } el se { | |||||
| 113 | final JAXBElemen t jaxbRetV al = (JAXB Element) r etVal; | |||||
| 114 | respon se = (GetE ESummaryRe sponse) ja xbRetVal.g etValue(); | |||||
| 115 | } | |||||
| 116 | this .dumpRespo nseContent s("getEESu mmaryReque st After i nvocation" , | |||||
| 117 | response ); | |||||
| 118 | retu rn respons e; | |||||
| 119 | } | |||||
| 120 | ||||||
| 121 | pu blic void setEsrServ iceTemplat e( | |||||
| 122 | final WebService Template e srServiceT emplate) { | |||||
| 123 | this .esrServic eTemplate = esrServi ceTemplate ; | |||||
| 124 | } | |||||
| 125 | } |
Araxis Merge (but not the data content of this report) is Copyright © 1993-2016 Araxis Ltd (www.araxis.com). All rights reserved.