Topic
  • 4 replies
  • Latest Post - ‏2013-03-18T17:23:24Z by SystemAdmin
SystemAdmin
SystemAdmin
224 Posts

Pinned topic Problem in Consuming WCF Data Service in Cast Iron

‏2013-03-11T14:42:41Z |
Hi,

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.
Updated on 2013-03-18T17:23:24Z at 2013-03-18T17:23:24Z by SystemAdmin
  • SystemAdmin
    SystemAdmin
    224 Posts

    Re: Problem in Consuming WCF Data Service in Cast Iron

    ‏2013-03-11T16:26:43Z  
    Probably the web service not confirming to WS-I Basic Profile 1.1?

    http://www-01.ibm.com/support/docview.wss?uid=swg21452782
  • SystemAdmin
    SystemAdmin
    224 Posts

    Re: Problem in Consuming WCF Data Service in Cast Iron

    ‏2013-03-11T17:01:16Z  
    Does 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.
  • SystemAdmin
    SystemAdmin
    224 Posts

    Re: Problem in Consuming WCF Data Service in Cast Iron

    ‏2013-03-18T08:29:23Z  
    Where 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.
  • SystemAdmin
    SystemAdmin
    224 Posts

    Re: Problem in Consuming WCF Data Service in Cast Iron

    ‏2013-03-18T17:23:24Z  
    Where 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.
    If 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