0

我收到这样的肥皂请求:

<?xml version="1.0" encoding="UTF-8"?>
<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/"
    xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
    <soapenv:Body>
        <notifications xmlns="xxxxx">
            <sometags></sometags>
            <Notification>
                <Id>yyyyy</Id>
                <sObject xsi:type="sf:Dog" xmlns:sf="urn:some.enterprise.object.soap.com">
                    <sf:Id>zzzzz</sf:Id>
                </sObject>
            </Notification>
        </notifications>
    </soapenv:Body>
</soapenv:Envelope>

我想知道通知是关于什么样的对象(==我想读取sObject的类型属性,以便我知道谁的sObject类型与id标签相关)。


我希望能够做类似的事情:

if (sObject.type.equals("Dog")) //做某事

if (sObject.type.equals("Cat")) //做其他事情

但我怎样才能在肥皂请求中获得该属性值?

我将 java 与 cxf 库一起使用。

谢谢,

克劳茨

4

1 回答 1

0

只需使用拦截器并做任何你想做的事。

于 2012-12-19T10:29:55.440 回答