From 4325bd7df1cc695ff93dd624025191b36a67b3d3 Mon Sep 17 00:00:00 2001 From: Matt Christianson Date: Thu, 28 Mar 2024 08:48:30 -0400 Subject: [PATCH 01/16] Initial commit --- .../bgs_service/vnp_ptcpnt_addrs_service.rb | 25 +++++++++++++++++++ 1 file changed, 25 insertions(+) create mode 100644 modules/claims_api/lib/bgs_service/vnp_ptcpnt_addrs_service.rb diff --git a/modules/claims_api/lib/bgs_service/vnp_ptcpnt_addrs_service.rb b/modules/claims_api/lib/bgs_service/vnp_ptcpnt_addrs_service.rb new file mode 100644 index 00000000000..65b1f2c7e26 --- /dev/null +++ b/modules/claims_api/lib/bgs_service/vnp_ptcpnt_addrs_service.rb @@ -0,0 +1,25 @@ +# frozen_string_literal: true + +module ClaimsApi + class VnpPtcpntAddrsService < ClaimsApi::LocalBGS + FORM_TYPE_CD = '21-22' + + def vnp_ptcpnt_addrs_create(options) + vnp_proc_id = options[:vnp_proc_id] + options.delete(:vnp_proc_id) + arg_strg = convert_nil_values(options) + body = Nokogiri::XML::DocumentFragment.parse <<~EOXML + + + #{vnp_proc_id} + #{FORM_TYPE_CD} + + #{arg_strg} + + EOXML + + make_request(endpoint: 'VnpPtcpntAddrsWebServiceBean/VnpPtcpntAddrsService', + action: 'vnpPtcpntAddrsCreate', body:, key: 'return') + end + end +end From 2e27d84491d31fb425b69cb26684d2e5637b0dd3 Mon Sep 17 00:00:00 2001 From: Matt Christianson Date: Tue, 2 Apr 2024 10:17:15 -0400 Subject: [PATCH 02/16] Incremental commit, add spec test --- .../vnp_ptcpnt_addrs_service_spec.rb | 70 ++++ .../vnp_ptcpnt_addrs_create.yml | 387 ++++++++++++++++++ 2 files changed, 457 insertions(+) create mode 100644 modules/claims_api/spec/lib/claims_api/vnp_ptcpnt_addrs_service_spec.rb create mode 100644 spec/support/vcr_cassettes/bgs/vnp_ptcpnt_addrs_service/vnp_ptcpnt_addrs_create.yml diff --git a/modules/claims_api/spec/lib/claims_api/vnp_ptcpnt_addrs_service_spec.rb b/modules/claims_api/spec/lib/claims_api/vnp_ptcpnt_addrs_service_spec.rb new file mode 100644 index 00000000000..8243fa1f61b --- /dev/null +++ b/modules/claims_api/spec/lib/claims_api/vnp_ptcpnt_addrs_service_spec.rb @@ -0,0 +1,70 @@ +# frozen_string_literal: true + +require 'rails_helper' +require 'bgs_service/vnp_ptcpnt_addrs_service' + +describe ClaimsApi::VnpPtcpntAddrsService do + subject { described_class.new external_uid: 'xUid', external_key: 'xKey' } + + describe 'vnp_ptcpnt_addrs_create' do + let(:options) { {} } + + it 'responds with attributes' do + options[:vnp_ptcpnt_addrs_id] = nil + options[:vnp_proc_id] = '3854437' + options[:vnp_ptcpnt_id] = nil + options[:efctv_dt] = '2020-07-16T18:20:17Z' + options[:addrs_one_txt] = '' + options[:addrs_two_txt] = '' + options[:addrs_three_txt] = '' + options[:bad_addrs_ind] = nil + options[:city_nm] = 'Bridgeport' + options[:cntry_nm] = 'United States' + options[:county_nm] = 'Fairfield' + options[:eft_waiver_type_nm] = 281 + options[:email_addrs_txt] = 281 + options[:end_dt] = '2025-07-16T18:20:17Z' + options[:fms_addrs_code_txt] = 281 + options[:frgn_postal_cd] = nil + options[:group_1_verifd_type_cd] = nil + options[:jrn_dt] = '2020-07-16T18:20:17Z' + options[:jrn_lctn_id] = 281 + options[:jrn_obj_id] = 'VAgovAPI' + options[:jrn_status_type_cd] = 'U' + options[:jrn_user_id] = 'VAgovAPI' + options[:lctn_nm] = nil + options[:mlty_postal_type_cd] = nil + options[:mlty_post_office_type_cd] = nil + options[:postal_cd] = nil + options[:prvnc_nm] = nil + options[:ptcpnt_addrs_type_nm] = 'VAgovAPI' + options[:shared_addrs_ind] = nil + options[:trsury_addrs_six_txt] = nil + options[:trsury_addrs_five_txt] = nil + options[:trsury_addrs_four_txt] = nil + options[:trsury_addrs_three_txt] = nil + options[:trsury_addrs_two_txt] = nil + options[:trsury_addrs_one_txt] = nil + options[:trsury_seq_nbr] = nil + options[:trtry_nm] = nil + options[:zip_first_suffix_nbr] = 0 + options[:zip_prefix_nbr] = 64 + options[:zip_second_suffix_nbr] = 68 + + VCR.use_cassette('bgs/vnp_ptcpnt_addrs_service/vnp_ptcpnt_addrs_create') do + response = subject.vnp_ptcpnt_addrs_create(options) + byebug + expect(response).to include( + { vnp_ptcpnt_id: '181913', + vnp_proc_id: '3854437', + jrn_dt: '2020-07-16T18:20:17Z', + jrn_lctn_id: '281', + jrn_obj_id: 'VAgovAPI', + jrn_status_type_cd: 'U', + jrn_user_id: 'VAgovAPI', + ptcpnt_type_nm: 'Person' } + ) + end + end + end +end diff --git a/spec/support/vcr_cassettes/bgs/vnp_ptcpnt_addrs_service/vnp_ptcpnt_addrs_create.yml b/spec/support/vcr_cassettes/bgs/vnp_ptcpnt_addrs_service/vnp_ptcpnt_addrs_create.yml new file mode 100644 index 00000000000..6ae3756fb92 --- /dev/null +++ b/spec/support/vcr_cassettes/bgs/vnp_ptcpnt_addrs_service/vnp_ptcpnt_addrs_create.yml @@ -0,0 +1,387 @@ +--- +http_interactions: +- request: + method: get + uri: https://localhost:4447/VnpPtcpntAddrsWebServiceBean/VnpPtcpntAddrsService?WSDL + body: + encoding: US-ASCII + string: '' + headers: + User-Agent: + - Faraday v2.9.0 + Accept-Encoding: + - gzip;q=1.0,deflate;q=0.6,identity;q=0.3 + Accept: + - "*/*" + response: + status: + code: 200 + message: OK + headers: + Date: + - Tue, 02 Apr 2024 14:11:53 GMT + Server: + - Apache + X-Frame-Options: + - SAMEORIGIN + Transfer-Encoding: + - chunked + Content-Type: + - text/xml;charset=utf-8 + Strict-Transport-Security: + - max-age=16000000; includeSubDomains; preload; + body: + encoding: UTF-8 + string: |- + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + recorded_at: Tue, 02 Apr 2024 14:11:53 GMT +- request: + method: post + uri: https://localhost:4447/VnpPtcpntAddrsWebServiceBean/VnpPtcpntAddrsService + body: + encoding: UTF-8 + string: | + + + + + + VAgovAPI + + + 192.168.0.9 + 281 + VAgovAPI + xUid + xKey + + + + + + + + 2020-07-16T18:20:17ZBridgeportUnited StatesFairfield2812812025-07-16T18:20:17Z2812020-07-16T18:20:17Z281VAgovAPIUVAgovAPIVAgovAPI06468 + + + + + + headers: + User-Agent: + - Faraday v2.9.0 + Content-Type: + - text/xml;charset=UTF-8 + Host: + - ".vba.va.gov" + Soapaction: + - '"vnpPtcpntAddrsCreate"' + Accept-Encoding: + - gzip;q=1.0,deflate;q=0.6,identity;q=0.3 + Accept: + - "*/*" + response: + status: + code: 500 + message: Internal Server Error + headers: + Date: + - Tue, 02 Apr 2024 14:11:54 GMT + Server: + - Apache + X-Frame-Options: + - SAMEORIGIN + X-Oracle-Dms-Ecid: + - 5ebb2983-445f-44b8-b3ac-97e28420d278-001419bb + X-Oracle-Dms-Rid: + - '0' + Transfer-Encoding: + - chunked + Content-Type: + - text/xml; charset=utf-8 + Strict-Transport-Security: + - max-age=16000000; includeSubDomains; preload; + body: + encoding: UTF-8 + string: "rO0ABXdKABR3ZWJsb2dpYy5hcHAudm5wLWVhcgAAANYAAAAjd2VibG9naWMud29ya2FyZWEuU3RyaW5nV29ya0NvbnRleHQABTIuMC44AAA=ns0:ServerEJB + Exception: : <openjpa-1.1.1-SNAPSHOT-r422266:1445923 fatal general error> + org.apache.openjpa.persistence.PersistenceException: The transaction has been + rolled back. See the nested exceptions for details on the errors that occurred.\n\tat + org.apache.openjpa.kernel.BrokerImpl.newFlushException(BrokerImpl.java:2170)\n\tat + org.apache.openjpa.kernel.BrokerImpl.flush(BrokerImpl.java:2017)\n\tat org.apache.openjpa.kernel.BrokerImpl.flushSafe(BrokerImpl.java:1915)\n\tat + org.apache.openjpa.kernel.BrokerImpl.flush(BrokerImpl.java:1686)\n\tat org.apache.openjpa.kernel.QueryImpl.isInMemory(QueryImpl.java:955)\n\tat + org.apache.openjpa.kernel.QueryImpl.execute(QueryImpl.java:795)\n\tat org.apache.openjpa.kernel.QueryImpl.updateAll(QueryImpl.java:883)\n\tat + kodo.kernel.KodoQuery.updateAll(KodoQuery.java:67)\n\tat org.apache.openjpa.kernel.QueryImpl.updateAll(QueryImpl.java:879)\n\tat + kodo.kernel.KodoQuery.updateAll(KodoQuery.java:63)\n\tat org.apache.openjpa.kernel.DelegatingQuery.updateAll(DelegatingQuery.java:565)\n\tat + org.apache.openjpa.persistence.QueryImpl.executeUpdate(QueryImpl.java:322)\n\tat + sun.reflect.GeneratedMethodAccessor3741.invoke(Unknown Source)\n\tat sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)\n\tat + java.lang.reflect.Method.invoke(Method.java:498)\n\tat weblogic.persistence.InterceptingInvocationHandlerImpl.invoke(InterceptingInvocationHandlerImpl.java:24)\n\tat + com.sun.proxy.$Proxy882.executeUpdate(Unknown Source)\n\tat gov.va.vba.benefits.vdc.util.Util.clearDBGlobals(Unknown + Source)\n\tat gov.va.vba.vonapp.services.ptcpntAddrsService.VnpPtcpntAddrsWebServiceBean.vnpPtcpntAddrsCreate(Unknown + Source)\n\tat sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)\n\tat + sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)\n\tat + sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)\n\tat + java.lang.reflect.Method.invoke(Method.java:498)\n\tat com.bea.core.repackaged.springframework.aop.support.AopUtils.invokeJoinpointUsingReflection(AopUtils.java:344)\n\tat + com.bea.core.repackaged.springframework.aop.framework.ReflectiveMethodInvocation.invokeJoinpoint(ReflectiveMethodInvocation.java:198)\n\tat + com.bea.core.repackaged.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:163)\n\tat + com.oracle.pitchfork.intercept.MethodInvocationInvocationContext.proceed(MethodInvocationInvocationContext.java:101)\n\tat + com.oracle.pitchfork.intercept.JeeInterceptorInterceptor.invoke(JeeInterceptorInterceptor.java:101)\n\tat + com.bea.core.repackaged.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:186)\n\tat + com.oracle.pitchfork.intercept.MethodInvocationInvocationContext.proceed(MethodInvocationInvocationContext.java:101)\n\tat + org.jboss.weld.ejb.AbstractEJBRequestScopeActivationInterceptor.aroundInvoke(AbstractEJBRequestScopeActivationInterceptor.java:73)\n\tat + org.jboss.weld.ejb.SessionBeanInterceptor.aroundInvoke(SessionBeanInterceptor.java:52)\n\tat + sun.reflect.GeneratedMethodAccessor37553.invoke(Unknown Source)\n\tat sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)\n\tat + java.lang.reflect.Method.invoke(Method.java:498)\n\tat com.oracle.pitchfork.intercept.JeeInterceptorInterceptor.invoke(JeeInterceptorInterceptor.java:94)\n\tat + com.bea.core.repackaged.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:186)\n\tat + com.bea.core.repackaged.springframework.aop.support.DelegatingIntroductionInterceptor.doProceed(DelegatingIntroductionInterceptor.java:136)\n\tat + com.bea.core.repackaged.springframework.aop.support.DelegatingIntroductionInterceptor.invoke(DelegatingIntroductionInterceptor.java:124)\n\tat + com.bea.core.repackaged.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:186)\n\tat + com.bea.core.repackaged.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:212)\n\tat + com.sun.proxy.$Proxy2747.vnpPtcpntAddrsCreate(Unknown Source)\n\tat gov.va.vba.vonapp.services.ptcpntAddrsService.VnpPtcpntAddrsWebServiceBean_elntxk_WSOImpl.__WL_invoke(Unknown + Source)\n\tat weblogic.ejb.container.internal.WSOMethodInvoker.invoke(WSOMethodInvoker.java:24)\n\tat + gov.va.vba.vonapp.services.ptcpntAddrsService.VnpPtcpntAddrsWebServiceBean_elntxk_WSOImpl.__WL_vnpPtcpntAddrsCreate_WS(Unknown + Source)\n\tat sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)\n\tat + sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)\n\tat + sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)\n\tat + java.lang.reflect.Method.invoke(Method.java:498)\n\tat weblogic.wsee.server.ejb.WsEjb.invoke(WsEjb.java:55)\n\tat + weblogic.wsee.jaxws.WLSEjbInstanceResolver$WLSEjbInvoker.invoke(WLSEjbInstanceResolver.java:196)\n\tat + weblogic.wsee.jaxws.WLSInstanceResolver$WLSInvoker.invoke(WLSInstanceResolver.java:93)\n\tat + com.sun.xml.ws.server.InvokerTube$2.invoke(InvokerTube.java:149)\n\tat com.sun.xml.ws.server.sei.SEIInvokerTube.processRequest(SEIInvokerTube.java:88)\n\tat + com.sun.xml.ws.api.pipe.Fiber.__doRun(Fiber.java:1136)\n\tat com.sun.xml.ws.api.pipe.Fiber._doRun(Fiber.java:1050)\n\tat + com.sun.xml.ws.api.pipe.Fiber.doRun(Fiber.java:1019)\n\tat com.sun.xml.ws.api.pipe.Fiber.runSync(Fiber.java:877)\n\tat + com.sun.xml.ws.server.WSEndpointImpl$2.process(WSEndpointImpl.java:419)\n\tat + com.sun.xml.ws.transport.http.HttpAdapter$HttpToolkit.handle(HttpAdapter.java:868)\n\tat + com.sun.xml.ws.transport.http.HttpAdapter.handle(HttpAdapter.java:422)\n\tat + com.sun.xml.ws.transport.http.servlet.ServletAdapter.handle(ServletAdapter.java:169)\n\tat + weblogic.wsee.jaxws.WLSServletAdapter.handle(WLSServletAdapter.java:246)\n\tat + weblogic.wsee.jaxws.HttpServletAdapter$AuthorizedInvoke.run(HttpServletAdapter.java:667)\n\tat + weblogic.security.acl.internal.AuthenticatedSubject.doAs(AuthenticatedSubject.java:386)\n\tat + weblogic.security.service.SecurityManager.runAs(SecurityManager.java:163)\n\tat + weblogic.wsee.util.ServerSecurityHelper.authenticatedInvoke(ServerSecurityHelper.java:108)\n\tat + weblogic.wsee.jaxws.HttpServletAdapter$3.run(HttpServletAdapter.java:286)\n\tat + weblogic.wsee.jaxws.HttpServletAdapter.post(HttpServletAdapter.java:295)\n\tat + weblogic.wsee.jaxws.JAXWSServlet.doRequest(JAXWSServlet.java:128)\n\tat weblogic.servlet.http.AbstractAsyncServlet.service(AbstractAsyncServlet.java:103)\n\tat + javax.servlet.http.HttpServlet.service(HttpServlet.java:790)\n\tat weblogic.servlet.internal.StubSecurityHelper$ServletServiceAction.run(StubSecurityHelper.java:295)\n\tat + weblogic.servlet.internal.StubSecurityHelper$ServletServiceAction.run(StubSecurityHelper.java:260)\n\tat + weblogic.servlet.internal.StubSecurityHelper.invokeServlet(StubSecurityHelper.java:137)\n\tat + weblogic.servlet.internal.ServletStubImpl.execute(ServletStubImpl.java:353)\n\tat + weblogic.servlet.internal.ServletStubImpl.execute(ServletStubImpl.java:250)\n\tat + weblogic.servlet.internal.WebAppServletContext$ServletInvocationAction.wrapRun(WebAppServletContext.java:3796)\n\tat + weblogic.servlet.internal.WebAppServletContext$ServletInvocationAction.run(WebAppServletContext.java:3766)\n\tat + weblogic.security.acl.internal.AuthenticatedSubject.doAs(AuthenticatedSubject.java:344)\n\tat + weblogic.security.service.SecurityManager.runAsForUserCode(SecurityManager.java:197)\n\tat + weblogic.servlet.provider.WlsSecurityProvider.runAsForUserCode(WlsSecurityProvider.java:203)\n\tat + weblogic.servlet.provider.WlsSubjectHandle.run(WlsSubjectHandle.java:71)\n\tat + weblogic.servlet.internal.WebAppServletContext.doSecuredExecute(WebAppServletContext.java:2454)\n\tat + weblogic.servlet.internal.WebAppServletContext.securedExecute(WebAppServletContext.java:2302)\n\tat + weblogic.servlet.internal.WebAppServletContext.execute(WebAppServletContext.java:2280)\n\tat + weblogic.servlet.internal.ServletRequestImpl.runInternal(ServletRequestImpl.java:1739)\n\tat + weblogic.servlet.internal.ServletRequestImpl.run(ServletRequestImpl.java:1699)\n\tat + weblogic.servlet.provider.ContainerSupportProviderImpl$WlsRequestExecutor.run(ContainerSupportProviderImpl.java:272)\n\tat + weblogic.invocation.ComponentInvocationContextManager._runAs(ComponentInvocationContextManager.java:352)\n\tat + weblogic.invocation.ComponentInvocationContextManager.runAs(ComponentInvocationContextManager.java:337)\n\tat + weblogic.work.LivePartitionUtility.doRunWorkUnderContext(LivePartitionUtility.java:57)\n\tat + weblogic.work.PartitionUtility.runWorkUnderContext(PartitionUtility.java:41)\n\tat + weblogic.work.SelfTuningWorkManagerImpl.runWorkUnderContext(SelfTuningWorkManagerImpl.java:655)\n\tat + weblogic.work.ExecuteThread.execute(ExecuteThread.java:420)\n\tat weblogic.work.ExecuteThread.run(ExecuteThread.java:360)\nCaused + by: <openjpa-1.1.1-SNAPSHOT-r422266:1445923 nonfatal general error> org.apache.openjpa.persistence.PersistenceException: + ORA-12899: value too large for column \"CORPPROD\".\"VNP_PTCPNT_ADDRS\".\"FMS_ADDRS_CODE_TXT\" + (actual: 3, maximum: 2)\n {prepstmnt 87349417 INSERT INTO VNP_PTCPNT_ADDRS + (VNP_PTCPNT_ADDRS_ID, ADDRS_ONE_TXT, ADDRS_THREE_TXT, ADDRS_TWO_TXT, BAD_ADDRS_IND, + CITY_NM, CNTRY_TYPE_NM, COUNTY_NM, EFCTV_DT, EFT_WAIVER_TYPE_NM, EMAIL_ADDRS_TXT, + END_DT, FMS_ADDRS_CODE_TXT, FRGN_POSTAL_CD, GROUP1_VERIFD_TYPE_CD, JRN_DT, + JRN_LCTN_ID, JRN_OBJ_ID, JRN_STATUS_TYPE_CD, JRN_USER_ID, LCTN_NM, MLTY_POST_OFFICE_TYPE_CD, + MLTY_POSTAL_TYPE_CD, POSTAL_CD, PRVNC_NM, PTCPNT_ADDRS_TYPE_NM, SHARED_ADDRS_IND, + TRSURY_ADDRS_FIVE_TXT, TRSURY_ADDRS_FOUR_TXT, TRSURY_ADDRS_ONE_TXT, TRSURY_ADDRS_SIX_TXT, + TRSURY_ADDRS_THREE_TXT, TRSURY_ADDRS_TWO_TXT, TRSURY_SEQ_NBR, TRTRY_NM, VNP_PROC_ID, + VNP_PTCPNT_ID, ZIP_FIRST_SUFFIX_NBR, ZIP_PREFIX_NBR, ZIP_SECOND_SUFFIX_NBR) + VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, + ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?) [params=(long) 143890, + (String) , (String) , (String) , (null) null, (String) Bridgeport, (String) + United States, (String) Fairfield, (Timestamp) 2020-07-16 13:20:17.0, (String) + 281, (String) 281, (Timestamp) 2025-07-16 13:20:17.0, (String) 281, (null) + null, (null) null, (Timestamp) 2020-07-16 13:20:17.0, (String) 281, (String) + VAgovAPI, (String) U, (String) VAgovAPI, (null) null, (null) null, (null) + null, (null) null, (null) null, (String) VAgovAPI, (null) null, (null) null, + (null) null, (null) null, (null) null, (null) null, (null) null, (null) null, + (null) null, (null) null, (null) null, (String) 0, (String) 64, (String) 68]} + [code=12899, state=72000]\nFailedObject: gov.va.vba.vonapp.entities.VnpPtcpntAddrs@36e73559\n\tat + org.apache.openjpa.jdbc.sql.DBDictionary.narrow(DBDictionary.java:4207)\n\tat + org.apache.openjpa.jdbc.sql.DBDictionary.newStoreException(DBDictionary.java:4171)\n\tat + org.apache.openjpa.jdbc.sql.SQLExceptions.getStore(SQLExceptions.java:102)\n\tat + org.apache.openjpa.jdbc.sql.SQLExceptions.getStore(SQLExceptions.java:72)\n\tat + kodo.jdbc.kernel.BatchingPreparedStatementManager.flushInternal(BatchingPreparedStatementManager.java:214)\n\tat + kodo.jdbc.kernel.BatchingPreparedStatementManager.flush(BatchingPreparedStatementManager.java:188)\n\tat + kodo.jdbc.kernel.ConstraintUpdateManager.flush(ConstraintUpdateManager.java:90)\n\tat + org.apache.openjpa.jdbc.kernel.AbstractUpdateManager.flush(AbstractUpdateManager.java:89)\n\tat + org.apache.openjpa.jdbc.kernel.AbstractUpdateManager.flush(AbstractUpdateManager.java:72)\n\tat + org.apache.openjpa.jdbc.kernel.JDBCStoreManager.flush(JDBCStoreManager.java:569)\n\tat + org.apache.openjpa.kernel.DelegatingStoreManager.flush(DelegatingStoreManager.java:130)\n\tat + org.apache.openjpa.datacache.DataCacheStoreManager.flush(DataCacheStoreManager.java:571)\n\tat + org.apache.openjpa.kernel.DelegatingStoreManager.flush(DelegatingStoreManager.java:130)\n\t... + 95 more\nCaused by: org.apache.openjpa.lib.jdbc.ReportingSQLException: ORA-12899: + value too large for column \"CORPPROD\".\"VNP_PTCPNT_ADDRS\".\"FMS_ADDRS_CODE_TXT\" + (actual: 3, maximum: 2)\n {prepstmnt 87349417 INSERT INTO VNP_PTCPNT_ADDRS + (VNP_PTCPNT_ADDRS_ID, ADDRS_ONE_TXT, ADDRS_THREE_TXT, ADDRS_TWO_TXT, BAD_ADDRS_IND, + CITY_NM, CNTRY_TYPE_NM, COUNTY_NM, EFCTV_DT, EFT_WAIVER_TYPE_NM, EMAIL_ADDRS_TXT, + END_DT, FMS_ADDRS_CODE_TXT, FRGN_POSTAL_CD, GROUP1_VERIFD_TYPE_CD, JRN_DT, + JRN_LCTN_ID, JRN_OBJ_ID, JRN_STATUS_TYPE_CD, JRN_USER_ID, LCTN_NM, MLTY_POST_OFFICE_TYPE_CD, + MLTY_POSTAL_TYPE_CD, POSTAL_CD, PRVNC_NM, PTCPNT_ADDRS_TYPE_NM, SHARED_ADDRS_IND, + TRSURY_ADDRS_FIVE_TXT, TRSURY_ADDRS_FOUR_TXT, TRSURY_ADDRS_ONE_TXT, TRSURY_ADDRS_SIX_TXT, + TRSURY_ADDRS_THREE_TXT, TRSURY_ADDRS_TWO_TXT, TRSURY_SEQ_NBR, TRTRY_NM, VNP_PROC_ID, + VNP_PTCPNT_ID, ZIP_FIRST_SUFFIX_NBR, ZIP_PREFIX_NBR, ZIP_SECOND_SUFFIX_NBR) + VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, + ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?) [params=(long) 143890, + (String) , (String) , (String) , (null) null, (String) Bridgeport, (String) + United States, (String) Fairfield, (Timestamp) 2020-07-16 13:20:17.0, (String) + 281, (String) 281, (Timestamp) 2025-07-16 13:20:17.0, (String) 281, (null) + null, (null) null, (Timestamp) 2020-07-16 13:20:17.0, (String) 281, (String) + VAgovAPI, (String) U, (String) VAgovAPI, (null) null, (null) null, (null) + null, (null) null, (null) null, (String) VAgovAPI, (null) null, (null) null, + (null) null, (null) null, (null) null, (null) null, (null) null, (null) null, + (null) null, (null) null, (null) null, (String) 0, (String) 64, (String) 68]} + [code=12899, state=72000]\n\tat org.apache.openjpa.lib.jdbc.LoggingConnectionDecorator.wrap(LoggingConnectionDecorator.java:192)\n\tat + org.apache.openjpa.lib.jdbc.LoggingConnectionDecorator.access$700(LoggingConnectionDecorator.java:57)\n\tat + org.apache.openjpa.lib.jdbc.LoggingConnectionDecorator$LoggingConnection$LoggingPreparedStatement.executeUpdate(LoggingConnectionDecorator.java:866)\n\tat + org.apache.openjpa.lib.jdbc.DelegatingPreparedStatement.executeUpdate(DelegatingPreparedStatement.java:269)\n\tat + org.apache.openjpa.jdbc.kernel.JDBCStoreManager$CancelPreparedStatement.executeUpdate(JDBCStoreManager.java:1453)\n\tat + kodo.jdbc.kernel.BatchingPreparedStatementManager.flushInternal(BatchingPreparedStatementManager.java:208)\n\t... + 103 more\n" + recorded_at: Tue, 02 Apr 2024 14:11:54 GMT +recorded_with: VCR 6.2.0 From 1cf1879ab807529509dca381bba92b69fea0e2b9 Mon Sep 17 00:00:00 2001 From: Matt Christianson Date: Wed, 3 Apr 2024 09:23:43 -0400 Subject: [PATCH 03/16] Misc cleanup, spec value adjustments --- .../bgs_service/vnp_ptcpnt_addrs_service.rb | 7 ------- .../vnp_ptcpnt_addrs_service_spec.rb | 20 +++++++++---------- 2 files changed, 10 insertions(+), 17 deletions(-) diff --git a/modules/claims_api/lib/bgs_service/vnp_ptcpnt_addrs_service.rb b/modules/claims_api/lib/bgs_service/vnp_ptcpnt_addrs_service.rb index 65b1f2c7e26..306ec077363 100644 --- a/modules/claims_api/lib/bgs_service/vnp_ptcpnt_addrs_service.rb +++ b/modules/claims_api/lib/bgs_service/vnp_ptcpnt_addrs_service.rb @@ -2,18 +2,11 @@ module ClaimsApi class VnpPtcpntAddrsService < ClaimsApi::LocalBGS - FORM_TYPE_CD = '21-22' def vnp_ptcpnt_addrs_create(options) - vnp_proc_id = options[:vnp_proc_id] - options.delete(:vnp_proc_id) arg_strg = convert_nil_values(options) body = Nokogiri::XML::DocumentFragment.parse <<~EOXML - - #{vnp_proc_id} - #{FORM_TYPE_CD} - #{arg_strg} EOXML diff --git a/modules/claims_api/spec/lib/claims_api/vnp_ptcpnt_addrs_service_spec.rb b/modules/claims_api/spec/lib/claims_api/vnp_ptcpnt_addrs_service_spec.rb index 8243fa1f61b..3641702de6e 100644 --- a/modules/claims_api/spec/lib/claims_api/vnp_ptcpnt_addrs_service_spec.rb +++ b/modules/claims_api/spec/lib/claims_api/vnp_ptcpnt_addrs_service_spec.rb @@ -11,20 +11,20 @@ it 'responds with attributes' do options[:vnp_ptcpnt_addrs_id] = nil - options[:vnp_proc_id] = '3854437' - options[:vnp_ptcpnt_id] = nil + options[:vnp_proc_id] = '3854566' + options[:vnp_ptcpnt_id] = '182014' options[:efctv_dt] = '2020-07-16T18:20:17Z' - options[:addrs_one_txt] = '' + options[:addrs_one_txt] = '76 Crowther Ave' options[:addrs_two_txt] = '' options[:addrs_three_txt] = '' options[:bad_addrs_ind] = nil options[:city_nm] = 'Bridgeport' options[:cntry_nm] = 'United States' options[:county_nm] = 'Fairfield' - options[:eft_waiver_type_nm] = 281 + options[:eft_waiver_type_nm] = nil options[:email_addrs_txt] = 281 options[:end_dt] = '2025-07-16T18:20:17Z' - options[:fms_addrs_code_txt] = 281 + options[:fms_addrs_code_txt] = nil options[:frgn_postal_cd] = nil options[:group_1_verifd_type_cd] = nil options[:jrn_dt] = '2020-07-16T18:20:17Z' @@ -37,8 +37,8 @@ options[:mlty_post_office_type_cd] = nil options[:postal_cd] = nil options[:prvnc_nm] = nil - options[:ptcpnt_addrs_type_nm] = 'VAgovAPI' - options[:shared_addrs_ind] = nil + options[:ptcpnt_addrs_type_nm] = 'Mailing' + options[:shared_addrs_ind] = 'F' options[:trsury_addrs_six_txt] = nil options[:trsury_addrs_five_txt] = nil options[:trsury_addrs_four_txt] = nil @@ -48,12 +48,12 @@ options[:trsury_seq_nbr] = nil options[:trtry_nm] = nil options[:zip_first_suffix_nbr] = 0 - options[:zip_prefix_nbr] = 64 - options[:zip_second_suffix_nbr] = 68 + options[:zip_prefix_nbr] = 66 + options[:zip_second_suffix_nbr] = 05 VCR.use_cassette('bgs/vnp_ptcpnt_addrs_service/vnp_ptcpnt_addrs_create') do - response = subject.vnp_ptcpnt_addrs_create(options) byebug + response = subject.vnp_ptcpnt_addrs_create(options) expect(response).to include( { vnp_ptcpnt_id: '181913', vnp_proc_id: '3854437', From de778e8170d053552d68fb847459c7032d4e0e89 Mon Sep 17 00:00:00 2001 From: Matt Christianson Date: Wed, 3 Apr 2024 09:25:24 -0400 Subject: [PATCH 04/16] Add blank cassette for now --- .../vnp_ptcpnt_addrs_create.yml | 387 ------------------ 1 file changed, 387 deletions(-) diff --git a/spec/support/vcr_cassettes/bgs/vnp_ptcpnt_addrs_service/vnp_ptcpnt_addrs_create.yml b/spec/support/vcr_cassettes/bgs/vnp_ptcpnt_addrs_service/vnp_ptcpnt_addrs_create.yml index 6ae3756fb92..e69de29bb2d 100644 --- a/spec/support/vcr_cassettes/bgs/vnp_ptcpnt_addrs_service/vnp_ptcpnt_addrs_create.yml +++ b/spec/support/vcr_cassettes/bgs/vnp_ptcpnt_addrs_service/vnp_ptcpnt_addrs_create.yml @@ -1,387 +0,0 @@ ---- -http_interactions: -- request: - method: get - uri: https://localhost:4447/VnpPtcpntAddrsWebServiceBean/VnpPtcpntAddrsService?WSDL - body: - encoding: US-ASCII - string: '' - headers: - User-Agent: - - Faraday v2.9.0 - Accept-Encoding: - - gzip;q=1.0,deflate;q=0.6,identity;q=0.3 - Accept: - - "*/*" - response: - status: - code: 200 - message: OK - headers: - Date: - - Tue, 02 Apr 2024 14:11:53 GMT - Server: - - Apache - X-Frame-Options: - - SAMEORIGIN - Transfer-Encoding: - - chunked - Content-Type: - - text/xml;charset=utf-8 - Strict-Transport-Security: - - max-age=16000000; includeSubDomains; preload; - body: - encoding: UTF-8 - string: |- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - recorded_at: Tue, 02 Apr 2024 14:11:53 GMT -- request: - method: post - uri: https://localhost:4447/VnpPtcpntAddrsWebServiceBean/VnpPtcpntAddrsService - body: - encoding: UTF-8 - string: | - - - - - - VAgovAPI - - - 192.168.0.9 - 281 - VAgovAPI - xUid - xKey - - - - - - - - 2020-07-16T18:20:17ZBridgeportUnited StatesFairfield2812812025-07-16T18:20:17Z2812020-07-16T18:20:17Z281VAgovAPIUVAgovAPIVAgovAPI06468 - - - - - - headers: - User-Agent: - - Faraday v2.9.0 - Content-Type: - - text/xml;charset=UTF-8 - Host: - - ".vba.va.gov" - Soapaction: - - '"vnpPtcpntAddrsCreate"' - Accept-Encoding: - - gzip;q=1.0,deflate;q=0.6,identity;q=0.3 - Accept: - - "*/*" - response: - status: - code: 500 - message: Internal Server Error - headers: - Date: - - Tue, 02 Apr 2024 14:11:54 GMT - Server: - - Apache - X-Frame-Options: - - SAMEORIGIN - X-Oracle-Dms-Ecid: - - 5ebb2983-445f-44b8-b3ac-97e28420d278-001419bb - X-Oracle-Dms-Rid: - - '0' - Transfer-Encoding: - - chunked - Content-Type: - - text/xml; charset=utf-8 - Strict-Transport-Security: - - max-age=16000000; includeSubDomains; preload; - body: - encoding: UTF-8 - string: "rO0ABXdKABR3ZWJsb2dpYy5hcHAudm5wLWVhcgAAANYAAAAjd2VibG9naWMud29ya2FyZWEuU3RyaW5nV29ya0NvbnRleHQABTIuMC44AAA=ns0:ServerEJB - Exception: : <openjpa-1.1.1-SNAPSHOT-r422266:1445923 fatal general error> - org.apache.openjpa.persistence.PersistenceException: The transaction has been - rolled back. See the nested exceptions for details on the errors that occurred.\n\tat - org.apache.openjpa.kernel.BrokerImpl.newFlushException(BrokerImpl.java:2170)\n\tat - org.apache.openjpa.kernel.BrokerImpl.flush(BrokerImpl.java:2017)\n\tat org.apache.openjpa.kernel.BrokerImpl.flushSafe(BrokerImpl.java:1915)\n\tat - org.apache.openjpa.kernel.BrokerImpl.flush(BrokerImpl.java:1686)\n\tat org.apache.openjpa.kernel.QueryImpl.isInMemory(QueryImpl.java:955)\n\tat - org.apache.openjpa.kernel.QueryImpl.execute(QueryImpl.java:795)\n\tat org.apache.openjpa.kernel.QueryImpl.updateAll(QueryImpl.java:883)\n\tat - kodo.kernel.KodoQuery.updateAll(KodoQuery.java:67)\n\tat org.apache.openjpa.kernel.QueryImpl.updateAll(QueryImpl.java:879)\n\tat - kodo.kernel.KodoQuery.updateAll(KodoQuery.java:63)\n\tat org.apache.openjpa.kernel.DelegatingQuery.updateAll(DelegatingQuery.java:565)\n\tat - org.apache.openjpa.persistence.QueryImpl.executeUpdate(QueryImpl.java:322)\n\tat - sun.reflect.GeneratedMethodAccessor3741.invoke(Unknown Source)\n\tat sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)\n\tat - java.lang.reflect.Method.invoke(Method.java:498)\n\tat weblogic.persistence.InterceptingInvocationHandlerImpl.invoke(InterceptingInvocationHandlerImpl.java:24)\n\tat - com.sun.proxy.$Proxy882.executeUpdate(Unknown Source)\n\tat gov.va.vba.benefits.vdc.util.Util.clearDBGlobals(Unknown - Source)\n\tat gov.va.vba.vonapp.services.ptcpntAddrsService.VnpPtcpntAddrsWebServiceBean.vnpPtcpntAddrsCreate(Unknown - Source)\n\tat sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)\n\tat - sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)\n\tat - sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)\n\tat - java.lang.reflect.Method.invoke(Method.java:498)\n\tat com.bea.core.repackaged.springframework.aop.support.AopUtils.invokeJoinpointUsingReflection(AopUtils.java:344)\n\tat - com.bea.core.repackaged.springframework.aop.framework.ReflectiveMethodInvocation.invokeJoinpoint(ReflectiveMethodInvocation.java:198)\n\tat - com.bea.core.repackaged.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:163)\n\tat - com.oracle.pitchfork.intercept.MethodInvocationInvocationContext.proceed(MethodInvocationInvocationContext.java:101)\n\tat - com.oracle.pitchfork.intercept.JeeInterceptorInterceptor.invoke(JeeInterceptorInterceptor.java:101)\n\tat - com.bea.core.repackaged.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:186)\n\tat - com.oracle.pitchfork.intercept.MethodInvocationInvocationContext.proceed(MethodInvocationInvocationContext.java:101)\n\tat - org.jboss.weld.ejb.AbstractEJBRequestScopeActivationInterceptor.aroundInvoke(AbstractEJBRequestScopeActivationInterceptor.java:73)\n\tat - org.jboss.weld.ejb.SessionBeanInterceptor.aroundInvoke(SessionBeanInterceptor.java:52)\n\tat - sun.reflect.GeneratedMethodAccessor37553.invoke(Unknown Source)\n\tat sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)\n\tat - java.lang.reflect.Method.invoke(Method.java:498)\n\tat com.oracle.pitchfork.intercept.JeeInterceptorInterceptor.invoke(JeeInterceptorInterceptor.java:94)\n\tat - com.bea.core.repackaged.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:186)\n\tat - com.bea.core.repackaged.springframework.aop.support.DelegatingIntroductionInterceptor.doProceed(DelegatingIntroductionInterceptor.java:136)\n\tat - com.bea.core.repackaged.springframework.aop.support.DelegatingIntroductionInterceptor.invoke(DelegatingIntroductionInterceptor.java:124)\n\tat - com.bea.core.repackaged.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:186)\n\tat - com.bea.core.repackaged.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:212)\n\tat - com.sun.proxy.$Proxy2747.vnpPtcpntAddrsCreate(Unknown Source)\n\tat gov.va.vba.vonapp.services.ptcpntAddrsService.VnpPtcpntAddrsWebServiceBean_elntxk_WSOImpl.__WL_invoke(Unknown - Source)\n\tat weblogic.ejb.container.internal.WSOMethodInvoker.invoke(WSOMethodInvoker.java:24)\n\tat - gov.va.vba.vonapp.services.ptcpntAddrsService.VnpPtcpntAddrsWebServiceBean_elntxk_WSOImpl.__WL_vnpPtcpntAddrsCreate_WS(Unknown - Source)\n\tat sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)\n\tat - sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)\n\tat - sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)\n\tat - java.lang.reflect.Method.invoke(Method.java:498)\n\tat weblogic.wsee.server.ejb.WsEjb.invoke(WsEjb.java:55)\n\tat - weblogic.wsee.jaxws.WLSEjbInstanceResolver$WLSEjbInvoker.invoke(WLSEjbInstanceResolver.java:196)\n\tat - weblogic.wsee.jaxws.WLSInstanceResolver$WLSInvoker.invoke(WLSInstanceResolver.java:93)\n\tat - com.sun.xml.ws.server.InvokerTube$2.invoke(InvokerTube.java:149)\n\tat com.sun.xml.ws.server.sei.SEIInvokerTube.processRequest(SEIInvokerTube.java:88)\n\tat - com.sun.xml.ws.api.pipe.Fiber.__doRun(Fiber.java:1136)\n\tat com.sun.xml.ws.api.pipe.Fiber._doRun(Fiber.java:1050)\n\tat - com.sun.xml.ws.api.pipe.Fiber.doRun(Fiber.java:1019)\n\tat com.sun.xml.ws.api.pipe.Fiber.runSync(Fiber.java:877)\n\tat - com.sun.xml.ws.server.WSEndpointImpl$2.process(WSEndpointImpl.java:419)\n\tat - com.sun.xml.ws.transport.http.HttpAdapter$HttpToolkit.handle(HttpAdapter.java:868)\n\tat - com.sun.xml.ws.transport.http.HttpAdapter.handle(HttpAdapter.java:422)\n\tat - com.sun.xml.ws.transport.http.servlet.ServletAdapter.handle(ServletAdapter.java:169)\n\tat - weblogic.wsee.jaxws.WLSServletAdapter.handle(WLSServletAdapter.java:246)\n\tat - weblogic.wsee.jaxws.HttpServletAdapter$AuthorizedInvoke.run(HttpServletAdapter.java:667)\n\tat - weblogic.security.acl.internal.AuthenticatedSubject.doAs(AuthenticatedSubject.java:386)\n\tat - weblogic.security.service.SecurityManager.runAs(SecurityManager.java:163)\n\tat - weblogic.wsee.util.ServerSecurityHelper.authenticatedInvoke(ServerSecurityHelper.java:108)\n\tat - weblogic.wsee.jaxws.HttpServletAdapter$3.run(HttpServletAdapter.java:286)\n\tat - weblogic.wsee.jaxws.HttpServletAdapter.post(HttpServletAdapter.java:295)\n\tat - weblogic.wsee.jaxws.JAXWSServlet.doRequest(JAXWSServlet.java:128)\n\tat weblogic.servlet.http.AbstractAsyncServlet.service(AbstractAsyncServlet.java:103)\n\tat - javax.servlet.http.HttpServlet.service(HttpServlet.java:790)\n\tat weblogic.servlet.internal.StubSecurityHelper$ServletServiceAction.run(StubSecurityHelper.java:295)\n\tat - weblogic.servlet.internal.StubSecurityHelper$ServletServiceAction.run(StubSecurityHelper.java:260)\n\tat - weblogic.servlet.internal.StubSecurityHelper.invokeServlet(StubSecurityHelper.java:137)\n\tat - weblogic.servlet.internal.ServletStubImpl.execute(ServletStubImpl.java:353)\n\tat - weblogic.servlet.internal.ServletStubImpl.execute(ServletStubImpl.java:250)\n\tat - weblogic.servlet.internal.WebAppServletContext$ServletInvocationAction.wrapRun(WebAppServletContext.java:3796)\n\tat - weblogic.servlet.internal.WebAppServletContext$ServletInvocationAction.run(WebAppServletContext.java:3766)\n\tat - weblogic.security.acl.internal.AuthenticatedSubject.doAs(AuthenticatedSubject.java:344)\n\tat - weblogic.security.service.SecurityManager.runAsForUserCode(SecurityManager.java:197)\n\tat - weblogic.servlet.provider.WlsSecurityProvider.runAsForUserCode(WlsSecurityProvider.java:203)\n\tat - weblogic.servlet.provider.WlsSubjectHandle.run(WlsSubjectHandle.java:71)\n\tat - weblogic.servlet.internal.WebAppServletContext.doSecuredExecute(WebAppServletContext.java:2454)\n\tat - weblogic.servlet.internal.WebAppServletContext.securedExecute(WebAppServletContext.java:2302)\n\tat - weblogic.servlet.internal.WebAppServletContext.execute(WebAppServletContext.java:2280)\n\tat - weblogic.servlet.internal.ServletRequestImpl.runInternal(ServletRequestImpl.java:1739)\n\tat - weblogic.servlet.internal.ServletRequestImpl.run(ServletRequestImpl.java:1699)\n\tat - weblogic.servlet.provider.ContainerSupportProviderImpl$WlsRequestExecutor.run(ContainerSupportProviderImpl.java:272)\n\tat - weblogic.invocation.ComponentInvocationContextManager._runAs(ComponentInvocationContextManager.java:352)\n\tat - weblogic.invocation.ComponentInvocationContextManager.runAs(ComponentInvocationContextManager.java:337)\n\tat - weblogic.work.LivePartitionUtility.doRunWorkUnderContext(LivePartitionUtility.java:57)\n\tat - weblogic.work.PartitionUtility.runWorkUnderContext(PartitionUtility.java:41)\n\tat - weblogic.work.SelfTuningWorkManagerImpl.runWorkUnderContext(SelfTuningWorkManagerImpl.java:655)\n\tat - weblogic.work.ExecuteThread.execute(ExecuteThread.java:420)\n\tat weblogic.work.ExecuteThread.run(ExecuteThread.java:360)\nCaused - by: <openjpa-1.1.1-SNAPSHOT-r422266:1445923 nonfatal general error> org.apache.openjpa.persistence.PersistenceException: - ORA-12899: value too large for column \"CORPPROD\".\"VNP_PTCPNT_ADDRS\".\"FMS_ADDRS_CODE_TXT\" - (actual: 3, maximum: 2)\n {prepstmnt 87349417 INSERT INTO VNP_PTCPNT_ADDRS - (VNP_PTCPNT_ADDRS_ID, ADDRS_ONE_TXT, ADDRS_THREE_TXT, ADDRS_TWO_TXT, BAD_ADDRS_IND, - CITY_NM, CNTRY_TYPE_NM, COUNTY_NM, EFCTV_DT, EFT_WAIVER_TYPE_NM, EMAIL_ADDRS_TXT, - END_DT, FMS_ADDRS_CODE_TXT, FRGN_POSTAL_CD, GROUP1_VERIFD_TYPE_CD, JRN_DT, - JRN_LCTN_ID, JRN_OBJ_ID, JRN_STATUS_TYPE_CD, JRN_USER_ID, LCTN_NM, MLTY_POST_OFFICE_TYPE_CD, - MLTY_POSTAL_TYPE_CD, POSTAL_CD, PRVNC_NM, PTCPNT_ADDRS_TYPE_NM, SHARED_ADDRS_IND, - TRSURY_ADDRS_FIVE_TXT, TRSURY_ADDRS_FOUR_TXT, TRSURY_ADDRS_ONE_TXT, TRSURY_ADDRS_SIX_TXT, - TRSURY_ADDRS_THREE_TXT, TRSURY_ADDRS_TWO_TXT, TRSURY_SEQ_NBR, TRTRY_NM, VNP_PROC_ID, - VNP_PTCPNT_ID, ZIP_FIRST_SUFFIX_NBR, ZIP_PREFIX_NBR, ZIP_SECOND_SUFFIX_NBR) - VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, - ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?) [params=(long) 143890, - (String) , (String) , (String) , (null) null, (String) Bridgeport, (String) - United States, (String) Fairfield, (Timestamp) 2020-07-16 13:20:17.0, (String) - 281, (String) 281, (Timestamp) 2025-07-16 13:20:17.0, (String) 281, (null) - null, (null) null, (Timestamp) 2020-07-16 13:20:17.0, (String) 281, (String) - VAgovAPI, (String) U, (String) VAgovAPI, (null) null, (null) null, (null) - null, (null) null, (null) null, (String) VAgovAPI, (null) null, (null) null, - (null) null, (null) null, (null) null, (null) null, (null) null, (null) null, - (null) null, (null) null, (null) null, (String) 0, (String) 64, (String) 68]} - [code=12899, state=72000]\nFailedObject: gov.va.vba.vonapp.entities.VnpPtcpntAddrs@36e73559\n\tat - org.apache.openjpa.jdbc.sql.DBDictionary.narrow(DBDictionary.java:4207)\n\tat - org.apache.openjpa.jdbc.sql.DBDictionary.newStoreException(DBDictionary.java:4171)\n\tat - org.apache.openjpa.jdbc.sql.SQLExceptions.getStore(SQLExceptions.java:102)\n\tat - org.apache.openjpa.jdbc.sql.SQLExceptions.getStore(SQLExceptions.java:72)\n\tat - kodo.jdbc.kernel.BatchingPreparedStatementManager.flushInternal(BatchingPreparedStatementManager.java:214)\n\tat - kodo.jdbc.kernel.BatchingPreparedStatementManager.flush(BatchingPreparedStatementManager.java:188)\n\tat - kodo.jdbc.kernel.ConstraintUpdateManager.flush(ConstraintUpdateManager.java:90)\n\tat - org.apache.openjpa.jdbc.kernel.AbstractUpdateManager.flush(AbstractUpdateManager.java:89)\n\tat - org.apache.openjpa.jdbc.kernel.AbstractUpdateManager.flush(AbstractUpdateManager.java:72)\n\tat - org.apache.openjpa.jdbc.kernel.JDBCStoreManager.flush(JDBCStoreManager.java:569)\n\tat - org.apache.openjpa.kernel.DelegatingStoreManager.flush(DelegatingStoreManager.java:130)\n\tat - org.apache.openjpa.datacache.DataCacheStoreManager.flush(DataCacheStoreManager.java:571)\n\tat - org.apache.openjpa.kernel.DelegatingStoreManager.flush(DelegatingStoreManager.java:130)\n\t... - 95 more\nCaused by: org.apache.openjpa.lib.jdbc.ReportingSQLException: ORA-12899: - value too large for column \"CORPPROD\".\"VNP_PTCPNT_ADDRS\".\"FMS_ADDRS_CODE_TXT\" - (actual: 3, maximum: 2)\n {prepstmnt 87349417 INSERT INTO VNP_PTCPNT_ADDRS - (VNP_PTCPNT_ADDRS_ID, ADDRS_ONE_TXT, ADDRS_THREE_TXT, ADDRS_TWO_TXT, BAD_ADDRS_IND, - CITY_NM, CNTRY_TYPE_NM, COUNTY_NM, EFCTV_DT, EFT_WAIVER_TYPE_NM, EMAIL_ADDRS_TXT, - END_DT, FMS_ADDRS_CODE_TXT, FRGN_POSTAL_CD, GROUP1_VERIFD_TYPE_CD, JRN_DT, - JRN_LCTN_ID, JRN_OBJ_ID, JRN_STATUS_TYPE_CD, JRN_USER_ID, LCTN_NM, MLTY_POST_OFFICE_TYPE_CD, - MLTY_POSTAL_TYPE_CD, POSTAL_CD, PRVNC_NM, PTCPNT_ADDRS_TYPE_NM, SHARED_ADDRS_IND, - TRSURY_ADDRS_FIVE_TXT, TRSURY_ADDRS_FOUR_TXT, TRSURY_ADDRS_ONE_TXT, TRSURY_ADDRS_SIX_TXT, - TRSURY_ADDRS_THREE_TXT, TRSURY_ADDRS_TWO_TXT, TRSURY_SEQ_NBR, TRTRY_NM, VNP_PROC_ID, - VNP_PTCPNT_ID, ZIP_FIRST_SUFFIX_NBR, ZIP_PREFIX_NBR, ZIP_SECOND_SUFFIX_NBR) - VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, - ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?) [params=(long) 143890, - (String) , (String) , (String) , (null) null, (String) Bridgeport, (String) - United States, (String) Fairfield, (Timestamp) 2020-07-16 13:20:17.0, (String) - 281, (String) 281, (Timestamp) 2025-07-16 13:20:17.0, (String) 281, (null) - null, (null) null, (Timestamp) 2020-07-16 13:20:17.0, (String) 281, (String) - VAgovAPI, (String) U, (String) VAgovAPI, (null) null, (null) null, (null) - null, (null) null, (null) null, (String) VAgovAPI, (null) null, (null) null, - (null) null, (null) null, (null) null, (null) null, (null) null, (null) null, - (null) null, (null) null, (null) null, (String) 0, (String) 64, (String) 68]} - [code=12899, state=72000]\n\tat org.apache.openjpa.lib.jdbc.LoggingConnectionDecorator.wrap(LoggingConnectionDecorator.java:192)\n\tat - org.apache.openjpa.lib.jdbc.LoggingConnectionDecorator.access$700(LoggingConnectionDecorator.java:57)\n\tat - org.apache.openjpa.lib.jdbc.LoggingConnectionDecorator$LoggingConnection$LoggingPreparedStatement.executeUpdate(LoggingConnectionDecorator.java:866)\n\tat - org.apache.openjpa.lib.jdbc.DelegatingPreparedStatement.executeUpdate(DelegatingPreparedStatement.java:269)\n\tat - org.apache.openjpa.jdbc.kernel.JDBCStoreManager$CancelPreparedStatement.executeUpdate(JDBCStoreManager.java:1453)\n\tat - kodo.jdbc.kernel.BatchingPreparedStatementManager.flushInternal(BatchingPreparedStatementManager.java:208)\n\t... - 103 more\n" - recorded_at: Tue, 02 Apr 2024 14:11:54 GMT -recorded_with: VCR 6.2.0 From 9420812a3368ef1e9f90bf20d8f42f9a9f40c63c Mon Sep 17 00:00:00 2001 From: Matt Christianson Date: Wed, 3 Apr 2024 10:15:04 -0400 Subject: [PATCH 05/16] Test data tweaks --- .../claims_api/vnp_ptcpnt_addrs_service_spec.rb | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/modules/claims_api/spec/lib/claims_api/vnp_ptcpnt_addrs_service_spec.rb b/modules/claims_api/spec/lib/claims_api/vnp_ptcpnt_addrs_service_spec.rb index 3641702de6e..cd59b4f93d4 100644 --- a/modules/claims_api/spec/lib/claims_api/vnp_ptcpnt_addrs_service_spec.rb +++ b/modules/claims_api/spec/lib/claims_api/vnp_ptcpnt_addrs_service_spec.rb @@ -11,8 +11,8 @@ it 'responds with attributes' do options[:vnp_ptcpnt_addrs_id] = nil - options[:vnp_proc_id] = '3854566' - options[:vnp_ptcpnt_id] = '182014' + options[:vnp_proc_id] = '3854571' + options[:vnp_ptcpnt_id] = '182017' options[:efctv_dt] = '2020-07-16T18:20:17Z' options[:addrs_one_txt] = '76 Crowther Ave' options[:addrs_two_txt] = '' @@ -22,12 +22,12 @@ options[:cntry_nm] = 'United States' options[:county_nm] = 'Fairfield' options[:eft_waiver_type_nm] = nil - options[:email_addrs_txt] = 281 + options[:email_addrs_txt] = nil options[:end_dt] = '2025-07-16T18:20:17Z' options[:fms_addrs_code_txt] = nil options[:frgn_postal_cd] = nil options[:group_1_verifd_type_cd] = nil - options[:jrn_dt] = '2020-07-16T18:20:17Z' + options[:jrn_dt] = Time.current.iso8601 options[:jrn_lctn_id] = 281 options[:jrn_obj_id] = 'VAgovAPI' options[:jrn_status_type_cd] = 'U' @@ -47,9 +47,9 @@ options[:trsury_addrs_one_txt] = nil options[:trsury_seq_nbr] = nil options[:trtry_nm] = nil - options[:zip_first_suffix_nbr] = 0 - options[:zip_prefix_nbr] = 66 - options[:zip_second_suffix_nbr] = 05 + options[:zip_first_suffix_nbr] = '66' + options[:zip_prefix_nbr] = '0' + options[:zip_second_suffix_nbr] = '05' VCR.use_cassette('bgs/vnp_ptcpnt_addrs_service/vnp_ptcpnt_addrs_create') do byebug From a83628f0992b4a8327cbf2c28bb8f18f809b174e Mon Sep 17 00:00:00 2001 From: Matt Christianson Date: Wed, 3 Apr 2024 10:16:15 -0400 Subject: [PATCH 06/16] Remove byebug --- .../spec/lib/claims_api/vnp_ptcpnt_addrs_service_spec.rb | 1 - 1 file changed, 1 deletion(-) diff --git a/modules/claims_api/spec/lib/claims_api/vnp_ptcpnt_addrs_service_spec.rb b/modules/claims_api/spec/lib/claims_api/vnp_ptcpnt_addrs_service_spec.rb index cd59b4f93d4..590438a09fc 100644 --- a/modules/claims_api/spec/lib/claims_api/vnp_ptcpnt_addrs_service_spec.rb +++ b/modules/claims_api/spec/lib/claims_api/vnp_ptcpnt_addrs_service_spec.rb @@ -52,7 +52,6 @@ options[:zip_second_suffix_nbr] = '05' VCR.use_cassette('bgs/vnp_ptcpnt_addrs_service/vnp_ptcpnt_addrs_create') do - byebug response = subject.vnp_ptcpnt_addrs_create(options) expect(response).to include( { vnp_ptcpnt_id: '181913', From 2cd73fa1f411e81db7e56b6ee1ef9cd973442344 Mon Sep 17 00:00:00 2001 From: Matt Christianson Date: Thu, 4 Apr 2024 10:20:25 -0400 Subject: [PATCH 07/16] Arrange options in order presented in BGS service catalog --- .../vnp_ptcpnt_addrs_service_spec.rb | 22 +++++++++---------- 1 file changed, 11 insertions(+), 11 deletions(-) diff --git a/modules/claims_api/spec/lib/claims_api/vnp_ptcpnt_addrs_service_spec.rb b/modules/claims_api/spec/lib/claims_api/vnp_ptcpnt_addrs_service_spec.rb index 590438a09fc..978b2cc9bf5 100644 --- a/modules/claims_api/spec/lib/claims_api/vnp_ptcpnt_addrs_service_spec.rb +++ b/modules/claims_api/spec/lib/claims_api/vnp_ptcpnt_addrs_service_spec.rb @@ -11,23 +11,23 @@ it 'responds with attributes' do options[:vnp_ptcpnt_addrs_id] = nil - options[:vnp_proc_id] = '3854571' - options[:vnp_ptcpnt_id] = '182017' - options[:efctv_dt] = '2020-07-16T18:20:17Z' + options[:vnp_proc_id] = '3854572' + options[:vnp_ptcpnt_id] = '182018' + options[:efctv_dt] = Time.current.iso8601 options[:addrs_one_txt] = '76 Crowther Ave' - options[:addrs_two_txt] = '' - options[:addrs_three_txt] = '' + options[:addrs_three_txt] = nil + options[:addrs_two_txt] = nil options[:bad_addrs_ind] = nil options[:city_nm] = 'Bridgeport' - options[:cntry_nm] = 'United States' + options[:cntry_nm] = 'USA' options[:county_nm] = 'Fairfield' options[:eft_waiver_type_nm] = nil - options[:email_addrs_txt] = nil - options[:end_dt] = '2025-07-16T18:20:17Z' + options[:email_addrs_txt] = 'testy@test.com' + options[:end_dt] = nil options[:fms_addrs_code_txt] = nil options[:frgn_postal_cd] = nil options[:group_1_verifd_type_cd] = nil - options[:jrn_dt] = Time.current.iso8601 + options[:jrn_dt] = '2020-07-16T18:20:17Z' options[:jrn_lctn_id] = 281 options[:jrn_obj_id] = 'VAgovAPI' options[:jrn_status_type_cd] = 'U' @@ -39,12 +39,12 @@ options[:prvnc_nm] = nil options[:ptcpnt_addrs_type_nm] = 'Mailing' options[:shared_addrs_ind] = 'F' - options[:trsury_addrs_six_txt] = nil options[:trsury_addrs_five_txt] = nil options[:trsury_addrs_four_txt] = nil + options[:trsury_addrs_one_txt] = nil + options[:trsury_addrs_six_txt] = nil options[:trsury_addrs_three_txt] = nil options[:trsury_addrs_two_txt] = nil - options[:trsury_addrs_one_txt] = nil options[:trsury_seq_nbr] = nil options[:trtry_nm] = nil options[:zip_first_suffix_nbr] = '66' From b50cf2a1869332dc6decc335cdc9467251bd7b25 Mon Sep 17 00:00:00 2001 From: Matt Christianson Date: Thu, 4 Apr 2024 15:05:38 -0400 Subject: [PATCH 08/16] Add updated spec with accepted values, updated cassette --- .../vnp_ptcpnt_addrs_service_spec.rb | 37 ++- .../vnp_ptcpnt_addrs_create.yml | 242 ++++++++++++++++++ 2 files changed, 265 insertions(+), 14 deletions(-) diff --git a/modules/claims_api/spec/lib/claims_api/vnp_ptcpnt_addrs_service_spec.rb b/modules/claims_api/spec/lib/claims_api/vnp_ptcpnt_addrs_service_spec.rb index 978b2cc9bf5..91cae6c6c81 100644 --- a/modules/claims_api/spec/lib/claims_api/vnp_ptcpnt_addrs_service_spec.rb +++ b/modules/claims_api/spec/lib/claims_api/vnp_ptcpnt_addrs_service_spec.rb @@ -11,16 +11,16 @@ it 'responds with attributes' do options[:vnp_ptcpnt_addrs_id] = nil - options[:vnp_proc_id] = '3854572' - options[:vnp_ptcpnt_id] = '182018' - options[:efctv_dt] = Time.current.iso8601 + options[:vnp_proc_id] = '3854596' + options[:vnp_ptcpnt_id] = '182057' + options[:efctv_dt] = '2020-07-16T18:20:18Z' options[:addrs_one_txt] = '76 Crowther Ave' options[:addrs_three_txt] = nil options[:addrs_two_txt] = nil options[:bad_addrs_ind] = nil options[:city_nm] = 'Bridgeport' - options[:cntry_nm] = 'USA' - options[:county_nm] = 'Fairfield' + options[:cntry_nm] = nil + options[:county_nm] = nil options[:eft_waiver_type_nm] = nil options[:email_addrs_txt] = 'testy@test.com' options[:end_dt] = nil @@ -35,10 +35,10 @@ options[:lctn_nm] = nil options[:mlty_postal_type_cd] = nil options[:mlty_post_office_type_cd] = nil - options[:postal_cd] = nil - options[:prvnc_nm] = nil + options[:postal_cd] = 'CT' + options[:prvnc_nm] = 'CT' options[:ptcpnt_addrs_type_nm] = 'Mailing' - options[:shared_addrs_ind] = 'F' + options[:shared_addrs_ind] = 'N' options[:trsury_addrs_five_txt] = nil options[:trsury_addrs_four_txt] = nil options[:trsury_addrs_one_txt] = nil @@ -47,21 +47,30 @@ options[:trsury_addrs_two_txt] = nil options[:trsury_seq_nbr] = nil options[:trtry_nm] = nil - options[:zip_first_suffix_nbr] = '66' - options[:zip_prefix_nbr] = '0' - options[:zip_second_suffix_nbr] = '05' + options[:zip_first_suffix_nbr] = nil + options[:zip_prefix_nbr] = '06605' + options[:zip_second_suffix_nbr] = nil VCR.use_cassette('bgs/vnp_ptcpnt_addrs_service/vnp_ptcpnt_addrs_create') do response = subject.vnp_ptcpnt_addrs_create(options) expect(response).to include( - { vnp_ptcpnt_id: '181913', - vnp_proc_id: '3854437', + { vnp_ptcpnt_addrs_id: '143950', + efctv_dt: '2020-07-16T18:20:18Z', + vnp_ptcpnt_id: '182057', + vnp_proc_id: '3854596', + addrs_one_txt: '76 Crowther Ave', + city_nm: 'Bridgeport', + email_addrs_txt: 'testy@test.com', jrn_dt: '2020-07-16T18:20:17Z', jrn_lctn_id: '281', jrn_obj_id: 'VAgovAPI', jrn_status_type_cd: 'U', jrn_user_id: 'VAgovAPI', - ptcpnt_type_nm: 'Person' } + postal_cd: 'CT', + prvnc_nm: 'CT', + ptcpnt_addrs_type_nm: 'Mailing', + shared_addrs_ind: 'N', + zip_prefix_nbr: '06605' } ) end end diff --git a/spec/support/vcr_cassettes/bgs/vnp_ptcpnt_addrs_service/vnp_ptcpnt_addrs_create.yml b/spec/support/vcr_cassettes/bgs/vnp_ptcpnt_addrs_service/vnp_ptcpnt_addrs_create.yml index e69de29bb2d..4fb2c9b60f3 100644 --- a/spec/support/vcr_cassettes/bgs/vnp_ptcpnt_addrs_service/vnp_ptcpnt_addrs_create.yml +++ b/spec/support/vcr_cassettes/bgs/vnp_ptcpnt_addrs_service/vnp_ptcpnt_addrs_create.yml @@ -0,0 +1,242 @@ +--- +http_interactions: +- request: + method: get + uri: https://internal-dsva-vagov-dev-fwdproxy-1893365470.us-gov-west-1.elb.amazonaws.com:4447/VnpPtcpntAddrsWebServiceBean/VnpPtcpntAddrsService?WSDL + body: + encoding: US-ASCII + string: '' + headers: + User-Agent: + - Faraday v2.9.0 + Accept-Encoding: + - gzip;q=1.0,deflate;q=0.6,identity;q=0.3 + Accept: + - "*/*" + response: + status: + code: 200 + message: OK + headers: + Date: + - Thu, 04 Apr 2024 18:57:11 GMT + Server: + - Apache + X-Frame-Options: + - SAMEORIGIN + Transfer-Encoding: + - chunked + Content-Type: + - text/xml;charset=utf-8 + Strict-Transport-Security: + - max-age=16000000; includeSubDomains; preload; + body: + encoding: UTF-8 + string: |- + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + recorded_at: Thu, 04 Apr 2024 18:57:11 GMT +- request: + method: post + uri: https://internal-dsva-vagov-dev-fwdproxy-1893365470.us-gov-west-1.elb.amazonaws.com:4447/VnpPtcpntAddrsWebServiceBean/VnpPtcpntAddrsService + body: + encoding: UTF-8 + string: | + + + + + + VAgovAPI + + + 192.168.0.9 + 281 + VAgovAPI + xUid + xKey + + + + + + + + 38545961820572020-07-16T18:20:18Z76 Crowther AveBridgeporttesty@test.com2020-07-16T18:20:17Z281VAgovAPIUVAgovAPICTCTMailingN06605 + + + + + + headers: + User-Agent: + - Faraday v2.9.0 + Content-Type: + - text/xml;charset=UTF-8 + Host: + - ".vba.va.gov" + Soapaction: + - '"vnpPtcpntAddrsCreate"' + Accept-Encoding: + - gzip;q=1.0,deflate;q=0.6,identity;q=0.3 + Accept: + - "*/*" + response: + status: + code: 200 + message: OK + headers: + Date: + - Thu, 04 Apr 2024 18:57:12 GMT + Server: + - Apache + X-Frame-Options: + - SAMEORIGIN + Transfer-Encoding: + - chunked + Content-Type: + - text/xml; charset=utf-8 + Strict-Transport-Security: + - max-age=16000000; includeSubDomains; preload; + body: + encoding: UTF-8 + string: rO0ABXdKABR3ZWJsb2dpYy5hcHAudm5wLWVhcgAAANYAAAAjd2VibG9naWMud29ya2FyZWEuU3RyaW5nV29ya0NvbnRleHQABTIuMC44AAA=1439502020-07-16T18:20:18Z182057385459676 + Crowther AveBridgeporttesty@test.com2020-07-16T18:20:17Z281VAgovAPIUVAgovAPICTCTMailingN06605 + recorded_at: Thu, 04 Apr 2024 18:57:12 GMT +recorded_with: VCR 6.2.0 From cbcae9ebe217e2d42ffeee28048498bed9b430a4 Mon Sep 17 00:00:00 2001 From: Matt Christianson Date: Thu, 4 Apr 2024 15:08:43 -0400 Subject: [PATCH 09/16] Rubocop layout adjustment --- modules/claims_api/lib/bgs_service/vnp_ptcpnt_addrs_service.rb | 1 - 1 file changed, 1 deletion(-) diff --git a/modules/claims_api/lib/bgs_service/vnp_ptcpnt_addrs_service.rb b/modules/claims_api/lib/bgs_service/vnp_ptcpnt_addrs_service.rb index 306ec077363..85bf4cda2ff 100644 --- a/modules/claims_api/lib/bgs_service/vnp_ptcpnt_addrs_service.rb +++ b/modules/claims_api/lib/bgs_service/vnp_ptcpnt_addrs_service.rb @@ -2,7 +2,6 @@ module ClaimsApi class VnpPtcpntAddrsService < ClaimsApi::LocalBGS - def vnp_ptcpnt_addrs_create(options) arg_strg = convert_nil_values(options) body = Nokogiri::XML::DocumentFragment.parse <<~EOXML From a05170f65becc381d29e97ca23d489c14aef7e13 Mon Sep 17 00:00:00 2001 From: Matt Christianson Date: Thu, 11 Apr 2024 10:09:29 -0400 Subject: [PATCH 10/16] Initial changes for BGS unit test pattern --- .../lib/claims_api/vnp_ptcpnt_addrs_service_spec.rb | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/modules/claims_api/spec/lib/claims_api/vnp_ptcpnt_addrs_service_spec.rb b/modules/claims_api/spec/lib/claims_api/vnp_ptcpnt_addrs_service_spec.rb index 91cae6c6c81..bb1be065c5f 100644 --- a/modules/claims_api/spec/lib/claims_api/vnp_ptcpnt_addrs_service_spec.rb +++ b/modules/claims_api/spec/lib/claims_api/vnp_ptcpnt_addrs_service_spec.rb @@ -2,8 +2,16 @@ require 'rails_helper' require 'bgs_service/vnp_ptcpnt_addrs_service' +require Rails.root.join('modules', 'claims_api', 'spec', 'support', 'bgs_client_helpers.rb') -describe ClaimsApi::VnpPtcpntAddrsService do +metadata = { + bgs: { + service: 'vnp_ptcpnt_addrs_service', + operation: 'vnp_ptcpnt_addrs_create' + } +} + +describe ClaimsApi::VnpPtcpntAddrsService, metadata do subject { described_class.new external_uid: 'xUid', external_key: 'xKey' } describe 'vnp_ptcpnt_addrs_create' do From 90596264e44d395755152941f29a5959c4049de6 Mon Sep 17 00:00:00 2001 From: Matt Christianson Date: Thu, 11 Apr 2024 10:58:15 -0400 Subject: [PATCH 11/16] Update to use helper method --- .../spec/lib/claims_api/vnp_ptcpnt_addrs_service_spec.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/modules/claims_api/spec/lib/claims_api/vnp_ptcpnt_addrs_service_spec.rb b/modules/claims_api/spec/lib/claims_api/vnp_ptcpnt_addrs_service_spec.rb index bb1be065c5f..3e80d040a23 100644 --- a/modules/claims_api/spec/lib/claims_api/vnp_ptcpnt_addrs_service_spec.rb +++ b/modules/claims_api/spec/lib/claims_api/vnp_ptcpnt_addrs_service_spec.rb @@ -59,7 +59,7 @@ options[:zip_prefix_nbr] = '06605' options[:zip_second_suffix_nbr] = nil - VCR.use_cassette('bgs/vnp_ptcpnt_addrs_service/vnp_ptcpnt_addrs_create') do + use_bgs_cassette('vnp_ptcpnt_addrs_create') do response = subject.vnp_ptcpnt_addrs_create(options) expect(response).to include( { vnp_ptcpnt_addrs_id: '143950', From 3a3b132f7512b6fcb19b4438c4ad867ab1083593 Mon Sep 17 00:00:00 2001 From: Oren Mittman Date: Mon, 15 Apr 2024 12:55:54 -0400 Subject: [PATCH 12/16] API-34936 correct outdated BGS client helper cassette location comment --- modules/claims_api/spec/support/bgs_client_helpers.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/modules/claims_api/spec/support/bgs_client_helpers.rb b/modules/claims_api/spec/support/bgs_client_helpers.rb index 8cd2c5f8ebc..4d6394c50fd 100644 --- a/modules/claims_api/spec/support/bgs_client_helpers.rb +++ b/modules/claims_api/spec/support/bgs_client_helpers.rb @@ -38,7 +38,7 @@ module BGSClientHelpers # Then, HTTP interactions that occur within the block supplied to this method # will be captured by VCR cassettes that have the following convenient # properties: - # - They will be nicely organized at `bgs/:service/:operation/:name` + # - They will be nicely organized at `claims_api/bgs/:service/:operation/:name` # - Cassette matching will be done on canonicalized XML bodies, so # reformatting cassettes for human readability won't defeat matching def use_bgs_cassette(name, &) From 0b36566dd5271572a85ba36c8594a29ef06b7fb3 Mon Sep 17 00:00:00 2001 From: Oren Mittman Date: Mon, 15 Apr 2024 12:52:12 -0400 Subject: [PATCH 13/16] API-34936 move cassette location to match BGS client helper --- .../spec/lib/claims_api/vnp_ptcpnt_addrs_service_spec.rb | 2 +- .../vnp_ptcpnt_addrs_create/happy_path.yml} | 0 2 files changed, 1 insertion(+), 1 deletion(-) rename spec/support/vcr_cassettes/{bgs/vnp_ptcpnt_addrs_service/vnp_ptcpnt_addrs_create.yml => claims_api/bgs/vnp_ptcpnt_addrs_service/vnp_ptcpnt_addrs_create/happy_path.yml} (100%) diff --git a/modules/claims_api/spec/lib/claims_api/vnp_ptcpnt_addrs_service_spec.rb b/modules/claims_api/spec/lib/claims_api/vnp_ptcpnt_addrs_service_spec.rb index 3e80d040a23..e9dfa8550cb 100644 --- a/modules/claims_api/spec/lib/claims_api/vnp_ptcpnt_addrs_service_spec.rb +++ b/modules/claims_api/spec/lib/claims_api/vnp_ptcpnt_addrs_service_spec.rb @@ -59,7 +59,7 @@ options[:zip_prefix_nbr] = '06605' options[:zip_second_suffix_nbr] = nil - use_bgs_cassette('vnp_ptcpnt_addrs_create') do + use_bgs_cassette('happy_path') do response = subject.vnp_ptcpnt_addrs_create(options) expect(response).to include( { vnp_ptcpnt_addrs_id: '143950', diff --git a/spec/support/vcr_cassettes/bgs/vnp_ptcpnt_addrs_service/vnp_ptcpnt_addrs_create.yml b/spec/support/vcr_cassettes/claims_api/bgs/vnp_ptcpnt_addrs_service/vnp_ptcpnt_addrs_create/happy_path.yml similarity index 100% rename from spec/support/vcr_cassettes/bgs/vnp_ptcpnt_addrs_service/vnp_ptcpnt_addrs_create.yml rename to spec/support/vcr_cassettes/claims_api/bgs/vnp_ptcpnt_addrs_service/vnp_ptcpnt_addrs_create/happy_path.yml From 96141bfa2b5e7ac45b7cb089229467ace7ee070e Mon Sep 17 00:00:00 2001 From: Oren Mittman Date: Mon, 15 Apr 2024 13:05:41 -0400 Subject: [PATCH 14/16] API-34936 replace hardcoded BGS base URL with cassette placeholder --- .../vnp_ptcpnt_addrs_create/happy_path.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/spec/support/vcr_cassettes/claims_api/bgs/vnp_ptcpnt_addrs_service/vnp_ptcpnt_addrs_create/happy_path.yml b/spec/support/vcr_cassettes/claims_api/bgs/vnp_ptcpnt_addrs_service/vnp_ptcpnt_addrs_create/happy_path.yml index 4fb2c9b60f3..03661310848 100644 --- a/spec/support/vcr_cassettes/claims_api/bgs/vnp_ptcpnt_addrs_service/vnp_ptcpnt_addrs_create/happy_path.yml +++ b/spec/support/vcr_cassettes/claims_api/bgs/vnp_ptcpnt_addrs_service/vnp_ptcpnt_addrs_create/happy_path.yml @@ -2,7 +2,7 @@ http_interactions: - request: method: get - uri: https://internal-dsva-vagov-dev-fwdproxy-1893365470.us-gov-west-1.elb.amazonaws.com:4447/VnpPtcpntAddrsWebServiceBean/VnpPtcpntAddrsService?WSDL + uri: /VnpPtcpntAddrsWebServiceBean/VnpPtcpntAddrsService?WSDL body: encoding: US-ASCII string: '' @@ -171,7 +171,7 @@ http_interactions: recorded_at: Thu, 04 Apr 2024 18:57:11 GMT - request: method: post - uri: https://internal-dsva-vagov-dev-fwdproxy-1893365470.us-gov-west-1.elb.amazonaws.com:4447/VnpPtcpntAddrsWebServiceBean/VnpPtcpntAddrsService + uri: /VnpPtcpntAddrsWebServiceBean/VnpPtcpntAddrsService body: encoding: UTF-8 string: | From 7c70c3168c626e7e439e09b9fcc807e749b1c1eb Mon Sep 17 00:00:00 2001 From: Oren Mittman Date: Mon, 15 Apr 2024 13:06:38 -0400 Subject: [PATCH 15/16] API-34936 replace IP mismatch in BGS cassette --- .../vnp_ptcpnt_addrs_create/happy_path.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/spec/support/vcr_cassettes/claims_api/bgs/vnp_ptcpnt_addrs_service/vnp_ptcpnt_addrs_create/happy_path.yml b/spec/support/vcr_cassettes/claims_api/bgs/vnp_ptcpnt_addrs_service/vnp_ptcpnt_addrs_create/happy_path.yml index 03661310848..c4e49a562eb 100644 --- a/spec/support/vcr_cassettes/claims_api/bgs/vnp_ptcpnt_addrs_service/vnp_ptcpnt_addrs_create/happy_path.yml +++ b/spec/support/vcr_cassettes/claims_api/bgs/vnp_ptcpnt_addrs_service/vnp_ptcpnt_addrs_create/happy_path.yml @@ -183,7 +183,7 @@ http_interactions: VAgovAPI - 192.168.0.9 + 127.0.0.1 281 VAgovAPI xUid From e12694caafc83899bf955f5b7455a8ba39224138 Mon Sep 17 00:00:00 2001 From: Oren Mittman Date: Mon, 15 Apr 2024 14:51:56 -0400 Subject: [PATCH 16/16] API-34936 reformat vnp_ptcpnt_addrs_create cassette for readability --- .../vnp_ptcpnt_addrs_create/happy_path.yml | 264 +++++++----------- 1 file changed, 104 insertions(+), 160 deletions(-) diff --git a/spec/support/vcr_cassettes/claims_api/bgs/vnp_ptcpnt_addrs_service/vnp_ptcpnt_addrs_create/happy_path.yml b/spec/support/vcr_cassettes/claims_api/bgs/vnp_ptcpnt_addrs_service/vnp_ptcpnt_addrs_create/happy_path.yml index c4e49a562eb..11d52b9b5fd 100644 --- a/spec/support/vcr_cassettes/claims_api/bgs/vnp_ptcpnt_addrs_service/vnp_ptcpnt_addrs_create/happy_path.yml +++ b/spec/support/vcr_cassettes/claims_api/bgs/vnp_ptcpnt_addrs_service/vnp_ptcpnt_addrs_create/happy_path.yml @@ -33,141 +33,7 @@ http_interactions: body: encoding: UTF-8 string: |- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + recorded_at: Thu, 04 Apr 2024 18:57:11 GMT - request: method: post @@ -175,32 +41,78 @@ http_interactions: body: encoding: UTF-8 string: | - - + + - - - VAgovAPI - - - 127.0.0.1 - 281 - VAgovAPI - xUid - xKey - - - - + + + VAgovAPI + + + 127.0.0.1 + 281 + VAgovAPI + xUid + xKey + + + - 38545961820572020-07-16T18:20:18Z76 Crowther AveBridgeporttesty@test.com2020-07-16T18:20:17Z281VAgovAPIUVAgovAPICTCTMailingN06605 - - + + 3854596 + 182057 + 2020-07-16T18:20:18Z + 76 Crowther Ave + + + + Bridgeport + + + + testy@test.com + + + + + 2020-07-16T18:20:17Z + 281 + VAgovAPI + U + VAgovAPI + + + + CT + CT + Mailing + N + + + + + + + + + + 06605 + + - + headers: User-Agent: - Faraday v2.9.0 @@ -233,10 +145,42 @@ http_interactions: - max-age=16000000; includeSubDomains; preload; body: encoding: UTF-8 - string: rO0ABXdKABR3ZWJsb2dpYy5hcHAudm5wLWVhcgAAANYAAAAjd2VibG9naWMud29ya2FyZWEuU3RyaW5nV29ya0NvbnRleHQABTIuMC44AAA=1439502020-07-16T18:20:18Z182057385459676 - Crowther AveBridgeporttesty@test.com2020-07-16T18:20:17Z281VAgovAPIUVAgovAPICTCTMailingN06605 + string: | + + + + + rO0ABXdKABR3ZWJsb2dpYy5hcHAudm5wLWVhcgAAANYAAAAjd2VibG9naWMud29ya2FyZWEuU3RyaW5nV29ya0NvbnRleHQABTIuMC44AAA= + + + + + + 143950 + 2020-07-16T18:20:18Z + 182057 + 3854596 + 76 Crowther Ave + Bridgeport + testy@test.com + 2020-07-16T18:20:17Z + 281 + VAgovAPI + U + VAgovAPI + CT + CT + Mailing + N + 06605 + + + + recorded_at: Thu, 04 Apr 2024 18:57:12 GMT recorded_with: VCR 6.2.0