Web services 使用suds.js不支持Tianium SOAP调用操作

Web services 使用suds.js不支持Tianium SOAP调用操作,web-services,soap,wsdl,titanium-mobile,Web Services,Soap,Wsdl,Titanium Mobile,我有http://192.168.15.45:8081/Taqeem.CRM.Appointments.Service.svc?wsdl服务和方法BookAppointment,我也提到了代码中的参数,它是值 var url = "http://192.168.15.45:8081/Taqeem.CRM.Appointments.Service.svc?wsdl"; var callparams = { AppointmentNumber: 'APP-00000003-H042S5',

我有
http://192.168.15.45:8081/Taqeem.CRM.Appointments.Service.svc?wsdl
服务和方法BookAppointment,我也提到了代码中的参数,它是值

var url = "http://192.168.15.45:8081/Taqeem.CRM.Appointments.Service.svc?wsdl";
var callparams = {
    AppointmentNumber: 'APP-00000003-H042S5',
    UserId: '4'
};

var suds = new SudsClient({
    endpoint: url,
    targetNamespace: 'http://tempuri.org'
});

try {
    suds.invoke('BookAppointment', {}, function(xmlDoc) {
        var ManifestXML = this.responseText;
        console.log(ManifestXML);
        var results = xmlDoc.documentElement.getElementsByTagName('ResultCode').text;
        console.log('result'+ results);
        if (results && results.length>0) {
            var result = results.item(0);
            label.text = '1 Euro buys you ' + results.item(0).text + ' U.S. Dollars.';
        } else {
            label.text = 'Oops, could not determine result of SOAP call.';
        }
    });
} catch(e) {
    Ti.API.error('Error: ' + e);
}
我已经使用了suds.js,当我执行下面的代码时。我得到的错误是ActionNotSupport

完整答复:

[INFO] :   <s:Envelope xmlns:s="http://schemas.xmlsoap.org/soap/envelope/">
    <s:Body>
    <s:Fault>
    <faultcode xmlns:a="http://schemas.microsoft.com/ws/2005/05/addressing/none">
    a:ActionNotSupported
    </faultcode>
    <faultstring xml:lang="en-US">
    The message with Action 'http://tempuri.org/BookAppointment' cannot be processed at the receiver, due to a ContractFilter mismatch at the EndpointDispatcher. This may be because of either a contract mismatch (mismatched Actions between sender and receiver) or a binding/security mismatch between the sender and the receiver.  Check that sender and receiver have the same contract and the same binding (including security requirements, e.g. Message, Transport, None).
    </faultstring>
    </s:Fault>
    </s:Body>
    </s:Envelope>
[INFO]:
答:行动不受支持
带行动的信息'http://tempuri.org/BookAppointment由于EndpointDispatcher上的ContractFilter不匹配,无法在接收器上处理。这可能是因为合同不匹配(发送方和接收方之间的操作不匹配)或发送方和接收方之间的绑定/安全不匹配。检查发送方和接收方是否具有相同的合同和相同的绑定(包括安全要求,例如消息、传输、无)。
我觉得我传递了错误的TargetNameSpace,但我已签入
http://192.168.15.45:8081/Taqeem.CRM.Appointments.Service.svc?wsdl
这很好。我请求查看上面的链接以获取方法列表


我使用了soapui,它执行得非常完美。我得到了完美的回答。

你试过了吗?是的,我试过了,但运气不好,在该指南中还建议不要使用soap调用???为什么?事实上,同样的事情也发生在我身上,我最终使用php处理soap调用,将php脚本放在我的服务器上,然后使用titanium的参数调用php脚本url。至少通过这种方式,你可以节省时间,而不是继续尝试使用钛合金。如果您需要帮助编写php脚本,我可以帮助您,为此您需要一个主机服务器和启用soap的php。