1

これはこれまでのコードですが、なぜこのエラー (エラー 400) が発生するのか理解できません。

問題は引数フィルターのフォーマットにあると思います。誰にも提案はありますか?

Imports CookComputing.XmlRpc

Public Class Form2

    <XmlRpcUrl("http://example.wordpress.org/xmlrpc.php")> _
    Public Interface IWP
        Inherits IXmlRpcProxy

        <XmlRpcMethod("wp.getPosts")> _
        Function getPosts(ByVal args() As String) As Post()

    End Interface

    Public Structure Post
        Public post_id As String
        Public post_title As String
        Public post_type As String
        '...
    End Structure

    Private Sub Button1_Click(sender As Object, e As EventArgs) Handles Button1.Click
        Dim proxy As IWP = XmlRpcProxyGen.Create(Of IWP)()
        Dim args() As String = {"blog_id", "user", "password", "post_type='page'"}
        Dim posts() As Post
        Try
            posts = proxy.getPosts(args)
            For Each post In posts
                ListBox1.Items.Add(post.post_title)
            Next
        Catch ex As Exception
            MsgBox(ex.Message)
        End Try

    End Sub

End Class
4

0 に答える 0