2011-08-04 49 views
1

私は、同じ名前の "getConfiguration"を持つ2つの異なるwebservices(それぞれが異なるwsdlから生成された)を持っています。これは同じ.aarファイルに入れようとしています。私は2番目の名前「getConfiguration2」、 はので、私のservices.xmlファイルは、次のようになりますように変更しましたservices.xmlのでaxis2:同じ名前を持つ2つの異なるWebサービス

<?xml version="1.0" encoding="UTF-8"?> 
<serviceGroup> 
<service name="getConfiguration"> 
     <messageReceivers> 
      <messageReceiver mep="http://www.w3.org/ns/wsdl/in-out" class="wi.xpto.webservice.GetConfigurationMessageReceiverInOut"/> 
     </messageReceivers> 
     <parameter name="ServiceClass">wi.xpto.webservice.GetConfigurationSkeleton</parameter> 
     <parameter name="useOriginalwsdl">true</parameter> 
     <parameter name="modifyUserWSDLPortAddress">false</parameter> 
     <operation name="getConfiguration" mep="http://www.w3.org/ns/wsdl/in-out" namespace="http://6.xpto.com/v/i/wsd/getConfiguration"> 
      <actionMapping>v_i_wsd_getConfiguration_Binder_getConfiguration</actionMapping> 
      <outputActionMapping>http://6.xpto.com/v/i/wsd/getConfiguration/getConfiguration_PortType/getConfigurationResponse</outputActionMapping> 
     </operation> 
    </service> 

    <service name="getConfiguration2"> 
     <messageReceivers> 
      <messageReceiver mep="http://www.w3.org/ns/wsdl/in-out" class="wi.xpto.webservice2.GetConfigurationMessageReceiverInOut"/> 
     </messageReceivers> 
     <parameter name="ServiceClass">wi.xpto.webservice2.GetConfigurationSkeleton</parameter> 
     <parameter name="useOriginalwsdl">true</parameter> 
     <parameter name="modifyUserWSDLPortAddress">false</parameter> 
     <operation name="getConfiguration" mep="http://www.w3.org/ns/wsdl/in-out" namespace="http://7.xpto.com/VResouce_I/wsd/getConfiguration"> 
      <actionMapping>VResouce_I_wsd_getConfiguration_Binder_getConfiguration</actionMapping> 
      <outputActionMapping>http://7.xpto.com/VResouce_I/wsd/getConfiguration/getConfiguration_PortType/getConfigurationResponse</outputActionMapping> 
     </operation> 
    </service> 

</serviceGroup> 

サービス/ listServicesは、二つのWebサービスを提供します:私はgetConfigurationのWSDLのURLにアクセスすると

-> getConfiguration 
Service EPR : http://host/path/services/getConfiguration 
Service Description : getConfiguration 
Service Status : Active 
Available Operations 
getConfiguration 

-> getConfiguration2 
Service EPR : http://host/path/services/getConfiguration2 
Service Description : getConfiguration2 
Service Status : Active 
Available Operations 
getConfiguration 

は(?のhttp://ホスト/パス/サービス/ getConfiguration WSDL)を軸は、私にはよさそうだgetConfigurationサービスからWSDLを提示します。 しかし、私はgetConfiguration2のWSDLのURLにアクセスする場合(のhttp://ホスト/パス/サービス/ getConfiguration2 WSDL)を次のエラーが表示されます

<error> 
    <description>Unable to generate WSDL 1.1 for this service</description> 
    <reason>If you wish Axis2 to automatically generate the WSDL 1.1, then please +set useOriginalwsdl as false in your services.xml</reason> 
</error> 

AARファイルは、WSDL(もgetConfiguration2に改名秒1の両方が含まれています):

META-INF/getconfiguration.wsdl 
META-INF/getConfiguration2.wsdl 

これを解決するにはどうすればよいですか? 私がservices.xmlファイルの中の1つをコメントすると、もう1つは正常に動作します。 マイセットアップ:Linuxの+のJava 1.6 + Tomcatの+軸2つの

おかげ

答えて

1

それはあなたがまた、WSDLを編集して、次のようにサービス名を変更する必要があり、WSDLファイルの名前を変更するのに十分ではありません。

<wsdl:service name="getConfiguration2"> 
      <wsdl:port name="..." binding="tns:..."> 
         <soap:address location="http://hostname:port/path/..."/> 
      </wsdl:port> 
</wsdl:service> 
関連する問題