0

是的,我的应用程序服务器在 https 上运行。客户要求将肥皂地址从 http 更改为 https。

客户要求,只要他想要 2 通过浏览器查看 wsdl,soap 地址应该以 https 的形式出现

我已经在axis2.xml中添加了这个......

<transportReceiver name="https"      class="org.apache.axis2.transport.http.SimpleHTTPServer"> <parameter     name="port">8443</parameter> 
</transportReceiver>

我在 service.xml 中添加了以下内容

<transports> <transport>HTTPS</transport> </transports> 

在封闭标签之后,但它给了我以下错误。

它给了我例外

org.apache.axis2.deployment.DeploymentException: Service [ RTAPDevService] is trying to expose in a transport : <transports> <transport>HTTPS</transport> </transports> and which is not available in Axis2 – 
4

3 回答 3

0

这就是我所做的:

创建证书

keytool -genkey -alias localhost -keypass password -keystore /choose/a/path/localhost.bin -storepass password -keyalg RSA

在 tomcat 中为 AXIS2 启用服务器端 SSL

Server.xml在tomcat中添加以下内容:

<Connector port="8443" protocol="HTTP/1.1" SSLEnabled="true"
       maxThreads="150" scheme="https" secure="true"
       clientAuth="false" sslProtocol="TLS"
       keystoreFile="/choose/a/path/localhost.bin"
       keystorePass="password" keyAlias="localhost"/>

更改axis2.xml

(您可以同时使用:http 和 https)

<transportReceiver name="http"
               class="org.apache.axis2.transport.http.AxisServletListener">
               <parameter name="port">8080</parameter>
           </transportReceiver>
<transportReceiver name="https"
               class="org.apache.axis2.transport.http.AxisServletListener">
               <parameter name="port">8443</parameter>
           </transportReceiver>

希望能帮助到你。

于 2012-04-08T16:11:06.120 回答
0

service.xml中有错字。它应该是 :

<transports><transport>https</transport></transports>

不是 HTTPS。

您的wsdl将如下所示:

 <wsdl:service name="SampleService">
<wsdl:port name="SampleServiceHttpsSoap11Endpoint" binding="ns:SampleServiceSoap11Binding">
<soap:address location="https://localhost:8443/Axis2HttpsProject/services/SampleService.SampleServiceHttpsSoap11Endpoint/"/>
</wsdl:port>
<wsdl:port name="SampleServiceHttpsSoap12Endpoint" binding="ns:SampleServiceSoap12Binding">
<soap12:address location="https://localhost:8443/Axis2HttpsProject/services/SampleService.SampleServiceHttpsSoap12Endpoint/"/>
</wsdl:port>
<wsdl:port name="SampleServiceHttpsEndpoint" binding="ns:SampleServiceHttpBinding">
<http:address location="https://localhost:8443/Axis2HttpsProject/services/SampleService.SampleServiceHttpsEndpoint/"/>
</wsdl:port>
</wsdl:service>

还有一件事,确保你已经添加了http-core jar。

于 2012-04-09T10:55:49.020 回答
0

在standalone.xml中我做了这些改变:

    <subsystem xmlns="urn:jboss:domain:webservices:1.2">
        <modify-wsdl-address>true</modify-wsdl-address>
        <wsdl-host>jbossws.undefined.host</wsdl-host>
        <wsdl-port>443</wsdl-port>
        <endpoint-config name="Standard-Endpoint-Config"/>
于 2018-11-26T14:37:42.633 回答