ERROR [AxisEngine]必须理解标题检查失败http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd

时间:2017-04-17 10:08:20

标签: java web-services axis2

我在这里已经完成了所有相关的帖子,但没有得到任何解决方案 我使用 /** * Custom toast to show application error messages * * @param context * @param message */ public static void displayAppToast(Context context, String message) { try { if (toast != null) { toast.cancel(); } toast = Toast.makeText(context, message, Toast.LENGTH_LONG); View view = toast.getView(); view.setBackgroundResource(R.drawable.toast_background); TextView text = (TextView) view.findViewById(android.R.id.message); text.setTextColor(context.getResources().getColor(R.color.color_white)); text.setPadding(10, 0, 10, 0); //Here is the code you need LayoutParams lp = new LayoutParams(); lp.gravity = Gravity.CENTER_HORIZONTAL; tatextsetLayoutParams(lp); toast.show(); } catch (Exception e) { } }

生成了wsdl2java的Web服务客户端代码

wsdl有以下

Apache Axis2 1.4.1

但是当检查肥皂请求信封时,没有找到政策标题。

我在执行网络服务请求时遇到以下错误。

<wsp:Policy wsu:Id="DigitalSignatureWithCertificateAndTimestampPolicy" xmlns:wsa="http://schemas.xmlsoap.org/ws/2004/08/addressing" xmlns:wsu="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd" xmlns:wsse="http://schemas.xmlsoap.org/ws/2002/12/secext"
            xmlns:wsrmp="http://schemas.xmlsoap.org/ws/2005/02/rm/policy" xmlns:sp="http://schemas.xmlsoap.org/ws/2005/07/securitypolicy">
    <wsp:ExactlyOne>
        <wsp:All alternative-id="DigitalSignatureWithCertificateAndTimestampPolicy">
            <sp:AsymmetricBinding>
                <wsp:Policy>
                    <sp:IncludeTimestamp/>
                    <sp:AlgorithmSuite>
                        <wsp:Policy>
                            <sp:TripleDesRsa15/>
                        </wsp:Policy>
                    </sp:AlgorithmSuite>
                    <sp:RecipientToken>
                        <wsp:Policy>
                            <sp:X509Token IncludeToken="http://schemas.xmlsoap.org/ws/2005/07/securitypolicy/IncludeToken/Always"/>
                        </wsp:Policy>
                    </sp:RecipientToken>
                    <sp:InitiatorToken>
                        <wsp:Policy>
                            <sp:X509Token IncludeToken="http://schemas.xmlsoap.org/ws/2005/07/securitypolicy/IncludeToken/Always"/>
                        </wsp:Policy>
                    </sp:InitiatorToken>
                </wsp:Policy>
            </sp:AsymmetricBinding>
            <sp:SignedParts>
                <sp:Body/>
            </sp:SignedParts>
        </wsp:All>
    </wsp:ExactlyOne>
</wsp:Policy>

任何人都可以帮我解决这个问题吗?

0 个答案:

没有答案