繁体   English   中英

WS-Security客户端:签署SOAP错误

[英]WS-Security Client: Sign SOAP error

我正在尝试使用eclipse + axis在WSDL生成的WS Client中签名SOAP消息。

这是代码:

_call.setOperation(_operations[2]);
    _call.setUseSOAPAction(true);
    _call.setSOAPActionURI("http://hostname/operation");
    _call.setEncodingStyle(null);
    _call.setProperty(org.apache.axis.client.Call.SEND_TYPE_ATTR, Boolean.FALSE);
    _call.setProperty(org.apache.axis.AxisEngine.PROP_DOMULTIREFS, Boolean.FALSE);
    _call.setSOAPVersion(org.apache.axis.soap.SOAPConstants.SOAP11_CONSTANTS);
    _call.setOperationName(new javax.xml.namespace.QName("", "EFACRECEPCIONSOBRE"));
    //Firma

    try {
        Properties configuration = new Properties();
        configuration.load(new FileInputStream(new File("C:\\trabajo\\sts-bundle\\sts-3.7.3.RELEASE\\workspace\\tmp\\securityConfiguration.properties")));
        //Handler que maneja la petición
        ClientHandler sender = new ClientHandler(configuration);
        _call.setClientHandlers(sender, null);
    } catch (Exception e) {
        e.printStackTrace();
    }
    setRequestHeaders(_call);
    setAttachments(_call);
    try {        

        java.lang.Object _resp = _call.invoke(new java.lang.Object[] {parameters});
        if (_resp instanceof java.rmi.RemoteException) {
            throw (java.rmi.RemoteException)_resp;
        }
        else {
            extractAttachments(_call);
            try {
                xxxxxxxx_resp;
            } catch (java.lang.Exception _exception) {
                xxxxxx
            }
        }
    } catch (org.apache.axis.AxisFault axisFaultException) {
        throw axisFaultException;
    }

但我收到此错误:

null cannot create instance

执行客户端时,在此行中:

java.lang.Object _resp = _call.invoke(new java.lang.Object[] {parameters});

任何想法?

安全配置参考文件中的错误导致此错误。 在Windows上引用密钥库必须将\\设置为\\。

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM