Problem Implementing Web Services using SOAP

vipinkuruvillavipinkuruvilla Member Posts: 143
Hai All,

I have a web service that has some datas. I like to insert these datas to a Navision table. I have tried this using SOAP but it is giving me some error like

" This message is for C/AL programmers :
Invalid assignment.It is not possible to assign a IXMLDOMProcessingInstruction
to a DomDocument."

It would be very grateful if anyone help me out. The code is as below :

IF ISCLEAR(SoapHttpConn) THEN
CREATE(SoapHttpConn);
SoapHttpConn.Property('EndPointURL','http://192.168.3.160:9999/assystsuite/service/SharepointService.jws');
SoapHttpConn.Connect;
SoapHttpConn.Property('SoapAction','http://tempuri.org/HelloWorld');
SoapHttpConn.BeginMessage;
IF ISCLEAR(SoapSerialize) THEN
CREATE(SoapSerialize);
SoapSerialize.Init(SoapHttpConn.InputStream);
SoapSerialize.startEnvelope('','STANDARD');
SoapSerialize.startBody;
SoapSerialize.writeXML('<HelloWorld xmlns="http://tempuri.org"></HelloWorld>');
SoapSerialize.endBody;
SoapSerialize.endEnvelope;
SoapHttpConn.EndMessage;
IF ISCLEAR(XmlDom) THEN
CREATE(XmlDom);
XmlDom.load(SoapHttpConn.OutputStream);
XmlDom.save('c:\temp.xml');
CREATE(XmlDomNew);
XmlNode := XmlDom.firstChild();
XmlDomNew.appendChild(XmlNode);
XmlNode := XmlDom.selectSingleNode('//customsOffices');
attributes := XmlNode.attributes();
attributes.removeNamedItem('xmlns');
XmlDomNew.appendChild(XmlNode);
XmlDomNew.save('c:\temp.xml');


TestFile.OPEN('c:\temp.xml');
TestFile.CREATEINSTREAM(TestStream);
XMLPORT.IMPORT(50000,TestStream);
TestFile.CLOSE;

Please take a note that in C/AL Globals I have written as follows :

TestFile - File
TestStream - Instream
SoapHttpCon - Automation - 'Microsoft Soap Type Library'.HttpConnector
SoapSerialize - Automation - 'Microsoft Soap Type Library'.SoapSerializer
XmlDom - Automation - 'Microsoft XML, v6.0'.DOMDocument
XmlNode - Automation - 'Microsoft XML, v6.0'.DOMDocument
attributes - Automation - 'Microsoft XML, v6.0'.IXMLDOMNamedNodeMap
XmlDomNew - Automation - 'Microsoft XML, v6.0'.DOMDocument

Any help would be appreciated......

Thanx in advance.........

Comments

Sign In or Register to comment.