On Wednesday, March 07, 2012 02:25:51 PM Rahul Somasunderam wrote:
> Dan,
> 
> Thanks for replying. I tried your solution and see this:
> 
> 
> 2012-03-07 14:17:51,174 [bio-8080-exec-8] INFO 
> terceptor.LoggingInInterceptor  - Inbound Message
> ----------------------------
> ID: 1
> Address: /healthdock/services/xdsRepositoryB
> Encoding: UTF-8
> Content-Type: multipart/related;
> boundary="MIMEBoundary_8da5e499407a04fc30996bfd2404eb52dc0ebe267b6af695";
> type="application/xop+xml";
> start="<0.9da5e499407a04fc30996bfd2404eb52dc0ebe267b6af...@apache.org>";
> start-info="application/soap+xml";
> action="urn:ihe:iti:2007:ProvideAndRegisterDocumentSet-b" Headers:
> {content-type=[multipart/related;
> boundary="MIMEBoundary_8da5e499407a04fc30996bfd2404eb52dc0ebe267b6af695";
> type="application/xop+xml";
> start="<0.9da5e499407a04fc30996bfd2404eb52dc0ebe267b6af...@apache.org>";
> start-info="application/soap+xml";
> action="urn:ihe:iti:2007:ProvideAndRegisterDocumentSet-b"],
> host=[10.1.128.72:8080], transfer-encoding=[chunked], user-agent=[Axis2],
> Content-Type=[multipart/related;
> boundary="MIMEBoundary_8da5e499407a04fc30996bfd2404eb52dc0ebe267b6af695";
> type="application/xop+xml";
> start="<0.9da5e499407a04fc30996bfd2404eb52dc0ebe267b6af...@apache.org>";
> start-info="application/soap+xml";
> action="urn:ihe:iti:2007:ProvideAndRegisterDocumentSet-b"]}
> --------------------------------------
> 
> I don't see the request being printed.
> 
> Should I be looking for something else?

That likely means that the Grails filter or something is consuming the 
InputStream.   Honestly, not sure what to suggest.   That's something more 
likely for the Grails community.

Dan


> 
> R,
> rahul
> 
> On Mar 7, 2012, at 1:47 PM, Daniel Kulp wrote:
> > This is in the AttachmentInInterceptor which is VERY VERY early in the
> > chain.   Very little has gone on at that point from a CXF side.   Thus,
> > it looks like grails is still doing something funky with the input
> > stream before CXF is getting it.   That's the area you may need to look
> > at.
> > 
> > You can try registering the LoggingInInterceptor before the
> > AttachmentInInterceptor and seeing what it sees.   It's a little tricky
> > to do.  In spring, I think its:
> > 
> > <bean class="....LoggingInInterceptor">
> > 
> >    <property name="before">
> >    
> >         <list>
> >         
> >             <value>org.apache.cxf.interceptor.AttachmentInInterceptor</v
> >             alue>
> >          
> >          </list>
> >     
> >     </property>
> > 
> > </bean>
> > 
> > 
> > 
> > Dan
> > 
> > On Wednesday, March 07, 2012 01:00:49 PM Rahul Somasunderam wrote:
> >> I'm trying to create an endpoint using Grails + CXF. There is a WSDL
> >> that
> >> is provided by a standards body, and I have to use that as the contract
> >> for the web service. When I use JAXB to codegen from the WSDL, I get a
> >> class that looks like this:
> >> 
> >> public class ProvideAndRegisterDocumentSetRequestType {
> >> 
> >>    ...
> >>    protected List<ProvideAndRegisterDocumentSetRequestType.Document>
> >> 
> >> document;
> >> 
> >>    public static class Document {
> >>    
> >>        @XmlValue
> >>        protected byte[] value;
> >>        
> >>        @XmlAttribute(name = "id", required = true)
> >>        @XmlSchemaType(name = "anyURI")
> >>        protected String id;
> >>        
> >>        ...
> >>    
> >>    }
> >>    ...
> >> 
> >> }
> >> 
> >> Now this document is what gets attached as a mime part.
> >> When I implemented this in a java project, it worked just fine. However
> >> when I started implementing this in a grails project I started getting
> >> an
> >> exception on calling the webservice.
> >> 
> >> 2012-03-07 11:27:41,464 [http-bio-8080-exec-8] ERROR StackTrace  - Full
> >> Stack Trace: org.apache.cxf.interceptor.Fault: Couldn't find MIME
> >> boundary:
> >> --MIMEBoundary_4a94e41e3eed5d193a8c2b8ac8fa17bec22927a6b89fb8a1
> >> at
> >> org.apache.cxf.interceptor.AttachmentInInterceptor.handleMessage(Attach
> >> me
> >> ntInInterceptor.java:66) at
> >> org.apache.cxf.phase.PhaseInterceptorChain.doIntercept(PhaseInterceptor
> >> Ch
> >> ain.java:247) at
> >> org.apache.cxf.transport.ChainInitiationObserver.onMessage(ChainInitiat
> >> io
> >> nObserver.java:113) at
> >> org.apache.cxf.transport.servlet.ServletDestination.invoke(ServletDesti
> >> na
> >> tion.java:97) at
> >> org.apache.cxf.transport.servlet.ServletController.invokeDestination(Se
> >> rv
> >> letController.java:458) at
> >> org.apache.cxf.transport.servlet.ServletController.invoke(ServletContro
> >> ll
> >> er.java:185) at
> >> org.apache.cxf.transport.servlet.AbstractCXFServlet.invoke(AbstractCXFS
> >> er
> >> vlet.java:148) at
> >> org.grails.cxf.GrailsCXFServlet.invoke(GroovyCXFServlet.groovy) at
> >> org.apache.cxf.transport.servlet.AbstractHTTPServlet.handleRequest(Abst
> >> ra
> >> ctHTTPServlet.java:179) at
> >> org.grails.cxf.GrailsCXFServlet.handleRequest(GroovyCXFServlet.groovy)
> >> at
> >> org.apache.cxf.transport.servlet.AbstractHTTPServlet.doPost(AbstractHTT
> >> PS
> >> ervlet.java:103) at
> >> org.grails.cxf.GrailsCXFServlet.doPost(GroovyCXFServlet.groovy) at
> >> javax.servlet.http.HttpServlet.service(HttpServlet.java:641) at
> >> org.apache.cxf.transport.servlet.AbstractHTTPServlet.service(AbstractHT
> >> TP
> >> Servlet.java:159) at
> >> org.grails.cxf.GrailsCXFServlet.service(GroovyCXFServlet.groovy)
> >> 
> >> I looked at another post
> >> (http://www.brimllc.com/2012/01/grails-cxf-web-service-with-mtom-attach
> >> me
> >> nts/) on Grails + CXF + MTOM that seems to suggest that I should be
> >> using
> >> DataHandler instead of byte[]. However since I'm building a
> >> contract-first webservice and using codegen, I can't do anything there.
> >> 
> >> I also implemented the suggestion that I should exclude '/services/*'
> >> in
> >> my UrlMappings to tell grails it shouldn't process what looks like
> >> attachments.
> >> 
> >> Does anyone have any suggestions?
> >> 
> >> R,
> >> rahul
-- 
Daniel Kulp
dk...@apache.org - http://dankulp.com/blog
Talend Community Coder - http://coders.talend.com

Reply via email to