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
...
Use SoapUI to do generate the stubs. See
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.
Warning | ||
---|---|---|
| ||
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.
Code Block |
---|
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)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:498)
at org.junit.runners.model.FrameworkMethod$1.runReflectiveCall(FrameworkMethod.java:50)
at org.junit.internal.runners.model.ReflectiveCallable.run(ReflectiveCallable.java:12)
at org.junit.runners.model.FrameworkMethod.invokeExplosively(FrameworkMethod.java:47)
at org.junit.internal.runners.statements.InvokeMethod.evaluate(InvokeMethod.java:17)
at org.springframework.test.context.junit4.statements.RunBeforeTestMethodCallbacks.evaluate(RunBeforeTestMethodCallbacks.java:74)
at org.springframework.test.context.junit4.statements.RunAfterTestMethodCallbacks.evaluate(RunAfterTestMethodCallbacks.java:83)
at org.springframework.test.context.junit4.statements.SpringRepeat.evaluate(SpringRepeat.java:72)
at org.springframework.test.context.junit4.SpringJUnit4ClassRunner.runChild(SpringJUnit4ClassRunner.java:231)
at org.springframework.test.context.junit4.SpringJUnit4ClassRunner.runChild(SpringJUnit4ClassRunner.java:88 |
Warning | ||
---|---|---|
| ||
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.
Code Block |
---|
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.junitapache.runnerscxf.ParentRunner$3jaxws.run(ParentRunner.java:290) at org.junit.runners.ParentRunner$1.schedule(ParentRunnerspi.ProviderImpl.createServiceDelegate(ProviderImpl.java:7163) at orgjavax.junitxml.runnersws.ParentRunnerService.runChildren<init>(ParentRunnerService.java:28877) at orgjavax.junitxml.runnersws.ParentRunnerService.access$000create(ParentRunnerService.java:58) at org.junit.runners.ParentRunner$2.evaluate(ParentRunner.java:268707) at org.springframework.testremoting.contextjaxws.junit4.statements.RunBeforeTestClassCallbacks.evaluate(RunBeforeTestClassCallbacksLocalJaxWsServiceFactory.createJaxWsService(LocalJaxWsServiceFactory.java:61134) at org.springframework.testremoting.contextjaxws.junit4.statements.RunAfterTestClassCallbacks.evaluate(RunAfterTestClassCallbacksJaxWsPortClientInterceptor.prepare(JaxWsPortClientInterceptor.java:71288) at org.junit.runners.ParentRunner.run(ParentRunner.java:363) at org.springframework.testremoting.contextjaxws.junit4JaxWsPortClientInterceptor.SpringJUnit4ClassRunner.runinvoke(SpringJUnit4ClassRunnerJaxWsPortClientInterceptor.java:174376) at org.eclipsespringframework.jdtaop.internalframework.junit4.runner.JUnit4TestReference.run(JUnit4TestReferenceReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:86171) at org.eclipsespringframework.jdtaop.internal.junit.runner.TestExecution.run(TestExecution.java:38) at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:459) at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:675) at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.run(RemoteTestRunner.java:382) at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.main(RemoteTestRunner.java:192) Caused by: 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.apache.cxf.jaxws.JaxWsClientProxy.invoke(JaxWsClientProxy.java:158framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:204) at com.sun.proxy.$Proxy125$Proxy10.getPayeeACHAccountbyPrimaryIdisPayeeACHActive(Unknown Source) at sunedu.reflecthawaii.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpltravel.kfs.KFSUhWebServiceUtil.isPayeeACHActive(KFSUhWebServiceUtil.java:62115) at sunedu.reflecthawaii.DelegatingMethodAccessorImpltravel.invoke(DelegatingMethodAccessorImpl.java:43) at java.lang.reflect.Method.invoke(Methodrequest.TravelRequestWorker.fetchNewTravelerInfo(TravelRequestWorker.java:498270) at orgedu.springframeworkhawaii.remotingtravel.jaxwsrequest.JaxWsPortClientInterceptorTravelRequestWorker.doInvokefetchNewTravelerInfo(JaxWsPortClientInterceptorTravelRequestWorker.java:526) at org.springframework.remoting.jaxws.JaxWsPortClientInterceptor.doInvoke(JaxWsPortClientInterceptor.java:500) ... 33 more Caused by: javax.xml.bind.UnmarshalException - with linked exception: [com.sun.istack.SAXParseException2; lineNumber: 1; columnNumber: 153; unexpected element (uri:"http://util.java", local:"PayeeACHAccountWebType"). Expected elements are <{http://businessobject.pdp.kfs.its.hawaii.edu}PayeeACHAccountWebType>] at com.sun.xml.bind.v2.runtime.unmarshaller.UnmarshallerImpl.handleStreamException(UnmarshallerImpl.java:395) at com.sun.xml.bind.v2.runtime.unmarshaller.UnmarshallerImpl.unmarshal0(UnmarshallerImpl.java:334) at com.sun.xml.bind.v2.runtime.unmarshaller.UnmarshallerImpl.unmarshal(UnmarshallerImpl.java:311) at org.apache.cxf.jaxb.JAXBEncoderDecoder.doUnmarshal(JAXBEncoderDecoder.java:857) at org.apache.cxf.jaxb.JAXBEncoderDecoder.access$100(JAXBEncoderDecoder.java:101) at org.apache.cxf.jaxb.JAXBEncoderDecoder$2.run(JAXBEncoderDecoder.java:896) at java.security.AccessController.doPrivileged(Native Method) at org.apache.cxf.jaxb.JAXBEncoderDecoder.unmarshall(JAXBEncoderDecoder.java:894) at org.apache.cxf.jaxb.JAXBEncoderDecoder.unmarshall(JAXBEncoderDecoder.java:711) at org.apache.cxf.jaxb.io.DataReaderImpl.read(DataReaderImpl.java:172) at org.apache.cxf.interceptor.DocLiteralInInterceptor.handleMessage(DocLiteralInInterceptor.java:107) at org.apache.cxf.phase.PhaseInterceptorChain.doIntercept(PhaseInterceptorChain.java:272) at org.apache.cxf.endpoint.ClientImpl.onMessage(ClientImpl.java:849) at org.apache.cxf.transport.http.HTTPConduit$WrappedOutputStream.handleResponseInternal(HTTPConduit.java:1642) at org.apache.cxf.transport.http.HTTPConduit$WrappedOutputStream.handleResponse(HTTPConduit.java:1520) at org.apache.cxf.transport.http.HTTPConduit$WrappedOutputStream.close(HTTPConduit.java:1317) at178) |
Warning | ||
---|---|---|
| ||
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.
Code Block |
---|
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.transport.AbstractConduit.close(AbstractConduit.java:56) at org.apache.cxf.transport.http.HTTPConduit.close(HTTPConduit.java:632) at org.apache.cxf.interceptor.MessageSenderInterceptor$MessageSenderEndingInterceptor.handleMessage(MessageSenderInterceptor.java:62) at org.apache.cxf.phase.PhaseInterceptorChain.doIntercept(PhaseInterceptorChain.java:272) at org.apache.cxf.endpoint.ClientImpl.doInvoke(ClientImpl.java:572) at org.apache.cxf.endpoint.ClientImpl.invoke(ClientImpl.java:481) at org.apache.cxf.endpoint.ClientImpl.invoke(ClientImpl.java:382) at org.apache.cxf.endpoint.ClientImpl.invoke(ClientImpl.java:335) at org.apache.cxf.frontend.ClientProxy.invokeSync(ClientProxy.java:96) at org.apache.cxf.jaxws.JaxWsClientProxy.invoke(JaxWsClientProxy.java:136) ... 40 more Caused by: com.sun.istack.SAXParseException2; lineNumber: 1; columnNumber: 153; unexpected element (uri:"http://util.java", local:"PayeeACHAccountWebType"). Expected elements are <{http://businessobject.pdp.kfs.its.hawaii.edu}PayeeACHAccountWebType> at com.sun.xml.bind.v2.runtime.unmarshaller.UnmarshallingContext.handleEvent(UnmarshallingContext.java:523) at com.sun.xml.bind.v2.runtime.unmarshaller.Loader.reportError(Loader.java:199) at com.sun.xml.bind.v2.runtime.unmarshaller.Loader.reportError(Loader.java:194) at com.sun.xml.bind.v2.runtime.unmarshaller.Loader.reportUnexpectedChildElement(Loader.java:71) at com.sun.xml.bind.v2.runtime.unmarshaller.Loader.childElement(Loader.java:65) at com.sun.xml.bind.v2.runtime.unmarshaller.StructureLoader.childElement(StructureLoader.java:209) at com.sun.xml.bind.v2.runtime.unmarshaller.UnmarshallingContext._startElement(UnmarshallingContext.java:366) at com.sun.xml.bind.v2.runtime.unmarshaller.UnmarshallingContext.startElement(UnmarshallingContext.java:347) at com.sun.xml.bind.v2.runtime.unmarshaller.InterningXmlVisitor.startElement(InterningXmlVisitor.java:35) at com.sun.xml.bind.v2.runtime.unmarshaller.StAXStreamConnector.handleStartElement(StAXStreamConnector.java:201) at com.sun.xml.bind.v2.runtime.unmarshaller.StAXStreamConnector.bridge(StAXStreamConnector.java:135) at com.sun.xml.bind.v2.runtime.unmarshaller.UnmarshallerImpl.unmarshal0(UnmarshallerImpl.java:332) ... 64 more Caused by: javax.xml.bind.UnmarshalException: unexpected element (uri:"http://util.java", local:"PayeeACHAccountWebType"). Expected elements are <{http://businessobject.pdp.kfs.its.hawaii.edu}PayeeACHAccountWebType> ... 76 moreinterceptor.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> |