2017-09-13 14 views
0

오류를 바인드되어 있지가 발생합니다 생성 : 그것이 @XmlRootElement에 정의되어있는 동안웹 로직 12.2 - CXF 3.1 - JAXB 2.2 - 배포 : WSDL에와</p> <p>문제 : 오류 javax.xml.ws.WebServiceException : java.lang.IllegalStateException : 웹 로직 서버를 시작할 때 접두사 X가

org.springframework.beans.factory.BeanCreationException: Error creating bean with name '': Invocation of init method failed; nested exception is javax.xml.ws.WebServiceException: java.lang.IllegalStateException: The prefix X is not bound. 
 
     at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(AbstractAutowireCapableBeanFactory.java:1578) 
 
     at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:545) 
 
     at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:482) 
 
Caused by: javax.xml.ws.WebServiceException: java.lang.IllegalStateException: The prefix X is not bound. 
 
     at org.apache.cxf.jaxws.EndpointImpl.doPublish(EndpointImpl.java:375) 
 
     at org.apache.cxf.jaxws.EndpointImpl.publish(EndpointImpl.java:255) 
 
     at org.apache.cxf.jaxws.EndpointImpl.publish(EndpointImpl.java:543) 
 
Caused by: java.lang.IllegalStateException: The prefix X is not bound. 
 
     at org.apache.ws.commons.schema.SchemaBuilder.getRefQName(SchemaBuilder.java:823) 
 
     at org.apache.ws.commons.schema.SchemaBuilder.getRefQName(SchemaBuilder.java:831)

네임 스페이스 요소 루트에없는

여기

SchemaBuilder.getRefQName 소스 코드 :

https://github.com/wso2/wso2-xmlschema/blob/master/xmlschema/src/main/java/org/apache/ws/commons/schema/SchemaBuilder.java

 prefix = pName.substring(0, offset); 
     uri = NodeNamespaceContext.getNamespaceURI(pNode, prefix); 
     if (uri == null || Constants.NULL_NS_URI.equals(uri)) { 
      if (schema.parent != null 
        && schema.parent.getNamespaceContext() != null) { 
       uri = schema.parent.getNamespaceContext().getNamespaceURI(
         prefix); 
      } 
     } 

     if (uri == null || Constants.NULL_NS_URI.equals(uri)) { 
      throw new IllegalStateException("The prefix " + prefix 
        + " is not bound."); 
     } 

어떤 생각하세요?

답변

0

버전 호환성 문제를 피하는 것이 더 나은 방법 인 다른 솔루션은 프로젝트에 웹 로직 라이브러리를 사용하도록 강제하는 것입니다.

0

내 문제는 자바 개체에 정의 된 @XmlType 주석의 namesapce 추가하여 해결 :

@XmlType (이름 = "", propOrder = { "elt1", "elt2", "elt3"} , 네임 스페이스 = "http : // xyz")