It works. The package of SOAPBinding was wrong.

Thanks a lot.

Nuka



Freeman Fang-2 wrote:
> 
> Hi Nuka,
> 
> What's the package name of your SOAPBinding? It should be 
> javax.xml.ws.soap.SOAPBinding, would you please check it?
> 
> Regards
> 
> Freeman
> 
> nuka wrote:
>> Client code:
>>
>>      public static void main(String args[]) throws Exception
>>      {
>>
>>              URL wsdlURL = new URL(endPoint);
>>              KGenericWSMoleculeNamer ss = new 
>> KGenericWSMoleculeNamer(wsdlURL,
>> SERVICE_NAME);
>>              
>>              KGenericWSMoleculeNamerPortType port =
>> ss.getKGenericWSMoleculeNamerSOAP12Port();
>>
>>
>> I've tried to do something like this:
>>
>> Binding binding = ((BindingProvider)port).getBinding(); 
>> ((SOAPBinding)binding).setMTOMEnabled(true); 
>>
>> in order to configure the client to support MTOM but I got a message
>> saying
>> that the method setMTOMEnabled is undefined for SOAPBinding. 
>>
>>              
>>
>>
>>
>>
>> nuka wrote:
>>   
>>> Hello,
>>>
>>> I have some problems when enabling MTOM for CXF generated client. 
>>> I've made the configuration for MTOM as suggested in the user guide for
>>> both client and server side.
>>>
>>> - jaxws endpoint configuration for MTOM (beans.xml)
>>> - MIMEType annotation application/octet-stream for the binary data
>>>
>>>
>>> The server is ok, its responses support MTOM. But the client requests
>>> are
>>> not MTOM based. The binary data is embedded in the SOAP body.
>>>
>>> I believe I've missed something on the client side configuration but I
>>> don't know what. 
>>>
>>> Thanks in advance
>>> Nuka  
>>>
>>>  
>>>
>>>     
>>
>>   
> 
> 

-- 
View this message in context: 
http://www.nabble.com/enable-MTOM-client-tf4300910.html#a12251099
Sent from the cxf-user mailing list archive at Nabble.com.

Reply via email to