2017-02-19 1 views
0

CXF 서비스의 시간 초과를 지정하려고합니다. JAX-RS 및 CXF와 함께 Play Framework를 사용하고 있습니다 (여러 버전, 3.07 및 3.10을 시도했습니다). CXF 시간 초과 설정을 시도하는 중 예외가 발생했습니다.

내가 얻을 예외 :

 
2017-02-19 13:07:09,786 [error] - controllers.GPSWebServiceController - Error calling wsSanctionsPEPCheckV2 operation on GPS endpoint. 
java.util.concurrent.CompletionException: javax.xml.ws.soap.SOAPFaultException: Error creating bean with name '*.http-conduit': Cannot create inner bean '(inner bean)#741a1e82' of type [org.a 
pache.cxf.configuration.spring.JAXBBeanFactory] while setting bean property 'client'; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with nam 
e '(inner bean)#741a1e82': Bean instantiation via factory method failed; nested exception is org.springframework.beans.BeanInstantiationException: Failed to instantiate [java.lang.Object]: Fa 
ctory method 'createJAXBBean' threw exception; nested exception is java.lang.RuntimeException: javax.xml.bind.UnmarshalException 
- with linked exception: 
[com.ctc.wstx.exc.WstxUnexpectedCharException: Unexpected character 'h' (code 104) in start tag Expected a quote 
at [row,col {unknown-source}]: [1,35]] 
     at java.util.concurrent.CompletableFuture.encodeThrowable(CompletableFuture.java:273) 
     at java.util.concurrent.CompletableFuture.completeThrowable(CompletableFuture.java:280) 
     at java.util.concurrent.CompletableFuture$AsyncSupply.run(CompletableFuture.java:1592) 
     at play.core.j.HttpExecutionContext$$anon$2.run(HttpExecutionContext.scala:56) 
     at akka.dispatch.TaskInvocation.run(AbstractDispatcher.scala:39) 
     at akka.dispatch.ForkJoinExecutorConfigurator$AkkaForkJoinTask.exec(AbstractDispatcher.scala:405) 
     at scala.concurrent.forkjoin.ForkJoinTask.doExec(ForkJoinTask.java:260) 
     at scala.concurrent.forkjoin.ForkJoinPool$WorkQueue.runTask(ForkJoinPool.java:1339) 
     at scala.concurrent.forkjoin.ForkJoinPool.runWorker(ForkJoinPool.java:1979) 
     at scala.concurrent.forkjoin.ForkJoinWorkerThread.run(ForkJoinWorkerThread.java:107) 
Caused by: javax.xml.ws.soap.SOAPFaultException: Error creating bean with name '*.http-conduit': Cannot create inner bean '(inner bean)#741a1e82' of type [org.apache.cxf.configuration.spring. 
JAXBBeanFactory] while setting bean property 'client'; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name '(inner bean)#741a1e82': Bean 
instantiation via factory method failed; nested exception is org.springframework.beans.BeanInstantiationException: Failed to instantiate [java.lang.Object]: Factory method 'createJAXBBean' t 
hrew exception; nested exception is java.lang.RuntimeException: javax.xml.bind.UnmarshalException 
- with linked exception: 
[com.ctc.wstx.exc.WstxUnexpectedCharException: Unexpected character 'h' (code 104) in start tag Expected a quote 
at [row,col {unknown-source}]: [1,35]] 
     at org.apache.cxf.jaxws.JaxWsClientProxy.invoke(JaxWsClientProxy.java:161) 
     at com.sun.proxy.$Proxy69.wsSanctionsPEPCheckV2(Unknown Source) 
     at services.pepcheck.PepCheckServiceImpl.lambda$performPepCheck$33(PepCheckServiceImpl.java:114) 
     at java.util.concurrent.CompletableFuture$AsyncSupply.run(CompletableFuture.java:1590) 
     ... 7 common frames omitted 
Caused by: org.springframework.beans.factory.BeanCreationException: Error creating bean with name '*.http-conduit': Cannot create inner bean '(inner bean)#741a1e82' of type [org.apache.cxf.co 
nfiguration.spring.JAXBBeanFactory] while setting bean property 'client'; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name '(inner be 
an)#741a1e82': Bean instantiation via factory method failed; nested exception is org.springframework.beans.BeanInstantiationException: Failed to instantiate [java.lang.Object]: Factory method 
'createJAXBBean' threw exception; nested exception is java.lang.RuntimeException: javax.xml.bind.UnmarshalException 
- with linked exception: 
[com.ctc.wstx.exc.WstxUnexpectedCharException: Unexpected character 'h' (code 104) in start tag Expected a quote 
at [row,col {unknown-source}]: [1,35]] 
     at org.springframework.beans.factory.support.BeanDefinitionValueResolver.resolveInnerBean(BeanDefinitionValueResolver.java:313) 
     at org.springframework.beans.factory.support.BeanDefinitionValueResolver.resolveValueIfNecessary(BeanDefinitionValueResolver.java:129) 
     at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.applyPropertyValues(AbstractAutowireCapableBeanFactory.java:1486) 
     at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.populateBean(AbstractAutowireCapableBeanFactory.java:1231) 
     at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.configureBean(AbstractAutowireCapableBeanFactory.java:323) 
     at org.springframework.beans.factory.wiring.BeanConfigurerSupport.configureBean(BeanConfigurerSupport.java:147) 
     at org.apache.cxf.configuration.spring.ConfigurerImpl.configureBean(ConfigurerImpl.java:177) 
     at org.apache.cxf.configuration.spring.ConfigurerImpl.configureWithWildCard(ConfigurerImpl.java:202) 

을 그리고 이것은 내가이 메시지가 나타납니다 beans.xml 환경 파일

<beans xmlns="http://www.springframework.org/schema/beans"                                  
     xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"                                 
     xmlns:jaxws="http://cxf.apache.org/jaxws"                                    
     xmlns:http-conf="http://cxf.apache.org/transports/http/configuration"                             
     xmlns:cxf="http://cxf.apache.org/core"                                     
     xsi:schemaLocation="http://www.springframework.org/schema/beans                               
     http://www.springframework.org/schema/beans/spring-beans-4.3.xsd                               
     http://cxf.apache.org/configuration/security                                    
     http://cxf.apache.org/schemas/configuration/security.xsd                                 
     http://cxf.apache.org/transports/http/configuration                                  
     http://cxf.apache.org/schemas/configuration/http-conf.xsd                                 
     http://cxf.apache.org/core                                        
     http://cxf.apache.org/schemas/core.xsd                                     
     http://cxf.apache.org/jaxws                                        
     http://cxf.apache.org/schemas/jaxws.xsd">                                     


    <jaxws:client id="mySoapClient"                                      
        serviceClass="ro.vdin.ServiceSoap"                             
        address="https://example.com"/>                                    

    <http-conf:conduit name="*.http-conduit">                                     
     <http-conf:client ConnectionTimeout="60000"                                    
          ReceiveTimeout="60000"                                    
          AllowChunking="false"/>                                    
    </http-conf:conduit> 
</beans> 

경우에만 HTTP-conf의 경우 : 도관 matches 서비스; 어떤 임의의 이름을 넣으면 아무런 예외도 발생하지 않습니다 (단, 시간 제한 없음).

아이디어가 있으십니까?

답변

0

Play Framework에서 CXF를 사용할 때도 비슷한 문제가있었습니다. 그 이유를 정확히 알지 못하지만 *.http-conduit 와일드 카드를 사용할 수 없습니다. 호스트 이름을 직접 지정해야합니다. <http-conf:conduit name="https://example.com">

그리고 여러 웹 서비스가있는 경우 regexp를 사용하여 모두 일치시킬 수 있습니다.

예 : https://example.com/service1https://example.com/service2 엔드 포인트가있는 경우, 구성이 제안에 대한 <http-conf:conduit name="https://example.com/.*">

+0

감사하겠습니다! 불행히도, 나는 그것을 시도하고 여전히 같은 오류가 (예 : ; 또한 regex name = "https : //example.com:5678.* "및 name ="https://example.com:5678/service.asmx.* ") –

+0

@VladDinulescu 프로토콜을 추가하려고 했습니까? 난 당신이 그것을 지정해야한다고 생각 :'name = "https://example.com:5678/.*"'. 어쩌면 http-conf : conduit과 관련된 문제가 아닐 수도 있습니다. 'jaxws : client'' 주소가''https://example.com ''입니까? 완전한 웹 서비스 엔드 포인트 여야합니다. ""https://example.com:5678/service.asmx " –

+0

음 ... 프로토콜을 추가했습니다. StackOverflow는 내 의견을 형식화 한 것으로 생각하지 않았습니다. 또한 jaxws : client 주소에 관해서는 그렇습니다. 전체 웹 서비스 엔드 포인트를 넣었습니다. 그러나 개인 정보 보호 목적으로 SO에 넣고 싶지는 않습니다. (내가 설명에서 말했듯이, 나는 서비스에 완전히 액세스 할 수있다. 그것은 단지 타임 아웃을 올바르게 설정할 수 없다는 것이다.) –

관련 문제