Thursday, 15 August 2013

Does Delphi XE2 correctly import WSDL from Java/Axis2 when function has no return value?

Does Delphi XE2 correctly import WSDL from Java/Axis2 when function has no
return value?

I'm importing a service into Delphi so I can test my front end (delphi)
with my back end (java) and when I go to test a server function I get the
following error:
XML document must have a top level element.
Line: 0
What I have noticed is that my function does not have a a return value
(public void functionName) but if I switch it to say Boolean and just
return true, the error no longer comes up.
The function appears to execute regardless of the error message being
there or not however.
Here's the function being called (Java):
public void addNewUser(String facility, String username, String password,
String status) {
serviceHelper.addNewUser(facility, username, password, status);
}
And the corresponding call in Delphi:
procedure TForm1.btnAddUserClick(Sender: TObject);
begin
GetServicePortType.addNewUser(lbledtFacility.Text,
lbledtUsername.Text,
lbledtPassword.Text,
cbb1.Text);
end;

No comments:

Post a Comment