Article

WCF service has issues with deserializing the Corticon response when new entities are created inside Corticon with “new” keyword.

« Go Back

Information

 
Article Number000038313
EnvironmentProduct: Corticon .NET Server
Version: 5.3.x, 5.4.x,5.5.x
OS: Windows
Database: All supported databases
Browser:n/a
Application Server: IIS
Question/Problem Description

WCF service has issues with deserializing the Corticon response when new entities are created inside Corticon with “new” keyword.  

 

 

 

 

 

Steps to Reproduce
Clarifying Information

Corticon decision service is deployed in IIS. 
Corticon is able to generate the output response.
The generated response is not compliant with WCF.

Error MessageC:\Program Files (x86)\Progress\Corticon 5.3\Server .NET\samples\bin>CallCargoService-wcf.exe
Calling service Cargo using WCF interface...
System.ServiceModel.CommunicationException: Error in deserializing body of reply message for operation 'Execute'. ---> System.InvalidOperationException: There is an error in XML document (1, 546). ---
> System.InvalidOperationException: The specified type was not recognized: name='Aircraft', namespace='urn:Corticon', at <Aircraft xmlns='urn:Corticon'>.
at Microsoft.Xml.Serialization.GeneratedAssembly.XmlSerializationReaderCargoDecisionServiceSoap.Read3_AircraftType(Boolean isNullable, Boolean checkType)
at Microsoft.Xml.Serialization.GeneratedAssembly.XmlSerializationReaderCargoDecisionServiceSoap.Read6_WorkDocumentsType(Boolean isNullable, Boolean checkType)
at Microsoft.Xml.Serialization.GeneratedAssembly.XmlSerializationReaderCargoDecisionServiceSoap.Read11_CorticonResponse()
at Microsoft.Xml.Serialization.GeneratedAssembly.ArrayOfObjectSerializer.Deserialize(XmlSerializationReader reader)
at System.Xml.Serialization.XmlSerializer.Deserialize(XmlReader xmlReader, String encodingStyle, XmlDeserializationEvents events)
--- End of inner exception stack trace ---
at System.Xml.Serialization.XmlSerializer.Deserialize(XmlReader xmlReader, String encodingStyle, XmlDeserializationEvents events)
at System.Xml.Serialization.XmlSerializer.Deserialize(XmlReader xmlReader, String encodingStyle)
at System.ServiceModel.Dispatcher.XmlSerializerOperationFormatter.DeserializeBody(XmlDictionaryReader reader, MessageVersion version, XmlSerializer serializer, MessagePartDescription returnPart, Me
ssagePartDescriptionCollection bodyParts, Object[] parameters, Boolean isRequest)
--- End of inner exception stack trace ---

Server stack trace:
at System.ServiceModel.Dispatcher.XmlSerializerOperationFormatter.DeserializeBody(XmlDictionaryReader reader, MessageVersion version, XmlSerializer serializer, MessagePartDescription returnPart, Me
ssagePartDescriptionCollection bodyParts, Object[] parameters, Boolean isRequest)
at System.ServiceModel.Dispatcher.XmlSerializerOperationFormatter.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.DeserializeReply(Message message, Object[] parameters)
at System.ServiceModel.Dispatcher.ProxyOperationRuntime.AfterReply(ProxyRpc& rpc)
at System.ServiceModel.Channels.ServiceChannel.HandleReply(ProxyOperationRuntime operation, ProxyRpc& rpc)
at System.ServiceModel.Channels.ServiceChannel.Call(String action, Boolean oneway, ProxyOperationRuntime operation, Object[] ins, Object[] outs, TimeSpan timeout)
at System.ServiceModel.Channels.ServiceChannelProxy.InvokeService(IMethodCallMessage methodCall, ProxyOperationRuntime operation)
at System.ServiceModel.Channels.ServiceChannelProxy.Invoke(IMessage message)

Exception rethrown at [0]:
at System.Runtime.Remoting.Proxies.RealProxy.HandleReturnMessage(IMessage reqMsg, IMessage retMsg)
at System.Runtime.Remoting.Proxies.RealProxy.PrivateInvoke(MessageData& msgData, Int32 type)
at WcfUtilities.Corticon.ServiceGateway.WcfProxy.CargoDecisionServiceSoap.Execute(CorticonMessageRequest request)
at WcfUtilities.Corticon.ServiceGateway.WcfProxy.CargoDecisionServiceSoapClient.Execute(CorticonMessageRequest request) in d:\Stage\5.3\plugins\.Net\samples\wcf-client\CargoDecisionProxy_WCF.cs:lin
e 725
at CallCargoServiceWCF.Main() in d:\Stage\5.3\plugins\.Net\samples\wcf-client\CallCargoService.cs:line 45

C:\Program Files (x86)\Progress\Corticon 5.3\Server .NET\samples\bin>
Defect/Enhancement Number
Cause

Not enabling the property for WCF compliance ( com.corticon.servicecontracts.en sureComplianceWithDotNET_WCF=true)  in CcDeployment.properties file during the creation of the WSDL files using the Deployment Console.

Resolution

Enable the property for WCF compliance in CcDeployment.properties file during the creation of the WSDL files using the Deployment Console.

com.corticon.servicecontracts.ensureComplianceWithDotNET_WCF property determines whether generated service contracts (WSDL/XSD) are compliant with Microsoft .NET requirements. This property must be set to true when the Corticon Server is deployed inside a Microsoft WCF container.  
Default for ensureComplianceWithDotNETis false
i.e. com.corticon.servicecontracts.ensureComplianceWithDotNET_WCF=false

a] To enable this property, add the CcDeployment.properties file to the \Server .NET\samples\conf directory ( if not already present ) on the machine that is used for running the Deployment Console to create their WSDL and change/add com.corticon.servicecontracts.ensureComplianceWithDotNET_WCF property to true.

b] Run the Deployment Console and produce an updated WSDL with this property change in place.

c] Use this WSDL to generate the stubs/proxy classes

d] Ensure C:/inetpub/wwwroot/axis/conf/CcDeployment.properties also has com.corticon.servicecontracts.ensureComplianceWithDotNET_WCF=true during execution

e] Test with the updated WSDL and new stubs

Workaround
Notes
Attachment 
Last Modified Date9/15/2016 6:46 PM
Disclaimer

The origins of the information on this site may be internal or external to Progress Software Corporation (“Progress”). Progress Software Corporation makes all reasonable efforts to verify this information. However, the information provided is for your information only. Progress Software Corporation makes no explicit or implied claims to the validity of this information.

Any sample code provided on this site is not supported under any Progress support program or service. The sample code is provided on an "AS IS" basis. Progress makes no warranties, express or implied, and disclaims all implied warranties including, without limitation, the implied warranties of merchantability or of fitness for a particular purpose. The entire risk arising out of the use or performance of the sample code is borne by the user. In no event shall Progress, its employees, or anyone else involved in the creation, production, or delivery of the code be liable for any damages whatsoever (including, without limitation, damages for loss of business profits, business interruption, loss of business information, or other pecuniary loss) arising out of the use of or inability to use the sample code, even if Progress has been advised of the possibility of such damages.



Feedback
 
Was this article helpful?

   

Your feedback is appreciated.

Please tell us how we can make this article more useful. Please provide us a way to contact you, should we need clarification on the feedback provided or if you need further assistance.

Characters Remaining: 1025