Been banging my head against a bit of a mystery and I'm hoping someone can offer some guidance.
NAV 2009 SP1
We've setup a codeunit as a webservice and defined an XMLport as a parameter. Published it OK, external application can see it OK, sets up data OK and calls the webservice with the XML. But the XMLport is apparently not getting the data - it responds with a "nothing to process" mesage that we've coded into it. So we switched over to providing the XML in a bigtext parameter, stream the content into a BLOB and then set the source of the XMLport as a stream from the BLOB. Still nothing happened.
So the function in the codeunit as it stands looks like this:
Parameters are:
MsgXPort (VAR XMLport)
MsgText (BigText)
vBlob.Blob.CREATEINSTREAM(InStr); (vBlob is a local temporary variable for the TempBlob table)
vBlob.Blob.CREATEOUTSTREAM(OutStr);
MsgText.WRITE(OutStr);
MsgXPort.SETSOURCE(InStr);
IF MsgXPort.IMPORT THEN
EXIT(STRSUBSTNO(Text001,MsgXPort.GetClaimNo))
ELSE BEGIN
Result := COPYSTR(STRSUBSTNO(Text002,GETLASTERRORTEXT),MAXSTRLEN(Result));
EXIT;
END;
So we've got MsgText to dump its content to text file. That's OK. Then we dumped InStr to a text file and that was OK too.
So we put code in the XMLport that would record its progress with messgaes and values in a text file as it went through the various triggers. Nothing apart from the OnPre and OnPost triggers. Nothing from any of the the OnAssign triggers at all.
Which, I guess, leads me to conclude that the XMLport is not responding to the SETSOURCE command and doesn't know what its input stream is so it dosn't process anything. I've even tried restructuring things to do XMLPORT.RUN(60702, InStr) and see if that works - but that just returns a FALSE and the diagnostics from the XMLport are still only showing the OnPre/OnPost triggers executing.
Like I said, we've trie dit with just the XMLport as a parameter and that has the same results.
Does anyone have any clues? Is this an unsupported "feature" or something? Will I have any hair left by the end of the day? (Not that I've got that much to start with anyway)
Cheers
John
0
Comments
MVP - Dynamics NAV
My BLOG
NAVERTICA a.s.
Somewhere between the codeunit and the XMLport, the data seems to go missing. That's why I switched to trying to do it with a BigText and streams to see if I could get that to work instead.
Cheers
John
MVP - Dynamics NAV
My BLOG
NAVERTICA a.s.