• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

JAX-RPC issue

 
Ranch Hand
Posts: 264
Eclipse IDE Spring Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I am working on a Mobile Framework. The overall idea about framework is that a bank send data of cheque to Java Web Service which will further create MMS (by use of Nokia's MMS Java Libraray). The BANK will send a .NET request to Java Web Service. The request will be done by calling a method implemented by Java Web Service (JAX RPC implementation).
The method is declared like

sendMMS(String to, String from, String subject, String TextMessage, byte[] img, String imagename, byte[] audio, String audioname)

to is mobile no of customer
from (name of bank)
subject: some subject
textmessage about MMS
img : byte array containing image data of cheque
audio : audio byte array data
imagename and audioname are the names of files.

Now we know JAX RPC calls finally internally create SOAP message.

My question is that in case we want to send more than one image audio files and related text to that image, mean i want to make it generic not specific to on image,audio and text. I have two ideas

1. I can add second image data in same byte array (byte[] img) by adding some space in array
2. I can take array of bytes array
byte img[][]= new byte[n][];
this is for n images, so img[0][0] = new byte[size of image data]...

In this way i can take array of byte array of audio and one dim array for storing corresponding text

sendMMS(String to, String from, String subject, String TextMessage[], byte[][] img, String imagename[], byte[][] audio, String[] audioname)

3. The third one is that instead of passing all parameters, first i create a xml document
and pass that document like

sendMMS(Document d)

<sendMMS>
<to>9810291222</to>
<from>US BANK</from>
<data>
<text>Your cheque has been ...</text>
<image>...</image>
<imagename>...</imagename>
<audio> ...</audio>
<auidoname>...</audioname>
</data>
<data>
-------
----
</data>
</sendMMS>

So please suggest me which way is right, or provide me some better alternative.

Sincerely
Pawan
 
reply
    Bookmark Topic Watch Topic
  • New Topic