Receive data from third party software and create a new text file and keep it in shared location

saptarshiroy
Member Posts: 2
Hi Experts,
Could you please help me with the following:
I have a requirement where I would need to read data from third party software. For which I have already created a new codeunit and published that. I have created the following code in the CU to read the data.
Procedure ReceiveIncomingDoc(XMLBigText : BigText)
TempBlob.Blob.CREATEOUTSTREAM(OStream);
XMLBigText.WRITE(OStream);
TempBlob.CALCFIELDS(Blob);
TempBlob.Blob.CREATEINSTREAM(IStream);
Myfile.CREATE(File Location);
Myfile.CREATEOUTSTREAM(OutStrm);
COPYSTREAM(OutStrm,IStream);
MyFile.CLOSE();
But when third party software is trying to access my published SOAP URL, it is getting Status 400 Bad Request error.
Could you help with this.
Thanks
Could you please help me with the following:
I have a requirement where I would need to read data from third party software. For which I have already created a new codeunit and published that. I have created the following code in the CU to read the data.
Procedure ReceiveIncomingDoc(XMLBigText : BigText)
TempBlob.Blob.CREATEOUTSTREAM(OStream);
XMLBigText.WRITE(OStream);
TempBlob.CALCFIELDS(Blob);
TempBlob.Blob.CREATEINSTREAM(IStream);
Myfile.CREATE(File Location);
Myfile.CREATEOUTSTREAM(OutStrm);
COPYSTREAM(OutStrm,IStream);
MyFile.CLOSE();
But when third party software is trying to access my published SOAP URL, it is getting Status 400 Bad Request error.
Could you help with this.
Thanks
0
Answers
-
think you have to make the function Procedure ReceiveIncomingDoc(XMLBigText : BigText)
external and also not local. Then on the Web Service page you ahve to add this codeunit and publish the Web service.
Alos I am not sure if BigText can be used as parameter try with normal text first.
I hope this helps.0 -
Hello @saptarshiroy ,
The third party software need to call to your WS like this, asuming that your published codeunit is called ReceiveDoc:
And in the xMLBigText tag must go the data and this data is better that is in base64 format, so there in not conflict with the XML layout. Later you need to transform this data from the base64 format.
Regards0 -
Are they able to see your Methods??
Check the WSDL and see if the method is visible there.Thanks
Blog - rockwithnav.wordpress.com/
Twitter - https://twitter.com/RockwithNav
Facebook - https://facebook.com/rockwithnav/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