none
Why is my WCF-Custom Send Port POLLING? or something deeper? RRS feed

  • Question

  • Hi everybody.  I am posting this new variation of a Polling schema question. 

    Here is the Warning/error from the App Log:

    The adapter failed to transmit message going to send port "WcfSendPort_SqlAdapterBinding_TypedProcedures_dbo_Custom" with URL "mssql://localhost/MyInstance/MyDatabase?". It will be retransmitted after the retry interval specified for this Send Port. Details:"Microsoft.ServiceModel.Channels.Common.XmlReaderParsingException: The start element with name "Polling" and namespace "http://schemas.microsoft.com/Sql/2008/05/Polling/" was unexpected. Please ensure that your input XML conforms to the schema for the operation.

    Server stack trace:
       at System.Runtime.AsyncResult.End[TAsyncResult](IAsyncResult result)
       at System.ServiceModel.Channels.ServiceChannel.SendAsyncResult.End(SendAsyncResult result)
       at System.ServiceModel.Channels.ServiceChannel.EndCall(String action, Object[] outs, IAsyncResult result)
       at System.ServiceModel.Channels.ServiceChannel.EndRequest(IAsyncResult result)

    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 System.ServiceModel.Channels.IRequestChannel.EndRequest(IAsyncResult result)
       at Microsoft.BizTalk.Adapter.Wcf.Runtime.WcfClient`2.RequestCallback(IAsyncResult result)".

     

    My Send Port sqlBinding has nothing specified for the polledDataAvailalble and pollingStatement.  Do I have a deeper problem that I am just not seeing?

    A little background:

    I have three SQL Server Procedures.  The first two have no parameters, one is used as the Data Available polling statement and one is used to select rows as the Polling statement.  The third inserts into a different table based on parameter names that match the incoming columns from the polling statement procedure.

    (FYI, as instructed via MSDN my Data Available polling statement returns a 0 or a # if there are rows to retrieve.)

    My Receive ports would not work until I changed the Recieve Pipeline to PassThruRecieve (instead of XML Receive), Same with the Send Port.  (Before I did this I got an error saying "http://schemas.microsoft.com/Sql/2008/05/Polling/#Polling" was unexpected.)

    Here is my orchestration:

    (I would prefer NOT to have the construct and transform because the column names are the same in the incoming and outgoing data, but oh well. It got me past a build error.)

    The last thing to know, is that (in my latest attempt) in VS when I used Consume Adapter Service I did use the "Configure" button and specify the binding properties for my Polling Statement procedure.  However, this did not prevent my schema polling problems.

    Anything you've got would help!  I'm lost.

    Thanks

     

     

     

    • Moved by Ben Cline1Moderator Tuesday, September 27, 2011 3:03 AM Related to adapters (From:BizTalk Server General)
    Friday, September 23, 2011 4:02 PM

Answers

  • Think you should use TypedPolling as you have a strongly typed polling message. Also look at this wiki article, if you haven't already done so for some nice tips on polling with WCF SQL Adapter
    Regards,
    Bali
    MCTS: BizTalk Server 2010,BizTalk Server 2006 and WCF
    Blog: http://dpsbali-biztalkweblog.blogspot.com
    -----------------------------------------------------
    Mark As Answer or Vote As Helpful if this helps.
    • Marked as answer by Jimbox13 Monday, September 26, 2011 7:04 PM
    Sunday, September 25, 2011 9:41 AM
  • the error you are getting is because the expression you entered is invalid. I see you added quotes to the entire expression (which you don't need..)

     the expression should've been (in the Expression shape):

    InsertRequestMessage(WCF.Action)="TypedProcedure/dbo/procAmpDestInsert";

     However, if you are specifying the Action in the send port, no need to have it in the orchestration.

    In the send port, the action should be (no quotes)

    TypedProcedure/dbo/procAmpDestInsert

    Also, to resolve your receive error (finding document etc..) can you take a screen shot of your Schema node in your application and post it (Applications/YourApplicationname/Schemas) ..

    Click on the Root Name column (so that they're sorted as such)..If you see more that one Polling root name with the same name, there's your problem. If you see none, there's your problem also.  



    Patrick Delifer, MCTS BizTalk Server 2006
    • Marked as answer by Jimbox13 Monday, September 26, 2011 7:04 PM
    Monday, September 26, 2011 3:52 PM
  • Wait before you do that.

    What is the type of your receive msg?

    In your orchestration browser, find you receive message and look at the messageType property.

    Make sure it's something like Projectname.something_inboundId.TypedPolling

     

    I am certain that it's not at this point. You have selected the wrong schema in you message variable.


    Patrick Delifer, MCTS BizTalk Server 2006
    • Edited by rrggggg Monday, September 26, 2011 5:28 PM
    • Marked as answer by Jimbox13 Monday, September 26, 2011 7:03 PM
    Monday, September 26, 2011 5:23 PM
  • If you don't see typed polling it's because you probably generate the schemas wrong?could it be?

    Here's the process

    You know how to get to the schema generator. Specify the SQL binding stuff, inbound id (same you will use in port), Polling Statement, and PolledDataAvailablestatement..

    Then:

    1.  Click connect

    2. Make sure you select Inbound Service Op from drop down

    3. Click the / and select TypedPolling

     

    then add OK..


    Patrick Delifer, MCTS BizTalk Server 2006
    • Marked as answer by Jimbox13 Monday, September 26, 2011 7:03 PM
    Monday, September 26, 2011 5:52 PM

All replies

  • See this blog on resolving the similar error.


    Don't forget to mark the post as answer or vote as helpful if it does, Regards -Rohit Sharma (http://rohitbiztalk.blogspot.com)
    Friday, September 23, 2011 4:24 PM
    Moderator
  • Hi Rohit!

    Thanks for that link.  I tried using "Procedure/dbo/SP_NAME" instead of "TypedProcedure/dbo/SP_NAME" but I still go the same app log messages.

     

    Here is a new clue!

    I ran SQL Profiler and discovered that all three of my procedures are actually running!  Even the insert! However, the insert is sending NULL for all the parameter values.  :(

    Update:

    Actually the Insert statement is being called after " SET FMTONLY OFF; SET FMTONLY ON;".  The next statement is " SET FMTONLY OFF;".  So maybe it's not really calling it, rather just getting the result schema?  It's acting like a Receive port? no?

    Any suggestions?  Maybe the problem really is with how I am receiving the rows?

     


    • Edited by Jimbox13 Friday, September 23, 2011 4:57 PM More info from SQL Profiler
    Friday, September 23, 2011 4:42 PM
  • Hi,

    Are you using the inbound polling scenario. I am afraid if so you will have to configure a one way WCF Custom or WCF SQL receive port, Two way ports are not supported for inbound operations.

    Hope this helps.


    Regards,
    Bali
    MCTS: BizTalk Server 2010,BizTalk Server 2006 and WCF
    Blog: http://dpsbali-biztalkweblog.blogspot.com
    -----------------------------------------------------
    Mark As Answer or Vote As Helpful if this helps.
    Friday, September 23, 2011 5:22 PM
  • Thank you for checking. 

    Yes I am using an inbound polling scenario (fyi with InBoundID specified in the URI) but my receive port is One-Way.  It is set this way in BT Admin Cons and also that way in my Orchestration above.

    Maybe something else?

    Friday, September 23, 2011 5:25 PM
  • Whats the value for this property that you are using InboundOperationType
    Regards,
    Bali
    MCTS: BizTalk Server 2010,BizTalk Server 2006 and WCF
    Blog: http://dpsbali-biztalkweblog.blogspot.com
    -----------------------------------------------------
    Mark As Answer or Vote As Helpful if this helps.
    Friday, September 23, 2011 5:35 PM
  • My polling WCF-Custom Receive Port Location has "Polling" in that property.

    I don't know if it matters (I am so confused already), but my WCF-Custom Send Port ("Static Solicit-Response") also has "Polling" in that Property, but the other polling related fields are blank or default.  I can provide the values if it would be helpful.

    Note also, my Send Port does not have "InBoundID" in the URI?  Should it?

    Friday, September 23, 2011 5:39 PM
  • Jimbox13,

    a few clarifications. You say you're using 3 sp's

    "The first two have no parameters, one is used as the Data Available polling statement and one is used to select rows as the Polling statement.  The third inserts into a different table based on parameter names that match the incoming columns from the polling statement procedure.."

    I gather the first 2 are used in the receive location..(I hope so).That would be your "polling" operation

    then you say "My Send Port sqlBinding has nothing specified for the polledDataAvailalble and pollingStatement.".

    the send port shouldn't and doesn't poll. There's no polling properties in the send config anyways.

    That being said, are you specifying the WCF.Action inthe Orchestration or in the Send port?

    Based on the screen shot above, I don't see where you would specify it in the orch so I guess you're doing it on the Send POrt?

    If you aren't then yu need to do it:

    In the orch, use an expression shape after the transform and code the following

    trandformedMsg(WCF.Action)="TypedProcedure/dbo/SP_NAME" ;

    or 

    In the send port, in the general table under SOAP actions, write:

    TypedProcedure/dbo/SP_NAME

    Let me know

     


    Patrick Delifer, MCTS BizTalk Server 2006
    Saturday, September 24, 2011 1:06 AM
  • Think you should use TypedPolling as you have a strongly typed polling message. Also look at this wiki article, if you haven't already done so for some nice tips on polling with WCF SQL Adapter
    Regards,
    Bali
    MCTS: BizTalk Server 2010,BizTalk Server 2006 and WCF
    Blog: http://dpsbali-biztalkweblog.blogspot.com
    -----------------------------------------------------
    Mark As Answer or Vote As Helpful if this helps.
    • Marked as answer by Jimbox13 Monday, September 26, 2011 7:04 PM
    Sunday, September 25, 2011 9:41 AM
  • Hi Patrick,

    I added an expression after the Construct and before Send_1.   I put in "InsertRequestMessage(WCF.Action)="TypedProcedure/dbo/procAmpDestInsert";".  I matched the message name the "Output Messages" property.

    However, this gives me a compile error:  "The expression that you have entered is not valid."  The compiler red underline is under the first open parenthesis.


    Also, fyi, in BTSAC my send port already had "TypedProcedure/dbo/procAmpDestInsert" entered in the Send Port SOAP Action.  (This is the exact text, nothing else is there) This text has been here from my initial configuration.

    Any ideas about the compiler message?  Maybe I need to set the Action on the send port in the Orchestration in VS instead of a message object?

    Thanks!

    Monday, September 26, 2011 3:12 PM
  • FYI:  Since last we spoke I decided that I should change the "PassThruReceive" settings on all my ports in BTSAC to be XMLReceive/XMLTransmit instead, based on the MSDN documentation that explains these settings.  Now I am back to schema problems on my receive port.

     

    Bali,

    I changed my receive port to use TypedPolling instead of the default Polling and I now get this App Log error:

    Receive Port: "RecAmpPortReal" URI: "mssql://localhost/....InboundId=SelecingAmp" Reason: Finding the document specification by message type "http://schemas.microsoft.com/Sql/2008/05/TypedPolling/SelecingAmp#TypedPolling" failed. Verify the schema deployed properly.

    I will now go and read that article, but please (any one) feel free to post other suggestions.  Still lost.

     

    Monday, September 26, 2011 3:15 PM
  • the error you are getting is because the expression you entered is invalid. I see you added quotes to the entire expression (which you don't need..)

     the expression should've been (in the Expression shape):

    InsertRequestMessage(WCF.Action)="TypedProcedure/dbo/procAmpDestInsert";

     However, if you are specifying the Action in the send port, no need to have it in the orchestration.

    In the send port, the action should be (no quotes)

    TypedProcedure/dbo/procAmpDestInsert

    Also, to resolve your receive error (finding document etc..) can you take a screen shot of your Schema node in your application and post it (Applications/YourApplicationname/Schemas) ..

    Click on the Root Name column (so that they're sorted as such)..If you see more that one Polling root name with the same name, there's your problem. If you see none, there's your problem also.  



    Patrick Delifer, MCTS BizTalk Server 2006
    • Marked as answer by Jimbox13 Monday, September 26, 2011 7:04 PM
    Monday, September 26, 2011 3:52 PM
  • Hey Patrick,  Thanks again for the help.

    Sorry for the confusion.  I did not have quotes around the expression, I added that in the post.  I copied and pasted from your last message but it still gives a compiler error.  Same error.

     

    Here is a screenshot of my application's schemas:

    I don't see my polling schema here, but I didn't expect to because I am not using a typed polling data available statement;  it only returns a zero or a one. 

    "procAmpSelect" is the polling statement, the statement that should return rows of data to be imported as messages into my orchestartion. 

    I assumed that was possible to poll rows and each row would become a Message and then I could use an orchestration to transform the message and call a different stored procedure with the data from the polled rows. 

    Maybe I'm expecting too much?

     

     


    • Edited by Jimbox13 Monday, September 26, 2011 4:02 PM (forgot image)
    Monday, September 26, 2011 4:02 PM
  • The expression should not be entered in an Expression editor.

    You should add an Assignment shape right after the transform shape and entered it in there..

    that being said, 


    You said you are using ProcAmpSelect but the error is you are receiving a msg with the msgType 

    "http://schemas.microsoft.com/Sql/2008/05/TypedPolling/SelecingAmp#TypedPolling"

     


    Patrick Delifer, MCTS BizTalk Server 2006
    Monday, September 26, 2011 4:23 PM
  • Interesting!  yeah "SelecingAmp" is the "InBoundID" specified in the URI in the Receive Port Configuration both from the VS Wizard and in the BTSAC. (sorry, but I put the typo in VS when I generated the schema)  It's not a schema.

    Does the InBoundID have to match a schema instead?  I'm happy to try it, but nothing I've read has said it should.  

    Edit:

    Now I'm back to my Polling/#Polling schema problem:

    Receive Port: "RecAmpPortReal" URI: "mssql://localhost/...?InboundId=procAmpSelect" Reason: Finding the document specification by message type "http://schemas.microsoft.com/Sql/2008/05/Polling/#Polling" failed. Verify the schema deployed properly.

    I can get around this by switching to PassThru pipelines, but I don't think I want to.  Not to mention it leads to my original post about Send Port Polling confusion.

    I wish BT worked as simply as MSDN says it should.


    • Edited by Jimbox13 Monday, September 26, 2011 4:45 PM
    Monday, September 26, 2011 4:31 PM
  • When you use the schema generator to generate your typedPolling schema, did you specify the INboundId that is set in the receivePort?

    If not, you have to do it. 

    So to answer your question, yes the inboundid becomes part of the schema..

    Make sure you configure all the goodies when generating the schema (inboundid, pollingstatement, datafoundpolling)


    Patrick Delifer, MCTS BizTalk Server 2006
    • Edited by rrggggg Monday, September 26, 2011 5:19 PM
    Monday, September 26, 2011 5:08 PM
  • Yeah.  "SelecingAmp" was the "InBoundID" specified in the URI in the Receive Port Configuration both from the VS Wizard and in the BTSAC.

    To be sure I just regenerated my typedPolling schema, this time I made sure that the InBoundID matched, I put it as "procAmpSelect" (because maybe it has to match the schema name?) and I made sure that I selected TypedPolling in the wizard and in the Rec Port in BTSAC.  They all seem to match.

    I'm back to:

    Receive Port: "RecAmpPortReal" URI: "mssql://localhost/.... . ?InboundId=procAmpSelect" Reason: Finding the document specification by message type "http://schemas.microsoft.com/Sql/2008/05/TypedPolling/procAmpSelect#TypedPolling" failed. Verify the schema deployed properly.

    If it's of interest both the polling data avail and polling statement are being called in sqls (checked in profiler again)

    I'm going to try deleting the whole BT app from the AC and re-deploying and recreating everything on that end.... :/

    maybe it's something with my "Root node" and/or XML namespace properties in sqlBindings?


    • Edited by Jimbox13 Monday, September 26, 2011 5:20 PM added question
    Monday, September 26, 2011 5:18 PM
  • Wait before you do that.

    What is the type of your receive msg?

    In your orchestration browser, find you receive message and look at the messageType property.

    Make sure it's something like Projectname.something_inboundId.TypedPolling

     

    I am certain that it's not at this point. You have selected the wrong schema in you message variable.


    Patrick Delifer, MCTS BizTalk Server 2006
    • Edited by rrggggg Monday, September 26, 2011 5:28 PM
    • Marked as answer by Jimbox13 Monday, September 26, 2011 7:03 PM
    Monday, September 26, 2011 5:23 PM
  • Hm... I don't see anything in the odx talking about polling. (except for the "name" I gave the port)

    Here I've selected the incoming message:  (sorry it's so wide, but the Property values don't wrap)

    Monday, September 26, 2011 5:33 PM
  • Here's your problem

    The message type you specified is wrong.

     You have to select the schema that will return the message with the <TypedPolling> root name ..

    You wont be able to change it this way you will have to delete the links from the receive shape to the port request.

     


    Patrick Delifer, MCTS BizTalk Server 2006
    Monday, September 26, 2011 5:37 PM
  • YAY!!! We're getting close now!  Thank you!

    Which one of these four messages is the Typed Polling one?

     

    FYI:  This is from the "Schema" tree node in the drop down.  There were only four generated, even when I specified typedpolling in the sqlbindings in the wizard.  I used the "Generate Unique [names]" option ANNNND I put a prefix of "MON_" on the new typed polling schemas so I could tell them apart from last weeks.

    Thanks!

    Monday, September 26, 2011 5:45 PM
  • If you don't see typed polling it's because you probably generate the schemas wrong?could it be?

    Here's the process

    You know how to get to the schema generator. Specify the SQL binding stuff, inbound id (same you will use in port), Polling Statement, and PolledDataAvailablestatement..

    Then:

    1.  Click connect

    2. Make sure you select Inbound Service Op from drop down

    3. Click the / and select TypedPolling

     

    then add OK..


    Patrick Delifer, MCTS BizTalk Server 2006
    • Marked as answer by Jimbox13 Monday, September 26, 2011 7:03 PM
    Monday, September 26, 2011 5:52 PM
  • Missed that one!  I didn't even realize that other "contract type" existed.

    WOW! now it's polling and calling the insert statement with values!  Hooorah!!!!!!!!!!

     

    I'm still getting a warning:

    The adapter failed to transmit message going to send port "SendAmpInsert" with URL "mssql://localhost...?". It will be retransmitted after the retry interval specified for this Send Port. Details:"Microsoft.ServiceModel.Channels.Common.XmlReaderParsingException: The start element with name "TypedPolling" and namespace "http://schemas.microsoft.com/Sql/2008/05/TypedPolling/SelectingAmp" was unexpected.

    Should I be worried about that?  The parameter values look okay... so far.

    Thanks Thanks Thanks so much again!

    Monday, September 26, 2011 6:09 PM
  • Glad it worked.

    I gather that for it to work you also changed the source schema in your map to the correct one.

    Not sure what's happening in you send port, but it appears you have a send-receive port, and you aren't doing anything with the response back in your orch.

    What were you planning to to with the receive?

    btw, If the latter solved your case, it would be greatly appreciated to mark it as answered. thanks.


    Patrick Delifer, MCTS BizTalk Server 2006
    Monday, September 26, 2011 6:50 PM
  • In this case I wasn't planning on doing anything with the response, I guess I thought all stored procs had responses.  I'll look into that, maybe I specified the wrong schema for the response from the insert.

    Thanks again Patrick, you rock!  (Let me know if I didn't mark the answers right)

    Monday, September 26, 2011 7:06 PM
  • Hey, Jimbox13,

    did you fix you

    The adapter failed to transmit message going to send port "SendAmpInsert" with URL "mssql://localhost...?". It will be retransmitted after the retry interval specified for this Send Port. Details:"Microsoft.ServiceModel.Channels.Common.XmlReaderParsingException: The start element with name "TypedPolling" and namespace "http://schemas.microsoft.com/Sql/2008/05/TypedPolling/SelectingAmp" was unexpected.????????????????????

    Wednesday, May 22, 2013 6:35 PM