使用soap数据处理程序发送文件

pzfprimi  于 2021-07-06  发布在  Java
关注(0)|答案(0)|浏览(285)

我在webservice上的datahandler上发送jpg时遇到问题。这个问题似乎只是jpg文件,而不是其他类型的文件。不知何故,当我尝试通过webservice发送时,相同的方法找不到该文件并显示ioexception。

InputStream
        at com.hp.mps.onlinetransactions.actions.SikayetAction.generalErrorMessageForSrOperation(SikayetAction.java:477)
        at com.hp.mps.onlinetransactions.actions.SikayetAction.process(SikayetAction.java:248)
        at com.hp.mps.common.base.MPSBaseAction.execute(MPSBaseAction.java:708)
        at com.hp.mps.infrastructure.mvc.ControllingServlet.chainProcess(ControllingServlet.java:1000)
        at com.hp.mps.infrastructure.mvc.ControllingServlet.service(ControllingServlet.java:654)
        at javax.servlet.http.HttpServlet.service(HttpServlet.java:820)
        at weblogic.servlet.internal.StubSecurityHelper$ServletServiceAction.run(StubSecurityHelper.java:227)
        at weblogic.servlet.internal.StubSecurityHelper.invokeServlet(StubSecurityHelper.java:125)
        at weblogic.servlet.internal.ServletStubImpl.execute(ServletStubImpl.java:301)
        at weblogic.servlet.internal.TailFilter.doFilter(TailFilter.java:26)
        at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:60)
        at com.hp.mps.common.util.DoubleSubmitFilter.doFilter(DoubleSubmitFilter.java:86)
        at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:60)
        at weblogic.servlet.internal.WebAppServletContext$ServletInvocationAction.wrapRun(WebAppServletContext.java:3748)
        at weblogic.servlet.internal.WebAppServletContext$ServletInvocationAction.run(WebAppServletContext.java:3714)
        at weblogic.security.acl.internal.AuthenticatedSubject.doAs(AuthenticatedSubject.java:321)
        at weblogic.security.service.SecurityManager.runAs(SecurityManager.java:120)
        at weblogic.servlet.internal.WebAppServletContext.securedExecute(WebAppServletContext.java:2283)
        at weblogic.servlet.internal.WebAppServletContext.execute(WebAppServletContext.java:2182)
        at weblogic.servlet.internal.ServletRequestImpl.run(ServletRequestImpl.java:1499)
        at weblogic.work.ExecuteThread.execute(ExecuteThread.java:263)
        at weblogic.work.ExecuteThread.run(ExecuteThread.java:221)
Caused by: java.io.IOException: Unable to encode the image to a stream ImageDataContentHandler requires Image object, was given object of type class java.io.FileInputStream
        at com.sun.xml.ws.encoding.ImageDataContentHandler.writeTo(ImageDataContentHandler.java:174)
        at  .DataHandlerAttachment.writeTo(DataHandlerAttachment.java:122)
        at com.sun.xml.ws.encoding.MimeCodec.encode(MimeCodec.java:155)
        at com.sun.xml.ws.encoding.SwACodec.encode(SwACodec.java:57)
        at com.sun.xml.ws.encoding.SOAPBindingCodec.encode(SOAPBindingCodec.java:261)
        at com.sun.xml.ws.transport.http.client.HttpTransportPipe.process(HttpTransportPipe.java:189)
        at com.sun.xml.ws.transport.http.client.HttpTransportPipe.processRequest(HttpTransportPipe.java:124)
        at com.sun.xml.ws.transport.DeferredTransportPipe.processRequest(DeferredTransportPipe.java:118)
        at com.sun.xml.ws.api.pipe.Fiber.__doRun(Fiber.java:866)
        at com.sun.xml.ws.api.pipe.Fiber._doRun(Fiber.java:815)
        at com.sun.xml.ws.api.pipe.Fiber.doRun(Fiber.java:778)
        at com.sun.xml.ws.api.pipe.Fiber.runSync(Fiber.java:680)
        at com.sun.xml.ws.client.Stub.process(Stub.java:272)
        at com.sun.xml.ws.client.sei.SEIStub.doProcess(SEIStub.java:153)
        at com.sun.xml.ws.client.sei.SyncMethodHandler.invoke(SyncMethodHandler.java:115)
        at com.sun.xml.ws.client.sei.SyncMethodHandler.invoke(SyncMethodHandler.java:95)
        at com.sun.xml.ws.client.sei.SEIStub.invoke(SEIStub.java:136)
        at com.sun.proxy.$Proxy427.saveFile(Unknown Source)
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
        at java.lang.reflect.Method.invoke(Method.java:597)
        at weblogic.wsee.jaxws.spi.ClientInstanceInvocationHandler.invoke(ClientInstanceInvocationHandler.java:84)
        at com.sun.proxy.$Proxy236.saveFile(Unknown Source)
        at com.hp.mps.onlinetransactions.beans.SikayetFileOperationsBean.saveFile(SikayetFileOperationsBean.java:66)
        at com.hp.mps.onlinetransactions.actions.SikayetAction.getDocIdFromFileServer(SikayetAction.java:317)
        at com.hp.mps.onlinetransactions.actions.SikayetAction.fillDocumentMap(SikayetAction.java:259)
        at com.hp.mps.onlinetransactions.actions.SikayetAction.process(SikayetAction.java:209)
        ... 20 more

暂无答案!

目前还没有任何答案,快来回答吧!

相关问题