I'm designing a Salesforce CRM to DB system that will accept a SF outbound message and put that message on a ActiveMQ queue. So I created a route for that and it works well. It's the next step that gives me trouble. I want a job that listens to the queue so I'm using tMomInput for that. The XML that is on the queue looks like this:
<notifications xmlns="http://soap.sforce.com/2005/09/outbound" xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<sObject xmlns:sf="urn:sobject.enterprise.soap.sforce.com" xsi:type="sf:Account">
<sf:Name>Johan Mig 1</sf:Name>
This is to be mapped to a SF Account (created SF Metadata for this) and then send that Account to a tDbOutput object.
So far I have (which doesn't work):
I dropped the SF metadata schema to tExtractXmLField and the connect tMomInput with tExtractXmLField and copied over the schema tMomInput but as I suspected it doesn't work. tMomInput will expect an SF Account object which it doesn't get. I need something in between tMomInput and tExtractXMLField (don't even know if that is right component for the scenario) but what? That component needs to map the sObject within the Notification tag to Account and send that to tExtractXMLField that will then send it to tDBOutput.
Any suggestions how to read a SF notification message from an ActiveMQ queu and store it in a DB as a SF Account?
BTW tLogRow in the picture above is supposed to be the tDBOutput object.
So to clarify my own ramblings.
My job looks like this:
tMomInput receives XML (attachment account-schema.xml) which is based on WSDL schema (attachment wfoutbound.wsdl) and map it to a DB table (attachment account_new_sf.xml). The problem seems to be that account-schema contains name spaces because no values are transferred over to tDBOutput. I'm only interested in what is in and within the sObject tag.
<sObject xmlns:sf="urn:sobject.enterprise.soap.sforce.com" xsi:type="sf:Account"> <sf:Id>0011l000003x9E5AAI</sf:Id> <sf:Name>Johan Mig 10</sf:Name> <sf:OwnerId>0051t000000n6rEAAQ</sf:OwnerId> </sObject>
So the table in the DB is xsi:type="sf:Account" and the rest are the columns without the namespaces.
Can tXMLMap do this or do I need some other component(s)?
Watch the recorded webinar!
Introduction to Talend Open Studio for Data Integration.
Test drive Talend's enterprise products.
Practical steps to developing your data integration strategy.