3

I am trying to follow this blog to insert a record into an oracle table using BizTalk 2010 http://biztalk2010changes.blogspot.co.nz/2011/04/insert-update-delete-select-operation.html No orchestration was created I only created a WCF-custom generated item using OracleDBBinding contract type client/(outbound operation).

I selected the table and picked Insert category. An xsd was generated with the following entries

  • xxRECORDINSERT,
  • arrayOfxxxRECORDINSERT,
  • Insert,
  • InsertResponse.

I generated an instance of the above schema, my goal is using that instance as a file with content to be inserted into my oracle table. I deployed the application successfully, set up FilePort when BizTalk will pick up the file and the oracle port based on the bindings created by BizTalk (the steps I followed as similar to the link I provided above. I have also set up the filter for the application to pickup the file and the message

enter image description here

However, when the file was drop into the directory, it was indeed picked up but I got this routing error:

enter image description here

enter image description here

and the I got this error msg log:

WcfSendPort_OracleDBBinding_ORASCHEMA_Table_ROTATION_REQ_Custom oracledb://oracleServer/?PollingId=TEST_00042 Microsoft.ServiceModel.Channels.Common.XmlReaderParsingException: Unexpected start node "ROTATION_REQRECORDINSERT" with namespace "http://Microsoft.LobServices.OracleDB/2007/03/ORASCHEMA/Table/ROTATION_REQ" found.

This is an extract of my schema:

<?xml version="1.0" encoding="utf-16" ?> 
- <xs:schema xmlns:b="http://schemas.microsoft.com/BizTalk/2003" xmlns:tns="http://Microsoft.LobServices.OracleDB/2007/03/ORASCHEMA/Table/ROTATION_REQ" elementFormDefault="qualified" targetNamespace="http://Microsoft.LobServices.OracleDB/2007/03/ORASCHEMA/Table/ROTATION_REQ" version="1.0" xmlns:xs="http://www.w3.org/2001/XMLSchema">

and this is an instance of my sample I tried to insert into my table:

<ns0:ROTATION_REQRECORDINSERT xmlns:ns0="http://Microsoft.LobServices.OracleDB/2007/03/ORASCHEMA/Table/ROTATION_REQ">
  <ns0:RotationID InlineValue="InlineValue_0">RotationID_0</ns0:RotationID>
  <ns0:Year InlineValue="InlineValue_0">2015</ns0:Year>
  <ns0:Class InlineValue="2015">T4</ns0:Class>
  <ns0:Rotation InlineValue="InlineValue_0">Rotation_0</ns0:Rotation>
  <ns0:From InlineValue="InlineValue_0">1999-05-31T13:20:00.000-05:00</ns0:From>
  <ns0:To InlineValue="InlineValue_0">1999-05-31T13:20:00.000-05:00</ns0:To>
  <ns0:NumberOfConsecutiveSession InlineValue="InlineValue_0">500</ns0:NumberOfConsecutiveSession>
  <ns0:AmOrPM InlineValue="InlineValue_0">3</ns0:AmOrPM>
  <ns0:DayOfWeek InlineValue="InlineValue_0">6</ns0:DayOfWeek>
</ns0:ROTATION_REQRECORDINSERT>

Anything I did was incorrect?

Update: The context of the message:

enter image description here

Dijkgraaf
  • 11,049
  • 17
  • 42
  • 54
user1205746
  • 3,110
  • 11
  • 44
  • 73

2 Answers2

1

After a while banging my head against the wall, I finally managed to figure out what I need to do to make it works. The post was accurate at what it described but it was what not there that confused me and caused issue for me.

I updated this for myself or anyone else that might run into my same scenario in the future.

These are the things I did incorrectly for lack of instructions:

1) I used xxRECORDINSERT to create my message which is not correct. I should have used Insert instead. It was actually there in the sample but I have overlooked it and have let BizTalk auto generate it. The insert should have been moved to the beginning of the file so that BizTalk could generate the message correctly. That was probably the reason why BizTalk was complaining about the "unexpected start node".

2) I need to create another port to catch the response from BizTalk after the record was inserted otherwise it will cause the routing error I had experienced earlier.

These are very fundamental errors that I have overlooked. Hope it will save someone else time should they come across the same issue in the future.

user1205746
  • 3,110
  • 11
  • 44
  • 73
0

To resolve routing errors you need to look at the context properties of the message and compare it to the active subscription and see what doesn't match. You can see subscription via the BizTalk Server Administration Console, BizTalk Group, New Query, Search For Equals Subscriptions.

Dijkgraaf
  • 11,049
  • 17
  • 42
  • 54
  • I have looked at the Context of the message and could not pick up what is different from the filter in the send port. Basically, I have a filter to catch if there is a message from receiveportname = ReceivePort1 or BTS.MessageType equals to the node id ns0 (ROTATION_REQRECORDINSERT) generated automatically by BizTalk when I asked BT to auto generate instance based on the WCF-Custom oracledbbinding schema. I have updated the post with the image of the context, if you could take a look at it and see if there is something not correct, it would be great! – user1205746 Mar 05 '14 at 18:44
  • What pipeline is on your receive location? I don't see the MessageType context property on the message, which makes me suspect you are using a PassThru. – Dijkgraaf Mar 05 '14 at 19:05
  • Yes, I used PassThru. Out of curiosity, I changed it to XMLReceive and resent, the message is then queued and the service status is "Dehydrated". My BT is not busy at all and the host is running... Do you know what is going on? – user1205746 Mar 05 '14 at 20:43
  • Finally it errored out and this is the error message: "A message sent to adapter "WCF-Custom" on send port "WcfSendPort_OracleDBBinding_OracleTable_Table_ROTATION_REQ_Custom" with URI "oracledb://OracleServer/?PollingId=TEST_00042" is suspended. Error details: Microsoft.ServiceModel.Channels.Common.XmlReaderParsingException: Unexpected start node "ROTATION_REQRECORDINSERT" with namespace "http://Microsoft.LobServices.OracleDB/2007/03/ORACLETABLE/Table/ROTATION_REQ" found. – user1205746 Mar 05 '14 at 21:12
  • What is configured in the SOAP Action Header? – Dijkgraaf Mar 05 '14 at 21:29
  • but then I think it might be problem, so I changed it to: – user1205746 Mar 05 '14 at 21:57
  • but then I got this error: The adapter failed to transmit message going to send port "WcfSendPort_OracleDBBinding_ORACLETABLE_Table_ROTATION_REQ_Custom" with URL "oracledb://OracleServer/?PollingId=TEST_00042". It will be retransmitted after the retry interval specified for this Send Port. Details:"Microsoft.ServiceModel.Channels.Common.UnsupportedOperationException: Action "http://Microsoft.LobServices.OracleDB/2007/03/ORACLETABLE/Table/ROTATION_REQ/ROTATION_REQRECORDINSERT" is invalid. – user1205746 Mar 05 '14 at 21:57
  • Because you are doing messaging only and no Operation Name is being set on the message context by either an Orchestration or Pipeline component, you probably just want the action without all the XML wrapping around it. e.g. just http://microsoft.lobservices.oracledb/2007/03/ORACLETABLE/Table/ROTATION_REQ/ROTATION_REQRECORDINSERT – Dijkgraaf Mar 05 '14 at 22:09
  • I stripped out all the xml and just leave "http://microsoft/.../ROTATION_REQRECORDINSERT" but I still get this error:The adapter failed to transmit message going to send port "WcfSendPort_OracleDBBinding_ORACLETABLE_Table_ROTATION_REQ_Custom" with URL "oracledb://OracleServer/?PollingId=TEST_00042". It will be retransmitted after the retry interval specified for this Send Port. Details:"Microsoft.ServiceModel.Channels.Common.MetadataException: Argument "http://Microsoft.LobServices.OracleDB/2007/03/ORACLETABLE/Table/ROTATION_REQ/ROTATION_REQRECORDINSERT" is invalid. – user1205746 Mar 05 '14 at 22:21
  • Sorry, it should be your original action of http://microsoft.lobservices.oracledb/2007/03/ORACLETABLE/Table/ROTATION_REQ/Insert – Dijkgraaf Mar 05 '14 at 23:56
  • Have you ever able to duplicate the issue I have? If not, please try the link above (the link you suggested) and see if you run into issue... The instructions were clear but unfortunately not working...at least not working for me – user1205746 Mar 06 '14 at 16:55