Dan, I tested today and it works great!
Thanks, A.J. On 4/22/06 8:45 AM, "Dan Diephouse" <[EMAIL PROTECTED]> wrote: > So I did a lot of investigating into MTOM yesterday. Seems there was a > bug or two as you're finding out. I've uploaded a new snapshot and I > think it fixes the bug that you run into. If you could test it out it'd > be much appreciated. > > http://xfire.codehaus.org/Download > > Cheers, > - Dan > > Andrew Wright wrote: >> Dan, >> >> I have set mtom-enabled = true on the client and server. >> >> >> I am now receiving this error: >> >> Apr 21, 2006 11:01:28 AM >> org.codehaus.xfire.transport.http.CommonsHttpMessageSender getInMessage >> SEVERE: javax.mail.internet.ParseException >> >> org.codehaus.xfire.XFireRuntimeException: Could not invoke service.. Nested >> exception is org.codehaus.xfire.fault.XFireFault: Couldn't send message. >> org.codehaus.xfire.fault.XFireFault: Couldn't send message. >> at org.codehaus.xfire.fault.XFireFault.createFault(XFireFault.java:89) >> at >> org.codehaus.xfire.handler.OutMessageSender.invoke(OutMessageSender.java:30) >> at >> org.codehaus.xfire.handler.HandlerPipeline.invoke(HandlerPipeline.java:98) >> at org.codehaus.xfire.client.Client.invoke(Client.java:359) >> at >> org.codehaus.xfire.client.XFireProxy.handleRequest(XFireProxy.java:77) >> at org.codehaus.xfire.client.XFireProxy.invoke(XFireProxy.java:57) >> at $Proxy0.getAttachment(Unknown Source) >> at >> com.jivesoftware.forum.webservices.AttachmentServiceTest.testgetAttachment(A >> ttachmentServiceTest.java:25) >> at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) >> at >> sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39 >> ) >> at >> sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl >> .java:25) >> at >> com.intellij.rt.execution.junit2.JUnitStarter.main(JUnitStarter.java:32) >> Caused by: org.codehaus.xfire.XFireException: Couldn't send message. >> at >> org.codehaus.xfire.transport.http.HttpChannel.sendViaClient(HttpChannel.java >> :178) >> at >> org.codehaus.xfire.transport.http.HttpChannel.send(HttpChannel.java:66) >> at >> org.codehaus.xfire.handler.OutMessageSender.invoke(OutMessageSender.java:26) >> ... 24 more >> Caused by: java.io.IOException >> at >> org.codehaus.xfire.transport.http.CommonsHttpMessageSender.getInMessage(Comm >> onsHttpMessageSender.java:234) >> at >> org.codehaus.xfire.transport.http.HttpChannel.sendViaClient(HttpChannel.java >> :171) >> ... 26 more >> >> >> >> Here is the dump of the request and response: >> >> POST /services/AttachmentService HTTP/1.1 >> >> SOAPAction: "" >> >> Content-Type: multipart/related; type="application/xop+xml"; >> start="<[EMAIL PROTECTED]>"; start-info="null; charset=utf-8"; >> >> .boundary="----=_Part_0_15152280.1145642488166" >> >> User-Agent: Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.0; XFire Client >> +http://xfire.codehaus.org) >> >> Host: localhost:8080 >> >> Expect: 100-continue >> >> Content-Length: 1388 >> >> >> >> HTTP/1.1 100 Continue >> >> >> >> >> >> ------=_Part_0_15152280.1145642488166 >> >> Content-Type: application/xop+xml; charset=UTF-8; type="text/xml; >> charset=UTF-8" >> >> Content-Transfer-Encoding: binary >> >> Content-ID: <[EMAIL PROTECTED]> >> >> >> >> <?xml version='1.0' encoding='UTF-8'?><soap:Envelope >> xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/" >> xmlns:xsd="http://www.w3.org/2001/XMLSchema" >> xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"> >> <soap:Header> >> <wsse:Security soap:mustUnderstand="1" >> xmlns:wsse="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecuri >> ty-secext-1.0.xsd"><wsse:UsernameToken wsu:Id="UsernameToken-16031375" >> xmlns:wsse="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecuri >> ty-secext-1.0.xsd" >> xmlns:wsu="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurit >> y-utility-1.0.xsd"><wsse:Username >> xmlns:wsse="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecuri >> ty-secext-1.0.xsd">admin</wsse:Username><wsse:Password >> Type="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-username-token >> -profile-1.0#PasswordText" >> xmlns:wsse="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecuri >> ty-secext-1.0.xsd">admin</wsse:Password></wsse:UsernameToken></wsse:Security >> >>> </soap:Header><soap:Body><getAttachment >>> >> xmlns="http://jivesoftware.com/webservices/"><in0>16</in0></getAttachment></ >> soap:Body></soap:Envelope> >> >> ------=_Part_0_15152280.1145642488166-- >> >> HTTP/1.1 200 OK >> >> Server: Apache-Coyote/1.1 >> >> Set-Cookie: JSESSIONID=29A65D45DE774A6ABB882AD83DEC9A38; Path=/ >> >> Content-Type: multipart/related; type="application/xop+xml"; >> start="<[EMAIL PROTECTED]>"; start-info="null; >> .boundary="----=_Part_2_13557902.1145642488523";charset=utf-8 >> >> Transfer-Encoding: chunked >> >> Date: Fri, 21 Apr 2006 18:01:28 GMT >> >> >> >> 31a >> >> >> >> ------=_Part_2_13557902.1145642488523 >> >> Content-Type: application/xop+xml; charset=UTF-8; type="text/xml; >> charset=UTF-8" >> >> Content-Transfer-Encoding: binary >> >> Content-ID: <[EMAIL PROTECTED]> >> >> >> >> <?xml version='1.0' encoding='UTF-8'?><soap:Envelope >> xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/" >> xmlns:xsd="http://www.w3.org/2001/XMLSchema" >> xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"><soap:Body><getAttachm >> entResponse xmlns="http://jivesoftware.com/webservices/"><out >> xmlns="http://jivesoftware.com/webservices/" >> xmlns:ns1="http://www.w3.org/2004/11/xmlmime" >> ns1:mimeType="image/png"><Include >> xmlns="http://www.w3.org/2004/08/xop/include" >> href="cid:114564248852321144857942@http://www.w3.org/2001/XMLSchema" >> /></out></getAttachmentResponse></soap:Body></soap:Envelope> >> >> 9d2 >> >> >> >> ------=_Part_2_13557902.1145642488523 >> >> Content-Type: image/png >> >> Content-Transfer-Encoding: binary >> >> Content-ID: <[EMAIL PROTECTED]://www.w3.org/2001/XMLSchema> >> >> >> >> .PNG >> >> . >> ... >> IHDR...2...2.....).x.....PLTE... >> ...........pqq...KLK...P.......r.......iT...[:3...yQC............Z[Zeff...88 >> 7........................................................................... >> ............................................................................ >> ............................................................................ >> ............................................................................ >> ............................................................................ >> ............................................................................ >> ............................................................................ >> ............................................................................ >> ............................................................................ >> .....U......IDATx.mV[....n......{....7&UyI.rRIj..9.}.......W|.q. >> ".e<...........BK..~...&.".X.....}..g.D.I...........}.^.>..G.>..pLfub...G#.+ >> .+......-.b..2.A.......|... >> .E.y.F . >> /....I.....!w...}w....!.....s.F..vy...d.}?...9GAW0.;....Tl.jL....;....fo[../ >> ..<....1`.??..YAj..%9y....1`6q...^..7....S.~.....R.K.pO...z..F..]*.R_m....Rn >> {^.|N..3..j.?..nb.....m.._.t.f........,. ."..-.l>....(..p... >> !.."........F............#..XQj*......7A..F.....a.3...(..E..z >> .4D....Sc....".#.1.B..E.2.P....;..l5....7...1.].N..f..*h...c.Q.*..N.U.H.+,.. >> [EMAIL PROTECTED]|_...M.......;....E.k..F......l....r........(.d._N...S. >> .n..3/,ULxtiP..I~.76O.DP....p.z=.S,....v..w.....7..v'.#......C....d}.{b..A.. >> Z.V.3{M..._..`.......s.K.n...!..T.M..)eO..(...XZ%{.}.LFWH*.A.1n...V.J...Y... >> S...96..Id..t..:H..FG..j...9..$...n.......Jz.a.|..[.....g..F.b.....$......x) >> ....u7.T....J.A.........;.GOv...Z..].....OB.=.......p...*.b../b5.mh6.{..5... >> .............u..........0+..T.z...b............:...r.Q..1.h.g.22<4..;..y... >> .....-gP.....I...N.....w.....|..q......u...o..T.v.#6{.n).U,.......e....P...) >> .5..\u>~..Uk;.PP.If.4OR...m.._..*U....z.g.Y.^(.. >> *.Y.8.?.!K..r.2U.......mYZ...<.pZ....m....p]:...Fk=....>....F..mNv]..I...R^> >> .K{k.(4y.........R...... >> '.6..]...b.Bv.8'.W.K....E.I.*.4..V..........."... >> ..pM.................y#.ta.t:.q-..8..".z...E./...W.....M...y...u.O.....M..x. >> ...:_.Xx..".V.d.t.(.4... >> .......j.:...... >> ..I.L7.....s....$W.-.G.N.Wo.K..~..E.V..^....*7./.......b...z..c...<.a.2.8s.^ >> .9j.lx...Q.t..o.EhT....W.^...<0..... >> s%.:....Hq..So.!~.../T.w.#.n.....IEND.B`. >> >> 2b >> >> >> >> ------=_Part_2_13557902.1145642488523-- >> >> >> >> 0 >> >> >> >> >> >> >> >> On 4/21/06 7:59 AM, "Dan Diephouse" <[EMAIL PROTECTED]> wrote: >> >> >>> Have you set the mtom-enabled property to true on your Client and >>> Server? See: >>> >>> http://xfire.codehaus.org/MTOM >>> >>> BTW, there is a problem with 1.1 beta and handling large attachments. >>> We're getting it fixed right now and it'll work for 1.1. >>> >>> - Dan >>> >>> Andrew Wright wrote: >>> >>>> Hi, >>>> >>>> I am getting the following error on the client side when try to get an >>>> attachment: >>>> >>>> >>>> org.codehaus.xfire.XFireRuntimeException: Could not invoke service.. Nested >>>> exception is org.codehaus.xfire.fault.XFireFault: Could not find the >>>> attachment cid:114557797500941910934512@http://www.w3.org/2001/XMLSchema >>>> org.codehaus.xfire.fault.XFireFault: Could not find the attachment >>>> cid:114557797500941910934512@http://www.w3.org/2001/XMLSchema >>>> at >>>> org.codehaus.xfire.aegis.type.mtom.AbstractXOPType.readInclude(AbstractXOPT>>>> y >>>> pe.java:62) >>>> at >>>> org.codehaus.xfire.aegis.type.mtom.AbstractXOPType.readObject(AbstractXOPTy>>>> p >>>> e.java:45) >>>> at >>>> org.codehaus.xfire.aegis.AegisBindingProvider.readParameter(AegisBindingPro>>>> v >>>> ider.java:91) >>>> at >>>> org.codehaus.xfire.service.binding.AbstractBinding.read(AbstractBinding.jav>>>> a >>>> :175) >>>> at >>>> org.codehaus.xfire.service.binding.WrappedBinding.readMessage(WrappedBindin>>>> g >>>> .java:50) >>>> at >>>> org.codehaus.xfire.soap.handler.SoapBodyHandler.invoke(SoapBodyHandler.java>>>> : >>>> 42) >>>> at >>>> org.codehaus.xfire.handler.HandlerPipeline.invoke(HandlerPipeline.java:98) >>>> at org.codehaus.xfire.client.Client.onReceive(Client.java:448) >>>> at >>>> org.codehaus.xfire.transport.http.HttpChannel.sendViaClient(HttpChannel.jav>>>> a >>>> :173) >>>> at >>>> org.codehaus.xfire.transport.http.HttpChannel.send(HttpChannel.java:66) >>>> at >>>> org.codehaus.xfire.handler.OutMessageSender.invoke(OutMessageSender.java:26>>>> ) >>>> at >>>> org.codehaus.xfire.handler.HandlerPipeline.invoke(HandlerPipeline.java:98) >>>> at org.codehaus.xfire.client.Client.invoke(Client.java:359) >>>> at >>>> org.codehaus.xfire.client.XFireProxy.handleRequest(XFireProxy.java:77) >>>> at org.codehaus.xfire.client.XFireProxy.invoke(XFireProxy.java:57) >>>> at $Proxy0.getAttachment(Unknown Source) >>>> at >>>> com.jivesoftware.forum.webservices.AttachmentServiceTest.testgetAttachment(>>>> A >>>> ttachmentServiceTest.java:25) >>>> at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) >>>> at >>>> sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:3>>>> 9 >>>> ) >>>> at >>>> sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImp>>>> l >>>> .java:25) >>>> at >>>> com.intellij.rt.execution.junit2.JUnitStarter.main(JUnitStarter.java:32) >>>> >>>> My client is making the following xml request: >>>> >>>> <?xml version='1.0' encoding='UTF-8'?> >>>> <soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/" >>>> xmlns:xsd="http://www.w3.org/2001/XMLSchema" >>>> xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"> >>>> <soap:Header> >>>> <wsse:Security soap:mustUnderstand="1" >>>> >>>> xmlns:wsse="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecur>>>> i >>>> ty-secext-1.0.xsd"> >>>> <wsse:UsernameToken wsu:Id="UsernameToken-16031375" >>>> >>>> xmlns:wsse="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecur>>>> i >>>> ty-secext-1.0.xsd" >>>> >>>> xmlns:wsu="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecuri>>>> t >>>> y-utility-1.0.xsd"> >>>> <wsse:Username >>>> >>>> xmlns:wsse="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecur>>>> i >>>> ty-secext-1.0.xsd" >>>> >>>>> admin</wsse:Username> >>>>> >>>> <wsse:Password >>>> >>>> Type="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-username-toke>>>> n >>>> -profile-1.0#PasswordText" >>>> >>>> xmlns:wsse="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecur>>>> i >>>> ty-secext-1.0.xsd" >>>> >>>>> admin</wsse:Password> >>>>> >>>> </wsse:UsernameToken> >>>> </wsse:Security> >>>> </soap:Header> >>>> <soap:Body> >>>> <getAttachment xmlns="http://jivesoftware.com/webservices/"> >>>> <in0>13</in0> >>>> </getAttachment> >>>> </soap:Body> >>>> </soap:Envelope> >>>> >>>> I am getting this response from my server: >>>> >>>> <?xml version='1.0' encoding='UTF-8'?> >>>> <soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/" >>>> xmlns:xsd="http://www.w3.org/2001/XMLSchema" >>>> xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"> >>>> <soap:Body> >>>> <getAttachmentResponse >>>> xmlns="http://jivesoftware.com/webservices/"> >>>> <out xmlns="http://jivesoftware.com/webservices/" >>>> xmlns:ns1="http://www.w3.org/2004/11/xmlmime" >>>> ns1:mimeType="application/octet-stream"> >>>> <Include xmlns="http://www.w3.org/2004/08/xop/include" >>>> >>>> href="cid:11455779417623-116595464@http://www.w3.org/2001/XMLSchema"/> >>>> </out> >>>> </getAttachmentResponse> >>>> </soap:Body> >>>> </soap:Envelope> >>>> >>>> >>>> Thanks in advance, >>>> Andrew >>>> >>>> >>>> >>>> >>>> >>>> >> >> >
