Developer forum

Forum » Integration » Parsing Connector request data

Parsing Connector request data

Imar Spaanjaars Dynamicweb Employee
Imar Spaanjaars
Reply

Hi there,

I am building my own connector by inheriting the Connector class. When I schedule the connector using Batch, I can see the request come in as follows:

<GetEcomData products><tables><Products type="all"/><Currencies type="all"/><Languages type="all"/><Manufacturers  type="all"/><Units type="all"/></tables></GetEcomData>

where the products attibute on GetEcomData comes from my own settings on the connector configuration.

Is there some sample code that parses this XML into something moe meaningful so I can check which data my connector should return? I can easily write my own parser, but would rather use some eady-made code if it already exists somewhere.

Thanks,

Imar


Replies

 
Jonas Krarup Dam
Reply
This post has been marked as an answer

Hi Imar,

Usually, this XML is parsed in the destination system (NAV, AX, etc). For this reason we haven't created any example code for parsing the XML.

Regards, Jonas

Votes for this answer: 1
 
Imar Spaanjaars Dynamicweb Employee
Imar Spaanjaars
Reply

Yeah, that's what I was afraid of. Thanks, I'll write my own.

Does the XML always look like this or could there be situations where it contains more or fewer nodes?

Imar

 
Jonas Krarup Dam
Reply
This post has been marked as an answer

When you use the default scheduled tasks, they will allways look like this (with the variable of the settings you enter, of course).

if you use the "import data with custom request" scheduled task, you can define your own XML to send to the remote system.

Also, if you wish to implement import of users, or export of orders/users, you will have to handle some other XML snippets.

/Jonas

Votes for this answer: 1

 

You must be logged in to post in the forum