سلام درود بر شما
در هنگام استفاده از وبسرویس crm پیام گستر با خطای نامشخصی مواجه میشویم.
متن و پایخ درخواست جهت بررسی در ذیل آمده است:
Request:
<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:tem="http://tempuri.org/" xmlns:arr="http://schemas.microsoft.com/2003/10/Serialization/Arrays" xmlns:sep="http://schemas.datacontract.org/2004/07/Septa.PayamGostar.ServiceLayer.Contract.PGContracts.DataContracts">
<soapenv:Header/>
<soapenv:Body>
<tem:SaveCustomerById>
<!--Optional:-->
<tem:userName>AdminUser</tem:userName>
<!--Optional:-->
<tem:password>AdminPassword</tem:password>
<!--Optional:-->
<tem:identityId></tem:identityId>
<!--Optional:-->
<tem:isCorporate></tem:isCorporate>
<!--Optional:-->
<tem:name>Arya</tem:name>
<!--Optional:-->
<tem:propertyNameArray>
<!--Zero or more repetitions:-->
<arr:string>ایمیل:</arr:string>
</tem:propertyNameArray>
<!--Optional:-->
<tem:propertyValueArray>
<!--Zero or more repetitions:-->
<arr:string>arya.rashidi96@gmail.com</arr:string>
</tem:propertyValueArray>
<!--Optional:-->
<tem:exPropertyNameArray>
<!--Zero or more repetitions:-->
</tem:exPropertyNameArray>
<!--Optional:-->
<tem:exPropertyValueArray>
<!--Zero or more repetitions:-->
</tem:exPropertyValueArray>
<!--Optional:-->
<tem:addresses>
<!--Zero or more repetitions:-->
<sep:CustomerAddress>
<!--Optional:-->
<sep:Address>Line 2</sep:Address>
<!--Optional:-->
<sep:AddressType>1</sep:AddressType>
<!--Optional:-->
<sep:City>Saqqez</sep:City>
<!--Optional:-->
<sep:Country>Iran</sep:Country>
<!--Optional:-->
<sep:State>Kurdistan</sep:State>
<!--Optional:-->
<sep:ZipCode>6565656565</sep:ZipCode>
</sep:CustomerAddress>
</tem:addresses>
<!--Optional:-->
<tem:phones>
<!--Zero or more repetitions:-->
<sep:CustomerPhone>
<!--Optional:-->
<sep:ContinuedNumber>09189997761</sep:ContinuedNumber>
<!--Optional:-->
<sep:Extension></sep:Extension>
<!--Optional:-->
<sep:PhoneNumber></sep:PhoneNumber>
<!--Optional:-->
<sep:PhoneType></sep:PhoneType>
<!--Optional:-->
<sep:Prefix></sep:Prefix>
</sep:CustomerPhone>
</tem:phones>
<!--Optional:-->
<tem:userCategoryPath>
<!--Zero or more repetitions:-->
<arr:string></arr:string>
</tem:userCategoryPath>
</tem:SaveCustomerById>
</soapenv:Body>
</soapenv:Envelope>
Result:
<s:Envelope xmlns:s="http://schemas.xmlsoap.org/soap/envelope/">
<s:Body>
<s:Fault>
<faultcode xmlns:a="http://schemas.microsoft.com/net/2005/12/windowscommunicationfoundation/dispatcher">a:DeserializationFailed</faultcode>
<faultstring xml:lang="en-US">The formatter threw an exception while trying to deserialize the message: There was an error while trying to deserialize parameter http://tempuri.org/:identityId. The InnerException message was 'There was an error deserializing the object of type System.Nullable`1[[System.Guid, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089]]. The value '' cannot be parsed as the type 'Guid'.'. Please see InnerException for more details.</faultstring>
<detail>
<ExceptionDetail xmlns="http://schemas.datacontract.org/2004/07/System.ServiceModel" xmlns:i="http://www.w3.org/2001/XMLSchema-instance">
<HelpLink i:nil="true"/>
<InnerException>
<HelpLink i:nil="true"/>
<InnerException>
<HelpLink i:nil="true"/>
<InnerException>
<HelpLink i:nil="true"/>
<InnerException i:nil="true"/>
<Message>Unrecognized Guid format.</Message>
<StackTrace>at System.Guid.GuidResult.SetFailure(ParseFailureKind failure, String failureMessageID, Object failureMessageFormatArgument, String failureArgumentName, Exception innerException)
at System.Guid.TryParseGuid(String g, GuidStyles flags, GuidResult& result)
at System.Guid.Parse(String input)
at System.Runtime.Serialization.XmlReaderDelegator.ReadElementContentAsGuid()</StackTrace>
<Type>System.FormatException</Type>
</InnerException>
<Message>The value '' cannot be parsed as the type 'Guid'.</Message>
<StackTrace>at System.Runtime.Serialization.XmlReaderDelegator.ReadElementContentAsGuid()
at System.Runtime.Serialization.GuidDataContract.ReadXmlValue(XmlReaderDelegator reader, XmlObjectSerializerReadContext context)
at System.Runtime.Serialization.XmlObjectSerializerReadContext.InternalDeserialize(XmlReaderDelegator reader, String name, String ns, Type declaredType, DataContract& dataContract)
at System.Runtime.Serialization.XmlObjectSerializerReadContext.InternalDeserialize(XmlReaderDelegator xmlReader, Type declaredType, DataContract dataContract, String name, String ns)
at System.Runtime.Serialization.DataContractSerializer.InternalReadObject(XmlReaderDelegator xmlReader, Boolean verifyObjectName, DataContractResolver dataContractResolver)
at System.Runtime.Serialization.XmlObjectSerializer.ReadObjectHandleExceptions(XmlReaderDelegator reader, Boolean verifyObjectName, DataContractResolver dataContractResolver)</StackTrace>
<Type>System.Xml.XmlException</Type>
</InnerException>
<Message>There was an error deserializing the object of type System.Nullable`1[[System.Guid, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089]]. The value '' cannot be parsed as the type 'Guid'.</Message>
<StackTrace>at System.Runtime.Serialization.XmlObjectSerializer.ReadObjectHandleExceptions(XmlReaderDelegator reader, Boolean verifyObjectName, DataContractResolver dataContractResolver)
at System.Runtime.Serialization.DataContractSerializer.ReadObject(XmlDictionaryReader reader, Boolean verifyObjectName)
at System.ServiceModel.Dispatcher.DataContractSerializerOperationFormatter.PartInfo.ReadObject(XmlDictionaryReader reader, XmlObjectSerializer serializer)
at System.ServiceModel.Dispatcher.DataContractSerializerOperationFormatter.DeserializeParameterPart(XmlDictionaryReader reader, PartInfo part, Boolean isRequest)</StackTrace>
<Type>System.Runtime.Serialization.SerializationException</Type>
</InnerException>
<Message>The formatter threw an exception while trying to deserialize the message: There was an error while trying to deserialize parameter http://tempuri.org/:identityId. The InnerException message was 'There was an error deserializing the object of type System.Nullable`1[[System.Guid, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089]]. The value '' cannot be parsed as the type 'Guid'.'. Please see InnerException for more details.</Message>
<StackTrace>at System.ServiceModel.Dispatcher.DataContractSerializerOperationFormatter.DeserializeParameterPart(XmlDictionaryReader reader, PartInfo part, Boolean isRequest)
at System.ServiceModel.Dispatcher.DataContractSerializerOperationFormatter.DeserializeParameters(XmlDictionaryReader reader, PartInfo[] parts, Object[] parameters, Boolean isRequest)
at System.ServiceModel.Dispatcher.DataContractSerializerOperationFormatter.DeserializeBody(XmlDictionaryReader reader, MessageVersion version, String action, MessageDescription messageDescription, Object[] parameters, Boolean isRequest)
at System.ServiceModel.Dispatcher.OperationFormatter.DeserializeBodyContents(Message message, Object[] parameters, Boolean isRequest)
at System.ServiceModel.Dispatcher.OperationFormatter.DeserializeRequest(Message message, Object[] parameters)
at System.ServiceModel.Dispatcher.DispatchOperationRuntime.DeserializeInputs(MessageRpc& rpc)
at System.ServiceModel.Dispatcher.DispatchOperationRuntime.InvokeBegin(MessageRpc& rpc)
at System.ServiceModel.Dispatcher.ImmutableDispatchRuntime.ProcessMessage5(MessageRpc& rpc)
at System.ServiceModel.Dispatcher.ImmutableDispatchRuntime.ProcessMessage11(MessageRpc& rpc)
at System.ServiceModel.Dispatcher.MessageRpc.Process(Boolean isOperationContextSet)</StackTrace>
<Type>System.ServiceModel.Dispatcher.NetDispatcherFaultException</Type>
</ExceptionDetail>
</detail>
</s:Fault>
</s:Body>
</s:Envelope>
لطفا مورد را بررسی فرمایید.
بجای استفاده از سرویس Customer از سرویس Person یا Organization استفاده کنید. مشکل برطرف میشود.
ببخششید برای ذخیره کردن شرکت یا شخص آیتم الزام که باید داخل سایت پر بشه و به پیام گستر ارسال بشه چی هستش؟
سلام دوست عزیز
لطف میکنید منظورتون رو واضح تر بیان کنید متاسفانه متوجه سوالتون نشدم