Loading ...
Sorry, an error occurred while loading the content.

TypeMismatch error Using XML-RPC.NET to connect to OpenERP via VB.NET

Expand Messages
  • Scott
    Hi, I m making progress attaching to the OpenERP system using some of the code samples so graciously posted. The following code is allowing me to login and get
    Message 1 of 7 , Feb 18, 2011
    View Source
    • 0 Attachment
      Hi,

      I'm making progress attaching to the OpenERP system using some of the code samples so graciously posted. The following code is allowing me to login and get the user ID but the subsequent call to create the partner is resulting in the following XmlRpc TypeMisMatch error on the 'addPairFields' argument :

      "fault response contains string value where integer expected [fault response : struct mapped to type Fault : member faultCode mapped to type Int32]"

      I'm new to this tool so I'm not quite sure if the error is being triggered by something on the OpenERP side or if I'm passing an array of parameters incorrectly.


      Code:
      Dim userId As Integer = 0
      Dim dbname As String = "myDB"
      Dim userName As String = "myNAME"
      Dim pwd As String = "myPWD"

      'Login to openerp
      Dim rpcClientLogin As IOpenErpLogin = CType(XmlRpcProxyGen.Create(GetType(IOpenErpLogin)), IOpenErpLogin)
      userId = rpcClientLogin.login(dbname, userName, pwd)
      Console.WriteLine("Logged in userid {0}", userid)

      Dim rpcClient As IOpenErp = CType(XmlRpcProxyGen.Create(GetType(IOpenErp)), IOpenErp)

      Dim addPairFields As New XmlRpcStruct()
      addPairFields.Add("title", "Monsieur")
      addPairFields.Add("name", "Fabien Pinckaers")
      addPairFields.Add("lang", "fr")
      addPairFields.Add("active", 0)

      'error occuring on this line....
      Dim resAdd As Integer = rpcClient.create(dbname, userId, pwd, "res.partner", "create", addPairFields)

      Console.WriteLine("Added partner, record id = {0}", resAdd)



      Any help greatly appreciated.

      Thanks,
      Scott
    • Charles Cook
      The server is returning an invalid Fault response. Using AllowStringFaultCode as described here might help: http://xml-rpc.net/faq/xmlrpcnetfaq.html#2.22 ...
      Message 2 of 7 , Feb 20, 2011
      View Source
      • 0 Attachment
        The server is returning an invalid Fault response. Using AllowStringFaultCode
        as described here might help:

        http://xml-rpc.net/faq/xmlrpcnetfaq.html#2.22

        :Charles

        On Fri, Feb 18, 2011 at 9:37 PM, Scott <scott.wheeler@...> wrote:

        >
        >
        > Hi,
        >
        > I'm making progress attaching to the OpenERP system using some of the code
        > samples so graciously posted. The following code is allowing me to login and
        > get the user ID but the subsequent call to create the partner is resulting
        > in the following XmlRpc TypeMisMatch error on the 'addPairFields' argument :
        >
        > "fault response contains string value where integer expected [fault
        > response : struct mapped to type Fault : member faultCode mapped to type
        > Int32]"
        >
        > I'm new to this tool so I'm not quite sure if the error is being triggered
        > by something on the OpenERP side or if I'm passing an array of parameters
        > incorrectly.
        >
        > Code:
        > Dim userId As Integer = 0
        > Dim dbname As String = "myDB"
        > Dim userName As String = "myNAME"
        > Dim pwd As String = "myPWD"
        >
        > 'Login to openerp
        > Dim rpcClientLogin As IOpenErpLogin =
        > CType(XmlRpcProxyGen.Create(GetType(IOpenErpLogin)), IOpenErpLogin)
        > userId = rpcClientLogin.login(dbname, userName, pwd)
        > Console.WriteLine("Logged in userid {0}", userid)
        >
        > Dim rpcClient As IOpenErp = CType(XmlRpcProxyGen.Create(GetType(IOpenErp)),
        > IOpenErp)
        >
        > Dim addPairFields As New XmlRpcStruct()
        > addPairFields.Add("title", "Monsieur")
        > addPairFields.Add("name", "Fabien Pinckaers")
        > addPairFields.Add("lang", "fr")
        > addPairFields.Add("active", 0)
        >
        > 'error occuring on this line....
        > Dim resAdd As Integer = rpcClient.create(dbname, userId, pwd,
        > "res.partner", "create", addPairFields)
        >
        > Console.WriteLine("Added partner, record id = {0}", resAdd)
        >
        > Any help greatly appreciated.
        >
        > Thanks,
        > Scott
        >
        >
        >


        [Non-text portions of this message have been removed]
      • Scott
        Hi Charles, Thank you for the quick reply. I ve implemented the AllowStringFaultCode as seen below, but I m getting the same ...integer expected...
        Message 3 of 7 , Feb 21, 2011
        View Source
        • 0 Attachment
          Hi Charles,

          Thank you for the quick reply. I've implemented the 'AllowStringFaultCode' as seen below, but I'm getting the same "...integer expected..." TypeMismatch exception. Unfortunately, I'm not yet familiar enough with the API I am calling and the capabilities of your XML-RPC.NET library. Can you say which side you think might be prompting the exception at this point?

          Thanks,
          Scott


          Dim ClientProtocol As XmlRpcClientProtocol
          Dim userId As Integer = 0
          Dim dbname As String = "mydb"
          Dim userName As String = "myname"
          Dim pwd As String = "mypwd"

          'Login to openerp
          Dim rpcClientLogin As IOpenErpLogin = CType(XmlRpcProxyGen.Create(GetType(IOpenErpLogin)), IOpenErpLogin)

          userId = rpcClientLogin.login(dbname, userName, pwd)
          Console.WriteLine("Logged in userid {0}", userId)

          Dim rpcClient As IOpenErp = CType(XmlRpcProxyGen.Create(GetType(IOpenErp)), IOpenErp)

          ClientProtocol = CType(rpcClient, XmlRpcClientProtocol)
          ClientProtocol.NonStandard = XmlRpcNonStandard.AllowStringFaultCode

          Dim addPairFields As New XmlRpcStruct()
          addPairFields.Add("title", "Monsieur")
          addPairFields.Add("name", "Fabien Pinckaers")
          addPairFields.Add("lang", "fr_FR")
          addPairFields.Add("active", CInt(0))

          Try
          'error occuring here...
          Dim resAdd As Integer = rpcClient.create(dbname, userId, pwd, "res.partner", "create", addPairFields)
          Console.WriteLine("Added partner, record id = {0}", resAdd)

          Catch ex As XmlRpcException

          MsgBox(ex.Message)

          End Try

          --- In XMLRPCNET@yahoogroups.com, Charles Cook <chascook@...> wrote:
          >
          > The server is returning an invalid Fault response. Using AllowStringFaultCode
          > as described here might help:
          >
          > http://xml-rpc.net/faq/xmlrpcnetfaq.html#2.22
          >
          > :Charles
          >
          > On Fri, Feb 18, 2011 at 9:37 PM, Scott <scott.wheeler@...> wrote:
          >
          > >
          > >
          > > Hi,
          > >
          > > I'm making progress attaching to the OpenERP system using some of the code
          > > samples so graciously posted. The following code is allowing me to login and
          > > get the user ID but the subsequent call to create the partner is resulting
          > > in the following XmlRpc TypeMisMatch error on the 'addPairFields' argument :
          > >
          > > "fault response contains string value where integer expected [fault
          > > response : struct mapped to type Fault : member faultCode mapped to type
          > > Int32]"
          > >
          > > I'm new to this tool so I'm not quite sure if the error is being triggered
          > > by something on the OpenERP side or if I'm passing an array of parameters
          > > incorrectly.
          > >
          > > Code:
          > > Dim userId As Integer = 0
          > > Dim dbname As String = "myDB"
          > > Dim userName As String = "myNAME"
          > > Dim pwd As String = "myPWD"
          > >
          > > 'Login to openerp
          > > Dim rpcClientLogin As IOpenErpLogin =
          > > CType(XmlRpcProxyGen.Create(GetType(IOpenErpLogin)), IOpenErpLogin)
          > > userId = rpcClientLogin.login(dbname, userName, pwd)
          > > Console.WriteLine("Logged in userid {0}", userid)
          > >
          > > Dim rpcClient As IOpenErp = CType(XmlRpcProxyGen.Create(GetType(IOpenErp)),
          > > IOpenErp)
          > >
          > > Dim addPairFields As New XmlRpcStruct()
          > > addPairFields.Add("title", "Monsieur")
          > > addPairFields.Add("name", "Fabien Pinckaers")
          > > addPairFields.Add("lang", "fr")
          > > addPairFields.Add("active", 0)
          > >
          > > 'error occuring on this line....
          > > Dim resAdd As Integer = rpcClient.create(dbname, userId, pwd,
          > > "res.partner", "create", addPairFields)
          > >
          > > Console.WriteLine("Added partner, record id = {0}", resAdd)
          > >
          > > Any help greatly appreciated.
          > >
          > > Thanks,
          > > Scott
          > >
          > >
          > >
          >
          >
          > [Non-text portions of this message have been removed]
          >
        • Charles Cook
          Hi Scott — I just checked and there is a bug in this area — issue 77. The code in XmlRpcSerializer.ParseFault is incorrect. It is fixed in the next release
          Message 4 of 7 , Feb 21, 2011
          View Source
          • 0 Attachment
            Hi Scott � I just checked and there is a bug in this area � issue 77. The
            code in XmlRpcSerializer.ParseFault is incorrect. It is fixed in the next
            release but it is an obvious change to make and build the assembly. Details
            of the fix here:

            http://code.google.com/p/xmlrpcnet/source/detail?r=131

            Charles

            On Mon, Feb 21, 2011 at 12:17 PM, Scott <scott.wheeler@...> wrote:

            >
            >
            > Hi Charles,
            >
            > Thank you for the quick reply. I've implemented the 'AllowStringFaultCode'
            > as seen below, but I'm getting the same "...integer expected..."
            > TypeMismatch exception. Unfortunately, I'm not yet familiar enough with the
            > API I am calling and the capabilities of your XML-RPC.NET library. Can you
            > say which side you think might be prompting the exception at this point?
            >
            > Thanks,
            > Scott
            >
            >
            > Dim ClientProtocol As XmlRpcClientProtocol
            >
            > Dim userId As Integer = 0
            > Dim dbname As String = "mydb"
            > Dim userName As String = "myname"
            > Dim pwd As String = "mypwd"
            >
            >
            > 'Login to openerp
            > Dim rpcClientLogin As IOpenErpLogin =
            > CType(XmlRpcProxyGen.Create(GetType(IOpenErpLogin)), IOpenErpLogin)
            >
            > userId = rpcClientLogin.login(dbname, userName, pwd)
            > Console.WriteLine("Logged in userid {0}", userId)
            >
            >
            > Dim rpcClient As IOpenErp = CType(XmlRpcProxyGen.Create(GetType(IOpenErp)),
            > IOpenErp)
            >
            > ClientProtocol = CType(rpcClient, XmlRpcClientProtocol)
            > ClientProtocol.NonStandard = XmlRpcNonStandard.AllowStringFaultCode
            >
            >
            > Dim addPairFields As New XmlRpcStruct()
            > addPairFields.Add("title", "Monsieur")
            > addPairFields.Add("name", "Fabien Pinckaers")
            > addPairFields.Add("lang", "fr_FR")
            > addPairFields.Add("active", CInt(0))
            >
            > Try
            > 'error occuring here...
            >
            > Dim resAdd As Integer = rpcClient.create(dbname, userId, pwd,
            > "res.partner", "create", addPairFields)
            > Console.WriteLine("Added partner, record id = {0}", resAdd)
            >
            > Catch ex As XmlRpcException
            >
            > MsgBox(ex.Message)
            >
            > End Try
            >
            >
            > --- In XMLRPCNET@yahoogroups.com, Charles Cook <chascook@...> wrote:
            > >
            > > The server is returning an invalid Fault response. Using
            > AllowStringFaultCode
            > > as described here might help:
            > >
            > > http://xml-rpc.net/faq/xmlrpcnetfaq.html#2.22
            > >
            > > :Charles
            > >
            > > On Fri, Feb 18, 2011 at 9:37 PM, Scott <scott.wheeler@...> wrote:
            > >
            > > >
            > > >
            > > > Hi,
            > > >
            > > > I'm making progress attaching to the OpenERP system using some of the
            > code
            > > > samples so graciously posted. The following code is allowing me to
            > login and
            > > > get the user ID but the subsequent call to create the partner is
            > resulting
            > > > in the following XmlRpc TypeMisMatch error on the 'addPairFields'
            > argument :
            > > >
            > > > "fault response contains string value where integer expected [fault
            > > > response : struct mapped to type Fault : member faultCode mapped to
            > type
            > > > Int32]"
            > > >
            > > > I'm new to this tool so I'm not quite sure if the error is being
            > triggered
            > > > by something on the OpenERP side or if I'm passing an array of
            > parameters
            > > > incorrectly.
            > > >
            > > > Code:
            > > > Dim userId As Integer = 0
            > > > Dim dbname As String = "myDB"
            > > > Dim userName As String = "myNAME"
            > > > Dim pwd As String = "myPWD"
            > > >
            > > > 'Login to openerp
            > > > Dim rpcClientLogin As IOpenErpLogin =
            > > > CType(XmlRpcProxyGen.Create(GetType(IOpenErpLogin)), IOpenErpLogin)
            > > > userId = rpcClientLogin.login(dbname, userName, pwd)
            > > > Console.WriteLine("Logged in userid {0}", userid)
            > > >
            > > > Dim rpcClient As IOpenErp =
            > CType(XmlRpcProxyGen.Create(GetType(IOpenErp)),
            > > > IOpenErp)
            > > >
            > > > Dim addPairFields As New XmlRpcStruct()
            > > > addPairFields.Add("title", "Monsieur")
            > > > addPairFields.Add("name", "Fabien Pinckaers")
            > > > addPairFields.Add("lang", "fr")
            > > > addPairFields.Add("active", 0)
            > > >
            > > > 'error occuring on this line....
            > > > Dim resAdd As Integer = rpcClient.create(dbname, userId, pwd,
            > > > "res.partner", "create", addPairFields)
            > > >
            > > > Console.WriteLine("Added partner, record id = {0}", resAdd)
            > > >
            > > > Any help greatly appreciated.
            > > >
            > > > Thanks,
            > > > Scott
            > > >
            > > >
            > > >
            > >
            > >
            > > [Non-text portions of this message have been removed]
            > >
            >
            >
            >


            [Non-text portions of this message have been removed]
          • Scott Wheeler
            Hi Charles, Thanks for the note. Can you say if the exception generated might rollback a successful transaction in the API being called? For instance,
            Message 5 of 7 , Feb 21, 2011
            View Source
            • 0 Attachment
              Hi Charles,

              Thanks for the note. Can you say if the exception generated might rollback a
              successful transaction in the API being called? For instance, the call was made
              successfully but XML-RPC.NET couldn't somehow complete the 'handshake', so the
              action on the otherside was rolled-back?

              Also, do you have a loose date for your next release?

              Thanks a bunch,
              Scott
               




              ________________________________
              From: Charles Cook <chascook@...>
              To: XMLRPCNET@yahoogroups.com
              Sent: Mon, February 21, 2011 3:14:05 PM
              Subject: Re: [XMLRPCNET] Re: TypeMismatch error Using XML-RPC.NET to connect to
              OpenERP via VB.NET

              Hi Scott — I just checked and there is a bug in this area — issue 77. The
              code in XmlRpcSerializer.ParseFault is incorrect. It is fixed in the next
              release but it is an obvious change to make and build the assembly. Details
              of the fix here:

              http://code.google.com/p/xmlrpcnet/source/detail?r=131

              Charles

              On Mon, Feb 21, 2011 at 12:17 PM, Scott <scott.wheeler@...> wrote:

              >
              >
              > Hi Charles,
              >
              > Thank you for the quick reply. I've implemented the 'AllowStringFaultCode'
              > as seen below, but I'm getting the same "...integer expected..."
              > TypeMismatch exception. Unfortunately, I'm not yet familiar enough with the
              > API I am calling and the capabilities of your XML-RPC.NET library. Can you
              > say which side you think might be prompting the exception at this point?
              >
              > Thanks,
              > Scott
              >
              >
              > Dim ClientProtocol As XmlRpcClientProtocol
              >
              > Dim userId As Integer = 0
              > Dim dbname As String = "mydb"
              > Dim userName As String = "myname"
              > Dim pwd As String = "mypwd"
              >
              >
              > 'Login to openerp
              > Dim rpcClientLogin As IOpenErpLogin =
              > CType(XmlRpcProxyGen.Create(GetType(IOpenErpLogin)), IOpenErpLogin)
              >
              > userId = rpcClientLogin.login(dbname, userName, pwd)
              > Console.WriteLine("Logged in userid {0}", userId)
              >
              >
              > Dim rpcClient As IOpenErp = CType(XmlRpcProxyGen.Create(GetType(IOpenErp)),
              > IOpenErp)
              >
              > ClientProtocol = CType(rpcClient, XmlRpcClientProtocol)
              > ClientProtocol.NonStandard = XmlRpcNonStandard.AllowStringFaultCode
              >
              >
              > Dim addPairFields As New XmlRpcStruct()
              > addPairFields.Add("title", "Monsieur")
              > addPairFields.Add("name", "Fabien Pinckaers")
              > addPairFields.Add("lang", "fr_FR")
              > addPairFields.Add("active", CInt(0))
              >
              > Try
              > 'error occuring here...
              >
              > Dim resAdd As Integer = rpcClient.create(dbname, userId, pwd,
              > "res.partner", "create", addPairFields)
              > Console.WriteLine("Added partner, record id = {0}", resAdd)
              >
              > Catch ex As XmlRpcException
              >
              > MsgBox(ex.Message)
              >
              > End Try
              >
              >
              > --- In XMLRPCNET@yahoogroups.com, Charles Cook <chascook@...> wrote:
              > >
              > > The server is returning an invalid Fault response. Using
              > AllowStringFaultCode
              > > as described here might help:
              > >
              > > http://xml-rpc.net/faq/xmlrpcnetfaq.html#2.22
              > >
              > > :Charles
              > >
              > > On Fri, Feb 18, 2011 at 9:37 PM, Scott <scott.wheeler@...> wrote:
              > >
              > > >
              > > >
              > > > Hi,
              > > >
              > > > I'm making progress attaching to the OpenERP system using some of the
              > code
              > > > samples so graciously posted. The following code is allowing me to
              > login and
              > > > get the user ID but the subsequent call to create the partner is
              > resulting
              > > > in the following XmlRpc TypeMisMatch error on the 'addPairFields'
              > argument :
              > > >
              > > > "fault response contains string value where integer expected [fault
              > > > response : struct mapped to type Fault : member faultCode mapped to
              > type
              > > > Int32]"
              > > >
              > > > I'm new to this tool so I'm not quite sure if the error is being
              > triggered
              > > > by something on the OpenERP side or if I'm passing an array of
              > parameters
              > > > incorrectly.
              > > >
              > > > Code:
              > > > Dim userId As Integer = 0
              > > > Dim dbname As String = "myDB"
              > > > Dim userName As String = "myNAME"
              > > > Dim pwd As String = "myPWD"
              > > >
              > > > 'Login to openerp
              > > > Dim rpcClientLogin As IOpenErpLogin =
              > > > CType(XmlRpcProxyGen.Create(GetType(IOpenErpLogin)), IOpenErpLogin)
              > > > userId = rpcClientLogin.login(dbname, userName, pwd)
              > > > Console.WriteLine("Logged in userid {0}", userid)
              > > >
              > > > Dim rpcClient As IOpenErp =
              > CType(XmlRpcProxyGen.Create(GetType(IOpenErp)),
              > > > IOpenErp)
              > > >
              > > > Dim addPairFields As New XmlRpcStruct()
              > > > addPairFields.Add("title", "Monsieur")
              > > > addPairFields.Add("name", "Fabien Pinckaers")
              > > > addPairFields.Add("lang", "fr")
              > > > addPairFields.Add("active", 0)
              > > >
              > > > 'error occuring on this line....
              > > > Dim resAdd As Integer = rpcClient.create(dbname, userId, pwd,
              > > > "res.partner", "create", addPairFields)
              > > >
              > > > Console.WriteLine("Added partner, record id = {0}", resAdd)
              > > >
              > > > Any help greatly appreciated.
              > > >
              > > > Thanks,
              > > > Scott
              > > >
              > > >
              > > >
              > >
              > >
              > > [Non-text portions of this message have been removed]
              > >
              >

              >


              [Non-text portions of this message have been removed]



              ------------------------------------

              Yahoo! Groups Links






              [Non-text portions of this message have been removed]
            • Charles Cook
              Hi Scott: the next release is imminent. Currently testing and writing documentation. ... [Non-text portions of this message have been removed]
              Message 6 of 7 , Feb 22, 2011
              View Source
              • 0 Attachment
                Hi Scott: the next release is imminent. Currently testing and writing
                documentation.

                :Charles
                On Mon, Feb 21, 2011 at 11:34 PM, Scott Wheeler <scott.wheeler@...>wrote:

                >
                >
                > Hi Charles,
                >
                > Thanks for the note. Can you say if the exception generated might rollback
                > a
                > successful transaction in the API being called? For instance, the call was
                > made
                > successfully but XML-RPC.NET <http://xml-rpc.net/> couldn't somehow
                > complete the 'handshake', so the
                > action on the otherside was rolled-back?
                >
                > Also, do you have a loose date for your next release?
                >
                > Thanks a bunch,
                > Scott
                >
                >
                > ________________________________
                > From: Charles Cook <chascook@...>
                > To: XMLRPCNET@yahoogroups.com
                > Sent: Mon, February 21, 2011 3:14:05 PM
                > Subject: Re: [XMLRPCNET] Re: TypeMismatch error Using XML-RPC.NET<http://xml-rpc.net/>to connect to
                > OpenERP via VB.NET <http://vb.net/>
                >
                >
                > Hi Scott � I just checked and there is a bug in this area � issue 77. The
                > code in XmlRpcSerializer.ParseFault is incorrect. It is fixed in the next
                > release but it is an obvious change to make and build the assembly. Details
                > of the fix here:
                >
                > http://code.google.com/p/xmlrpcnet/source/detail?r=131
                >
                > Charles
                >
                > On Mon, Feb 21, 2011 at 12:17 PM, Scott <scott.wheeler@...> wrote:
                >
                > >
                > >
                > > Hi Charles,
                > >
                > > Thank you for the quick reply. I've implemented the
                > 'AllowStringFaultCode'
                > > as seen below, but I'm getting the same "...integer expected..."
                > > TypeMismatch exception. Unfortunately, I'm not yet familiar enough with
                > the
                > > API I am calling and the capabilities of your XML-RPC.NET<http://xml-rpc.net/>library. Can you
                > > say which side you think might be prompting the exception at this point?
                > >
                > > Thanks,
                > > Scott
                > >
                > >
                > > Dim ClientProtocol As XmlRpcClientProtocol
                > >
                > > Dim userId As Integer = 0
                > > Dim dbname As String = "mydb"
                > > Dim userName As String = "myname"
                > > Dim pwd As String = "mypwd"
                > >
                > >
                > > 'Login to openerp
                > > Dim rpcClientLogin As IOpenErpLogin =
                > > CType(XmlRpcProxyGen.Create(GetType(IOpenErpLogin)), IOpenErpLogin)
                > >
                > > userId = rpcClientLogin.login(dbname, userName, pwd)
                > > Console.WriteLine("Logged in userid {0}", userId)
                > >
                > >
                > > Dim rpcClient As IOpenErp =
                > CType(XmlRpcProxyGen.Create(GetType(IOpenErp)),
                > > IOpenErp)
                > >
                > > ClientProtocol = CType(rpcClient, XmlRpcClientProtocol)
                > > ClientProtocol.NonStandard = XmlRpcNonStandard.AllowStringFaultCode
                > >
                > >
                > > Dim addPairFields As New XmlRpcStruct()
                > > addPairFields.Add("title", "Monsieur")
                > > addPairFields.Add("name", "Fabien Pinckaers")
                > > addPairFields.Add("lang", "fr_FR")
                > > addPairFields.Add("active", CInt(0))
                > >
                > > Try
                > > 'error occuring here...
                > >
                > > Dim resAdd As Integer = rpcClient.create(dbname, userId, pwd,
                > > "res.partner", "create", addPairFields)
                > > Console.WriteLine("Added partner, record id = {0}", resAdd)
                > >
                > > Catch ex As XmlRpcException
                > >
                > > MsgBox(ex.Message)
                > >
                > > End Try
                > >
                > >
                > > --- In XMLRPCNET@yahoogroups.com, Charles Cook <chascook@...> wrote:
                > > >
                > > > The server is returning an invalid Fault response. Using
                > > AllowStringFaultCode
                > > > as described here might help:
                > > >
                > > > http://xml-rpc.net/faq/xmlrpcnetfaq.html#2.22
                > > >
                > > > :Charles
                > > >
                > > > On Fri, Feb 18, 2011 at 9:37 PM, Scott <scott.wheeler@...> wrote:
                > > >
                > > > >
                > > > >
                > > > > Hi,
                > > > >
                > > > > I'm making progress attaching to the OpenERP system using some of the
                > > code
                > > > > samples so graciously posted. The following code is allowing me to
                > > login and
                > > > > get the user ID but the subsequent call to create the partner is
                > > resulting
                > > > > in the following XmlRpc TypeMisMatch error on the 'addPairFields'
                > > argument :
                > > > >
                > > > > "fault response contains string value where integer expected [fault
                > > > > response : struct mapped to type Fault : member faultCode mapped to
                > > type
                > > > > Int32]"
                > > > >
                > > > > I'm new to this tool so I'm not quite sure if the error is being
                > > triggered
                > > > > by something on the OpenERP side or if I'm passing an array of
                > > parameters
                > > > > incorrectly.
                > > > >
                > > > > Code:
                > > > > Dim userId As Integer = 0
                > > > > Dim dbname As String = "myDB"
                > > > > Dim userName As String = "myNAME"
                > > > > Dim pwd As String = "myPWD"
                > > > >
                > > > > 'Login to openerp
                > > > > Dim rpcClientLogin As IOpenErpLogin =
                > > > > CType(XmlRpcProxyGen.Create(GetType(IOpenErpLogin)), IOpenErpLogin)
                > > > > userId = rpcClientLogin.login(dbname, userName, pwd)
                > > > > Console.WriteLine("Logged in userid {0}", userid)
                > > > >
                > > > > Dim rpcClient As IOpenErp =
                > > CType(XmlRpcProxyGen.Create(GetType(IOpenErp)),
                > > > > IOpenErp)
                > > > >
                > > > > Dim addPairFields As New XmlRpcStruct()
                > > > > addPairFields.Add("title", "Monsieur")
                > > > > addPairFields.Add("name", "Fabien Pinckaers")
                > > > > addPairFields.Add("lang", "fr")
                > > > > addPairFields.Add("active", 0)
                > > > >
                > > > > 'error occuring on this line....
                > > > > Dim resAdd As Integer = rpcClient.create(dbname, userId, pwd,
                > > > > "res.partner", "create", addPairFields)
                > > > >
                > > > > Console.WriteLine("Added partner, record id = {0}", resAdd)
                > > > >
                > > > > Any help greatly appreciated.
                > > > >
                > > > > Thanks,
                > > > > Scott
                > > > >
                > > > >
                > > > >
                > > >
                > > >
                > > > [Non-text portions of this message have been removed]
                > > >
                > >
                > >
                > >
                >
                > [Non-text portions of this message have been removed]
                >
                > ------------------------------------
                >
                > Yahoo! Groups Links
                >
                >
                > [Non-text portions of this message have been removed]
                >
                >
                >


                [Non-text portions of this message have been removed]
              • Scott Wheeler
                Excellent! I ll be on the look out for it. ________________________________ From: Charles Cook To: XMLRPCNET@yahoogroups.com Sent: Tue,
                Message 7 of 7 , Feb 22, 2011
                View Source
                • 0 Attachment
                  Excellent! I'll be on the 'look out' for it.




                  ________________________________
                  From: Charles Cook <chascook@...>
                  To: XMLRPCNET@yahoogroups.com
                  Sent: Tue, February 22, 2011 7:01:06 AM
                  Subject: Re: [XMLRPCNET] Re: TypeMismatch error Using XML-RPC.NET to connect to
                  OpenERP via VB.NET

                  Hi Scott: the next release is imminent. Currently testing and writing
                  documentation.

                  :Charles
                  On Mon, Feb 21, 2011 at 11:34 PM, Scott Wheeler <scott.wheeler@...>wrote:

                  >
                  >
                  > Hi Charles,
                  >
                  > Thanks for the note. Can you say if the exception generated might rollback
                  > a
                  > successful transaction in the API being called? For instance, the call was
                  > made
                  > successfully but XML-RPC.NET <http://xml-rpc.net/> couldn't somehow
                  > complete the 'handshake', so the
                  > action on the otherside was rolled-back?
                  >
                  > Also, do you have a loose date for your next release?
                  >
                  > Thanks a bunch,
                  > Scott
                  >
                  >
                  > ________________________________
                  > From: Charles Cook <chascook@...>
                  > To: XMLRPCNET@yahoogroups.com
                  > Sent: Mon, February 21, 2011 3:14:05 PM
                  > Subject: Re: [XMLRPCNET] Re: TypeMismatch error Using
                  >XML-RPC.NET<http://xml-rpc.net/>to connect to
                  > OpenERP via VB.NET <http://vb.net/>
                  >
                  >
                  > Hi Scott — I just checked and there is a bug in this area — issue 77. The
                  > code in XmlRpcSerializer.ParseFault is incorrect. It is fixed in the next
                  > release but it is an obvious change to make and build the assembly. Details
                  > of the fix here:
                  >
                  > http://code.google.com/p/xmlrpcnet/source/detail?r=131
                  >
                  > Charles
                  >
                  > On Mon, Feb 21, 2011 at 12:17 PM, Scott <scott.wheeler@...> wrote:
                  >
                  > >
                  > >
                  > > Hi Charles,
                  > >
                  > > Thank you for the quick reply. I've implemented the
                  > 'AllowStringFaultCode'
                  > > as seen below, but I'm getting the same "...integer expected..."
                  > > TypeMismatch exception. Unfortunately, I'm not yet familiar enough with
                  > the
                  > > API I am calling and the capabilities of your
                  >XML-RPC.NET<http://xml-rpc.net/>library. Can you
                  > > say which side you think might be prompting the exception at this point?
                  > >
                  > > Thanks,
                  > > Scott
                  > >
                  > >
                  > > Dim ClientProtocol As XmlRpcClientProtocol
                  > >
                  > > Dim userId As Integer = 0
                  > > Dim dbname As String = "mydb"
                  > > Dim userName As String = "myname"
                  > > Dim pwd As String = "mypwd"
                  > >
                  > >
                  > > 'Login to openerp
                  > > Dim rpcClientLogin As IOpenErpLogin =
                  > > CType(XmlRpcProxyGen.Create(GetType(IOpenErpLogin)), IOpenErpLogin)
                  > >
                  > > userId = rpcClientLogin.login(dbname, userName, pwd)
                  > > Console.WriteLine("Logged in userid {0}", userId)
                  > >
                  > >
                  > > Dim rpcClient As IOpenErp =
                  > CType(XmlRpcProxyGen.Create(GetType(IOpenErp)),
                  > > IOpenErp)
                  > >
                  > > ClientProtocol = CType(rpcClient, XmlRpcClientProtocol)
                  > > ClientProtocol.NonStandard = XmlRpcNonStandard.AllowStringFaultCode
                  > >
                  > >
                  > > Dim addPairFields As New XmlRpcStruct()
                  > > addPairFields.Add("title", "Monsieur")
                  > > addPairFields.Add("name", "Fabien Pinckaers")
                  > > addPairFields.Add("lang", "fr_FR")
                  > > addPairFields.Add("active", CInt(0))
                  > >
                  > > Try
                  > > 'error occuring here...
                  > >
                  > > Dim resAdd As Integer = rpcClient.create(dbname, userId, pwd,
                  > > "res.partner", "create", addPairFields)
                  > > Console.WriteLine("Added partner, record id = {0}", resAdd)
                  > >
                  > > Catch ex As XmlRpcException
                  > >
                  > > MsgBox(ex.Message)
                  > >
                  > > End Try
                  > >
                  > >
                  > > --- In XMLRPCNET@yahoogroups.com, Charles Cook <chascook@...> wrote:
                  > > >
                  > > > The server is returning an invalid Fault response. Using
                  > > AllowStringFaultCode
                  > > > as described here might help:
                  > > >
                  > > > http://xml-rpc.net/faq/xmlrpcnetfaq.html#2.22
                  > > >
                  > > > :Charles
                  > > >
                  > > > On Fri, Feb 18, 2011 at 9:37 PM, Scott <scott.wheeler@...> wrote:
                  > > >
                  > > > >
                  > > > >
                  > > > > Hi,
                  > > > >
                  > > > > I'm making progress attaching to the OpenERP system using some of the
                  > > code
                  > > > > samples so graciously posted. The following code is allowing me to
                  > > login and
                  > > > > get the user ID but the subsequent call to create the partner is
                  > > resulting
                  > > > > in the following XmlRpc TypeMisMatch error on the 'addPairFields'
                  > > argument :
                  > > > >
                  > > > > "fault response contains string value where integer expected [fault
                  > > > > response : struct mapped to type Fault : member faultCode mapped to
                  > > type
                  > > > > Int32]"
                  > > > >
                  > > > > I'm new to this tool so I'm not quite sure if the error is being
                  > > triggered
                  > > > > by something on the OpenERP side or if I'm passing an array of
                  > > parameters
                  > > > > incorrectly.
                  > > > >
                  > > > > Code:
                  > > > > Dim userId As Integer = 0
                  > > > > Dim dbname As String = "myDB"
                  > > > > Dim userName As String = "myNAME"
                  > > > > Dim pwd As String = "myPWD"
                  > > > >
                  > > > > 'Login to openerp
                  > > > > Dim rpcClientLogin As IOpenErpLogin =
                  > > > > CType(XmlRpcProxyGen.Create(GetType(IOpenErpLogin)), IOpenErpLogin)
                  > > > > userId = rpcClientLogin.login(dbname, userName, pwd)
                  > > > > Console.WriteLine("Logged in userid {0}", userid)
                  > > > >
                  > > > > Dim rpcClient As IOpenErp =
                  > > CType(XmlRpcProxyGen.Create(GetType(IOpenErp)),
                  > > > > IOpenErp)
                  > > > >
                  > > > > Dim addPairFields As New XmlRpcStruct()
                  > > > > addPairFields.Add("title", "Monsieur")
                  > > > > addPairFields.Add("name", "Fabien Pinckaers")
                  > > > > addPairFields.Add("lang", "fr")
                  > > > > addPairFields.Add("active", 0)
                  > > > >
                  > > > > 'error occuring on this line....
                  > > > > Dim resAdd As Integer = rpcClient.create(dbname, userId, pwd,
                  > > > > "res.partner", "create", addPairFields)
                  > > > >
                  > > > > Console.WriteLine("Added partner, record id = {0}", resAdd)
                  > > > >
                  > > > > Any help greatly appreciated.
                  > > > >
                  > > > > Thanks,
                  > > > > Scott
                  > > > >
                  > > > >
                  > > > >
                  > > >
                  > > >
                  > > > [Non-text portions of this message have been removed]
                  > > >
                  > >
                  > >
                  > >
                  >
                  > [Non-text portions of this message have been removed]
                  >
                  > ------------------------------------
                  >
                  > Yahoo! Groups Links
                  >
                  >
                  > [Non-text portions of this message have been removed]
                  >

                  >


                  [Non-text portions of this message have been removed]



                  ------------------------------------

                  Yahoo! Groups Links






                  [Non-text portions of this message have been removed]
                Your message has been successfully submitted and would be delivered to recipients shortly.