使用的版本:Tomcat 7 jre 6
我创建了一个新的动态web项目,并在这个新项目中添加了axis2 web服务客户端。然后我把这个项目变成了一个jar文件。当我导出时,我只选择了src文件。我添加了这个jar文件和axis2客户机的最小jar。这个最小jars:axis 2客户机的最小类路径是什么?
我运行这个主项目,该项目没有给出任何错误。但是这个项目部署但是当我把这个项目部署到 weblogic 服务器时,我收到以下错误:
org.apache.axis2.AxisFault: javax.xml.stream.XMLStreamException: DOCTYPE is not allowed
at org.apache.axis2.AxisFault.makeFault(AxisFault.java:430)
at org.apache.axis2.transport.TransportUtils.createSOAPMessage(TransportUtils.java:122)
at org.apache.axis2.transport.TransportUtils.createSOAPMessage(TransportUtils.java:66)
at org.apache.axis2.description.OutInAxisOperationClient.handleResponse(OutInAxisOperation.java:347)
at org.apache.axis2.description.OutInAxisOperationClient.send(OutInAxisOperation.java:414)
at org.apache.axis2.description.OutInAxisOperationClient.executeImpl(OutInAxisOperation.java:225)
at org.apache.axis2.client.OperationClient.execute(OperationClient.java:150)
at webmethods.wsdls.universitebirim.universitebirimv1.UniversiteBirimv1Stub.iDdenBirimAdiGetir(UniversiteBirimv1Stub.java:494)
at webmethods.wsdls.universitebirim.universitebirimv1.TestWebServis.birimGetirv1(TestWebServis.java:15)
at dao.SozMaasDAO.ogrenimSuresiGetir(SozMaasDAO.java:1159)
at dao.SozMaasDAO.ogrenimDurumRowSelect(SozMaasDAO.java:1192)
at bus.SozMaasBUS.listYoktenMezunBilgisiGetir(SozMaasBUS.java:7622)
at bus.SozMaasBUS$$FastClassByCGLIB$$41cbd8aa.invoke(<generated>)
at net.sf.cglib.proxy.MethodProxy.invoke(MethodProxy.java:163)
at org.springframework.aop.framework.Cglib2AopProxy$CglibMethodInvocation.invokeJoinpoint(Cglib2AopProxy.java:700)
at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:149)
at org.springframework.transaction.interceptor.TransactionInterceptor.invoke(TransactionInterceptor.java:106)
at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:171)
at org.springframework.aop.framework.Cglib2AopProxy$DynamicAdvisedInterceptor.intercept(Cglib2AopProxy.java:635)
at bus.SozMaasBUS$$EnhancerByCGLIB$$aa66edae.listYoktenMezunBilgisiGetir(<generated>)
at view.SozMaasView.hnd_yoktenMezunBilgisiGetir(SozMaasView.java:81)
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 org.springframework.web.servlet.mvc.multiaction.MultiActionController.invokeNamedMethod(MultiActionController.java:473)
at org.springframework.web.servlet.mvc.multiaction.MultiActionController.handleRequestInternal(MultiActionController.java:410)
at org.springframework.web.servlet.mvc.AbstractController.handleRequest(AbstractController.java:153)
at org.springframework.web.servlet.mvc.SimpleControllerHandlerAdapter.handle(SimpleControllerHandlerAdapter.java:48)
at org.springframework.web.servlet.DispatcherServlet.doDispatch(DispatcherServlet.java:875)
at org.springframework.web.servlet.DispatcherServlet.doService(DispatcherServlet.java:809)
at org.springframework.web.servlet.FrameworkServlet.processRequest(FrameworkServlet.java:476)
at org.springframework.web.servlet.FrameworkServlet.doPost(FrameworkServlet.java:441)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:727)
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 filter.SecurityFilter.doFilter(SecurityFilter.java:416)
at org.springframework.web.filter.DelegatingFilterProxy.invokeDelegate(DelegatingFilterProxy.java:183)
at org.springframework.web.filter.DelegatingFilterProxy.doFilter(DelegatingFilterProxy.java:138)
at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:60)
at filter.GZIPFilter.doFilter(GZIPFilter.java:32)
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: org.apache.axiom.om.DeferredParsingException: javax.xml.stream.XMLStreamException: DOCTYPE is not allowed
at org.apache.axiom.om.impl.builder.StAXOMBuilder.parserNext(StAXOMBuilder.java:681)
at org.apache.axiom.om.impl.builder.StAXOMBuilder.next(StAXOMBuilder.java:184)
at org.apache.axiom.core.CoreParentNodeSupport.ajc$interMethod$org_apache_axiom_core_CoreParentNodeSupport$org_apache_axiom_core_CoreParentNode$buildNext(CoreParentNodeSupport.aj:96)
at org.apache.axiom.om.impl.llom.OMDocumentImpl.buildNext(OMDocumentImpl.java:1)
at org.apache.axiom.core.CoreParentNodeSupport.ajc$interMethodDispatch1$org_apache_axiom_core_CoreParentNodeSupport$org_apache_axiom_core_CoreParentNode$buildNext(CoreParentNodeSupport.aj)
at org.apache.axiom.core.CoreChildNodeSupport.ajc$interMethod$org_apache_axiom_core_CoreChildNodeSupport$org_apache_axiom_core_CoreChildNode$coreGetNextSibling(CoreChildNodeSupport.aj:115)
at org.apache.axiom.om.impl.llom.OMNodeImpl.coreGetNextSibling(OMNodeImpl.java:1)
at org.apache.axiom.core.CoreChildNodeSupport.ajc$interMethodDispatch1$org_apache_axiom_core_CoreChildNodeSupport$org_apache_axiom_core_CoreChildNode$coreGetNextSibling(CoreChildNodeSupport.aj)
at org.apache.axiom.core.CoreDocumentSupport.ajc$interMethod$org_apache_axiom_core_CoreDocumentSupport$org_apache_axiom_core_CoreDocument$coreGetDocumentElement(CoreDocumentSupport.aj:47)
at org.apache.axiom.om.impl.llom.OMDocumentImpl.coreGetDocumentElement(OMDocumentImpl.java:1)
at org.apache.axiom.om.impl.common.AxiomDocumentSupport.ajc$interMethod$org_apache_axiom_om_impl_common_AxiomDocumentSupport$org_apache_axiom_om_impl_intf_AxiomDocument$getOMDocumentElement(AxiomDocumentSupport.aj:32)
at org.apache.axiom.om.impl.llom.OMDocumentImpl.getOMDocumentElement(OMDocumentImpl.java:1)
at org.apache.axiom.om.impl.builder.StAXOMBuilder.getDocumentElement(StAXOMBuilder.java:557)
at org.apache.axiom.om.impl.builder.StAXOMBuilder.getDocumentElement(StAXOMBuilder.java:553)
at org.apache.axis2.transport.TransportUtils.createDefaultDocumentElement(TransportUtils.java:230)
at org.apache.axis2.transport.TransportUtils.createDocumentElement(TransportUtils.java:207)
at org.apache.axis2.transport.TransportUtils.createSOAPMessage(TransportUtils.java:144)
at org.apache.axis2.transport.TransportUtils.createSOAPMessage(TransportUtils.java:107)
... 53 more
Caused by: javax.xml.stream.XMLStreamException: DOCTYPE is not allowed
at org.apache.axiom.util.stax.dialect.DisallowDoctypeDeclStreamReaderWrapper.next(DisallowDoctypeDeclStreamReaderWrapper.java:36)
at org.apache.axiom.om.impl.builder.StAXOMBuilder.parserNext(StAXOMBuilder.java:666)
... 70 more
<May 12, 2017 3:50:29 PM EEST> <Error> <HTTP> <BEA-101017> <[ServletContext@181830207[app:kbs_3asd module:kbs_3asd path: spec-version:2.5]] Root cause of ServletException.
java.lang.NullPointerException
at dao.SozMaasDAO.ogrenimDurumRowSelect(SozMaasDAO.java:1198)
at bus.SozMaasBUS.listYoktenMezunBilgisiGetir(SozMaasBUS.java:7622)
at bus.SozMaasBUS$$FastClassByCGLIB$$41cbd8aa.invoke(<generated>)
at net.sf.cglib.proxy.MethodProxy.invoke(MethodProxy.java:163)
at org.springframework.aop.framework.Cglib2AopProxy$CglibMethodInvocation.invokeJoinpoint(Cglib2AopProxy.java:700)
Truncated. see log file for complete stacktrace
>
注意:当我添加 Web 服务客户端时,代码就是以这种方式创建的
webmethods.wsdls.universitebirim.universitebirimv1.UniversiteBirimv1Stub.ıDdenBirimAdiGetir
但是我把它们改成了这样:
webmethods.wsdls.universitebirim.universitebirimv1.UniversiteBirimv1Stub.iDdenBirimAdiGetir
法典:
public static Birim birimAgaciGetir(long birim_id){
Birim birim= new Birim();
try {
UniversiteBirimv1Stub stub = new UniversiteBirimv1Stub();
IDdenBirimAdiGetir c2f = new IDdenBirimAdiGetir();
c2f.setBIRIM_ID(birim_id);
IDdenBirimAdiGetirE e= new IDdenBirimAdiGetirE();
e.setIDdenBirimAdiGetir(c2f);
IDdenBirimAdiGetirResponseE res = stub.ıDdenBirimAdiGetir(e);
System.out.println("Tested: "+res);
birim= res.getIDdenBirimAdiGetirResponse().getBirim();
//System.out.println(res.getIDdenBirimAdiGetirResponse().getBirim().getBAGLI_OLDUGU_BIRIM_ID());
} catch (AxisFault e) {
e.printStackTrace();
} catch (RemoteException e) {
e.printStackTrace();
}catch (Exception e) {
System.out.println(e);
}
return birim;
}
我在主项目中使用了这个。
System.out.println(res.getIDdenBirimAdiGetirResponse().getBirim().getBAGLI_OLDUGU_BIRIM_ID());
在我的例子中,服务关闭,因此轴2给出了相同的错误。一旦服务启动,我就能够调用并获得响应。
我解决了这个问题,在项目中添加了两个罐子(StAX, Woodstox)
问题内容: 我正在开发flask注册表格,但收到错误消息: 码: registration.html: 当我访问时,我收到错误消息。我究竟做错了什么? 问题答案: 这是因为在定义路由时仅允许POST请求。 当你在浏览器中访问时,它将首先执行GET请求。只有提交表单后,浏览器才会执行POST。因此,对于像你这样的自我提交表单,你需要同时处理两者。 使用 应该管用。
问题内容: 我正在尝试运行一个Python脚本,该脚本使用由后链接程序创建的二进制文件(xFiles.bin.addr_patched)。但是,我收到此错误。 当我通过ls-l检查此xFiles.bin的权限时,它表明 我认为错误是因为此文件是由其他应用程序创建的,我正在运行的python脚本无法访问它。因为我是ubuntu的初学者,所以我真的不知道如何解决它。对于如何解决这个问题,有任何的建议吗
我将我的数据库后端从sqlite3更改为PostGRE。当我尝试运行迁移时,我有一个错误 要执行的操作:同步未迁移的应用程序:messages、avtofarm、smart_selects、staticfiles、thumbnail应用所有迁移:contenttypes、admin、callboard、auth、sessions同步未迁移的应用程序:创建表...正在运行延迟SQL...正在安装自定
我的错误 我想知道做这次迁移的人打算做什么。
我有Laravel 5.4和VueJs应用程序。当我在Localhost中运行它时,它已经工作了,但是现在。我把主机放在一台服务器上,它会给出错误信息 这是我在VueJS的POST请求 这是api.php
我正在尝试使用angularJs和$http发布一个表单。post方法。但每当我执行此函数时,它都会给我以下错误:加载资源失败:服务器响应状态为405(不允许使用方法),我不知道该怎么办。(Im使用visual studio 2015)