JAXB - Property “Value” is already defined. Use to resolve this conflict

前端 未结 7 590
再見小時候
再見小時候 2020-11-30 19:01

Using JAXB to generate XML binding classes.

The schema is based on a set of legacy XML files, and includes this snippet:



        
7条回答
  •  栀梦
    栀梦 (楼主)
    2020-11-30 19:42

    I had a problem using the solution with Eclipse (tried both Helios SR1 and Juno SR1) and CXF 2.6.3. The solution was similar to what Kaitsu says. Namely the New > Web Service wizard of Eclipse copies the wsdl into the foldre WebContent/wsdl. I had to place the wsdl and the binding file there myself. Otherwise the binding file gave the "is not a part of this compilation" error.

    I wasn't able to use an inline schema in the WSDL but it did work with an external schema like in answer #1.

    I'm using the CXF Servlet endpoint config option. In my WSDL I have:

    
      
    
    

    The wizard generated this into my web.xml, which works ok:

    
      cxf
      /services/*
    
    

    But it put this into cxf-servlet.xml:

    
      
        
      
    
    

    I had to change the address into the full URL, like this:

    address="http://localhost:8080/Converter/services/Converter">
    

提交回复
热议问题