0

我的项目中有一个简单的 Web 服务:

@WebService
public class ASample {

在 weblogic 中部署后,将生成以下 WSDL 定义:

<definitions
    xmlns:wsu="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd"
    xmlns:wsp="http://www.w3.org/ns/ws-policy"
    xmlns:wsp1_2="http://schemas.xmlsoap.org/ws/2004/09/policy"
    xmlns:wsam="http://www.w3.org/2007/05/addressing/metadata"
    xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/"
    xmlns:tns="http://service.gov.dubai.ae/"
    xmlns:xsd="http://www.w3.org/2001/XMLSchema"
    xmlns="http://schemas.xmlsoap.org/wsdl/"
    targetNamespace="http://service.test.com/"
    name="ASampleService">

知道为什么以及如何添加与 ws-policy 和 ws-security 相关的命名空间,以及如何将其从生成的定义中排除。

另外,我们如何才能从操作定义中去掉“wsam:Action”?我没有在操作上使用@Action

    <portType name="ASample">
        <operation name="method1">
            <input
                wsam:Action="http://service.test.com/ASampleService/method1Request"
                message="tns:method1Request" />
            <output
                wsam:Action="http://service.test.com/ASampleService/method1Response"
                message="tns:method1Response" />
            <fault message="tns:ServiceException" name="ServiceException"
                wsam:Action="http://service.test.com/ASampleService/method1/Fault/ServiceException" />
        </operation>
4

0 回答 0