XMLPort and Schema

iris2009
Member Posts: 56
Hello,
I am trying to create a Xml-File with a custom Schema using a XMLPort
I am working according to an article which I found on Partnersource:
"How to use XMLports to connect to web services in MBS Navison 4.0", which is saying:
"1. Sending XML documents
In the XMLport, the TagType “Attribute” can be used to define XML namespaces.
For example, add the following tag in an XMLport:
TagName: xmlns
TagType: Attribute
SourceType: Text
DataSource: xmlns1
Add the following C/AL code line in the OnPreXMLport() trigger of the XMLport:
xmlns1 := 'http://schemas.xmlsoap.org/soap/envelope/';"
Unfortunately it is not working, the attribute tag is always empty. Has anyone solved this problem? Thank you!
I am trying to create a Xml-File with a custom Schema using a XMLPort
I am working according to an article which I found on Partnersource:
"How to use XMLports to connect to web services in MBS Navison 4.0", which is saying:
"1. Sending XML documents
In the XMLport, the TagType “Attribute” can be used to define XML namespaces.
For example, add the following tag in an XMLport:
TagName: xmlns
TagType: Attribute
SourceType: Text
DataSource: xmlns1
Add the following C/AL code line in the OnPreXMLport() trigger of the XMLport:
xmlns1 := 'http://schemas.xmlsoap.org/soap/envelope/';"
Unfortunately it is not working, the attribute tag is always empty. Has anyone solved this problem? Thank you!
0
Answers
-
Its working for me..
Why do you need a different datasource name..use same datasource name..
Did you specify any gobal variable?
Can you show the xml structure?0 -
Hello mohana_cse06,
thanks for your fast reply, this is my xmlport
Node Name Node Type Source Type Data Source
ExportAuftraege Element Text <ExportAuftraege>
xmlns:xsi Attribute Text <xmlns>
xsi:noNamespaceSchemaLocation Attribute Text <xsi:noNamespaceSchemaLocation>
Double_Weighing Element Table <Rhewa_SingleWeighing>(Rhewa_SingleWeighing)
DocumentNo Element Field Rhewa_SingleWeighing::Document No.
etc.
Yes I have specified a global Variable, which is added in the Datasource.
I don't understand your question about the datasource Tag, I have a varialbe referenced at this place, the name of it shouldnt be a matter at all...
I am using Nav 6.2, does this make any difference0 -
iris2009 wrote:xmlns:xsi Attribute Text <xmlns>
Change the node name to xmlns1 and delete global variable and try0 -
When I am deleting the variable, Nav is of course asking me for it. It is not working.
How can I get Xml-File looking like this:
<?xml version="1.0" encoding="UTF-8" ?>
<ExportAuftraege xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="Schema\ExportAuftraege.xsd">
And how can I get a Tag like xmlns:xsi when I change it to xmlns as you suggested?0 -
If you have the schema then try this tool
http://www.mibuso.com/forum/viewtopic.php?f=7&t=21867&start=00 -
Argh... obviously you have to the delete the < and > in the datasource name, then it is working.0
Categories
- All Categories
- 73 General
- 73 Announcements
- 66.6K Microsoft Dynamics NAV
- 18.7K NAV Three Tier
- 38.4K NAV/Navision Classic Client
- 3.6K Navision Attain
- 2.4K Navision Financials
- 116 Navision DOS
- 851 Navision e-Commerce
- 1K NAV Tips & Tricks
- 772 NAV Dutch speaking only
- 617 NAV Courses, Exams & Certification
- 2K Microsoft Dynamics-Other
- 1.5K Dynamics AX
- 320 Dynamics CRM
- 111 Dynamics GP
- 10 Dynamics SL
- 1.5K Other
- 990 SQL General
- 383 SQL Performance
- 34 SQL Tips & Tricks
- 35 Design Patterns (General & Best Practices)
- 1 Architectural Patterns
- 10 Design Patterns
- 5 Implementation Patterns
- 53 3rd Party Products, Services & Events
- 1.6K General
- 1.1K General Chat
- 1.6K Website
- 83 Testing
- 1.2K Download section
- 23 How Tos section
- 252 Feedback
- 12 NAV TechDays 2013 Sessions
- 13 NAV TechDays 2012 Sessions