none
Renaming "TypedPollingDataSet0" from autogenerated schema - WCF-SQL RRS feed

  • Question

  • Hello All,

    I am consuming an SP using WCF-SQL adapter using "TypedPolling" option. It genereated me the schema. It generated something like this:

    <TypedPolling>
       <TypedPollingDataSet0>
     <TypedPollingDataSet0>
     <A></A>
     <B></B>
     </TypedPollingDataSet0>
       <TypedPollingDataSet0>
    </TypedPolling>

    Is that possible to change the name of "TypedPollingDataSet0" to a friendly name that i want?" I guess if we update the WSDL generated will fix the problem. But i am not sure where to update it?

    Thanks

     


    SKGuru
    Monday, October 10, 2011 6:01 PM

Answers

  • I used XMLPolling and it worked for me.

    Incase if anyone doesnt like the way the schemas getting generated out of WCF-SQL (Typed polling), you can go for XMLPolling. Steps to be followed:

    1) Create the SP which will have the SELECT query similar to below:

    ;WITH XMLNAMESPACES (default 'http://yourcustomnamespace')
     Select * from Employee FOR XML PATH('YourCustomRootNode') 

    2) Create a schema out of the table using the following query

    Select * from Employee for xml auto, xmlschema 

    3) Re-name the root name and namespace as per you mentioned in point#1

    4) Create an Envelope Schema and refer the schema from point#3. Also make a note of the root node name and namespace that we need to specify

    in the admin console.

    5) Assign the Body XPath.  Deploy the solution.

    6) In the Admin console, add the Root Node Name and namespace mentioned in point#4 under "XmlStoredProcedureRoodNodeName" and "XmlStoredProcedureRoodNodeNamespace"

    There you go. I did this for debatching. You can do for nomarl batch message instead of Envelope create a normal document schema.

    Thanks


    SKGuru
    • Marked as answer by SKGuru Monday, October 17, 2011 5:46 PM
    Monday, October 17, 2011 5:46 PM

All replies

  • Hi,

    The schema that is generated is according to this structure:

    <?xml version="1.0" encoding="utf-8" ?>
    <TypedPollingResultSet xmlns="http://schemas.microsoft.com/Sql/2008/05/TypedPolling">
       <COLUMN1>[Value]</Column1>
       <COLUMN2>[Value]</Column2>
       …    
    </TypedPollingResultSet>

    You cannot be change this! SQL-Server will sent messages according to that structure (i.e. schema) to the adapter clients.

    HTH

    Regards,

    Steef-Jan Wiggers
    MVP & MCTS BizTalk Server 2010
    http://soa-thoughts.blogspot.com/
    If this answers your question please mark it accordingly


    BizTalk
    Monday, October 10, 2011 7:46 PM
    Moderator
  • I used XMLPolling and it worked for me.

    Incase if anyone doesnt like the way the schemas getting generated out of WCF-SQL (Typed polling), you can go for XMLPolling. Steps to be followed:

    1) Create the SP which will have the SELECT query similar to below:

    ;WITH XMLNAMESPACES (default 'http://yourcustomnamespace')
     Select * from Employee FOR XML PATH('YourCustomRootNode') 

    2) Create a schema out of the table using the following query

    Select * from Employee for xml auto, xmlschema 

    3) Re-name the root name and namespace as per you mentioned in point#1

    4) Create an Envelope Schema and refer the schema from point#3. Also make a note of the root node name and namespace that we need to specify

    in the admin console.

    5) Assign the Body XPath.  Deploy the solution.

    6) In the Admin console, add the Root Node Name and namespace mentioned in point#4 under "XmlStoredProcedureRoodNodeName" and "XmlStoredProcedureRoodNodeNamespace"

    There you go. I did this for debatching. You can do for nomarl batch message instead of Envelope create a normal document schema.

    Thanks


    SKGuru
    • Marked as answer by SKGuru Monday, October 17, 2011 5:46 PM
    Monday, October 17, 2011 5:46 PM