Giter Site home page Giter Site logo

Comments (5)

NickUfer avatar NickUfer commented on September 24, 2024 2

Yeah it is an encoding issue I could reproduce it. The client doesn't encode the request as UTF-8. There will be a fix within the next hours πŸ‘

from java-client.

NickUfer avatar NickUfer commented on September 24, 2024 1

You should now be able to use version 3.1.1 from maven central.

from java-client.

ddmler avatar ddmler commented on September 24, 2024 1

Thank you for helping us. πŸ₯‡

from java-client.

NickUfer avatar NickUfer commented on September 24, 2024

Hey, I tried to reproduce your problem but could not find any problem on my first try. I also tried your example with the correct values for cc, pc and city and it worked too.

JsonObject requestParameters = new JsonObject();
requestParameters.addProperty("type", "PERSON");
requestParameters.addProperty("name", "Test User");
requestParameters.addProperty("street", "MyStreet");
requestParameters.addProperty("city", "Berlin");
requestParameters.addProperty("pc", "10969");
requestParameters.addProperty("cc", "DE");
requestParameters.addProperty("voice", "+1.23324");
requestParameters.addProperty("email", "[email protected]");
requestParameters.addProperty("forceNew", true);
Request (account.login): {
  "method": "account.login",
  "params": {
    "user": "redacted",
    "pass": "redacted"
  }
}
Response (account.login): {
  "code": 1000,
  "msg": "Command completed successfully",
  "resData": {
    "customerId": redacted,
    "accountId": redacted,
    "tfa": "0",
    "builddate": "2017",
    "version": "1"
  }
}
Request (contact.create): {
  "method": "contact.create",
  "params": {
    "type": "PERSON",
    "name": "Test User",
    "street": "MyStreet",
    "city": "Berlin",
    "pc": "10969",
    "cc": "DE",
    "voice": "+1.23324",
    "email": "[email protected]",
    "forceNew": true
  }
}
Response (contact.create): {
  "code": 1000,
  "msg": "Command completed successfully",
  "resData": {
    "id": redacted
  }
}
Request (account.logout): {
  "method": "account.logout"
}
Response (account.logout): {
  "code": 1500,
  "msg": "Command completed successfully; ending session"
}

Maybe your values are not correct or known, especially city, pc and cc?

from java-client.

j-freimuth avatar j-freimuth commented on September 24, 2024

Thank you for your speedy reply.

I tried your data and it did work. You were right, my original test for the field street had UTF-8 characters, namely the German 'sz' character 'ß' and the German umlaut o character 'â'. If those are sent within the street and presumably in any other field, it will respond with a 2400 error code.

Still, my tests with Postman and these character were successful, so it has to be a bug somewhere within the library and not the API. Maybe it is transformed somewhere to ASCII?

from java-client.

Related Issues (2)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    πŸ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. πŸ“ŠπŸ“ˆπŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❀️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.