Hi Daniel

So that fixed part of my issue, but not sure if it brought me steps forward or 
back.

So now when I add the swa bindings to the WSDL and regenerate, I do see a data 
handler argument now instead of a byte[] argument, however now the outgoing 
soap requests have the binary content in the attachment field instead of 
streamed as a second multipart attribute.  The hope was to remove that 
attachment field from the outgoing soap request and see the content of the 
attachment as a second multipart.

I did verify all mtom settings were disabled when rerunning it.

Thanks,

John

On 2019/04/01 16:42:53, Daniel Kulp <dk...@apache.org> wrote: 
> 
> I think you are confusing a couple of specs…..    MTOM and Soap W/ 
> Attachments are actually two separate specs and are handled differently.   
> 
> For SwA, you wouldn’t turn on MTOM.   CXF should be able to look in the WSDL 
> and as long as mime things are properly and completely defined in the WSDL, 
> it should use that.   However, it also requires you to run the wsdl2java 
> stuff a bit differently as you need a binding file that turns on the 
> “enableMIMEContent” capabilities.    
> 
> If you look in our repo in the testutils/src/main/resources/wsdl directory, 
> there is a swa-mime-binding.xml binding file that would go along with the 
> swa-mime.wsdl file.   Use that as the starting point to re-generate the 
> interfaces and see if that changes anything.     If you want to dig into the 
> code that tests things, that would be 
> systests/jaxws/src/test/java/org/apache/cxf/systest/swa/ClientServerSwaTest.java.
> 
> Dan
> 
> 
> 
> > On Mar 29, 2019, at 2:37 PM, John D. Ament <johndam...@apache.org> wrote:
> > 
> > Hi,
> > 
> > I'm looking to integrate with an existing webservice that uses attachments
> > for its handling of binary content.  I've enabled mtom on my client.  I've
> > tested the service using SoapUI and I can see that it properly handles the
> > attachment when using the attachment option in SoapUI.
> > 
> > When I try to replicate this request in CXF, it fails.  But I notice the
> > call CXF makes is vastly different than the one I see in SoapUI.  For
> > instance, CXF adds the attachment object as an element in the SOAP call,
> > but SoapUI does not.
> > 
> > The WSDL has 2 parts to it, one with the request xml and a second wsdl:part
> > with name attachment and type xs:base64Binary.  I can see the mime related
> > parts for the attachment object being set to application/octet-stream.
> > 
> > I'm wondering if there's something special I have to do to enable this
> > service to work from the client perspective?
> > 
> > Thanks,
> > 
> > John
> 
> -- 
> Daniel Kulp
> dk...@apache.org <mailto:dk...@apache.org> - http://dankulp.com/blog 
> <http://dankulp.com/blog>
> Talend Community Coder - http://talend.com <http://coders.talend.com/>
> 

Reply via email to