Hi, I’m still working on the web service, now I have another problem. My WS must be accessed from a client developed by another person. Attached there are the wsdl generated by the WS, the SOAP xml file generated according with wsdl and a SOAP xml that is accepted by the WS.
The problem is that the xml file generated in according with the wsdl isn’t accepted from the WS.
As written in the WSDL the arrays must be serializated in:
Yes but as I told in the previous message when it use the wsdl the xml is generated in that way
< VisitDate>
< VisitDate>20180411</ VisitDate>
….
</ VisitDate>
If i try to import it with delphi and use standard delphi components I have the same problem, i must streep away the first < VisitDate> item. And according with the wsdl the right way is that is shown above.
all the arrays are serializated in that way, but the service don’t accept them. I don’t understand why the service generate a wsdl but accept a different input.
Sure the test case is the same that you have alredy seen. the Test client application use the wsdl as created from the service and use standard delphi components and generate a xml like described previously.
(clikking on test 2 button give an error in deserialization of the array INR)
function TZEUSWS.CreaArrayDistribuzione(Distribuzione : String) : DailyDosage;
var i : Integer;
ADistribuzione : Array Of Integer;
begin
i := 0;
while length(Distribuzione) <> 0 do
begin
Result.Add(StrToInt(copy(Distribuzione,1,pos(';',Distribuzione) - 1)));
Delete(Distribuzione,1,pos(';',Distribuzione));
end;
end;
your testcase contains errors, for example, in TZEUSWS.CreaArrayDistribuzione method you missed line like result := DailyDosage.Create; and it causes problems in run-time. I wonder how your testcase worked …
Simply because that portion of code isn’t called before the error. I.e. the deserialization error occurs before that that code is called.
Have you clicked on the test2 button?
This is the error that comes up when I click on the “Test 2” button, as you can see the INR array is deserializated in the wrong way. (you must use the testclient application to get the error)
I see that the code that you have sent back to me works… the question is what have you changed? I’ve tryed the code that I’ve sent to you and it don’t work… where is my fault?
Understood, but I as told before now there is another developer (another company) that must build a client for the WS, and he don’t use RO, there is going to be troubles?