我正在调用机会服务,但以下面的错误结束。 SOAP响应:
&LT; ?xml version="1.0" encoding="UTF-8"?><soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/"><soap:Body><soap:Fault><faultcode>soap:Client</faultcode><faultstring>Client</faultstring><detail><ErrorCode>SBL-ODU-01007</ErrorCode><ErrorMessage>The HTTP request did not contain a valid SOAPAction header
标头的值为:document/urn:crmondemand/ws/ecbs/opportunity/10/2004:OpportunityQueryPage</ErrorMessage></detail></soap:Fault></soap:Body></soap:Envelope>
我正在使用apache http客户端来调用此服务。
SOAP
请求消息:
<?xml version=\"1.0\" encoding=\"UTF-8\"?><soapenv:Envelope xmlns:soapenv=\"http://schemas.xmlsoap.org/soap/envelope/\" xmlns:ns=\"urn:crmondemand/ws/ecbs/opportunity/10/2004\" xmlns:quer=\"urn:/crmondemand/xml/Opportunity/Query\" xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\" xmlns:wsse=\"http://schemas.xmlsoap.org/ws/2002/07/secext\" xmlns:xsd=\"http://www.w3.org/2001/XMLSchema\"> <soapenv:Header><wsse:Security><wsse:UsernameToken><wsse:Username>XXXXXX</wsse:Username><wsse:Password Type=\"http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-username-token-profile-1.0#PasswordText\">XXXXXXX</wsse:Password></wsse:UsernameToken></wsse:Security></soapenv:Header><soapenv:Body><ns:OpportunityQueryPage_Input><quer:ListOfOpportunity pagesize=\"100\" startrownum=\"1\" recordcountneeded=\"5\"><quer:Opportunity searchspec=\"[Owner] LIKE '*'\"><quer:Description sortorder=\"ASCE\"></quer:Description><quer:AccountName sortorder=\"ASCE\"></quer:AccountName><quer:cActual_Booking_ValueTCV_Mn></quer:cActual_Booking_ValueTCV_Mn></quer:Opportunity></quer:ListOfOpportunity></ns:OpportunityQueryPage_Input></soapenv:Body></soapenv:Envelope>
我的调用网址:
https://secure-ausomxapa.crmondemand.com/Services/Integration
我无法准确找到错误的位置。请帮助解决此问题。
提前致谢。
答案 0 :(得分:0)
以下是适用于活动的示例:
soapAction: '"document/urn:crmondemand/ws/ecbs/activity/10/2004:ActivityQueryPage"',
data: '<?xml version="1.0" encoding="utf-8"?><soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema"><soap:Body><ActivityQueryPage_Input xmlns="urn:crmondemand/ws/ecbs/activity/10/2004"><ListOfActivity pagesize="20" xmlns="urn:/crmondemand/xml/Activity/Query"><Activity searchspec= "[Id] = \''+myTextBox.val()+'\'"><Id></Id><Subject></Subject><Type></Type><Priority></Priority><Description></Description><CommentsAction></CommentsAction><OwnerFullName></OwnerFullName><DelegatedBy></DelegatedBy></Activity></ListOfActivity></ActivityQueryPage_Input></soap:Body></soap:Envelope>',
callback: function (data) {}