Thanks Thilina and Paul for your responses.

I removed the Constants.Configuration.ENABLE_MTOM property, from my Axis2 
client accepting MTOM stream from .NET service, and I am able to retrieve the 
contents, and print them at my client.

Not sure if I got anything streamed in this case, but this is the rudimentary 
block of code that seems to print the contents on my client:

                DataHandler dh = contnt.getArtifactData();
                cntntStream = dh.getInputStream();
                
                byte[] myByte= new byte[1];
                System.out.println("Retrieved Content +++:\n");
                while (cntntStream.read(myByte) != -1)
                        System.out.print(new String(myByte));

Is this acceptable mechanism to retrieve MTOM encoded stream in Axis 2 client?

Thanks
Shalab Goel

-----Original Message-----
From: Thilina Gunarathne [mailto:[EMAIL PROTECTED] 
Sent: Saturday, August 04, 2007 3:22 AM
To: axis-user@ws.apache.org; [EMAIL PROTECTED]
Subject: Re: .NET Service with MTOM enabled operation

> How does Axis client make the determination that this is MTOM encoded data
> from server end?
Axis2 data binding code generator figures out that out by looking at
the "aData" element which has the type as base64Binary..

Axis2 can identify MTOM messages as MTOM binary references even
without code generation or without usign WSDL by looking at the
content type and the payload.

> I tried setting ENABLE_MTOM property in my client stub constructor code
> (generated using adb) as follows:
This is needed because .net sends back MTOM only if the request
message is MTOM :(..

Shalab:  I removed the Constants.Configuration.ENABLE_MTOM property, from my 
Axis2 client accepting MTOM stream from .NET service, and I am able to retrieve 
the contents, and print them at my client.



> I get the following SOAP Fault, that the server was unreachable.
When it comes to MTOM Axis2 has proven interoperbility with .net. This
error might be something you will need to explore bit more with your
service setup. Unfortunateyl I do not have much .net knowledge to
figure it out..

thanks,
Thilina

>
>
>
>             <soap:Fault>
>
>                <faultcode>soap:Server</faultcode>
>
>                <faultstring>Server unavailable, please try
> later</faultstring>
>
>
> <faultactor>http://hola5/MyService/Service.asmx</faultactor>
>
>             </soap:Fault>
>
>
>
>
>
> If I remove Constants.Configuration.ENABLE_MTOM property,
> and try to run the client, I see base encoded string in TCPMON, something
> like:
>
>
>
>            <exportResult>
>
>
> <aData>PD94bWwgdmVyc2lvbj0iMS4wIiBlbm......... </aData>
>
>             </exportResult>
>
>


--
Thilina Gunarathne  -  http://www.wso2.com - http://thilinag.blogspot.com

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to