0

はい、私のアプリケーションサーバーはhttpsで実行されます。クライアントは、soapアドレスを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>

もう 1 つ、 http-core jarが追加されていることを確認してください。

于 2012-04-09T10:55:49.020 に答える