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

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

Answers

  • vremeni4vremeni4 Member Posts: 323
    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.
  • ftorneroftornero Member Posts: 524
    Hello @saptarshiroy ,

    The third party software need to call to your WS like this, asuming that your published codeunit is called ReceiveDoc:

    48anmofsfuod.png

    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.

    Regards
  • RockWithNAVRockWithNAV Member Posts: 1,139
    Are they able to see your Methods??
    Check the WSDL and see if the method is visible there.
Sign In or Register to comment.