2009-02-28 7 views
2

私は、Delphi 2007アプリケーションからWSDL Importerを使用してリンクしたJava Webサービスを持っています。それを設定することはrocky roadでしたが、私はほとんどそこにいます!Delphi 2007がJava-WS Webサービスに送信したいXMLを生成していません

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が活動要素内活動要素の作成を停止し、.NETはないとJavaは期待しているようだとしてだけではなく、(活動要素内の各IDと名前を配置する必要があります)。

私は、InvRegistry.RegisterInvokeOptionsとRemClassRegistry.RegisterSerializeOptionsについて悩んでしまいましたが、いずれの組み合わせも機能していないようです。正直言って私は自分のXMLパーサーを書いているのを知りたいと思っています。しかし、誰かがこれがどのようにうまくいくかについての提案があれば、私はとても感謝しています。

確かにそこに誰かが:)

前のDelphi 2007を経由してTIA

+0

私はWSDLがどのようなものであるかを知りたいと思います。私はD7と配列で面白い時を過ごしましたが、あなたが渡したいものは私にはあまり役に立ちません。私はその間に複数の "活動"ノードがあることを期待しています。 – mj2008

+0

おっと!私の悪い。私が.Net版から何を得ているかに応じて、各活動をで囲むのを忘れてしまった。今編集されました。 –

答えて

2

をするJava-WS Webサービスを消費している必要がありますDelphi 2007でのXMLDocumentコンポーネントが壊れているようです。代わりにAlcinoeコンポーネントをインストールしましたが、それは魅力的です。これは1週間で無駄になりました... grrrr

関連する問題