Uploading video using the SOAP interface

I have written an application to upload images using the SOAP interface and that has been working. I recently added code to upload video using the SOAP interface and cannot get that to work. All I am getting back from the server is “java.lang.NullPointerException” and there is nothing getting written to the logs on the server. Is there a way I can get some more information out of the server about what I am missing or doing wrong? Thanks in advance for any insight you can provide.

I think you need to give us a little more detail.
What sort of client program are you using? Can you include some code fragments to illustrate the process.

Are you attempting to include the binary directly in a the item, or just a link to the item?

I’ve done this successfully with both binary and non-binary files, so I’m pretty sure we can help you out, but we need some more context.

Dave

Thanks for the response.

The client program is a standalone Java application and I have included a file that contains a snippet of code that I am using to upload images and video. The image uploads have been working, with the caveat that we are occasionally seeing “Read Timeout” messages.

The code is based on the java_rx_import sample code that was included in the release and uses PSWsUtils from that sample code. When I call PSWsUtils.createItem() I am passing in “lsaImage” for images and "lsaFile for video. When I originally wrote the video code, I figured that I needed to replace the “img1_*” names which I saw were defined in rxs_ct_sharedimage with the corresponding names that were in rxs_ct_sharedbinary. When I did this I started getting error messages saying that “item” was not a valid field name for the type of content I was uploading (lsaFile), so I dumped the field names associated with images and those associated with files and tried using the “file” field names instead of the names form rxs_ct_sharedbinary. You can see the field names that were returned as comments in the method body.

Thanks.

I don’t know if this is your problem, but I’ve never been able to make this work with a URLDataSource. Try the FileDataSource instead.

Also, you say you get an NPE… can you tell me where the NPE happens?

Dave

I tried using FileDataSource instead of URLDataSource, but I am still getting NPE’s. I can’t give you any infor on where the NPE’s are happening because all that is getting sent back is “java.lang.NullPointerException”, nothing else, not even a stack trace. I also cannot find anything in the server log files.

Also, the timeout issue I mentioned in the first post has become much worse. For the last two days I have been getting timeouts trying to upload an image that I have uploaded dozens of times before. I used a network sniffer and I can see the data being sent by the client and being ack’ed by the server, but after the last packet is sent, the server waits for about 30 seconds and then sends a message back to the client stating that a timeout has occurred while reading input from the client. I’ve attached the output from tcpdump in case you want to see it.