标签: axis2

Axis2 Web服务和Eclipse WSDL创作:在运行wsdl2java时向wsdl添加轴故障会导致异常

我正在尝试使用Apache Axis2 1.4.1创建一个契约优先的Web服务.由于Eclipse看起来像一个非常完整的wsdl编辑器,我开始使用Eclipse的编辑器自动化我的wsdls.一切都很好,我可以使用wsdl2java生成Java类,并在部署时使用Web Services.但是,向Web Service添加异常或错误会导致异常,说明Fault的Element QName为null.有谁知道可能导致这种情况的原因?检查wsdl也没有给我任何直接的答案.似乎故障/异常的定义与其他元素一样.

这是命令和堆栈跟踪:

>d:\axis2-1.4.1\bin\wsdl2java.bat -o src-test -ss -uri JavaIntegrationModule.wsdl
Using AXIS2_HOME:   D:\axis2-1.4.1
Using JAVA_HOME:    D:\Java\jdk1.5.0_14
Retrieving document at 'JavaIntegrationModule.wsdl'.
[INFO] The src-test\src\org\example\www\javaintegrationmodule\JavaIntegrationModuleSkeleton.java file cannot be overwritten.
[INFO] The src-test\src\org\example\www\javaintegrationmodule\JavaIntegrationModuleMessageReceiverInOut.java file cannot be overwritten.
D:\>d:\axis2-1.4.1\bin\wsdl2java.bat -o src-test -ss -uri JavaIntegrationModule.wsdl
Using AXIS2_HOME:   D:\axis2-1.4.1
Using JAVA_HOME:    D:\Java\jdk1.5.0_14
Retrieving document at 'JavaIntegrationModule.wsdl'.
D:\>d:\axis2-1.4.1\bin\wsdl2java.bat -o src-test -ss -uri JavaIntegrationModule.wsdl
Using AXIS2_HOME:   D:\axis2-1.4.1
Using JAVA_HOME:    D:\Java\jdk1.5.0_14
Retrieving document at 'JavaIntegrationModule.wsdl'.
Exception in thread "main" org.apache.axis2.wsdl.codegen.CodeGenerationException: org.apache.axis2.wsdl.codegen.CodeGenerationException: jav
a.lang.RuntimeException: Element QName is …
Run Code Online (Sandbox Code Playgroud)

java axis2 web-services exception fault

1
推荐指数
1
解决办法
2万
查看次数

AXIS2 webservice客户端java.net.SocketException:连接重置

我正在创建一个使用axis2来使用第三方ws的客户端,在我的机器中的tomcat服务器上一切正常,但是一旦部署到服务器我就无法运行它.

我已经检查过:

  • 第三方网址已启动并正在运行
  • 服务器中没有防火墙
  • Tomcat报告AXIS2工作正常(查看AXIS2快乐页面)
[INFO] Unable to sendViaPost to url[http://third.party.URL]
java.net.SocketException: Connection reset
    at java.net.SocketInputStream.read(SocketInputStream.java:168)
    at java.io.BufferedInputStream.fill(BufferedInputStream.java:218)
    at java.io.BufferedInputStream.read(BufferedInputStream.java:237)
    at org.apache.commons.httpclient.HttpParser.readRawLine(HttpParser.java:78)
    at org.apache.commons.httpclient.HttpParser.readLine(HttpParser.java:106)
Run Code Online (Sandbox Code Playgroud)

有什么建议?

tomcat axis2

1
推荐指数
1
解决办法
9326
查看次数

无法访问WSO2标识服务器的AuthenticationAdmin服务

我有一个新的WSO2身份服务器.我需要访问AuthenticationAdminWSO2 3.2.3 的轴Web服务来验证用户.我尝试了几个教程但没有帮助.

Issuing https://localhost:9443/services/AuthenticationAdmin 在浏览器上给出以下错误:

message:访问服务的服务元数据:已禁止AuthenticationAdmin

description:禁止访问指定的资源(访问服务的服务元数据:禁止AuthenticationAdmin).

在控制台上我得到了未找到服务的错误,如:

错误{org.apache.axis2.engine.AxisEngine} - 未找到操作的端点引用(EPR)是/ services/AuthenticationAdmin,WSA Action = null.如果以前可以访问此EPR,请联系服务器管理员.

请指导我..

authentication axis2 wso2 wso2is

1
推荐指数
1
解决办法
3729
查看次数

合同优先还是代码优先?

使用Apache Axis2创建Web服务时应使用哪种方法(Contract-First/Code-First)?如果我选择契约优先方法,我应该使用哪个工具来创建wsdl?我正在使用WSO2平台.

axis wsdl axis2 web-services wso2

1
推荐指数
1
解决办法
2078
查看次数

我如何在eclipse中使用axis2作为运行时

我正在尝试使用axis2从pojo生成Web服务.但是在eclipse中,由于禁用了ok按钮,我无法生成服务.我如何启用它?

日食

当我尝试启用Axis2 Web服务方面时,我收到此错误"Axis2 Web服务core1.1需要具有版本匹配表达式的动态Web模块"2.2,2.3,2.4,2.5"." 这是什么意思?

有没有其他方法可以将pojo转换为复杂数据类型的Web服务?

eclipse axis2 web-services

1
推荐指数
1
解决办法
5889
查看次数

将authentification标头添加到客户端stub轴2

我基于xmlbeans构建了wsdl-client-stub.现在我卡住了使用xmlbeans添加自定义标头以进行身份​​验证,因为xmlbeans存根缺少必要的类(?)

实际上,标题应如下所示:

<SOAP-ENV:Header> 
        <ns2:verifyingToken> 
            <UserID>9</UserID>
            <Token>29438094lkjslfkjlsdkjf</Token>
        </ns2:verifyingToken>
     </SOAP-ENV:Header>
Run Code Online (Sandbox Code Playgroud)

所以我尝试在存根和ServiceClient之间进行后退:

ServiceClient sc = stub._getServiceClient();

OMFactory  omFactory     = OMAbstractFactory.getOMFactory();
        OMElement  omElement     = omFactory.createOMElement(new QName("SOAP-ENV", "Header", "ver"), null);
        OMElement  omElementVeri = omFactory.createOMElement(new QName("", "verifyingToken", ""), omElement);
        OMElement  omElementUser = omFactory.createOMElement(new QName("", "UserID", ""), omElementVeri);
                   omElementUser.setText(""+userid);

        OMElement  omElementPass   =   omFactory.createOMElement(new QName("", "Token", ""), omElementVeri);
                   omElementPass.setText(""+token);
        sc.addHeader(omElement);
Run Code Online (Sandbox Code Playgroud)

eclipse引发错误说:OMFactory类型中的方法createOMElement(String,OMNamespace)不适用于参数(QName,null) - 构造函数QName(String,String,String)未定义

有没有人有一个暗示,我应该修复,让这个工作.我非常感谢你的帮助,

亚历克斯

axis2 stub soap-client soapheader

1
推荐指数
1
解决办法
6082
查看次数

Axis 2在Mac上看不到JAVA_HOME(soapUI和wsdl2java)

问题:为什么Axis 2看不到Java home的位置?我设置错了吗?

简介:我正在尝试使用带有soapUI的Axis 2从我的Mac上的wsdl生成Java对象.但是,我收到错误"你必须在运行Axis2 Script之前设置JAVA_HOME变量."

如果我输入echo $JAVA_HOME命令行,它说

/System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Home

我已经导航到JavaVirtualMachines文件夹,jdk确实在那里.

我也编辑了〜/ .bash_profile来说

export JAVA_HOME = $(/ usr/libexec/java_home)

macos axis2 wsdl2java soapui java-home

1
推荐指数
1
解决办法
4764
查看次数

ClassNotFoundException:org.apache.axis2.transport.http.AxisAdminServlet

我正在使用tomcat 7 + ZK框架+ axis2开发一个Web门户来使用Web服务.过了一会儿我开始收到这个错误:

SEVERE: Servlet /twigo threw load() exception
java.lang.ClassNotFoundException: org.apache.axis2.transport.http.AxisAdminServlet
    at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1714)
    at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1559)
    at org.apache.catalina.core.DefaultInstanceManager.loadClass(DefaultInstanceManager.java:532)
    at org.apache.catalina.core.DefaultInstanceManager.loadClassMaybePrivileged(DefaultInstanceManager.java:514)
    at org.apache.catalina.core.DefaultInstanceManager.newInstance(DefaultInstanceManager.java:133)
    at org.apache.catalina.core.StandardWrapper.loadServlet(StandardWrapper.java:1137)
    at org.apache.catalina.core.StandardWrapper.load(StandardWrapper.java:1081)
    at org.apache.catalina.core.StandardContext.loadOnStartup(StandardContext.java:5027)
    at org.apache.catalina.core.StandardContext.startInternal(StandardContext.java:5314)
    at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:150)
    at org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1559)
    at org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1549)
    at java.util.concurrent.FutureTask$Sync.innerRun(Unknown Source)
    at java.util.concurrent.FutureTask.run(Unknown Source)
    at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source)
    at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
    at java.lang.Thread.run(Unknown Source)
Run Code Online (Sandbox Code Playgroud)

也许axis2 1.6与tomcat 7不兼容?

java portal axis2 zk tomcat7

1
推荐指数
1
解决办法
2万
查看次数

如何从我的Java Web服务访问.properties文件

我已经使用tomcat成功部署了我的java Web服务.此Web服务正在访问配置文件(.Properties)我已将config.properties文件放在以下目录中

C:\Program Files\Apache Software Foundation\Tomcat 7.0\webapps\ProcurementWS1\WEB-INF\classes\MainPackagePr
Run Code Online (Sandbox Code Playgroud)

ProcurmentWS1是WAR文件的名称

这是我试图从我的代码访问它:

Properties properties = new Properties();
            InputStream is = Thread.currentThread().getContextClassLoader().getResourceAsStream("procwsconfig.properties");
            properties.load(is);
Run Code Online (Sandbox Code Playgroud)

并在加载时获得空指针异常

你能告诉我你做错了什么吗?

java tomcat axis2 web-services

1
推荐指数
1
解决办法
7604
查看次数

添加Axis 2客户端依赖项后,Spring Boot启动失败

我正在开发一个使用Soap Web服务的演示应用程序,我正在使用axis 2作为客户端.我决定使用Spring启动并将我的代码合并到其中.起初,简单的Spring Boot完全没问题,我可以创建一个demo jsp页面和一些其他的web服务.在我将存根代码jar文件以及Axis和Rampart依赖项添加到pom.xml之后,它在启动时不断出现错误.

这是pom.xml的代码片段,只需添加即可轻松复制该问题

<dependency>
            <groupId>org.apache.axis2</groupId>
            <artifactId>axis2-metadata</artifactId>
            <version>1.7.1</version>
        </dependency>
Run Code Online (Sandbox Code Playgroud)

进入一个简单的spring boot pom.xml文件,该文件使用嵌入式tomcat和jasper.

的pom.xml

<parent>
        <groupId>org.springframework.boot</groupId>
        <artifactId>spring-boot-starter-parent</artifactId>
        <version>1.5.7.RELEASE</version>
        <relativePath /> <!-- lookup parent from repository -->
    </parent>
...
<properties>
        <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
        <project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding>
        <java.version>1.8</java.version>
        <axis.version>1.7.1</axis.version>
        <rampart.version>1.7.1</rampart.version>
    </properties>
...

<dependencies>
        <dependency>
            <groupId>org.springframework.boot</groupId>
            <artifactId>spring-boot-starter-web</artifactId>
        </dependency>


        <dependency>
            <groupId>org.springframework.boot</groupId>
            <artifactId>spring-boot-devtools</artifactId>
            <optional>true</optional>
        </dependency>


        <dependency>
            <groupId>org.springframework.boot</groupId>
            <artifactId>spring-boot-starter-test</artifactId>
            <scope>test</scope>
        </dependency>
<dependency>
            <groupId>org.apache.tomcat.embed</groupId>
            <artifactId>tomcat-embed-jasper</artifactId>
            <scope>provided</scope>

        </dependency>

...
<dependency>
            <groupId>org.apache.axis2</groupId>
            <artifactId>axis2-metadata</artifactId>
            <version>${axis.version}</version>
            <exclusions>
                <exclusion>
                    <groupId>commons-logging</groupId>
                    <artifactId>commons-logging</artifactId>
                </exclusion>
                <exclusion>
                    <groupId>commons-io</groupId>
                    <artifactId>commons-io</artifactId>
                </exclusion>
            </exclusions>
        </dependency>
</dependencies>

    <build>
        <plugins>
            <plugin>
                <groupId>org.springframework.boot</groupId>
                <artifactId>spring-boot-maven-plugin</artifactId>
            </plugin> …
Run Code Online (Sandbox Code Playgroud)

spring axis2 rampart maven spring-boot

1
推荐指数
1
解决办法
609
查看次数