I write a simple web service in java use NetBeans, a function accept an array of string. Then I use delphi written a web service client and call the function, server always received an empty array.
When I use soapUI to test the web service, it runs normally.
I checked the xml content send by delphi client and compare with soapUI. this is send by delphi client:
<?xml version="1.0"?>
<SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/"
xmlns:xsd="http://www.w3.org/2001/XMLSchema"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<SOAP-ENV:Body>
<helloList xmlns="http://hw.xzq.com/">
<helloList>line 1</helloList>
</helloList>
</SOAP-ENV:Body>
</SOAP-ENV:Envelope>
This is send by soapUI:
<soapenv:Envelope
xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/"
xmlns:hw="http://hw.xzq.com/">
<soapenv:Header/>
<soapenv:Body>
<hw:helloList>
<!--Zero or more repetitions:-->
<helloList>?</helloList>
</hw:helloList>
</soapenv:Body>
</soapenv:Envelope>
I copied the xml content of delphi client to soapUI, the server received empty array now.
I modified the xml content by change these three lines:
<hw:helloList xmlns:hw="http://hw.xzq.com/">
<helloList>line 1</helloList>
</hw:helloList>
after this, the server received my string array.
SO, I think the problem is delphi client send array content without a prefix namespace. But how to correct this? Thanks for your help!
By the way, comment the line InvRegistry.RegisterInvokeOptions(TypeInfo(HelloWorld), ioDocument); no help.