Post a reply

Write your message and submit

Options

Click in the dark area of the image to send your post.

Go back

Topic review (newest first)

gvarga
2011-06-23 16:40:52

Hi all,

Workaround:

I have downloaded the WSO2 Web Services Framework for C from http://wso2.com/products/web-services-framework/c/ and I used the wsclient.exe from tSystem.

http://wso2.org/projects/wsclient

http://wso2.org/library/3362

Best regards,

Gabor Varga

gvarga
2011-06-11 21:38:46

Hi,

I have to create a similar job.

May I ask you to share the routines need to use MTOM?

Thanks in advance!

Gabor Varga

chicks
2010-04-16 22:34:55

Never mind.  This works fine using the MySQL connector, apparently just a M$ thing...

chicks
2010-04-14 23:48:52

BTW, this works fine in Talend if I use a java routine to read the file directly into a byte[] from the file system, just having the problem when trying to do same from a BLOB in a database.  Why?

chicks
2010-04-14 21:31:10

So, I'm able to retrieve a BLOB from a database (M$ Access for test purposes), and send to to an Axis2 web service using MTOM.  Working great, with one issue.  Talend is for some reason doubling the size of the BLOB before sending it.

I've tried retrieving from the DB as a byte[], which doubles in size, and as on Object->byte[], which doubles in size also.  How to prevent it from doubling in size?  It's not like I'm using a string and have the dreaded Unicode conversion issues...  Why is this happening?

Here's the java code in the Advanced Settings tab for the tWebServiceInput , and (hopefully) an image of the job.  As can be seen, the file length that Java sees is twice (approx) what Talend sees.  The length Talend is seeing is correct. 

Edit Those two "length" fields are from the SQL query, not the length that Talend is seeing:  select filename,filedata,len(filedata) as length from files;

Code:

routines.MTOMServicePortType msl = new routines.MTOMSampleLocator().getMTOMSampleSOAP11port_http();

routines.AttachmentType attachmentType = new routines.AttachmentType();
 
routines.Base64Binary data = new routines.Base64Binary(row3.filedata);
System.out.println("File length: " + row3.filedata.length + "\n");

attachmentType.setFileName(row3.filename);
attachmentType.setBinaryData(data);

output_row.status = msl.attachment(attachmentType);

Board footer

Powered by FluxBB