×

Discussion Board

Results 1 to 10 of 10
  1. #1
    Registered User
    Join Date
    May 2006
    Posts
    12

    Question JAXP support (JSR-172, Web Services)

    Is it a fact that all of S80, S60 and S40 3rd Edition Feature Pack 1 based devices support jaxp?

    But, S40 2nd Edition devices don't, right?

    Is that pretty much it, when it comes to jaxp support? Would there be a cross reference of which devices are ok with jaxp (JSR 172)?

    BTW, am I confusing S40 with Series 40 and all that? I'm not sure when to use 'Series', as opposed to Sxx...

    Thanks,
    Karoly

  2. #2
    Nokia Developer Champion
    Join Date
    Apr 2003
    Location
    USA, CA
    Posts
    7,192

    Re: JAXP support (JSR-172, Web Services)

    S60 devices have Web Services API (JSR-172) starting from 2nd Edition Feature Pack 3 (N70, N90) and it is available on S60 3rd Edtion devices.

    On Series 40 side you need to have a 3rd Edition Feature Pack 1 device. Those contain the JAXP part of the JSR-172. Series 40 2nd/3rd Edition devices do not have that functionality

    The official naming convention is Series 40 and S60.

    Hartti

  3. #3
    Super Contributor
    Join Date
    Dec 2005
    Location
    Europe/Poland/Warsaw
    Posts
    1,699

    Re: JAXP support (JSR-172, Web Services)

    hi all,
    and S80 does not support JSR-172,
    by the way:
    http://discussion.forum.nokia.com/fo...104#post222104

    regards,
    Peter

  4. #4
    Registered User
    Join Date
    May 2006
    Posts
    12

    Re: JAXP support (JSR-172, Web Services)

    Thanks Hartti!

    And so, if my understanding is correct, for Series 40 2nd/3rd Edition devices, the only way to implement a j2me based web services client is to use kSOAP or Wingfoot, right?

    In other words, j2me client stubs generated by my weblogic utilities or Sun's WTK can only be used on the devices that support JSR 172.

    Just wanted to close my train of thought on this.

    k

  5. #5
    Registered User
    Join Date
    May 2006
    Posts
    12

    Re: JAXP support (JSR-172, Web Services)

    I think it says that through an add-on, Series 80 developers can indeed create web services applications, no? Or that is outdated too?

  6. #6
    Super Contributor
    Join Date
    Dec 2005
    Location
    Europe/Poland/Warsaw
    Posts
    1,699

    Re: JAXP support (JSR-172, Web Services)

    hi Karoly,
    as to other ways to implement both,
    here is starting post from netbeans mobility team member about how to write both without using 3rd party lib but with middle-tier bridge:
    http://blogs.sun.com/roller/page/luk...nection_bridge
    (autogenerated code),

    regards,
    Peter

  7. #7
    Nokia Developer Champion
    Join Date
    Apr 2003
    Location
    USA, CA
    Posts
    7,192

    Re: JAXP support (JSR-172, Web Services)

    vanekur, of course XML parsing is just string manipulation, so you can add the functionality to your midlet by including a number of XML processing classes.

    Did this answer your question?

    Hartti

  8. #8
    Registered User
    Join Date
    May 2006
    Posts
    12

    Re: JAXP support (JSR-172, Web Services)

    You're correct about string processing, of course, but in terms of simplifying web services interactions WITHOUT a jaxp implementation, those two were the only ones I could find.

  9. #9
    Registered User
    Join Date
    May 2006
    Posts
    12

    Re: JAXP support (JSR-172, Web Services)

    Hmm, that's interesting looking concept. What do you suppose is behind the phrase 'binary protocol'? And just what exactly is in the middle-tier? A servlet? I've got no audio with the flash demo and I haven't had a chance to play with NetBeans and the Mobility Pack yet.

    Thanks Peter,
    Karoly

  10. #10
    Super Contributor
    Join Date
    Dec 2005
    Location
    Europe/Poland/Warsaw
    Posts
    1,699

    Re: JAXP support (JSR-172, Web Services)

    hi Karoly,

    yes, it creates servlet build upon web service client (client in web tier) and code for mobile client with using only standrad mipd/cldc abilities,
    for example: Amazon ECS sample client generates required servlet and client code,
    snippet from client generated code:
    PHP Code:
    private Object invokeServer(int requestIDObject[] parametersthrows IOException {
            
    HttpConnection connection = (HttpConnectionConnector.openserverURL );
            
    connection.setRequestMethod(HttpConnection.POST);
            
    connection.setRequestProperty("Content-Type""application/octet-stream");
            
    connection.setRequestProperty("Accept""application/octet-stream");
            
            if (
    sessionCookie == null) {
                
    // if this is the first time this client contatcs the server,
                // verify that the version matches
                
    connection.setRequestProperty("version""14-Jul-2006/11:14:52-CEST");
            } else {
                
    connection.setRequestProperty("cookie"sessionCookie);
            }
            
            
    DataOutputStream output connection.openDataOutputStream();
            
            
    writeObject(outputthis);
            
            
    /* Write the byte signifying that only one call
             * is being made.
             */
            
    output.writeShort(/* one call to be made to the server */);
            
            
    output.writeInt(requestID);
            for (
    int i 0parameters.lengthi++ ) {
                
    writeObject(outputparameters[i]);
            }
            
            
    output.close();
            
            
    int response;
            try {
                
    response connection.getResponseCode();
            } catch (
    IOException e) {
                throw new 
    IOException("No response from " serverURL);
            }
            if (
    response != 200) {
                throw new 
    IOException(response " " connection.getResponseMessage());
            }
            
    DataInputStream input connection.openDataInputStream();
            
    String sc connection.getHeaderField("set-cookie");
            if (
    sc != null) {
                
    sessionCookie sc;
            }
            
    short errorCode input.readShort();
            if (
    errorCode != 1) {
                
    // there was a remote exception
                
    throw new IOException((String) readObject(input));
            }
            
            
    Object returnValue readObject(input);
            
            
    input.close();
            
    connection.close();
            return 
    returnValue;
        } 
    PHP Code:
     private void writeObject(DataOutputStream outObject othrows IOException {
            if (
    == this) {
                
    out.writeShort(/* invocation code */);
            } else if (
    == null) {
                
    out.writeShort(-1);
            } else if (
    o.getClass().isArray()) {
                
    out.writeShort(-/* ARRAY TYPE */);
                
    Object[] array = (Object[]) o;
                if (
    instanceof String[]) {
                    
    out.writeShort(/* STRING_TYPE */);
                } else if ( 
    instanceof amazonclient.BrowseNode[]) {
                    
    out.writeShort(27 /* TYPE_amazonclient_BrowseNode */);
                } else if ( 
    instanceof amazonclient.KeyPhrase[]) {
                    
    out.writeShort(28 /* TYPE_amazonclient_KeyPhrase */);
                } else if ( 
    instanceof amazonclient.Track[]) {
                    
    out.writeShort(33 /* TYPE_amazonclient_Track */);
                } else if ( 
    instanceof amazonclient.Details[]) {
                    
    out.writeShort(26 /* TYPE_amazonclient_Details */);
                } else if ( 
    instanceof amazonclient.CustomerReview[]) {
                    
    out.writeShort(30 /* TYPE_amazonclient_CustomerReview */);
                } else if ( 
    instanceof amazonclient.ThirdPartyProductDetails[]) {
                    
    out.writeShort(32 /* TYPE_amazonclient_ThirdPartyProductDetails */);
                }
    .......
    .... 
    I never used it in real-life project (to be fair I'm newbie), but that's just interesting option
    hth,
    regards,
    Peter

Similar Threads

  1. Accessing Web Services through MIDlet
    By divyas in forum Mobile Java Networking & Messaging & Security
    Replies: 3
    Last Post: 2006-06-06, 11:41
  2. Urgent! Unstructured Supplementary Services Data (USSD) and JSR 120
    By tomonok in forum Mobile Java Networking & Messaging & Security
    Replies: 0
    Last Post: 2005-08-05, 12:38
  3. Nokia 7650 support Bluetooth audo?
    By ovjo12 in forum Bluetooth Technology
    Replies: 5
    Last Post: 2003-07-17, 18:50
  4. Replies: 0
    Last Post: 1970-01-01, 02:00

Posting Permissions

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