Getting J2ME Web Services Going

Hi,
I am having trouble getting web services support going. I have downloaded the Wireless Toolkit and the test I am doing to see if it is working is trying to:
import javax.microedition.xml.rpc;
import javax.xml.namespace;
import javax.xml.rpc;
import java.rmi;
and building the application, but I've been getting errors on these. I have tried adding some jars that I have downloaded (I've really been doing a bit of trial and error here) to my classpath, but I have been so far unsuccessful. Could anyone give me some advice on how to (or where I can find information on) getting the web services API's going?
cheers and thanks in advance
Jay

Hi ,
My basic things are not cleared about j2me-web services.
Please Can you tell me, If we want to send custom/std object like StringBuffer/Calender using kSOAP, Do we need to serialize it?
I am sending StringBuffer object as a part of "Vector", "Vector" is synchronized so I have put StringBuffer object in Vector. So Do I need to serialize StringBuffer object also?
Please, give your valuable suggestions?
Thanks
Regards
vikas khengare

Similar Messages

  • Problem parsing xml(J2ME Web Service spec) containing image in cldc/midp

    Hi,
    I have created a restful web service that generates xml file in app server. I have created xml file using JAXB2.1 spec. This xml file has many elements starting from char data to image (binary data). I could successfully create xml file and developed another test client to read the same file using JAXB. However, I am finding a problem while getting the image in the java me client (cldc1.1 and midp2.0).
    I am using J2ME Web Services Specification, using javax.xml.parsers.SAXParser to parse the xml file. Parsing is successful and got the character data. But the image data is not accurate, so I am not getting the image. I suspect the problem is with encoding but not sure how to solve this. At the server end, I verified that xml file is encoded with "UTF-8" encoding, not sure how to decode at the client end.
    I am totally confused as how to get the accurate image data, not sure if I use kxml parser would solve my problem.
    I would really appreciate if somebody can get back to me as this is very very important.

    Try to send to your web service the byte array instead of string and then convert the byte array into an image
    using a method like the following one in your service:
    // C# code
    public Image ByteArrayToImage(byte[] byteArrayIn)
         MemoryStream ms = new MemoryStream(byteArrayIn);
         Image returnImage = Image.FromStream(ms);
         return returnImage;
    }There can be some problem between encoding in J2ME and .Net so try different encodings in gathering the image bytes in your j2ME application, but, instead of jpg which has more encodings, try png that is a more standardized image compression(open standard).

  • J2me web services!!

    Hi, am working on midlets can any one tell me hw to use j2me web services in netbeans??

    Note: This thread was originally posted in the [Abstract Window Toolkit (AWT)|http://forums.sun.com/forum.jspa?forumID=5] forum, but moved to this forum for closer topic alignment.
    edit
    pavan146s, kindly take the trouble to locate an appropriate forum for your questions. The question very obviously has nothing whatever to do with the subject of the forum where you posted it.
    While you may get a useful response here, I suggest you post any future NetBeans questions in a NetBeans forum, on a site that has one. This site doesn't.
    Edited by: DarrylBurke

  • I get an web service error when trying enable web services. I have latest update and rebooted

    i get an web service error when trying enable web services. I have latest update and rebooted

    hi there philnj,
    could you help the community narrow troubleshooting by providing a little more information? Particularly what model printer are we dealing with?
    You can say thanks by clicking the Kudos Star in my post. If my post resolves your problem, please mark it as Accepted Solution so others can benefit too.

  • Problem creating J2ME web service client

    Hi,
    I am using netbeans (5 and 5.5 beta 2). I have created a web service which works fine. I also created a regular web service client as a standalone application which also works fine and connects to my web service with no problem.
    BUT, when I want to create a J2ME web service client (under a J2ME application) I have to locate my WSDL file. but the wizard shows me the error "WSDL file does not contain port information".
    By looking at the WSDL file I can see that port is created - or maybe I'm wrong.
    piece from WSDL file:
    <service name="myServiceName">
    <port name="myServiceSPort" binding="tns:TranslatorWSPortBinding">
    <soap:address location="myURLLocation"/>
    </port>
    </service>
    Please note that I have replaced the actual values in above piece
    I tried to use wsgen manually but it didn't help.
    Can anyone help me in generating the correct WSDL format as J2ME web service client expects?
    Thanks a lot,
    S.

    well stubs are generated separately using WTK 2.5 stub generator but the problem is with the WSDL at this point.
    S.

  • Can anybody give me complete guideance & code about using j2me web service?

    Hi to all !
    I have posted problem about using j2me web service ...
    but still nobody have give me at least one response..
    can anybody give me complete example about using webservice in j2me?
    premal

    Hi to all !
    I have posted problem about using j2me web service
    but still nobody have give me at least one
    response..
    can anybody give me complete example about using
    webservice in j2me?
    premal-----------------------------------
    Hi, You may find help using netBean IDE.In netBean IDE help, there you should find step by step solusion for web service as well soap messang technology
    your best regard
    http://www.techbd.com
    [email protected]

  • NetBeans 5.5 j2me web service client...how to?

    Hi,
    I am new to web services and j2me, so this question might be very simple.
    I have created a project (simple web service) and tested it and all work ok...
    I try to create a midlet to consume this web service so I do the following:
    (1) Create a mobile->Mobile Application project
    (2) Add a new file-> j2me web service client
    (3) On running web service I insert the url of the wsdl of the previous web service
    (4) Press retrieve WSDL (everything seem to work ok up to this point)
    (5) I keep the check box Create Simple midlet checked
    A packet with two files is created: blablah.wsclient, blablablah.wsdl
    No midlet is created and when I try to create my own nothing I dont know how to access the web services methods...
    Is it a bug of netbeans 5.5?
    Can someone provide a link for a simple tutorial or at least make clear how to access the method of the web service?
    Thanx in advance!

    I'm facing the same problem with NetBeans 5.5.1 while I had no trouble with NetBeans 5.5 (I wonder why I updated :-( )
    I hope someone can help us.
    Best regards
    edit:
    It should be due JDK 1.6; I will try and I'll let you have my results.
    Rread this:
    http://www.netbeans.org/issues/show_bug.cgi?id=90112
    Edited by: NikJ2ME on Oct 13, 2007 5:05 AM

  • How many are J2me Web service programming masters?

    I have created demo web service successfully and checked in browser..
    when i tried to implement in j2me then :
    exception on invoking this line :
    resultObj = op.invoke(inputObject);
    exceptiuon is like this :
    Error : java.rmi.ServerException:
    [String: JAXRPC.TIE.04: Internal Server Error (JAXRPCTIE01: caught exception while handling request: java.lang.ClassCastException: com.sun.xml.messaging.saaj.soap.impl.TextImpl)]
    why this exception occur...
    note that this is my first j2me web service application..
    all the ideas releted this always welcome
    premal                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                       

    hi,
    you can "borrow" the source code from [Yambo a free soft open source presentation engine (AKA XML microbrowser Xlet )|http://www.cineca.tv/labs/mhplab/index-en.html] both local and on a http remote connection.
    hope it helps..
    bye
    andrea

  • BigInteger in J2ME web service client

    I have a problem about sending parameter of BigInteger in J2ME web service client.
    To send a BigInteger as parameter web service, i change into array of byte then i change again into HexString.
    After that, the String value send to web service.
    The String value change into array of byte again then i build new object BigInteger.
    I think the way i try is correct, but in J2ME as web service client the value of BigInteger that i send has change.
    I tried in J2SE as web service client with the same way, then the value of BigInteger didn't changed.
    Is it the class BigInteger in library lcrypto-j2me (BouncyCastle) cannot apply into BigInteger in java?
    Or i've missing something???
    Thanks a lot for the answer...
    Best regards,
    Meis

    I have a problem about sending parameter of BigInteger in J2ME web service client.
    To send a BigInteger as parameter web service, i change into array of byte then i change again into HexString.
    After that, the String value send to web service.
    The String value change into array of byte again then i build new object BigInteger.
    I think the way i try is correct, but in J2ME as web service client the value of BigInteger that i send has change.
    I tried in J2SE as web service client with the same way, then the value of BigInteger didn't changed.
    Is it the class BigInteger in library lcrypto-j2me (BouncyCastle) cannot apply into BigInteger in java?
    Or i've missing something???
    Thanks a lot for the answer...
    Best regards,
    Meis

  • J2ME Web Services proxy

    I try to register a web service with mobile studio,
    (I use my account on studio.oraclemobile.com) so as to generate J2ME stub and run the service in proxy mode.
    The problem is, whichever URL I put for wsdl files, I get "The URL you entered does not contain a valid WSDL file." The URLs are correct, I tried many of them, including all given in 9iAS Wireless 904 docs, like
    http://www.xmethods.net/sd/2001/TemperatureService.wsdl
    http://www.xmethods.net/sd/2001/FedExTrackerService.wsdl
    as well as some others.
    I can view these WSDL files in browser and can't understand why they would be invalid.
    I wanted to check proxying feature with Mobile Studio first, then migrate it to a running 9iAS server - I have already tried Mobile Studio AND 9iAS, and both failed.
    Is there something I do wrong?
    Anyone, I will appreciate any help on that.
    Thanks
    Pawel

    Thomas,
    I checked the HTTP header I receive when "manually" requesting WSDLs. No encoding is shown, so I guess it's default UTF-8, and content-type is text/xml. What else could possibly go wrong?
    I also checked those WSDLs with a few validators (both online and offline like XMLSpy), documents were well-formed as well as valid.
    Any hint why I still can't get it to work?
    If there is a public available Web Service that you tried and know works well with Mobile Studio (or 9iAS),let me know the URL please.
    I suppose there is no problem with URLs themselves as (1)I successfully registered a multichanell application in Mobile Studio fetching Simple XML from external URLs, (2)I can view those WSDLs as "plain" XMLs in IE6.0..
    Pawel

  • How to make a WORKING J2ME Web Services client?

    Hi everyone,
    I'm trying to make my first J2ME client for web services (well, I need it for my degree thesis, so I'm a little bit DESPERATE) but I've got a lot of problem that I don't understand, even with samples downloaded from web tutorials and from xmethods.net.
    The problem is with the generation of Stub classes:
    if I try to make the Java Wireless TollKit 2.2 to generate them and then I run the midlet in the JWTK emulator there's no problem, but when I try to do the same thing with the Nokia Developer's Suite 3.0 I've got a lot of problems, first of all the java code generated for the stub is very different from the first one, it seem like a C# or J# code (and obviously Eclipse says that it's full of errors), so when I try to make the jar and jad files it doesn't work (because is not a right java code), so I made the stub classes using the JWTK2.2 Stub Generator and then I used the Nokia Dev's Suite 3.0 to build and package the midlet, but it says that it's not able to find the "class or resource javax/xml/rpc/Stub" even if the resource is present and used exactly as all the other packages, and it creates a jar file with just some of the classes but not all. At the end I tryed to run in the nokia emulators the midlet created by the JWTK 2.2, but it doesn't start, so I put the midlet on two diffent Nokia phones (6600 and 6630, because I need to make my client work on the 6630) but it seems to make the virtual machine to crash. I erased all the code lines invoking the stub classes and added them again one by one, until the midlet stoped again to work, and I understand that the problem seems to be with the invocation of the costructor of the stub class, but it doesen't make no sense, because the same code works properly on not-Nokia phones and emulators. I used many different wsdl files to create the stub classes for different web services, but there's always the same problems.
    Help me please.

    You will find some working code at :
    http://ksoap.objectweb.org/software/downloads/index.html
    It's code that use kSOAP and kXML implementations ....
    If you will also find some useful information here :
    http://developers.sun.com/techtopics/mobility/apis/articles/wsa/
    http://www-106.ibm.com/developerworks/wireless/library/wi-jsr/
    http://www-106.ibm.com/developerworks/wireless/library/wi-xmlparse/
    Regards.

  • Problem getting RESTful web service reference working with header value

    Hi,
    I posted this on Apex Listener forum but since I am not sure problem is with my Application RESTful web service reference or a Listener issue, I am posting here as well:
    I am on Apex 4.2.2 and Listener 2.1 and the listener is on WEblogic.
    I succeeded to get a RESTful web service working in an application with no header to obtain a full set of data. The data set is very large, so I am now just trying to set up a web service to get a set of data based on a student ID.
    I followed the examples shown in the RESTful web service module of SQL Workshop and set up a handler of this type:
    https://ourweblogicserver/apex/bnr/ace/students/course_grades/{stid}
    The test for this handler succeeded both for JSON output and CSV output in the Workshop test environment.
    However, when I try it from a Web Service Reference that I created for my application following what looked like the same approach used on the example video, I get NO data back. If I put a 'stid' directly into a URL of a web browser and do the basic authentication I get the data!!
    This is what I have for the Web service reference:
    https://ourweblogicserver/apex/bnr/ace/students/course_grades/{stid}
    Basic auth set to Yes -- and this is working -- I am able to authenticate
    HTTP method Get
    output format Text
    no response Xpath
    no response namespace
    defaults for new record and parameter delimiter
    NO REST input parameters
    Output set for all the fields in the data set queried (same set of data as in my rest service which does not have any http header)
    REST HTTP Header : Name stid
    I there something I am missing. I am not sure how to troubleshoot this further.
    I also tried exactly following the example shown on the Oracle Video for RESTFul web services at
    http://www.youtube.com/watch?v=gkCvd6P8_OU
    and I can't get the 2nd example to work either-- where the header has the bind variable parameter.
    Pat

    I was able to resolve the problem -- in the latest version of the RESTful web service that I created, I had left out the creation of the Header Parameter bind variable. Once I did that everything works fine!! I was able to test in the application and got the record of an individual student.
    Thanks,
    PM

  • J2me-web service

    Hi all, I've got a problem to get a response from a method that return a complexType. I've deployed a web services on axis(wsdd file), here is the text:
    <deployment xmlns="http://xml.apache.org/axis/wsdd/" xmlns:java="http://xml.apache.org/axis/wsdd/providers/java">
    <service name="GestoreUtenti" provider="java:RPC" style="document" use="literal">
    <parameter name="className" value="myPackage.GestioneUtenti"/>
    <parameter name="allowedMethods" value="*"/>
    <parameter name="scope" value="Session"/>
    <beanMapping qname="myNS:Utente" xmlns:myNS="urn:GestoreUtenti" languageSpecificType="java:myPackage.Utente" />
    </service>
    </deployment>
    I've tried a JavaSE client and it's all right but with javaMe there is an error "java.rmi.MarshalException: Invalid Element in Response : item" where 'item' is the first tag name that contain variables of the returned object.
    Here is the response soap:
    <?xml version="1.0" encoding="UTF-8" ?>
    - <soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
    - <soapenv:Body>
    - <elencoUtentiReturn xmlns="http://localhost:8080/.../GestoreUtenti">
    - <item xmlns="">
    <valid>true</valid>
    <username>admin</username>
    <userId>1</userId>
    <admin>true</admin>
    </item>
    </elencoUtentiReturn>
    </soapenv:Body>
    </soapenv:Envelope>
    Thanks

    WSDL:
    http://webservices.amazon.com/AWSECommerceService/AWSECommerceService.wsdl
    Is not intended for current version of Java ME web services (JSR172) due to unsupported data types.

  • Where can i download the J2ME Web Services APIs (WSA), JSR 172?

    anyone know where i can download the WSA reference implementation so i can use web services with android? I see this page here has a link for WSA but it just takes me to a general oracle page. http://java.sun.com/products/wsa/
    any help will be greatly appreciated!

    this was the closest form i could find matching my topic. Other people have posted this question here with no clear response or bad download links i.e. this post:
    http://forums.sun.com/thread.jspa?forumID=76&threadID=5331792
    which has a link to :
    http://jcp.org/aboutJava/communityprocess/final/jsr172/index.html
    which has a BAD link to here:
    https://javapartner.sun.com/partner/downloads/JCP-ME/JSR-0172/
    James

  • SharePoint 2013 - SQL Server 2012 PPIV - using a PPIV workbook as a data source - getting PPIV web service error

    I created a PowerPivot (SQL Server 2012 SP1) workbook and uploaded it to SharePoint 2010 Portal and started using it as a data source in an excel file. This worked fine and we saw no issues with it until we moved to SharePoint 2013 environment.
    I uploaded the same PowerPivot workbook (source workbook) to SharePoint 2013 Portal and now trying to use it as a data source. I tried to change connection properties so that I could use the new portal address for the workbook. When
    I try to save my changes, I see that OLAP queries are getting fired "Refreshing OLAP cube" shows up in the status bar, but eventually after running these OLAP queries (I would say after a minute), I get the following error -
    Couldn't find anything specific in SharePoint logs or maybe I wasn't looking for the right thing.
    Has anyone seen this issue? Why would PPIV service throw an error after running for a while? Is it a timeout issue of some kind? How can we take care of this?
    Thanks,
    Sonal

    ULS log showed the following exception: The maximum number of allowed sessions per user has been exceeded.
    Under Excel Services global settings, max limit is set. Default is 25, increasing it resolved this issue.
    Thanks,
    Sonal

Maybe you are looking for

  • Unable to assign the date profile to transaction tyep

    Hi, I have created a new date profile. but while assigning  it the transaction its giving error like " The action profile is only allowed with date profile " X00001 " . Please suggest what could be the reason for that . Thanks & Regardsm Rahul D

  • Strange Error in STO

    Hi I am facing strange Error in STO. I have 2 plants  2001 at Pune and 2004 at Nashik.I want to do STO from Nashil to Pune. Accordingly in config for STO I gave supplying Plant as 2004  and receiving plant as 2001. Then I manitained delivery type NL

  • Exchange 2010 to 2013 Migration: Authentication/Proxy Settings Issue

    I'm in the final stages of preparing for our Exchange 2010 to 2013 migration. I'm noticing minor authentication issues on mobile devices (android & ios) and proxy setting issues with Outlook that require user intervention. In an effort to make the mi

  • How to extend a class in same package

    I have a class called LoginBean.java which extends the class ConnectDB.java this both files have a statement both the classes are under the directory pmtools. and both are included in package pmtools. (they both have statement "package pmtools; " at

  • 3D like picture carousel

    Not sure if this is the wrong app, but I am trying to create a slide show with a carousel like theme. Pictures drop in from the top and land at different points to create a carousel layout and then spin to reveal each picture. Once a picture I want i