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.

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).

  • 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

  • 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

  • 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

  • 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.

  • 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

  • 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

  • J2me web services invocation mechanism SOAP or XML-RPC?

    Hi Friends,
    I want to invoke webservice from j2me. To send request to webservice, which mechanism should I use? Either SOAP/XML-RPC?
    I think SOAP is good way, but Is there any option for kSOAP? Means can I use something other that kSOAP?
    Thanks
    vikas r. khengare

    Come on guys i know you can help me, please don't hesitate to write some row

  • Access to MySql Database in the Web Service

    Hi all,
    In my j2me web service project, i want to access to MySql database in the web service and
    my installation is
    Tomcat 5.0 for Java WSDP,
    Java Web Services Developer Pack 1.5,
    MySql Server 5.0 and environment variables are adjusted...
    server.xml where is in "C:\tomcat50-jwsdp\conf" is adjusted like this
    <!-- Replace the above Realm with one of the following to get a Realm
    stored in a database and accessed via JDBC -->
    <Realm className="org.apache.catalina.realm.JDBCRealm"
         debug="99"
         driverName="com.mysql.jdbc.Driver"
         connectionURL="jdbc:mysql://localhost:3306/erendb"
         connectionName="root"
         connectionPassword=""
    />
    but i have not access to MySql database in the web service yet...
    please help...

    Hi Luis,
    If you see closely, the productID is actually a concatenation of the areaID and the productID. The reasoning here is that a product can be in multiple nodes of the product catalog and one would need to specify the product on a particular node for the direct URL to work.
    On a client site, we came up with a better solution by creating a new FM to retrieve the specific areaID and productID for a product. This FM could be called by extending the webshop. Then a .NET program was written to re-direct a shortened form of the URL to the long URL and therefore the specific product in the product catalog. Eg.: http://yyyyy.com/b2c/b2c/product would be automatically redirected to http://yyyyy.com/b2c/b2c/init.do?shop=<shop name>&areaID=<area Guid>&productID=<product Guid>, something similar to the concept behind "tinyurl.com". A point to remember here is that this would work only for the B2C webshop.
    Hope this helps.
    Cheers,
    Ashok.

  • Web Services on Nokia N770

    Hi everyone,
    has anyone tried to develop and run a web service on the N770? Is the device capable to support something like this? I'm taking about a service producer, not a consumer.
    Also, is it possible to install J2ME on a N770? I've seen on the tutorial for J2ME Web Services that it does not support creation and deployment of service endpoints, an alternative is most wellcomed.
    Thanks

    Actually is not a mobile phone, is a internet tablet with a 252Mhz processor.
    The idea is to have a small WS and just one consumer on another device.

Maybe you are looking for