Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 1037947
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 16, 20262026-05-16T14:54:47+00:00 2026-05-16T14:54:47+00:00

I have wrote a simple web service in .NET which return a string value.

  • 0

I have wrote a simple web service in .NET which return a string value.

[WebMethod]
    public string DeveloperInfo()
    {
        return "Chamara is the appliaction developer";
    }

I need to consume it using a J2ME application.following is the code i have used

if (displayable == ServiceForm) {
        if (command == exitCommand1) {
            // write pre-action user code here
            switchDisplayable(null, getTaskList());
            // write post-action user code here
        } else if (command == okCommand2) {
        try
        {
            new Thread(new Runnable()
          {
              public void run()
              {
         try {
                  service1.Service1_Stub service=new service1.Service1_Stub();

             String Info= service.DeveloperInfo().toString();
             txtService.setString(Info);
                // write post-action user code here
            } catch (Exception ex) {
                ex.printStackTrace();
            }
              }
          }).start();
        }catch (Exception e){System.out.println(e.toString());}

It gives the following Exception

java.lang.IllegalArgumentException
    at javax.microedition.lcdui.TextField.setChars(TextField.java:747)
    at javax.microedition.lcdui.TextField.setString(TextField.java:666)
    at com.sliit.j2me.tutorial.TaskList$1.run(TaskList.java:155)

Where I have got wrong?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-16T14:54:48+00:00Added an answer on May 16, 2026 at 2:54 pm

    It seems TextBox constraint fails.
    Ex. The Text is set to take input numbers and you try to set alphabets into it.
    check it and if it isn’t the case then post the contain of Info.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have wrote a basic web service using .net which I intend to use
I have the following web service: [ScriptService] public class Handler : WebService { [WebMethod]
I have a simple web service I wrote using Webmatrix that returns data in
I wrote a simple web service in C# using SharpDevelop (which I just got
I have an ASP.Net MVC site, which connects to a web service. The site's
Hello every one I have wrote a simple code in html5 in which I
I have a simple web service sitting on our internal network. I used SOAPUI
Hello I have a simple wcf service like this, with a test method which
I am writing a simple web service using .NET, one method is used to
I have to integrate an existing, simple asp.net web forms app including postbacks etc.

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.