Skip to end of metadata
Go to start of metadata

You are viewing an old version of this page. View the current version.

Compare with Current View Page History

« Previous Version 7 Next »

Background

The impetus for this library is for consistency and ease of management.  Multiple clients interface with KFS' web services so developing a shared library to handle that reduces code replication and modification of that code is done in one place.

Source Code Repository

svn+ssh://svnd@repo.its.hawaii.edu/misint/kfs-webservice-client

To be moved to github soon

Clients

eTravel -  calls getAccountByPrimaryId and isActive

Workflow - calls getAccountByPrimaryId, getAccountSupervisorDelegateByPrimaryId, and getAccountDelegateByPrimaryId

ePayment - calls getPayeeACHAccountByPrimaryId

Generating JAX-WS Artifacts

Use SoapUI to do generate the stubs.  Go to this wiki page for step by step instructions.

The auto generated stubs for the ACH service weren't copied as is to this library. The primary interface classes were modified to be more human readable. For the ACH web service, ACHWebServicePortType.java was renamed (and modified to reflect the current @WebService name) to UhACHWebService.java and ArrayOfPayeeACHAccountWebType.java was renamed to PayeeACHAccount.java. SoapUI will generate a class named UhACHWebService.java but it's just a sample client application so that class doesn't need to be copied into this library.

 

Troubleshooting

eTravel and ePayment have unit tests for the web services so that's the quickest and easiest way to test the web services because they give more information on what is actually wrong.  The log files for either app don't show the level of detail in the logs that the unit tests do.

Marshalling error

See KFSUP-13 for more info

Between KFS4 and KFS6, the uri changed for the AchWebService from http://util.java to http://businessobject.pdp.kfs.its.hawaii.edu so this library had to be rebuilt to account for that difference. 

org.springframework.remoting.jaxws.JaxWsSoapFaultException: Unmarshalling Error: unexpected element (uri:"http://util.java", local:"PayeeACHAccountWebType"). Expected elements are <{http://businessobject.pdp.kfs.its.hawaii.edu}PayeeACHAccountWebType> ; nested exception is javax.xml.ws.soap.SOAPFaultException: Unmarshalling Error: unexpected element (uri:"http://util.java", local:"PayeeACHAccountWebType"). Expected elements are <{http://businessobject.pdp.kfs.its.hawaii.edu}PayeeACHAccountWebType> 
	at org.springframework.remoting.jaxws.JaxWsPortClientInterceptor.doInvoke(JaxWsPortClientInterceptor.java:503)
	at org.springframework.remoting.jaxws.JaxWsPortClientInterceptor.invoke(JaxWsPortClientInterceptor.java:487)
	at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:172)
	at org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:204)
	at com.sun.proxy.$Proxy12.getPayeeACHAccountbyPrimaryId(Unknown Source)
	at edu.hawaii.its.epmt.webservice.client.WebServiceClientTest.existantPayeeAccount(WebServiceClientTest.java:33)

Failed to Create Service

See SADMIN-5084 and SADMIN- 7236 for more info

We're constantly running into this problem during the quarterly upgrades for Java.  When this error occurs, it's almost guarantee that the root ca certs are not in the JDK's cacerts keystore.  The SAs have just been copying the cacerts from the old version to the new version instead of importing the certs directly into the cacerts keystore.

2015-08-18 11:14:24,866 [http-172.16.4.183-9584-2] [user cahana | sessionId 71C6CE1E3DD3AE6A8177E567ABF32862] DEBUG edu.hawaii.travel.kfs.KFSUhWebServiceUtil - javax.xml.ws.WebServiceException: org.apache.cxf.service.factory.ServiceConstructionException: Failed to create service.
	at org.apache.cxf.jaxws.ServiceImpl.<init>(ServiceImpl.java:152)
	at org.apache.cxf.jaxws.spi.ProviderImpl.createServiceDelegate(ProviderImpl.java:63)
	at javax.xml.ws.Service.<init>(Service.java:77)
	at javax.xml.ws.Service.create(Service.java:707)
	at org.springframework.remoting.jaxws.LocalJaxWsServiceFactory.createJaxWsService(LocalJaxWsServiceFactory.java:134)
	at org.springframework.remoting.jaxws.JaxWsPortClientInterceptor.prepare(JaxWsPortClientInterceptor.java:288)
	at org.springframework.remoting.jaxws.JaxWsPortClientInterceptor.invoke(JaxWsPortClientInterceptor.java:376)
	at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:171)
	at org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:204)
	at com.sun.proxy.$Proxy10.isPayeeACHActive(Unknown Source)
	at edu.hawaii.travel.kfs.KFSUhWebServiceUtil.isPayeeACHActive(KFSUhWebServiceUtil.java:115)
	at edu.hawaii.travel.request.TravelRequestWorker.fetchNewTravelerInfo(TravelRequestWorker.java:270)
	at edu.hawaii.travel.request.TravelRequestWorker.fetchNewTravelerInfo(TravelRequestWorker.java:178)

301 Moved Permanently

See KFSUP-10 for more info

The issue was caused by incorrect registry url endpoints defined in KFS.  To resolve, KFS needs to be built with the correct endpoints.

2017-06-21 10:59:05,887 [http-172.16.4.183-9584-3] [user cahana | sessionId 57108BAE3F4AD933F48EB273EC65ACE6] WARN  org.apache.cxf.phase.PhaseInterceptorChain - Interceptor for {KFS}UhAccountWebService#{KFS}getAccountByPrimaryId has thrown exception, unwinding now
org.apache.cxf.interceptor.Fault: Response was of unexpected text/html ContentType.  Incoming portion of HTML stream: <!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML 2.0//EN">
<html><head>
<title>301 Moved Permanently</title>
</head><body>
<h1>Moved Permanently</h1>
<p>The document has moved <a href="https://test6.kfs.hawaii.edu/kfs-tst6/remoting/UhAccountWebService">here</a>.</p>
<hr>
<address>Apache/2.2.15 (Red Hat) Server at test.kfs.hawaii.edu Port 443</address>
</body></html>

 

 

  • No labels