I am trying to consume a WCF Data service in Cast Iron and getting some issues in it.
Following are steps followed by me:
1. Created a WCF Data Service(C#).
2. Hosted this service at one of my development server.
3. Created an orchestration in Cast Iron Studio.
4. Created an WebService end point.
I am getting the folowing error while creating the endpoint:
Could not load the document http://serverName/VDName/Service.svc/?wsdl into the repository.
Error: The document is not a schema@http://www.w3.org/2001/XMLSchema: document element mismatch got document
I have taken Webservice End Point type as Invoke, Location as Remote, and putting my service URL in WSDL-> Add URL and getting the error at this point only.
Please let me know if anyone in the community had ever tried or consumed WCF Data Service in Cast Iron Studio; and if ever had faced such issues and how resolved them.
Thanks in advance.
NOTICE: developerWorks Community will be offline May 29-30, 2015 while we upgrade to the latest version of IBM Connections. For more information, read our upgrade FAQ.
This topic has been locked.
4 replies Latest Post - 2013-03-18T17:23:24Z by SystemAdmin
Pinned topic Problem in Consuming WCF Data Service in Cast Iron
Answered question This question has been answered.
Unanswered question This question has not been answered yet.
Updated on 2013-03-18T17:23:24Z at 2013-03-18T17:23:24Z by SystemAdmin
Re: Problem in Consuming WCF Data Service in Cast Iron2013-03-11T17:01:16Z in response to SystemAdminDoes the service return any System.Data.DataSet objects? If so, you may want to convert them to return C# classes instead.
Check to see if there are any lines in the WSDL that say: <element ref="schema" /> and comment them out. Then try importing into Studio to see if you can get past this error.
If you need to return a DataSet, you may need to manually inject the schema for it in the WSDL to tell Studio how to accommodate it.
Re: Problem in Consuming WCF Data Service in Cast Iron2013-03-18T08:29:23Z in response to SystemAdminWhere to find the WSDL of WCF data service, I browsed the server where I have hosted the code and didn't get it.
I am returning IEnumerable<LineItem> from my data service, I tried returning string and integer also, all of these are working fine when I am consuming my this data service in my ASP.Net C# code and all of them is giving the same error in CIS.
Re: Problem in Consuming WCF Data Service in Cast Iron2013-03-18T17:23:24Z in response to SystemAdminIf you point your browser to the WSDL path you mentioned earlier (i.e., http://serverName/VDName/Service.svc?wsdl and not /?wsdl) you should be able to view the source of it and save it to a file for importing into Studio. Since it's a WCF service, you'll probably see that there are a few .xsd imports as well.
I would start by changing the service to return a List<LineItem> instead of IEnumerable<LineItem>. It may go against best OOP practices not to return an interface, but Studio (and other non-.NET clients I would think) needs something that can be expressed in an XML schema. If changing the return type is not an option, you could try fiddling with the serializers that .NET provides as well.
Cast Iron can interact with WCF services, but enabling these services to interop with other platforms may require some compromise.
Not sure if it's related, but thought I'd pass along: http://www-01.ibm.com/support/docview.wss?uid=swg21453379