Warning: file_get_contents(/data/phpspider/zhask/data//catemap/4/jsp/3.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Maven Java11中不存在javax.xml.namespace.QName_Maven_Soap_Java 7_Java 11 - Fatal编程技术网

Maven Java11中不存在javax.xml.namespace.QName

Maven Java11中不存在javax.xml.namespace.QName,maven,soap,java-7,java-11,Maven,Soap,Java 7,Java 11,我在尝试运行从具有javax.xml.namespace.QName属性的wsdl自动生成的Java类时遇到问题,它在Java 7中工作正常,但在更改版本时它停止识别。 pom.xml 如果pom.xml中有一个错误可以更正,或者我必须修改代码,或者java-11中有另一个方法需要更改,我将非常感谢您的支持。我今天遇到了完全相同的问题,并且遇到了一篇非常有用的帖子。也许这对你也有用 我的解决方案是用户LillaLinux的回答 <dependency> <gr

我在尝试运行从具有javax.xml.namespace.QName属性的wsdl自动生成的Java类时遇到问题,它在Java 7中工作正常,但在更改版本时它停止识别。 pom.xml


如果pom.xml中有一个错误可以更正,或者我必须修改代码,或者java-11中有另一个方法需要更改,我将非常感谢您的支持。

我今天遇到了完全相同的问题,并且遇到了一篇非常有用的帖子。也许这对你也有用

我的解决方案是用户LillaLinux的回答

<dependency>
         <groupId>com.fasterxml.jackson.core</groupId>
          <artifactId>jackson-databind</artifactId>
          <version>${jackson.version}</version>
        </dependency>
        <dependency>
            <groupId>javax.servlet</groupId>
            <artifactId>jstl</artifactId>
            <version>${servlet.jstl.version}</version>
            <scope>runtime</scope>
        </dependency>
        <dependency>
            <groupId>javax.servlet</groupId>
            <artifactId>servlet-api</artifactId>
            <version>${servlet.version}</version>
            <scope>provided</scope>
        </dependency>
        <dependency>
            <groupId>org.thymeleaf</groupId>
            <artifactId>thymeleaf</artifactId>
            <version>3.0.9.RELEASE</version>
        </dependency>
        
        <dependency>
              <groupId>javax.xml.stream</groupId>
              <artifactId>stax-api</artifactId>
              <version>1.0-2</version>
            </dependency>   
        
        <dependency>
            <groupId>org.codehaus.jackson</groupId>
            <artifactId>jackson-mapper-asl</artifactId>
            <version>1.9.8</version>
            <!--<scope>provided</scope>-->
        </dependency>
        
        <dependency>
            <groupId>com.thoughtworks.xstream</groupId>
            <artifactId>xstream</artifactId>
            <version>1.4.2</version>
            <!--<scope>provided</scope>-->
        </dependency>           
        
        <!-- POI -->        
        <dependency>
            <groupId>org.apache.poi</groupId>
            <artifactId>poi</artifactId>
            <version>3.13</version>
            <!--<scope>provided</scope>-->
            <exclusions>
               <exclusion>
                  <groupId>commons-codec</groupId>
                  <artifactId>commons-codec</artifactId>
               </exclusion>
            </exclusions>
        </dependency>
        
        <dependency>
            <groupId>org.apache.poi</groupId>
            <artifactId>poi-ooxml</artifactId>
            <version>3.9</version>
            <!--<scope>provided</scope>-->
            <exclusions>
               <exclusion>
                  <groupId>org.apache.poi</groupId>
                  <artifactId>poi-ooxml-schemas</artifactId>
               </exclusion>
               <exclusion>
                  <groupId>org.apache.xmlbeans</groupId>
                  <artifactId>xmlbeans</artifactId>
               </exclusion>
               <exclusion>
                  <groupId>stax</groupId>
                  <artifactId>stax-api</artifactId>
               </exclusion>
            </exclusions>
        </dependency>
        
        <dependency>
            <groupId>org.apache.poi</groupId>
            <artifactId>poi-ooxml-schemas</artifactId>
            <version>3.9</version>
            <!--<scope>provided</scope>-->
        </dependency>
        
        <dependency>
            <groupId>org.apache.xmlbeans</groupId>
            <artifactId>xmlbeans</artifactId>
            <version>2.3.0</version>
            <!--<scope>provided</scope>-->
        </dependency>
        
                
        <dependency>
            <groupId>commons-logging</groupId>
            <artifactId>commons-logging</artifactId>
            <version>1.2</version>
            <!--<scope>provided</scope>-->
        </dependency>
        
        <dependency>
            <groupId>commons-beanutils</groupId>
            <artifactId>commons-beanutils</artifactId>
            <version>1.9.3</version>
            <!--<scope>provided</scope>-->
        </dependency>
        
        <dependency>
            <groupId>commons-codec</groupId>
            <artifactId>commons-codec</artifactId>
            <version>1.9</version>
            <!--<scope>provided</scope>-->
        </dependency>
        
        <!-- Apache Commons IO -->
        <dependency>
            <groupId>commons-io</groupId>
            <artifactId>commons-io</artifactId>
            <version>2.4</version>
            <!--<scope>provided</scope>-->
        </dependency>
        
        <!-- Apache Commons Fileupload -->
        <dependency>
            <groupId>commons-fileupload</groupId>
            <artifactId>commons-fileupload</artifactId>
            <version>1.3</version>
            <!--<scope>provided</scope>-->
        </dependency>
        
        <!-- Apache Commons Lang3 -->
        <dependency>
            <groupId>org.apache.commons</groupId>
            <artifactId>commons-lang3</artifactId>
            <version>3.4</version>
            <!--<scope>provided</scope>-->
        </dependency>
        
        <dependency>
            <groupId>commons-lang</groupId>
            <artifactId>commons-lang</artifactId>
            <version>2.6</version>
            <!--<scope>provided</scope>-->
        </dependency>
        
        <dependency>
            <groupId>commons-collections</groupId>
            <artifactId>commons-collections</artifactId>
            <version>3.2.2</version>
            <!--<scope>provided</scope>-->
        </dependency>
        
        <dependency>
            <groupId>commons-digester</groupId>
            <artifactId>commons-digester</artifactId>
            <version>2.1</version>
            <!--<scope>provided</scope>-->
        </dependency>
        
        <!-- Java Activation -->
        <dependency>
            <groupId>javax.activation</groupId>
            <artifactId>activation</artifactId>
            <version>1.1.1</version>
            <!--<scope>provided</scope>-->
        </dependency>
        <!-- JavaMail extension -->
        <dependency>
            <groupId>javax.mail</groupId>
            <artifactId>mail</artifactId>
            <version>1.4.7</version>
            <!--<scope>provided</scope>-->
        </dependency>
        <dependency>
            <groupId>org.aspectj</groupId>
            <artifactId>aspectjrt</artifactId>
            <version>1.6.11</version>
            <!--<scope>provided</scope>-->
        </dependency>

        <dependency>
            <groupId>org.aspectj</groupId>
            <artifactId>aspectjweaver</artifactId>
            <version>1.6.11</version>
            <!--<scope>provided</scope>-->
        </dependency>
        
        <dependency>
            <groupId>aopalliance</groupId>
            <artifactId>aopalliance</artifactId>
            <version>1.0</version>
            <!--<scope>provided</scope>-->
        </dependency>

        <dependency>
            <groupId>org.apache.httpcomponents</groupId>
            <artifactId>httpclient</artifactId>
            <version>4.3.5</version>
            <!--<scope>provided</scope>-->
        </dependency>
        
        <dependency>
            <groupId>com.fasterxml.jackson.datatype</groupId>
            <artifactId>jackson-datatype-json-org</artifactId>
            <version>2.9.1</version>
        </dependency>
<dependency>
  <groupId>com.sun.xml.ws</groupId>
  <artifactId>jaxws-ri</artifactId>
  <version>2.3.0</version>
  <type>pom</type>
</dependency> 
    </dependencies>
import java.net.URL;
import javax.xml.namespace.QName;
import javax.xml.ws.WebEndpoint;
import javax.xml.ws.WebServiceClient;
import javax.xml.ws.WebServiceFeature;

@WebServiceClient(name = "service", 
                  wsdlLocation = "/wsdl/wsd_creado.wsdl",
                  targetNamespace = "http://camel.apache.org/cxf/jaxws/dispatch") 
public class Service extends javax.xml.ws.Service {

    public final static URL WSDL_LOCATION;

    public final static QName SERVICE = new QName("http://camel.apache.org/cxf/jaxws/dispatch", "service");
    public final static QName Port = new QName("http://camel.apache.org/cxf/jaxws/dispatch", "port");
    static {
        URL url = Service.class.getResource("/wsdl/wsd_creado.wsdl");
        if (url == null) {
            url = Service.class.getClassLoader().getResource("/wsdl/wsd_creado.wsdl");
        } 
        if (url == null) {
            java.util.logging.Logger.getLogger(Service.class.getName())
                .log(java.util.logging.Level.INFO, 
                     "Can not initialize the default wsdl from {0}", "/wsdl/wsd_creado.wsdl");
        }       
        WSDL_LOCATION = url;
    }

    public Service(URL wsdlLocation) {
        super(wsdlLocation, SERVICE);
    }

    public Service(URL wsdlLocation, QName serviceName) {
        super(wsdlLocation, serviceName);
    }

    public Service() {
        super(WSDL_LOCATION, SERVICE);
    }
    
    public Service(WebServiceFeature ... features) {
        super(WSDL_LOCATION, SERVICE, features);
    }

    public Service(URL wsdlLocation, WebServiceFeature ... features) {
        super(wsdlLocation, SERVICE, features);
    }

    public Service(URL wsdlLocation, QName serviceName, WebServiceFeature ... features) {
        super(wsdlLocation, serviceName, features);
    }    
    @WebEndpoint(name = "port")
    public AbsenceContingent getPort() {
        return super.getPort(Port, AbsenceContingent.class);
    }
    @WebEndpoint(name = "port")
    public AbsenceContingent getPort(WebServiceFeature... features) {
        return super.getPort(Port, AbsenceContingent.class, features);
    }

}