0

.XSLTファイルを使用して管理したいXML(WSDL)ファイルがあります。一部の制限付きIPがWSDLの一部を表示できるように、WSDLの一部を表示するために.XSLTファイルにIPアクセス許可を設定したいと思います。私はこのWSDLを持っています:

          <wsdl:types>
        ...
      </wsdl:types>

      <wsdl:message>
        ...
      </wsdl:message>

      <wsdl:portType name="countrySoap">
         <wsdl:operation name="GetCountryByCountryCode">
             <wsdl:documentation>Get country name by country code</wsdl:documentation>
             <wsdl:input message="tns:GetCountryByCountryCodeSoapIn" />
             <wsdl:output message="tns:GetCountryByCountryCodeSoapOut" />
         </wsdl:operation>
        <wsdl:operation name="GetISD">
            <wsdl:documentation>Get International Dialing Code </wsdl:documentation>
            <wsdl:input message="tns:GetISDSoapIn" />
            <wsdl:output message="tns:GetISDSoapOut" />
        </wsdl:operation>
        ...
      </wsdl:portType>

  ....

これは私の.xsltファイルです:

    <xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
        xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/">
        <xsl:output method="xml" indent="yes"/>

        <xsl:template match="@* | node()">
            <xsl:copy>
                <xsl:apply-templates select="@* | node()"/>
            </xsl:copy>
        </xsl:template>

  <xsl:template match="wsdl:operation[@name = 'GetISD']" />
</xsl:stylesheet>

ここで、たとえば、10.10.10.1がWSDLのこの部分を表示できないIP権限を設定したいと思います。

 <wsdl:operation name="GetISD">
    <wsdl:documentation>Get International Dialing Code </wsdl:documentation>
    <wsdl:input message="tns:GetISDSoapIn" />
    <wsdl:output message="tns:GetISDSoapOut" />
</wsdl:operation>

どうすればいいですか?

4

1 に答える 1

0

Authorizationこれを達成するために操作レベルで使用できますか? Web サービス操作を実装する場合roles、有効な権限を持つユーザーが特定の操作にアクセスできるように定義します。閲覧を制限するだけでは、サービスへの不正アクセスに対処する必要があります。

于 2013-01-28T17:20:08.757 に答える