views:

32

answers:

1

I have a C# WCF basicHttpBinding Streaming WebService.

The signature of the method that I want to access is:

[OperationContract]
    void SendStream(Stream stream);

However, when I try to add it as a standard Java Web Service Client into my Netbeans project. The auto-generated proxy method signature gets changed to:

void SendStream(byte[] stream)

(Basically streaming is removed).

Is there a simple way to achieve streaming on the java side? I would rather avoid implementing chunking if possible.

+1  A: 

WCF streaming over HTTP is not interoperable. You can't use it outside of .NET world.

Edit: Here I'm trying to collect not interoperable features of WCF.

Ladislav Mrnka
In that case, is chunking the best alternative ? (i.e. sending the file in smaller chunks using multiple service calls) In my case I'm expecting sending up to 100megs at a time.
vicjugador
Yes. You need some chunking mechanism. You can also try to use MTOM for your chunks.
Ladislav Mrnka
To simplify to code, should I bother considering simply sending everything out once (without chunking)?
vicjugador
100+ MB? No, it is not good idea.
Ladislav Mrnka