×

Discussion Board

Results 1 to 5 of 5
  1. #1
    Regular Contributor
    Join Date
    Oct 2008
    Posts
    50

    Question JSR172 and XML!?

    Hi!
    I learn JSR 172 to invoke the web service. i have a problem:
    how do I handle when web service return XMLDocument?? Thank!!

  2. #2
    Super Contributor
    Join Date
    Mar 2008
    Location
    The Capital of INDIA
    Posts
    4,328

    Thumbs up Re: JSR172 and XML!?

    Hi,
    Well, As soon as you get the xml file as a response from the server.then you can just parse the same and can move forward..

    As far as the parsing of the xml file is concern you can follow like this -
    @ you can either parse the file manually or
    @ you can parse through the parser..

    for the first point you have to write the code ..however for the second point you can go through the link
    http://wiki.forum.nokia.com/index.ph...J2ME_with_kXML
    for the having the deep idea -
    http://www.ibm.com/developerworks/library/wi-parsexml/

    Hope these lines can help you,
    Thanks,
    Thanks with Regards,

    R a j - The K e r n e l


    Join Delhi-NCR Nokia Developer's Community,

  3. #3
    Regular Contributor
    Join Date
    Oct 2008
    Posts
    50

    Re: JSR172 and XML!?

    I want to use Package "javax.xml.parsers" of JSR 172 to handle XML documents. it was returned from web service ( invoke by JSR 172)?. I don't use kXML!! Help! Thank very!

  4. #4
    Nokia Developer Expert
    Join Date
    May 2007
    Location
    Mexico D.F
    Posts
    351

    Re: JSR172 and XML!?

    :Ruben

  5. #5
    Regular Contributor
    Join Date
    Oct 2008
    Posts
    50

    Exclamation Re: JSR172 and XML!?

    I have the web service. it return a XML Document. I use JSR 172 to Invoke and generate a Stub with method:

    public void SampelXmlMethod(String t) throws java.rmi.RemoteException {
    Object inputObject[] = new Object[] {
    t
    };

    Operation op = Operation.newInstance( _qname_operation_SampelXmlMethod, _type_SampelXmlMethod, _type_SampelXmlMethodResponse );
    _prepOperation( op );
    op.setProperty( Operation.SOAPACTION_URI_PROPERTY, "http://tempuri.org/SampelXmlMethod" );
    Object resultObj;
    try {
    resultObj = op.invoke( inputObject );
    } catch( JAXRPCException e ) {
    Throwable cause = e.getLinkedCause();
    if( cause instanceof java.rmi.RemoteException ) {
    throw (java.rmi.RemoteException) cause;
    }
    throw e;
    }

    }
    -------
    Now, I can't handle return the Object ( XML Document) to display. Can You help me!, please. Thank!

Similar Threads

  1. XML comparison
    By olasamuel in forum Mobile Java General
    Replies: 14
    Last Post: 2009-03-06, 12:48
  2. JSR172 Web Services
    By lovercjs in forum Near Field Communication
    Replies: 5
    Last Post: 2008-11-16, 23:24
  3. kXML XML Parser versus Jsr172 API Parser
    By javame.developer in forum Mobile Java General
    Replies: 1
    Last Post: 2008-02-14, 20:23
  4. XML parsing problem
    By tugmbh in forum Mobile Java General
    Replies: 1
    Last Post: 2006-06-17, 15:41

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
×