• Post Reply Bookmark Topic Watch Topic
  • New Topic

JAX-RPC issue  RSS feed

Ranch Hand
Posts: 264
Eclipse IDE Java Spring
  • Mark post as helpful
  • send pies
  • 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)

<from>US BANK</from>
<text>Your cheque has been ...</text>
<audio> ...</audio>

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

You have to be odd to be #1 - Seuss. An odd little ad:
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!