Can anyone confirm that it is possible to use AIF to export XML that is fully
transformed (B2B case) and not just the Envelope/Body?
-Tommy
yes it is possible to "full" transform the ax generated xml.
I don't know if this is possible only over the XSLT function of AIF (Don't
know if you can transfor or remove the <header> and subtags).
When it is not possible whit the default pipeline-componets, you can write
your own aif-Adapter or pipeline-component to do the transformation.
Had done this some time ago to tranfer the AX-XML into a .CSV File...
Hope this helps you.
--
Sincerely yours
Axel Kühn (visit my Dynamics AX blog at: http://blog.ak-home.net)
Thanks for replying. From what I've seen, it looks like the only way I can
do full transformation using AIF is to make my own adapters and components.
It sounds very time consuming and I was hoping for a better/quicker and more
standardized way to do this.
One other approach would be to connect using .Net BC and transform in C#.
If it is possible, I would like to learn more on how you made your own adapters
and pipeline-components. I'm actually a .Net developer just arriving in the
Ax world, and X++ is new to me.
Axdata Norway,
Tommy Skaue
mailto:t...@axdata.no
> Hi,
>
> yes it is possible to "full" transform the ax generated xml.
>
> I don't know if this is possible only over the XSLT function of AIF
> (Don't know if you can transfor or remove the <header> and subtags).
>
> When it is not possible whit the default pipeline-componets, you can
> write
> your own aif-Adapter or pipeline-component to do the transformation.
> Had done this some time ago to tranfer the AX-XML into a .CSV File...
> Hope this helps you.
>
writing your own adapter is not so "hard". You only need to write 3 Classes.
Please take a look at the msmq adapter classes or the filesystem adapter.
This gives you a good overview over the things you must do to create your
own adapter.
Sorry that i currently have no example on hand. But as far as i can remember
some guy posted an example in the newsgroup (sometime in July 2008?!?!)...
Writting a custom pipeline componend is also not very "hard".
Please take a look at this video and the code sample.
Video: http://msdn.microsoft.com/en-us/dynamics/ax/cc664615.aspx
CodeSample:
http://code.msdn.microsoft.com/axcodesamples/Release/ProjectReleases.aspx?ReleaseId=1177
Hope this helps you.
--
Sincerely yours
Axel Kühn (visit my Dynamics AX blog at: http://blog.ak-home.net)
Thanks for the followup :-)
I have to admin it helps that you describe the task at "not so hard".
I will take a look at that code example. I believe I saw that screencast
last week as preperation for the task. It's quick and "dirty" and code is
pasted and not explained in detail. It gives the general idea, and that is
the point I guess.
Thanks!
Axdata Norway,
Tommy Skaue
mailto:t...@axdata.IDONTLIKESPAM.no
> Hi,
>
> writing your own adapter is not so "hard". You only need to write 3
> Classes. Please take a look at the msmq adapter classes or the
> filesystem adapter. This gives you a good overview over the things you
> must do to create your own adapter.
>
> Sorry that i currently have no example on hand. But as far as i can
> remember some guy posted an example in the newsgroup (sometime in July
> 2008?!?!)...
>
> Writting a custom pipeline componend is also not very "hard".
> Please take a look at this video and the code sample.
> Video: http://msdn.microsoft.com/en-us/dynamics/ax/cc664615.aspx
> CodeSample:
> http://code.msdn.microsoft.com/axcodesamples/Release/ProjectReleases.a
> spx?ReleaseId=1177
Let me get this straigt. There are two different strategies here.
1) Write my own adapter, 3 classes (and those are Adapter, ReadAdapter and
SendAdapter, right?)
2) Write my own pipeline component that receive the message, transforms and
sets it.
Are both strategies needed? If not, will both work? Writing one class seems
easier than three, but I might be wrong.
Thanks for reading!
Axdata Norway,
Tommy Skaue
mailto:t...@axdata.IDONTLIKESPAM.no
> Hi,
>
> writing your own adapter is not so "hard". You only need to write 3
> Classes. Please take a look at the msmq adapter classes or the
> filesystem adapter. This gives you a good overview over the things you
> must do to create your own adapter.
>
> Sorry that i currently have no example on hand. But as far as i can
> remember some guy posted an example in the newsgroup (sometime in July
> 2008?!?!)...
>
> Writting a custom pipeline componend is also not very "hard".
> Please take a look at this video and the code sample.
> Video: http://msdn.microsoft.com/en-us/dynamics/ax/cc664615.aspx
> CodeSample:
> http://code.msdn.microsoft.com/axcodesamples/Release/ProjectReleases.a
> spx?ReleaseId=1177
It is right that you need to write 3 classes to build your own adapter.
Which method you need depends on the things you will do. :-)
Pipeline-Components are build for transforming the XML-Message into another
format (lik csv, other XML, HtML, and so on). But as far as i know these
transformations are only applied to the Body-Part of the Message. I will
check this and come back to you later....
If you need the full control over the transformation (i.e You must also
control the filename or something else) you must write your own Adapter.
--
Sincerely yours
Axel Kühn (visit my Dynamics AX blog at: http://blog.ak-home.net)
just checked what the pipeline-componets can do and what not.
In a pipeline-component you have only access to the "real" Message.
This means that you only have access to all subtags of the Bodyelement in
the XML-Message.
You have no access to the Header tag (and subtags) because these tag are not
generated at the time the pipeline-component get executed.
As a result, if need to transform the header of the message you must build
your own adapter to transform the headerinformation.
But please keep in mind, that you must "rebuild" or provide a valid AIF
header for all inbound messages. If a inbound message hasn't valid
headerinfromation, these message generates an error while AIF processing.
Hope that helps you finding the right solution.
--
Sincerely yours
Axel Kühn (visit my Dynamics AX blog at: http://blog.ak-home.net)
Thanks a LOT for confirming that! I had a small feeling any modifications
to the message in the pipelines would only affect the body. To bad, it looked
like an easy adjustement.
As for the adapter approach, I am only interested in sending xml out. If
someone needs to send data in, they will have to conform to the standards
present. Or, I will address that when it is a problem.
I saw there was this class "EInvoiceXSLFileTransform". It looked like something
I could reuse just to make an full xml transform and export possible.
Thanks a lot for the follow ups!
Axdata Norway,
Tommy Skaue
mailto:t...@axdata.IDONTLIKESPAM.no
> HI Tommy,
>
> just checked what the pipeline-componets can do and what not.
> In a pipeline-component you have only access to the "real" Message.
> This means that you only have access to all subtags of the Bodyelement
> in
> the XML-Message.
> You have no access to the Header tag (and subtags) because these tag
> are not
> generated at the time the pipeline-component get executed.
> As a result, if need to transform the header of the message you must
> build
> your own adapter to transform the headerinformation.
> But please keep in mind, that you must "rebuild" or provide a valid
> AIF
> header for all inbound messages. If a inbound message hasn't valid
> headerinfromation, these message generates an error while AIF
> processing.
> Hope that helps you finding the right solution.
>
I think I have a working solution now. I got some good help from Patrick
Bovens (MVP from Netherlands).
It involved adding a new FileName field to the AifChannel. This allows me
to create a new FileAdapter outbound channel.
Now in the AifFileSystemSendAdapter I read in the Filename and use it to
transform the xml with given xsl. I've tested this now, and I now have full
control on transforming the XML.
If anyone need more details, send me a mail :-)
Axdata Norway,
Tommy Skaue
mailto:t...@axdata.IDONTLIKESPAM.no
> HI Tommy,
>
> just checked what the pipeline-componets can do and what not.
> In a pipeline-component you have only access to the "real" Message.
> This means that you only have access to all subtags of the Bodyelement
> in
> the XML-Message.
> You have no access to the Header tag (and subtags) because these tag
> are not
> generated at the time the pipeline-component get executed.
> As a result, if need to transform the header of the message you must
> build
> your own adapter to transform the headerinformation.
> But please keep in mind, that you must "rebuild" or provide a valid
> AIF
> header for all inbound messages. If a inbound message hasn't valid
> headerinfromation, these message generates an error while AIF
> processing.
> Hope that helps you finding the right solution.
>
Can you help me? I would like to transform the outoing XML to a TEXT file.
It seems that you have that working? Am I correct?
Thank you in advance.
I hope that you can help me.