首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >在构造函数服务中找不到符号

在构造函数服务中找不到符号
EN

Stack Overflow用户
提问于 2013-06-17 16:20:25
回答 3查看 2.4K关注 0票数 0

我尝试用JavaSE 1.6在Eclipse中编译一个webservice项目。

在这个项目中,我使用了很多从WSDL创建的类。

代码语言:javascript
复制
The error message is:

cannot find symbol
    [javac] symbol  : constructor Service(java.net.URL,javax.xml.namespace.QName,javax.xml.ws.WebServiceFeature[])
    [javac] location: class javax.xml.ws.Service

源代码(来自WSDL的编译类:

代码语言:javascript
复制
/**
 * This class was generated by the JAX-WS RI.
 * JAX-WS RI 2.2.4-b01
 * Generated source version: 2.2
 * 
 */

.....

    public IfaceService(WebServiceFeature... features) {
       **super(__getWsdlLocation(), IFACESERVICE_QNAME, features);**
    }


I read in another tread there are problems with JAX-WS version 2.1 in some cases. Therefore I tried different versions in the ivy config file.

    <info organisation="de.os.osvk.ech" module="my Project"
        status="integration" revision="0.1">
    </info>
    <dependencies>  
        <dependency org="com.google.inject" name="guice" rev="3.0"/>
        <dependency org="com.google.inject.extensions" name="guice-servlet" rev="3.0"/>

        <dependency org="org.glassfish.ha" name="ha-api" rev="3.1.8">
            <artifact name="ha-api" ext="jar" type="jar"/>
            <exclude org="com.sun.enterprise" module="hk2"/>
        </dependency>
        <dependency org="com.sun.xml.ws" name="jaxws-tools" rev="2.2.7"/> 
        <dependency org="javax.ws.rs" name="jsr311-api" rev="1.1.1"/>
        <dependency org="com.sun.jersey" name="jersey-core" rev="1.7" />
        <dependency org="javax.transaction" name="jta" rev="1.1"/>
        <dependency org="javax.xml.ws" name="jaxws-api" rev="2.1.1"></dependency>
        <dependency org="org.quartz-scheduler" name="quartz" rev="1.7.3" conf="*->*,!sources">
            <exclude org="javax.ejb" />
            <exclude org="javax.mail" />
            <exclude org="javax.servlet" />
            <exclude org="org.apache.openejb" />
            <exclude org="junit" />
            <exclude org="javax.jms" /> 
        </dependency> 

        <dependency org="xalan" name="xalan" rev="2.7.1"/>
        <dependency org="org.eclipse.jetty" name="jetty-servlet" rev="7.4.4.v20110707"/>
    </dependencies> 
</ivy-module>

我必须在JAX-WS RI 2.2.4-b01 (Java code from WSDL)上使用zu编译的javax.xml.ws or jaxax.xml.binding的哪些版本

EN

回答 3

Stack Overflow用户

发布于 2013-06-17 20:46:57

dependency org="javax.xml.ws" name="jaxws-api" rev="2.1.1"很可疑--你可能需要2.2.x。但是,Java SE 6包含JAX-WS API的旧版本。您可能需要阅读https://weblogs.java.net/blog/ramapulavarthi/archive/2009/04/tip_for_using_j.html

票数 0
EN

Stack Overflow用户

发布于 2013-10-02 18:10:28

您应该使用jdk1.6.0_35来生成WSDL。

票数 0
EN

Stack Overflow用户

发布于 2014-05-22 18:56:13

%JAVA_HOME%\jre\lib\endorsed中单独添加webservices-api-2.2.jar已经为我解决了问题。

票数 0
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/17143164

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档