2

以下のように、複数のポート名とバインディングが定義されている wsdl があります。

<wsdl:service name="NPCWebService">
    <wsdl:port name="NPCWebServiceHttpEndpoint" binding="xsd:NPCWebServiceHttpBinding">
      <http:address location="http://localhost:8080/axis2/services/NPCWebService"/>
    </wsdl:port>
    <wsdl:port name="NPCWebServiceHttpSoap12Endpoint" binding="xsd:NPCWebServiceSoap12Binding">
      <soap12:address location="http://localhost:8080/axis2/services/NPCWebService"/>
    </wsdl:port>
    <wsdl:port name="NPCWebServiceHttpSoap11Endpoint" binding="xsd:NPCWebServiceSoap11Binding">
      <soap:address location="http://localhost:8080/axis2/services/NPCWebService"/>
    </wsdl:port>
  </wsdl:service>

wsconsume を使用してスタブを生成しました。生成インターフェースを実装して Web サービスを開発する場合@WebService、wsdl には 3 つの値があるため、注釈の一部として指定する portName 属性を指定する必要があります。

さらに、3つのうちどのportNameを指定しても、戦争の展開中に「ポートが見つかりません..」という例外が発生します。

例外:

12:43:32,609 ERROR [MainDeployer] Could not start deployment: file:/C:/jboss-4.2
.2.GA/server/default/deploy/JbossWS.war
org.jboss.ws.WSException: Cannot find port in wsdl: {http://jbossws.np.hp.com/}N
PCWebServiceHttpSoap11Endpoint

これに関するあなたの見解を助けてください。

ありがとう

4

1 に答える 1

2

同じエラーが発生しました: WSDL で宣言された名前空間が実装と同じであることを確認してください (ここではcom.hp.np.jbossws、エラーで指定されているように、実装は にあります)

于 2011-07-12T08:49:29.030 に答える