我要,我已经从使用WSDL进口商德尔福2007年应用程序链接Java Web服务。设置它一直是颠簸的道路但我“M几乎有!

我现在已经在我的数组不能说我的Java Web服务可以消耗的方式被序列化的情况。我已经写在.NET中相同的应用程序来测试它(正常工作),我期待的XML生成如下所示: -

<?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"
        xmlns:SOAP-ENC="http://schemas.xmlsoap.org/soap/encoding/">
    <SOAP-ENV:Body xmlns:NS2="http://path.to.service">
        <NS1:addActivities xmlns:NS1="http://path.to.service/">
            <login href="#1"/>
            <project xsi:type="xsd:string">PROJ001</project>
            <activities>
                <id xsi:type="xsd:string">DELPHITEST</id>
                <name xsi:type="xsd:string">This is a test</name>
            </activities>
            <activities>
                <id xsi:type="xsd:string">DELPHITEST2</id>
                <name xsi:type="xsd:string">This is another test</name>
            </activities>
        </NS1:addActivities>
        <NS2:login id="1" xsi:type="NS2:login">
            <database xsi:type="xsd:string">My_database</database>
            <password xsi:type="xsd:string">neverUmind</password>
            <username xsi:type="xsd:string">bob</username>
        </NS2:login>
    </SOAP-ENV:Body>
</SOAP-ENV:Envelope>

但是,Delphi的生成XML如下: -

<?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" 
        xmlns:SOAP-ENC="http://schemas.xmlsoap.org/soap/encoding/">
    <SOAP-ENV:Body xmlns:NS2="http://path.to.service/">
        <NS1:addActivities xmlns:NS1="http://path.to.service/">
            <login href="#1"/>
            <project xsi:type="xsd:string">PROJ001</project>
            <activities xsi:type="SOAP-ENC:Array" 
                    SOAP-ENC:arrayType="NS2:activity[2]">
                <item href="#2"/>
                <item href="#3"/>
            </activities>
        </NS1:addActivities>
        <NS2:login id="1" xsi:type="NS2:login">
            <database xsi:type="xsd:string">My_database</database>
            <password xsi:type="xsd:string">neverUmind</password>
            <username xsi:type="xsd:string">bob</username>
        </NS2:login>
        <NS2:activity id="2" xsi:type="NS2:activity">
            <id xsi:type="xsd:string">DELPHITEST</id>
            <name xsi:type="xsd:string">This is a test</name>
        </NS2:activity>
        <NS2:activity id="3" xsi:type="NS2:activity">
            <id xsi:type="xsd:string">DELPHITEST2</id>
            <name xsi:type="xsd:string">This is another test</name>
        </NS2:activity>
    </SOAP-ENV:Body>
</SOAP-ENV:Envelope>

基本上,我需要的Delphi停止创造的活性活动元素,而是只把一个活动元件内的每个ID和名称(如净确实内的元件和Java的似乎期望的那样)。

我已经累垮关于与InvRegistry.RegisterInvokeOptions和RemClassRegistry.RegisterSerializeOptions但没有组合似乎工作。说实话,我对书面方式我自己的XML解析器为这是它采取的方式长弄清楚的边缘。但是,如果任何人有这个应该怎么工作的任何建议,我会非常感激。

当然有人在那里一定是通过德尔福2007年之前消耗掉一个Java-WS Web服务:)

TIA

有帮助吗?

解决方案

看来在2007年Delphi中的XMLDocument成分被破坏。我已经安装了 Alcinoe 的组件,而不是和一个可行的魅力。这是只有一个星期浪费...... GRRRR

许可以下: CC-BY-SA归因
不隶属于 StackOverflow
scroll top