Webservice calls XMLport but no data is passed

JohnP
Member Posts: 56
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
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
-
Just try to call
IF MsgXPort.IMPORT THEN EXIT(STRSUBSTNO(Text001,MsgXPort.GetClaimNo)) ELSE BEGIN Result := COPYSTR(STRSUBSTNO(Text002,GETLASTERRORTEXT),MAXSTRLEN(Result)); EXIT;
In the function. You do not need anything else.0 -
Thanks for taking the time to reply, but that was what I started with and where I first discovered the problem.
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
John0 -
May be wrong namespace or tags names, thus they are "cutted out".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