send xml to webservice from navision

myo007
Member Posts: 2
Hi,
I'm running in to a big problem. I need to send some xml requests to a webservice, within Navision.
I tried to do it with the soaptool kit, but this doesn't work.
Situation:
Connect to https webservice with passing username and password.
Building XML without making a file
sending XML.
Receiving XML answer from webservice.
Does anybody has sample code?
With some explanation!
Thx
I'm running in to a big problem. I need to send some xml requests to a webservice, within Navision.
I tried to do it with the soaptool kit, but this doesn't work.
Situation:
Connect to https webservice with passing username and password.
Building XML without making a file
sending XML.
Receiving XML answer from webservice.
Does anybody has sample code?
With some explanation!
Thx
0
Comments
-
I will try to guide you somehow. I will assume, that the XML is generated through XMLPort. I cannot post full code for you (because it is company property), but I will try do describe it:
1) SOAP request is XML, I recommend to use the SOAPUI application to test the webservices and examining the request XML and answers
2) SOAP toolkit will only help you to create the XML and send it
3) You need to use SOAP toolkit to generate whole XML request, because there is no way how to insert one part from another source (e.g. XMLPort)
4) XMLPort can be written into temporary BLOB field and read back from there through streams without inserting, modifying the record...
5) To insert the XML into the SOAP request, you can go through the XML by using 'Microsoft XML, v6.0'.IXMLDOMNode and 'Microsoft XML, v6.0'.IXMLDOMNodeList automation and creating the elements of the SOAP based on that (it means, load the stream into XMLDOM automation and going through it by using the XMLDOM functions) - based on that you can call the StartElement, WriteString and EndElement of the SOAP Toolkit.
6) Learn how to trace SOAP request e.g. by tools in SOAP SDK. It will help you to see what you are really sending. Compare it with the request generated by SOAPUI application.0 -
i belive on ara3n's BLOG was also an example.Do you make it right, it works too!0
-
You can look at this post.
http://mibuso.com/blogs/ara3n/2009/01/2 ... companies/
or this one
http://mibuso.com/blogs/ara3n/2008/03/
or this one.
http://mibuso.com/blogs/ara3n/2009/02/
I will try to post a detailed step by step process on how to use web services.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