调用DescribeSObjects 的示例Soap 主体
我在使用 Savon 从 ruby on Rails 应用程序进行描述SObject 调用时遇到了一些问题。有人可以根据过去使用 salesforce 合作伙伴 API 的经验或一般 wsdl 知识分享我的肥皂体应该是什么样子的示例吗?
这是我的应用程序生成的内容:
<?xml version="1.0" encoding="UTF-8"?>
<env:Envelope xmlns:wsdl="urn:partner.soap.sforce.com" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:ins0="urn:partner.soap.sforce.com" xmlns:ins1="urn:fault.partner.soap.sforce.com" xmlns:ins2="urn:sobject.partner.soap.sforce.com" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:env="http://schemas.xmlsoap.org/soap/envelope/">
<env:Header>
<wsdl:SessionHeader>
<wsdl:sessionId>REMOVED</wsdl:sessionId>
</wsdl:SessionHeader>
</env:Header>
<env:Body>
<ins0:describeSObjects>
<wsdl:object1>Action_Plans_Settings__c</wsdl:object1>
<wsdl:object2>QuoteLineSyncField__c</wsdl:object2>
</ins0:describeSObjects>
</env:Body>
</env:Envelope>
我知道这是不正确的,但我很难仅从 wsdl 中弄清楚最终的肥皂体会是什么样子。我浏览过销售人员论坛和文档,但运气不佳。
这是此操作的 wsdl 定义,也许一些 wsdl 大师可以根据它来解决这个问题:
<operation name="describeSObjects">
<documentation>Describe a number sObjects</documentation>
<input message="tns:describeSObjectsRequest"/>
<output message="tns:describeSObjectsResponse"/>
<fault message="tns:InvalidSObjectFault" name="InvalidSObjectFault"/>
<fault message="tns:UnexpectedErrorFault" name="UnexpectedErrorFault"/>
</operation>
<message name="describeSObjectsRequest">
<part element="tns:describeSObjects" name="parameters"/>
</message>
<element name="describeSObjects">
<complexType>
<sequence>
<element name="sObjectType" type="xsd:string" minOccurs='0' maxOccurs='100' />
</sequence>
</complexType>
</element>
I'm running into some issues doing a describeSObject call from a ruby on rails application using Savon. Could someone share an example of what my soap body should look like either from past experience with the salesforce partner api or general wsdl knowledge?
Here's what my application is generating:
<?xml version="1.0" encoding="UTF-8"?>
<env:Envelope xmlns:wsdl="urn:partner.soap.sforce.com" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:ins0="urn:partner.soap.sforce.com" xmlns:ins1="urn:fault.partner.soap.sforce.com" xmlns:ins2="urn:sobject.partner.soap.sforce.com" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:env="http://schemas.xmlsoap.org/soap/envelope/">
<env:Header>
<wsdl:SessionHeader>
<wsdl:sessionId>REMOVED</wsdl:sessionId>
</wsdl:SessionHeader>
</env:Header>
<env:Body>
<ins0:describeSObjects>
<wsdl:object1>Action_Plans_Settings__c</wsdl:object1>
<wsdl:object2>QuoteLineSyncField__c</wsdl:object2>
</ins0:describeSObjects>
</env:Body>
</env:Envelope>
I know this isn't correct, but I'm having trouble figuring out from the wsdl alone what the final soap body would look like. I've browsed the salesforce forums and docs without much luck.
Here's the wsdl definition for this operation, perhaps some wsdl gurus can figure this out based on it:
<operation name="describeSObjects">
<documentation>Describe a number sObjects</documentation>
<input message="tns:describeSObjectsRequest"/>
<output message="tns:describeSObjectsResponse"/>
<fault message="tns:InvalidSObjectFault" name="InvalidSObjectFault"/>
<fault message="tns:UnexpectedErrorFault" name="UnexpectedErrorFault"/>
</operation>
<message name="describeSObjectsRequest">
<part element="tns:describeSObjects" name="parameters"/>
</message>
<element name="describeSObjects">
<complexType>
<sequence>
<element name="sObjectType" type="xsd:string" minOccurs='0' maxOccurs='100' />
</sequence>
</complexType>
</element>
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)