Question

I need to poll the data in xml format and map it to the EDI 834.........

I have written the stored procedure using for xml auto,element

when i consume it using add adapter metadata i am getting a xml message....

but i need to use this xml message to map it to the EDI834 ....How to get the structure of xml so that i can use that in map....

I also followed http://social.msdn.microsoft.com/Forums/en-US/biztalkgeneral/thread/6a7e0093-0692-4ba5-9e14-0d2090c2cf54

this thread and generated the schems using xml polling and mapped that to EDI834.

But when i use the map into outbound map...It doesnt map the polling data to edi 834..

Was it helpful?

Solution

The WCF-SQL adapter removes the need to use the 'for xml auto, elements' syntax. This is a legacy leftover from the old Sql Adapter.

Just write your stored procedure in a manner to return a consistent result set, then generate metadata against the stored procedure. The adapter framework will create an appropriate schema based on the metadata returned from your stored procedure.

Then simply map the data from your WCF-SQL schema to your EDI834 schema.

OTHER TIPS

Create the stored procedure that returns xml (or xml part) by using the FOR XML PATH syntax

-Setup a receive location using WCF-SQL. Select XmlPolling. Choose a rootname and namespace for the adapter to wrap around the xml returned from SQL (mandatory).

-Set Polling Statement to: exec [SPNAME]

-Set PollDataAvailableStatement to something appropriate that will return a count > 0 if there are rows/xml to be polled.

-Use passthrureceive pipeline for the receive-location

-Set up a send port (FILE) that subscribes to everything that comes from the receiveport used for the receivelocation.

-Start the application. Examine the XML returned from the adapter.

-In VS generate a schema using well-formed XML (Add->Add generated Items->Generate Schemas) (NOTE: You may have to run the InstallWFX.vbs found under the BizTalk SDK/Utilities/Schema generator, if you have not already done this earlier on the machine).

-Choose the xml file generated by the adapter (give the file a name representing the schema you are trying to create).

-Now you should have a schema representing the xml returned by the adapter, you may have to go through the schema manually and change data types to something more appropriate than what the wizard has chosen.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top