Hi,
See my comments in line.

 
On 7/6/06, Tech Savvy <[EMAIL PROTECTED]> wrote:
Thilina,

Thanks for your reply. What I am trying to do, is to test the MTOM technology with AXIS2. I have successfully run the MTOM example come with AXIS2. However, since the sample is tied to the OMElement APIs, and there's no WSDL generated, I can't prove that a .net client can access the web service with its MTOM implementation. Is there a way to do such a test?

 
Unfortunately writing a WSDL for the sample is still in my to do list :(.. I'll do it soon.
I have done something similar to your requirement during a Interop tutorial. Best is to get a WSDL with MTOM binding (may be from .net) and generate a service from that. I recommend you to use ADB.
 
But it's bit outdated now.
 
The approach I was thinking is to develop a web service with POJO so a WSDL is generate, and I can use it in a .net framework to generate a client, and enable MTOM when making the call...can this be done?
 
I'm not sure.. Ideal scenerio is to generate an MTOM binding if a DataHandler is found on the method signature...
Deepal, Ajith,
is this possible.

On the OMText side, since the WebService will receive a String regardless OTOM is enabled or not, should there be a API call to detected wether the text is a Base64 encoded string?
 
It'lll be better if we can have. But it's not trivial...

Here's my senario: on my client side I send a OMText to the web serivce. If the OMText is built using a handler, it will be Based64 encoded thus I need to decode it manually to get the original content; if the OMText is a plain "Hello, World", it wont' be encoded. However on the webservice side, it always received a OMText. Now comes the hard part: how do I know if I need to decode the text or not?
 
You needs to be aware of the schema. If it says base64 then you have to do it. In a web service the interface needs to be properly defined. If it is defined to take in binary, then you can manually set the setBinary(true) for that OMText and get the dataHandler. If it is defined to take in text, then treat them as text.
 
Thanks,
~Thilina


Thanks.

Sunny *



On 7/5/06, Thilina Gunarathne <[EMAIL PROTECTED] > wrote:
See my comments inline..

On 7/6/06, Tech Savvy < [EMAIL PROTECTED] > wrote:
Hi,

Have two question regarding to MTOM:

1. The sample in the guide is using AXIS2 api to code the webservice and client, e.g. OMElements. In such case a wsdl is not present so this is tied to AXIS2, i.e . a .NET client can't access the service. Is there a way to code the webservice use POJO (i.e. RPC style webservice), then generate the client stub to call it, and still be able to enable MTOM?
 
I'm not sure about this..

2. In the webservice, how do I detect whether a OMText is Base64 encoded?
 
If it is in a message you receive then you will not be able to detect it without knowing the schema. If you created it using some binary or by explicitly specifying that it is base64 then the OMText.isBinay() will return true.
 
~Thilina





--
"May the SourcE be with u"            
http://webservices.apache.org/~thilina/
http://thilinag.blogspot.com/                 http://www.bloglines.com/blog/Thilina               

Reply via email to