0
我正在尝试在Microsoft Dynamic 2011中创建一个潜在客户。我已将我的PHP脚本连接到CRM,并获得了积极的反馈。通过PHP向CRM2011发送SOAP请求
我已经使用Fiddler获取用于在CRM2011中创建潜在顾客的肥皂代码。但是,当我通过我的PHP脚本使用相同的代码时,我会返回'false'。
,我已经发现了肥皂代码如下:
<s:Body>
<Execute xmlns="http://schemas.microsoft.com/crm/2009/WebServices">
<command>1</command>
<commandXml>
<Input>
<id>{00000000-0000-0000-0000-000000000000}</id>
<name>lead</name>
<formId>e3b6ddb7-8df0-4410-ac7b-fd32e5053d38</formId>
<dataxml>
<lead>
<leadqualitycode>2</leadqualitycode>
<statuscode>1</statuscode>
<ownerid type="8" name="Vlad Hercules">{6710C3A0-6EE9-E211-B17C-984BE16D3DAA}</ownerid>
<decisionmaker>0</decisionmaker>
<salesstage>0</salesstage>
<subject>subject</subject>
<lastname>vladislav</lastname>
<transactioncurrencyid type="9105" name="usd">{5B1C0B98-6CE9-E211-8B44-984BE17C9A7B}</transactioncurrencyid>
<preferredcontactmethodcode>1</preferredcontactmethodcode>
<donotemail>0</donotemail>
<donotbulkemail>0</donotbulkemail>
<donotphone>0</donotphone>
<donotpostalmail>0</donotpostalmail>
<donotsendmm>0</donotsendmm>
</lead>
</dataxml>
<associations></associations>
</Input>
</commandXml>
</Execute>
</s:Body>
</s:Envelope>
如何这个问题得到解决?我可以在哪里获得关于请求的外观的信息?
这是由微软提供的示例返回假的,当我尝试了:
<Create xmlns="http://schemas.microsoft.com/xrm/2011/Contracts/Services">
<entity xmlns:b="http://schemas.microsoft.com/xrm/2011/Contracts" xmlns:i="http://www.w3.org/2001/XMLSchema-instance">
<b:Attributes xmlns:c="http://schemas.datacontract.org/2004/07/System.Collections.Generic">
<b:KeyValuePairOfstringanyType>
<c:key>name</c:key>
<c:value i:type="d:string" xmlns:d="http://www.w3.org/2001/XMLSchema">Newer Corporation</c:value>
</b:KeyValuePairOfstringanyType>
</b:Attributes>
<b:EntityState i:nil="true"/>
<b:FormattedValues xmlns:c="http://schemas.datacontract.org/2004/07/System.Collections.Generic"/>
<b:Id>00000000-0000-0000-0000-000000000000</b:Id>
<b:LogicalName>account</b:LogicalName>
<b:RelatedEntities xmlns:c="http://schemas.datacontract.org/2004/07/System.Collections.Generic"/>
</entity>
</Create>
此答案似乎无效。但是,您是如何提出这种解决方案的? – user1652382
@ user1652382此代码有效。我在测试之前对它进行了测试。 有几个例子,我发现有用的。当你说它返回“false”时,你如何得到这个结果?您应该能够阅读应该告诉您它是否成功的SOAP响应。 我已经开始在这里记录一些SOAP-CRM的东西 http://crmtroubleshoot.blogspot.com.au/2013/07/dynamics-crm-2011-php-and-soap-using.html 你用什么方法调用你的SOAP? 什么认证类型? – Campey
@ user1652382您现在是否已成功处理上述请求? – Campey