2017-05-12 30 views
0

使用したバージョン: Tomcatの7 JRE 6Axis2の移行エラーDOCTYPEが許可されていない

は、私は新しい動的Webプロジェクトを作成し、私はこの新しいプロジェクトでのAxis2 Webサービスクライアントを追加しました。次に、このプロジェクトをjarファイルに変換しました。 エクスポートしたとき、私はsrcファイルのみを選択しました。そして、このjarファイルと、axis2クライアント用の最小のjarファイルを追加しました。 この最小ジャー: What's the minimum classpath for an Axis2 client?

私はこのメインプロジェクトを実行していますが、プロジェクトにエラーが発生していません。しかし、このプロジェクトは、 を展開しかし、私はWebLogic Serverにこのプロジェクトを展開するときに、私は次のエラーを取得する:

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> <[[email protected][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()); 

答えて

0

私は、この問題を解決し、私の場合には、プロジェクト

0

二つジャー(StAXの、Woodstox)を付加サービスは、Axis2の同じエラーを与えダウンひいてはました。サービスが開始されたら、私は呼び出して応答を得ることができました。

関連する問題