2016-08-24 8 views
0

WebSphere(管理コンソールを使用)でWebサービス(.WARとして)をデプロイするたびに、WSDLを変更してWSDL XSD(基本的にWSDL型のインライン展開を削除します)。また、GetGedDoc.wsdl(元の名前はGetGedDocumentService.wsdl)の名前に変更されます。Webサービス(JAX-WS)をデプロイするときにWebSphereがWSDLを変更します

特に問題はありませんが、XSDはすべてのパラメータarg0、arg1などの名前を変更し、それらをすべてオプションにします。

これを防ぐにはどうすればよいですか?

問題の診断に使用できるコードは実際にはわかりませんが、とにかく私のWSDLがあります。

<?xml version="1.0" encoding="UTF-8"?><!-- Generated by JAX-WS RI (http://jax-ws.java.net). 
    RI's version is JAX-WS RI 2.2.10 svn-revision#IBM 2.2.10-12/21/2015 12:33:25 
    PM(foreman)-. --> 
<definitions xmlns="http://schemas.xmlsoap.org/wsdl/" name="GetGedDocumentService" 
    targetNamespace="http://cm.web.dsidiff.fr/" xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/" 
    xmlns:tns="http://cm.web.dsidiff.fr/" xmlns:wsam="http://www.w3.org/2007/05/addressing/metadata" 
    xmlns:wsp="http://www.w3.org/ns/ws-policy" xmlns:wsp1_2="http://schemas.xmlsoap.org/ws/2004/09/policy" 
    xmlns:wsu="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd" 
    xmlns:xsd="http://www.w3.org/2001/XMLSchema"> 
    <types> 
     <xsd:schema targetNamespace="http://cm.web.dsidiff.fr/"> 
      <xsd:element name="parameters" type="tns:getDocument"/> 
      <xsd:complexType name="getDocument"> 
       <xsd:sequence> 
        <xsd:element minOccurs="1" name="pid" type="xsd:string" /> 
        <xsd:element minOccurs="1" name="login" type="xsd:string" /> 
        <xsd:element minOccurs="1" name="pwd" type="xsd:string" /> 
        <xsd:element minOccurs="1" name="numClient" type="xsd:string" /> 
        <xsd:element minOccurs="0" name="numCompte" type="xsd:string" /> 
        <xsd:element minOccurs="0" name="itemType" type="xsd:string" /> 
        <xsd:element minOccurs="0" name="typeDoc" type="xsd:string" /> 
       </xsd:sequence> 
      </xsd:complexType> 
      <xsd:element name="result" type="xsd:string" /> 
     </xsd:schema> 
    </types> 
    <message name="getDocument"> 
     <part element="tns:parameters" name="parameters" /> 
    </message> 
    <message name="getDocumentResponse"> 
     <part element="tns:result" name="result" /> 
    </message> 
    <portType name="GetGedDocService"> 
     <operation name="getDocument"> 
      <input message="tns:getDocument"/> 
      <output message="tns:getDocumentResponse" /> 
     </operation> 
    </portType> 
    <binding name="GetGedDocSOAP" type="tns:GetGedDocService"> 
     <soap:binding style="document" transport="http://schemas.xmlsoap.org/soap/http" /> 
     <operation name="getDocument"> 
      <soap:operation soapAction="http://localhost:9080/DSI_CMDK_WS/getDocument" /> 
      <input> 
       <soap:body use="literal" /> 
      </input> 
      <output> 
       <soap:body use="literal" /> 
      </output> 
     </operation> 
    </binding> 
    <service name="GetGedDocService"> 
     <port binding="tns:GetGedDocSOAP" name="GetGedDocSOAP"> 
      <soap:address location="http://localhost:9080" /> 
     </port> 
    </service> 
</definitions> 
+0

http://stackoverflow.com/questions/238643/where-does-websphere-get-the-wsdl-from?rq=1 – Karthik

答えて

2

いくつかの可能性があります。 @Webservice注釈にwsdlLocation属性が含まれていない場合、WebSphereはwsdlについて認識せず、wsdlを生成しています。

wsdlがアプリケーションとともにパッケージ化されると、WebSphereはそれを調べてコードと比較します。なんらかの理由でコードと互換性がない場合(操作やパラメータが一致しない、または名前空間が一致しないなど)、無視され、別のものが生成されます。

2番目の方に向いている場合は、com.ibm.ws.websvcs。* = allのトレースが参考になります。

+0

これは意味があります。どうすれば "com.ibm.ws.websvcs。* = all"をトレースするのでしょうか?私はEclipse/Rational/WebSphereには慣れていません。 – Kilazur

+0

管理コンソールで、トラブルシューティング - >ログとトレース - >(サーバー) - >詳細レベルの変更、[実行時]タブの選択、*情報= *情報の変更:com.ibm.ws.websvcs。* = all 。これをサーバーの再始動に突き当たせたい場合は、「save config to config」チェック・ボックスを選択します。 OKをクリックし、保存をクリックします。出力はtrace.logになります –

関連する問題