My understanding is that the XMLBeans binding doesn't not support MTOM, which is why you aren't having any success. Try ADB, or creating the OMElement by hand.
Paul On 1/26/07, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote:
Hi, earlier Charles wrote this message for me, since i subscribe to this mailing list. I changed my first sample to be full "MTOM Databinding using XMLBeans", and then the attachement still remains in the SOAPBody of the request message. Moreover, this exception occurs : "SEVERE : http-9000-Processor23 : Logger.logp : Exception occurred while trying to invoke service method sendFichier org.apache.axis2.AxisFault: presto.service.xsd.SendFichierDocument; nested exception is: java.lang.InstantiationException: presto.service.xsd.SendFichierDocument" The source data file is binded as base64Binary type in my WSDL file. I do not use OMElement API to create the attachement, i use the one generated with wsdl2java tool from my wsdl file. The MTOM module is engaged : - on the server side by adding this line, <parameter locked="false" name= "enableMTOM">true</parameter>, in my service.xml file under my operation description. - on the client side like you explain me in your response I join a zip file with : - stacktrace.log : the logged exception - BoService.wsdl : my WSDL file - BoServiceXMLBTest.java : my client side code hope this help. Thanks, Fred. (See attached file: axis2-test.zip) ----- Message de "Paul Fremantle" <[EMAIL PROTECTED]> sur Fri, 26 Jan 2007 09:10:11 +0000 ----- Pour : [email protected], [EMAIL PROTECTED] Objet Re: XOP activation : Hi Charles Is the attachment appearing as a Base64 encoded element inside the body? Basically once you have MTOM enabled, the actual "optimization" of a particular element is based on how you create the node. If you are using the OMElement API to create the attachment then you will be using one of the APIs like: OMText text = factory.createText(dataHandler, booleanOptimize); if you set booleanOptimize=true then the data will be XOP-included and set as pure binary in a MIME attachment. If this isn't working, check if you have enabled MTOM in axis2.xml: <parameter name="enableMTOM" locked="false">true</parameter> If you are using a client with no axis2.xml, then you need to make sure it is enabled like this: serviceClient.getOptions.setProperty(Constants.Configuration.ENABLE_MTOM, Constants.VALUE_TRUE); Here is the guide: http://ws.apache.org/axis2/1_1/mtom-guide.html Paul On 1/26/07, Charles Souillard <[EMAIL PROTECTED]> wrote: > Hi all, > > I am a newbie on Axis2. I have created an example using MTOM which runs > successfully. My problem is the attachment is included in the soapBody. > I know that xop allows to put the attachment outside of the SOAP > enveloppe (is that correct ?). > > Can you explain me how I can activate xop in my example ? Is there a > property to set on the client side ? server side ? > > Thanks for your help. > > Regards > Charles > > --------------------------------------------------------------------- > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > > -- Paul Fremantle VP/Technology, WSO2 and OASIS WS-RX TC Co-chair http://bloglines.com/blog/paulfremantle [EMAIL PROTECTED] "Oxygenating the Web Service Platform", www.wso2.com --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
-- Paul Fremantle VP/Technology, WSO2 and OASIS WS-RX TC Co-chair http://bloglines.com/blog/paulfremantle [EMAIL PROTECTED] "Oxygenating the Web Service Platform", www.wso2.com --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
