在 SOAP UI 中测试安全的 Web 服务

发布于 2024-10-02 22:04:51 字数 599 浏览 5 评论 0原文

我正在使用 AXIS2 框架来创建 Web 服务。现在我使用 Ramrt 来保护我的网络服务。现在,整个请求和响应都将被签名和加密。

现在我的疑问是如何在 SOAP UI 中测试它。当我加载 wsdl 文件时,它给我的是 以下。

    <soap:Envelope xmlns:soap="http://www.w3.org/2003/05/soapenvelope"
       xmlns:sam="http://sample03.policy.samples.rampart.apache.org">
    <soap:Header/>
     <soap:Body>
        <sam:echo>
              <!--Optional:-->
              <sam:args0>?</sam:args0>
        </sam:echo>
    </soap:Body>
  </soap:Envelope>

现在我如何放置数字证书相关数据以及如何加密我想要发送到轴服务器的内容。

谢谢, 纳伦德拉

I am using AXIS2 framework for my webservices creating. Now I am secured my webservices using ramprt. Now entire requests and response will be signed and encrypted.

Now my doubt is how can i test it in SOAP UI. when I am loading wsdl file it giving me as
below.

    <soap:Envelope xmlns:soap="http://www.w3.org/2003/05/soapenvelope"
       xmlns:sam="http://sample03.policy.samples.rampart.apache.org">
    <soap:Header/>
     <soap:Body>
        <sam:echo>
              <!--Optional:-->
              <sam:args0>?</sam:args0>
        </sam:echo>
    </soap:Body>
  </soap:Envelope>

Now Ho w can i place digital certificate related data and how can i encrypt the content i want to send to axis server.

Thanks,
Narendra

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

甜心 2024-10-09 22:04:51

证书数据存储在两个 xml 文件中:Outflowsecurity.xml 和 Inflowsecurity.xml,它们应如下所示:

<?xml version="1.0" encoding="UTF-8"?>
<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema" elementFormDefault="qualified" attributeFormDefault="unqualified">
    <xs:element name="action">
        <xs:annotation>
            <xs:documentation>Outflow security 'action' configuration</xs:documentation>
        </xs:annotation>
        <xs:complexType>
            <xs:sequence>
                <xs:element name="items" type="xs:string"/>
            <xs:element name="user" type="xs:string"/>
            <xs:element name="passwordCallbackClass" type="xs:string" minOccurs="0"/>
            <xs:element name="signaturePropFile" type="xs:string" minOccurs="0"/>
            <xs:element name="encryptionPropFile" type="xs:string" minOccurs="0"/>
            <xs:element name="encryptionPropFile" type="xs:string" minOccurs="0"/>
            <xs:element name="signatureKeyIdentifier" type="xs:string" minOccurs="0"/>
            <xs:element name="encryptionKeyIdentifier" type="xs:string" minOccurs="0"/>
            <xs:element name="encryptionUser" type="xs:string" minOccurs="0"/>
            <xs:element name="signatureParts" type="xs:string" minOccurs="0"/>

            <xs:element name="encryptionParts" type="xs:string" minOccurs="0"/>
            <xs:element name="optimizeParts" type="xs:string" minOccurs="0"/>
            <xs:element name="encryptionSymAlgorithm" type="xs:string" minOccurs="0"/>
            <xs:element name="EmbeddedKeyCallbackClass" type="xs:string" minOccurs="0"/>
            <xs:element name="encryptionKeyTransportAlgorithm" type="xs:string" minOccurs="0"/>
            <xs:element name="EmbeddedKeyName" type="xs:string" minOccurs="0"/>
            <xs:element name="timeToLive" type="xs:string" minOccurs="0"/>
        </xs:sequence>
    </xs:complexType>

</xs:element>

有关更多详细信息,请访问 Apache 帮助页面

使用请求中的身份验证需要将标签添加到soap:标题中,

<soapenv:Header>
    <wsse:Security
        soapenv:mustUnderstand="1">
        <wsu:Timestamp
            wsu:Id="Timestamp-31497899">
            <wsu:Created>2008-02-06T13:39:50.943Z</wsu:Created>
            <wsu:Expires>2008-02-06T13:44:50.943Z</wsu:Expires>
        </wsu:Timestamp>
        <wsse:UsernameToken
            wsu:Id="UsernameToken-10697954">
            <wsse:Username>apache</wsse:Username>
            <wsse:Password
                Type="http://...#PasswordText">password</wsse:Password>
        </wsse:UsernameToken>
    </wsse:Security>
</soapenv:Header>

命名空间为:

xmlns:wsu="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd" 
xmlns:wsp="http://schemas.xmlsoap.org/ws/2004/09/policy"

the certificate data is stored in two xml Files the Outflowsecurity.xml and Inflowsecurity.xml they should look like this:

<?xml version="1.0" encoding="UTF-8"?>
<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema" elementFormDefault="qualified" attributeFormDefault="unqualified">
    <xs:element name="action">
        <xs:annotation>
            <xs:documentation>Outflow security 'action' configuration</xs:documentation>
        </xs:annotation>
        <xs:complexType>
            <xs:sequence>
                <xs:element name="items" type="xs:string"/>
            <xs:element name="user" type="xs:string"/>
            <xs:element name="passwordCallbackClass" type="xs:string" minOccurs="0"/>
            <xs:element name="signaturePropFile" type="xs:string" minOccurs="0"/>
            <xs:element name="encryptionPropFile" type="xs:string" minOccurs="0"/>
            <xs:element name="encryptionPropFile" type="xs:string" minOccurs="0"/>
            <xs:element name="signatureKeyIdentifier" type="xs:string" minOccurs="0"/>
            <xs:element name="encryptionKeyIdentifier" type="xs:string" minOccurs="0"/>
            <xs:element name="encryptionUser" type="xs:string" minOccurs="0"/>
            <xs:element name="signatureParts" type="xs:string" minOccurs="0"/>

            <xs:element name="encryptionParts" type="xs:string" minOccurs="0"/>
            <xs:element name="optimizeParts" type="xs:string" minOccurs="0"/>
            <xs:element name="encryptionSymAlgorithm" type="xs:string" minOccurs="0"/>
            <xs:element name="EmbeddedKeyCallbackClass" type="xs:string" minOccurs="0"/>
            <xs:element name="encryptionKeyTransportAlgorithm" type="xs:string" minOccurs="0"/>
            <xs:element name="EmbeddedKeyName" type="xs:string" minOccurs="0"/>
            <xs:element name="timeToLive" type="xs:string" minOccurs="0"/>
        </xs:sequence>
    </xs:complexType>

</xs:element>

for more details go to the Apache help Page

To use the authentification in the Request you need to add a Tag to the soap:Header

<soapenv:Header>
    <wsse:Security
        soapenv:mustUnderstand="1">
        <wsu:Timestamp
            wsu:Id="Timestamp-31497899">
            <wsu:Created>2008-02-06T13:39:50.943Z</wsu:Created>
            <wsu:Expires>2008-02-06T13:44:50.943Z</wsu:Expires>
        </wsu:Timestamp>
        <wsse:UsernameToken
            wsu:Id="UsernameToken-10697954">
            <wsse:Username>apache</wsse:Username>
            <wsse:Password
                Type="http://...#PasswordText">password</wsse:Password>
        </wsse:UsernameToken>
    </wsse:Security>
</soapenv:Header>

the namespaces are:

xmlns:wsu="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd" 
xmlns:wsp="http://schemas.xmlsoap.org/ws/2004/09/policy"
~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文