Curl Global Community

Full Version: Could not deserialize the object from Curl.
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
ORB で通信を行うと、下記のようなメッセージが表示されます。

Could not deserialize the object from Curl.

サービスも、DTOも、正常にジェネレートしたものを利用しています。
なぜでしょうか。
クライアントから、{Array-of {HashTable-of String, any}} の型のデータを渡したいです。
Java側の DTO の型は、List<Map<String, Object>> で定義をしており、
ジェネレートしたDTOの型は、#Array になっています。

クライアント側でDTOに詰める際に、Array型に詰め替えをしています。

Code:
def hash-ary = {{Array-of {HashTable-of String, any}}}
・・・
def ary = {Array}
{for h in hash-ary do
    {ary.append h}
}
set dto.has-list = ary

さらに言うと、配列の要素数が1つの場合はエラーになりません。
なぜなのでしょう。
{HashTable}型につめかえる必要があるようですね。
要素数が1個の場合と、2個以上の場合でエラーになるかどうかが変わるのが奇妙ですが、
とりあえずは、この方法でいこうと思います。

Code:
def hash-ary = {{Array-of {HashTable-of String, any}}}
・・・
def ary = {Array}
{for h in hash-ary do
    def hst = {HashTable}
    {for s in {h.keys-to-Iterator} do
         set hst[s] = h[s]
    }
    {ary.append hst}
}
set dto.has-list = ary
Its really good to know me! Great site and a great topic as well i really get amazed to read this thanks. love this way!
Well i have also faced this problem.......it was very disturbing for me.....!

Such cleaver work and reporting. Keep up the great works guys i've added you guys to my blog roll. This is a great .