×

Discussion Board

Results 1 to 2 of 2
  1. #1
    Registered User
    Join Date
    Sep 2005
    Posts
    5

    Question buggy "MMS Java Library 1.1" ???

    Dear reader,

    I am working on a JAVA Servlet that delivers MMS to mobiles (using MMS Notification technique).

    So after receiving notification the mobile connects with the Servlet and receives the MMS.

    Basically I am using the sample code "OriginatingApp.java" from "MMS Java Library 1.1" to create and encode the MMS.

    Tomcat is configured well in order to deliver the MIME type "application/vnd.wap.mms-message" and inside the Servlet the ServletOutputStream is set to the same content type.

    Using a browser to surf the Servlet a download dialog occurs. This downloaded MMS is verified and displayed using "Nokia Developer's Suite for MMS Version 1.1" in combination with "Nokia MMSC EAIF emulator".

    But all mobiles I tried (only non Nokia) declined the MMS because of wrong content.

    In order to isolate the problem I tried to deliver "Matrix.mms" (a widely accepted MMS) I found on the net. This MMS isn't accepted by "Nokia MMSC EAIF emulator" but by every mobile I tried (only non Nokia).

    So it seems that I am doing fine with my Tomcat configuration, with my Servlet programming an with my MMS creation and encoding.

    As a result I can only speculate that "MMS Java Library 1.1" is buggy.

    Greetings,
    Marco204

  2. #2
    Registered User
    Join Date
    Sep 2005
    Posts
    5

    Re: buggy "MMS Java Library 1.1" ???

    Code:
      
    public byte[] generate() throws MmsException {
        
        // Variables
        byte[]  encodedMms = null;      
        byte[]  pic1buf    = null;
        
        
        try {
            // MmsException moeglich
            pic1buf = Util.loadFileFromURL( resource.getPic1URL() );
            
            // MMS Library 1.1
            MMMessage msg = new MMMessage();
    
            // Message fuellen
            msg.setMessageType( IMMConstants.MESSAGE_TYPE_M_SEND_REQ );         
            msg.setTransactionId( "0000000066" );
            msg.setVersion( IMMConstants.MMS_VERSION_10 );
            msg.setFrom( "+358990000066/TYPE=PLMN" ); //this.getResource().getSender()
            msg.addToAddress( "+491782666910/TYPE=PLMN" ); //this.getResource().getReceiver()       
            msg.setContentType( IMMConstants.CT_APPLICATION_MULTIPART_MIXED );
            msg.setDate( new Date( System.currentTimeMillis() ) );                      
            msg.setSubject( "This is a nice message!!" ); //resource.getSubject()
            msg.setMessageClass( IMMConstants.MESSAGE_CLASS_PERSONAL );                     
            msg.setPriority( IMMConstants.PRIORITY_LOW );           
            msg.setDeliveryReport( false );
            msg.setReadReply( false );
    
            // Part 1 ist nur Text
            MMContent part1 = new MMContent();
            byte[] buf1 = { 80, 65, 80, 65};    // PAPA
            part1.setContent( buf1, 0, buf1.length );
            part1.setContentId( "<0>" );
            part1.setType( IMMConstants.CT_TEXT_PLAIN );
            msg.addContent( part1 );            
                                    
            // encoden
            MMEncoder encoder = new MMEncoder();
            encoder.setMessage( msg );
            
            //EncoderException moeglich
            encoder.encodeMessage();
            encodedMms = encoder.getMessage();
    
            return( encodedMms );           
        }
        catch( MMEncoderException e ) {
            log.error( e );
            throw new MmsException( "Fehler beim Encodieren der MMS." );
        }               
    }//generate

Similar Threads

  1. need information about j2me polish
    By rathikathangaraj in forum Mobile Java General
    Replies: 4
    Last Post: 2007-12-19, 09:01
  2. Can’t launch application on 6630
    By kaffemannen in forum Symbian
    Replies: 8
    Last Post: 2005-06-29, 10:49
  3. can't open Nokia MMS Java Library
    By barnsley in forum General Messaging
    Replies: 3
    Last Post: 2004-08-28, 05:44
  4. MMS Java Library 1.1 and utf-8
    By MYL115 in forum General Messaging
    Replies: 0
    Last Post: 1970-01-01, 02:00
  5. Nokia MMS Java Library
    By walterzcm in forum General Messaging
    Replies: 1
    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
  •  
×