我们开发了一个Java API,称为BIP(商务智能发布者)并获得响应。
以前,它在BIP 10G版本上运行良好,并且客户端已从BIP 10G升级到BIP 11G。但是现在对于api,我们还没有收到来自BIP的响应。
在下面的代码中,调用函数失败。
public class Genstmt {
private void info(String line) {
webServiceLogger.log.info("INFO->" + line);
}
public void Report1(Properties prop, String acc, String fromDate,
String toDate, String filename, String Report_name)
throws Exception {
final Logger logger = Logger.getLogger(GenerateAccountStatement.class);
try {
info("Coming to runReport ");
final String bipEndpoint = "http://" + prop.getProperty("BIPIP")
+ ":" + prop.getProperty("BIPPORT")
+ "/xmlpserver/services/PublicReportService?wsdl";
info("Coming to bipEndPoint "+ bipEndpoint );
final String bipNamespace = "http://xmlns.oracle.com/oxp/service/PublicReportService";
String xdofile = "";
if (Report_name.equals("ACCSTMT")) {
xdofile = prop.getProperty("ACCSTMTABSPATH");
} else if (Report_name.equals("LOAN")) {
xdofile = prop.getProperty("LOAN");
}
info("This is info : ACCSTMTABSPATH " + xdofile);
info("This is info : fromDate " + fromDate);
info("This is info : toDate " + toDate);
info("account"+ acc);
// set up the call object
Service service = new Service();
Call call = (Call) service.createCall();
call.setTargetEndpointAddress(new URL(bipEndpoint));
// Run Report
info("runReport Service begin");
// register the ReportRequest class
QName reportReq = new QName(bipNamespace, "ReportRequest");
call.registerTypeMapping(ReportRequest.class, reportReq,
BeanSerializerFactory.class, BeanDeserializerFactory.class);
info("runReport Service begin 1");
// register the ParamNameValue class
QName nmvals = new QName(bipNamespace, "ParamNameValue");
call.registerTypeMapping(ParamNameValue.class, nmvals,
BeanSerializerFactory.class, BeanDeserializerFactory.class);
info("runReport Service begin 2");
// register the BIPReportResponse class
QName reportRespqn = new QName(bipNamespace, "ReportResponse");
call.registerTypeMapping(ReportResponse.class, reportRespqn,
BeanSerializerFactory.class, BeanDeserializerFactory.class);
// Default return type based on what we expect
call.setOperationName(new QName(bipNamespace, "runReport"));
call.addParameter("ReportRequest", reportReq, ParameterMode.IN);
call.addParameter("userID", XMLType.XSD_STRING, ParameterMode.IN);
call.addParameter("password", XMLType.XSD_STRING, ParameterMode.IN);
call.setReturnClass(ReportResponse.class);
info("runReport Service begin 3");
ParamNameValue[] paramNmVals = null;
if (Report_name.equals("ACCSTMT")) {
info("runReport Service begin ACCSTMT");
paramNmVals = new ParamNameValue[3];
// paramNmVals[0] = new ParamNameValue(false, "dept", null) ;
// paramNmVals[1] = new ParamNameValue(false, "emp", new
// String[] {"*"}) ;
paramNmVals[0] = new ParamNameValue();
paramNmVals[0].setMultiValuesAllowed(false);
paramNmVals[0].setName("pm_account");
paramNmVals[0].setValues(new String[] { acc });
paramNmVals[1] = new ParamNameValue();
paramNmVals[1].setMultiValuesAllowed(false);
paramNmVals[1].setName("pm_from_date");
paramNmVals[1].setValues(new String[] { fromDate });
paramNmVals[2] = new ParamNameValue();
paramNmVals[2].setMultiValuesAllowed(false);
paramNmVals[2].setName("pm_to_date");
paramNmVals[2].setValues(new String[] { toDate });
} else if (Report_name.equals("LOAN")) {
info("runReport Service begin loan");
paramNmVals = new ParamNameValue[1];
paramNmVals[0] = new ParamNameValue();
paramNmVals[0].setMultiValuesAllowed(false);
paramNmVals[0].setName("PM_LOAN_ACC");
paramNmVals[0].setValues(new String[] { acc });
}
info("runReport Service begin 4");
ReportRequest req = new ReportRequest();
req.setAttributeFormat("pdf");
req.setAttributeLocale("en-US");
req.setAttributeTemplate("Simple");
req.setParameterNameValues(paramNmVals);
req.setReportAbsolutePath(xdofile);
info("runReport Service begin 5");
// req. setSizeOfDataChunkDownload (-1); //download all
// issue the request
ReportResponse reportResp = (ReportResponse) call
.invoke(new Object[] { req,
prop.getProperty("BIPUSERNAME"),
prop.getProperty("BIPPASSWORD") });
info("Return ReportResponse: ContentType = "
+ reportResp.getReportContentType());
info("runReport Service begin 6");
AND THE ERROR IS:
=================
2019-11-05 16:33:58 DEBUG ProjectResourceBundle:72 - org.apache.axis.i18n.resource::handleGetObject(toAxisFault00)
2019-11-05 16:33:58 DEBUG enterprise:2445 - Mapping Exception to AxisFault
AxisFault
faultCode: {http://schemas.xmlsoap.org/soap/envelope/}Server.userException
faultSubcode:
faultString: org.xml.sax.SAXException: Invalid element in oracle.xdo.webservice.ReportRequest - reportDataFileName
faultActor:
faultNode:
faultDetail:
{http://xml.apache.org/axis/}hostname:drrept01p-l01.amanabank.com
org.xml.sax.SAXException: Invalid element in oracle.xdo.webservice.ReportRequest - reportDataFileName
at org.apache.axis.message.SOAPFaultBuilder.createFault(SOAPFaultBuilder.java:222)
at org.apache.axis.message.SOAPFaultBuilder.endElement(SOAPFaultBuilder.java:129)
at org.apache.axis.encoding.DeserializationContext.endElement(DeserializationContext.java:1087)
at com.sun.org.apache.xerces.internal.parsers.AbstractSAXParser.endElement(AbstractSAXParser.java:609)
at com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl.scanEndElement(XMLDocumentFragmentScannerImpl.java:1782)
at com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl$FragmentContentDriver.next(XMLDocumentFragmentScannerImpl.java:2967)
at com.sun.org.apache.xerces.internal.impl.XMLDocumentScannerImpl.next(XMLDocumentScannerImpl.java:602)
at com.sun.org.apache.xerces.internal.impl.XMLNSDocumentScannerImpl.next(XMLNSDocumentScannerImpl.java:112)
at com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl.scanDocument(XMLDocumentFragmentScannerImpl.java:505)
at com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse(XML11Configuration.java:842)
at com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse(XML11Configuration.java:771)
at com.sun.org.apache.xerces.internal.parsers.XMLParser.parse(XMLParser.java:141)
at com.sun.org.apache.xerces.internal.parsers.AbstractSAXParser.parse(AbstractSAXParser.java:1213)
at com.sun.org.apache.xerces.internal.jaxp.SAXParserImpl$JAXPSAXParser.parse(SAXParserImpl.java:643)
at weblogic.xml.jaxp.WebLogicXMLReader.parse(WebLogicXMLReader.java:133)
at weblogic.xml.jaxp.RegistryXMLReader.parse(RegistryXMLReader.java:171)
at javax.xml.parsers.SAXParser.parse(SAXParser.java:392)
at org.apache.axis.encoding.DeserializationContext.parse(DeserializationContext.java:227)
at org.apache.axis.SOAPPart.getAsSOAPEnvelope(SOAPPart.java:696)
at org.apache.axis.Message.getSOAPEnvelope(Message.java:435)
at org.apache.axis.transport.http.HTTPSender.readFromSocket(HTTPSender.java:796)
at org.apache.axis.transport.http.HTTPSender.invoke(HTTPSender.java:144)
at org.apache.axis.strategies.InvocationStrategy.visit(InvocationStrategy.java:32)
at org.apache.axis.SimpleChain.doVisiting(SimpleChain.java:118)
at org.apache.axis.SimpleChain.invoke(SimpleChain.java:83)
at org.apache.axis.client.AxisClient.invoke(AxisClient.java:165)
at org.apache.axis.client.Call.invokeEngine(Call.java:2784)
at org.apache.axis.client.Call.invoke(Call.java:2767)
at org.apache.axis.client.Call.invoke(Call.java:2443)
at org.apache.axis.client.Call.invoke(Call.java:2366)
at org.apache.axis.client.Call.invoke(Call.java:1812)
at com.finonyx.statement.GenerateAccountStatement.runReport(GenerateAccountStatement.java:122)
at com.finonyx.api.MobileWebService.generate_statement(MobileWebService.java:1169)
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.glassfish.jersey.server.model.internal.ResourceMethodInvocationHandlerFactory$1.invoke(ResourceMethodInvocationHandlerFactory.java:81)
at org.glassfish.jersey.server.model.internal.AbstractJavaResourceMethodDispatcher$1.run(AbstractJavaResourceMethodDispatcher.java:144)
at org.glassfish.jersey.server.model.internal.AbstractJavaResourceMethodDispatcher.invoke(AbstractJavaResourceMethodDispatcher.java:161)
at org.glassfish.jersey.server.model.internal.JavaResourceMethodDispatcherProvider$TypeOutInvoker.doDispatch(JavaResourceMethodDispatcherProvider.java:205)
at org.glassfish.jersey.server.model.internal.AbstractJavaResourceMethodDispatcher.dispatch(AbstractJavaResourceMethodDispatcher.java:99)
at org.glassfish.jersey.server.model.ResourceMethodInvoker.invoke(ResourceMethodInvoker.java:389)
at org.glassfish.jersey.server.model.ResourceMethodInvoker.apply(ResourceMethodInvoker.java:347)
at org.glassfish.jersey.server.model.ResourceMethodInvoker.apply(ResourceMethodInvoker.java:102)
at org.glassfish.jersey.server.ServerRuntime$2.run(ServerRuntime.java:326)
at org.glassfish.jersey.internal.Errors$1.call(Errors.java:271)
at org.glassfish.jersey.internal.Errors$1.call(Errors.java:267)
at org.glassfish.jersey.internal.Errors.process(Errors.java:315)
at org.glassfish.jersey.internal.Errors.process(Errors.java:297)
at org.glassfish.jersey.internal.Errors.process(Errors.java:267)
at org.glassfish.jersey.process.internal.RequestScope.runInScope(RequestScope.java:317)
at org.glassfish.jersey.server.ServerRuntime.process(ServerRuntime.java:305)
at org.glassfish.jersey.server.ApplicationHandler.handle(ApplicationHandler.java:1154)
at org.glassfish.jersey.servlet.WebComponent.serviceImpl(WebComponent.java:473)
at org.glassfish.jersey.servlet.WebComponent.service(WebComponent.java:427)
at org.glassfish.jersey.servlet.ServletContainer.service(ServletContainer.java:388)
at org.glassfish.jersey.servlet.ServletContainer.service(ServletContainer.java:341)
at org.glassfish.jersey.servlet.ServletContainer.service(ServletContainer.java:228)
at weblogic.servlet.internal.StubSecurityHelper$ServletServiceAction.run(StubSecurityHelper.java:286)
at weblogic.servlet.internal.StubSecurityHelper$ServletServiceAction.run(StubSecurityHelper.java:260)
at weblogic.servlet.internal.StubSecurityHelper.invokeServlet(StubSecurityHelper.java:137)
at weblogic.servlet.internal.ServletStubImpl.execute(ServletStubImpl.java:350)
at weblogic.servlet.internal.ServletStubImpl.execute(ServletStubImpl.java:247)
at weblogic.servlet.internal.WebAppServletContext$ServletInvocationAction.wrapRun(WebAppServletContext.java:3702)
at weblogic.servlet.internal.WebAppServletContext$ServletInvocationAction.run(WebAppServletContext.java:3672)
at weblogic.security.acl.internal.AuthenticatedSubject.doAs(AuthenticatedSubject.java:328)
at weblogic.security.service.SecurityManager.runAsForUserCode(SecurityManager.java:197)
at weblogic.servlet.provider.WlsSecurityProvider.runAsForUserCode(WlsSecurityProvider.java:203)
at weblogic.servlet.provider.WlsSubjectHandle.run(WlsSubjectHandle.java:71)
at weblogic.servlet.internal.WebAppServletContext.doSecuredExecute(WebAppServletContext.java:2443)
at weblogic.servlet.internal.WebAppServletContext.securedExecute(WebAppServletContext.java:2291)
at weblogic.servlet.internal.WebAppServletContext.execute(WebAppServletContext.java:2269)
at weblogic.servlet.internal.ServletRequestImpl.runInternal(ServletRequestImpl.java:1705)
at weblogic.servlet.internal.ServletRequestImpl.run(ServletRequestImpl.java:1665)
at weblogic.servlet.provider.ContainerSupportProviderImpl$WlsRequestExecutor.run(ContainerSupportProviderImpl.java:272)
at weblogic.invocation.ComponentInvocationContextManager._runAs(ComponentInvocationContextManager.java:352)
at weblogic.invocation.ComponentInvocationContextManager.runAs(ComponentInvocationContextManager.java:337)
at weblogic.work.LivePartitionUtility.doRunWorkUnderContext(LivePartitionUtility.java:57)
at weblogic.work.PartitionUtility.runWorkUnderContext(PartitionUtility.java:41)
at weblogic.work.SelfTuningWorkManagerImpl.runWorkUnderContext(SelfTuningWorkManagerImpl.java:652)
at weblogic.work.ExecuteThread.execute(ExecuteThread.java:420)
at weblogic.work.ExecuteThread.run(ExecuteThread.java:360)
2019-11-05 16:33:58 INFO webServiceLogger:22 - INFO->catch org.xml.sax.SAXException: Invalid element in oracle.xdo.webservice.ReportRequest - reportDataFileName
2019-11-05 16:33:58 INFO GenerateAccountStatement:140 - error1org.xml.sax.SAXException: Invalid element in oracle.xdo.webservice.ReportRequest - reportDataFileName
2019-11-05 16:33:58 INFO webServiceLogger:1064 - INFO->runReport Service begin 8
2019-11-05 16:33:58 INFO DBUtil:32 - getDataSource
2019-11-05 16:33:58 INFO webServiceLogger:1064 - INFO->Connection is Valid or Open true
2019-11-05 16:33:58 INFO webServiceLogger:1064 - INFO->to_address evenalexjr@gmail.com
2019-11-05 16:33:58 INFO webServiceLogger:1064 - INFO->Connection is closed true
2019-11-05 16:33:58 INFO webServiceLogger:1064 - INFO->This is info : to_address evenalexjr@gmail.com
2019-11-05 16:33:58 INFO webServiceLogger:1064 - INFO->runReport Service begin 9
2019-11-05 16:33:58 INFO webServiceLogger:1064 - INFO->runReport Service begin 10evenalexjr@gmail.com
2019-11-05 16:33:58 INFO webServiceLogger:1064 - INFO->runReport before send mail
2019-11-05 16:33:58 INFO webServiceLogger:172 - INFO->Sending Email
2019-11-05 16:33:58 INFO webServiceLogger:172 - INFO->userid is ebanking@amanabank.co.tz
2019-11-05 16:33:58 INFO webServiceLogger:172 - INFO->username is Amana Bank
2019-11-05 16:33:58 INFO webServiceLogger:172 - INFO->password is Ama3banking31
2019-11-05 16:33:58 INFO webServiceLogger:172 - INFO->===========
2019-11-05 16:33:58 INFO webServiceLogger:172 - INFO->===========Account Statement From 05-Jan-19 to 05-Nov-19
2019-11-05 16:33:58 INFO webServiceLogger:172 - INFO->Body changes
2019-11-05 16:33:58 INFO webServiceLogger:172 - INFO->===========
2019-11-05 16:33:58 INFO webServiceLogger:172 - INFO->Attachment 1 done
2019-11-05 16:33:58 INFO webServiceLogger:172 - INFO->Transporting message
2019-11-05 16:33:58 INFO webServiceLogger:172 - INFO->Failed Transporting message javax.mail.MessagingException: IOException while sending message;
nested exception is:
java.io.FileNotFoundException: /u01/FCLogs/AMALIVE/001XXXX50110001_from_05-Jan-19_to_05-Nov-19.pdf (No such file or directory)
2019-11-05 16:33:58 INFO webServiceLogger:1064 - INFO->runReport after send mail