Warning: file_get_contents(/data/phpspider/zhask/data//catemap/0/xml/13.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
使用Java在输入Spring WS-SOAP的XML标记的所有字段中强制使用前缀_Java_Xml_Web Services_Soap_Wsdl - Fatal编程技术网

使用Java在输入Spring WS-SOAP的XML标记的所有字段中强制使用前缀

使用Java在输入Spring WS-SOAP的XML标记的所有字段中强制使用前缀,java,xml,web-services,soap,wsdl,Java,Xml,Web Services,Soap,Wsdl,我正在使用SpringSOAP,它会自动为我的SOAP web服务生成WSDL 我的问题是,当我使用WSDL时,SOAP UI生成了以下输入: <soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:ser="http://service.servicename.test/"> <soapenv:Header/> <soapenv:Body> &

我正在使用SpringSOAP,它会自动为我的SOAP web服务生成WSDL

我的问题是,当我使用WSDL时,SOAP UI生成了以下输入:

<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:ser="http://service.servicename.test/">
<soapenv:Header/>
<soapenv:Body>
    <ser:serviceName>
        <InputParameters>
            <service>
                <id>0</id>
            </service>
        </InputParameters>
    </ser:serviceName>
</soapenv:Body>

0

但我需要这样的东西:

<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:ser="http://service.servicename.test/">
<soapenv:Header/>
<soapenv:Body>
    <ser:serviceName>
        <ser:InputParameters>
            <ser:service>
                <ser:id>0</ser:id>
            </ser:service>
        </ser:InputParameters>
    </ser:serviceName>
</soapenv:Body>

0


如何将前缀“ser:”添加到所有标记中?

您是如何生成WSDL的?您是否创建了请求和响应模式(.xsd)?我在Java类中使用注释,如@xmlement(name=“service”,nillable=true)。。。等等希望这个链接能帮助你。