chemistry-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Alex Devasia <deva...@yahoo.com.INVALID>
Subject Re: Websphere issue - The request is not MTOM encoded
Date Wed, 09 Jul 2014 16:55:13 GMT
Thanks Florian and Mark.

The client in this case is a web application deployed on Tomcat. The same client works fine
when the server is deployed on Tomcat. The problem shows up only when the server is deployed
on WebSphere.

One thing I noticed in the websphere/web.xml included with open CMIS 0.11 is that the servlet
CmisWebServicesServlet is not defined or commented out.

If I do the same, the above client works just fine. However, not defining the above servlet
in web.xml would mean 3rd party CMIS
clients wouldn't be able to connect to the server using web services binding.

Thanks
Alex


On Wednesday, July 9, 2014 9:31 PM, Mark Streit <mcs130@gmail.com> wrote:
 


There was another thread about something similar before - I believe it was
Alex as well, correct?

Recall that you don't want the WebSphere stack interfering and it will
unless you specifically configure the application that is running to avoid
it.   If your "client" code is running from inside WAS8.X (it was similar
for WAS7 too), I am assuming it is part of a WAR/EAR...IIRC, in WAS7 you
couldn't deploy any WAR w/o a corresponding EAR file (unlike Tomcat for
instance).

As before, assuming the client code is running from inside some web
application...

1) is the WAR file carrying all the needed JARs in /WEB-INF/lib - there are
dependencies that CMIS clients have which are JAX-WS related
2) is the classloader policy for the EAR or WAR set correctly?  ... is it
set to *PARENT_LAST and "classloader per application" - not single
classloader*.    If not, we would find that "other" JARs from the IBM stack
(including XML, SAAJ, and JAX-WS related classes) would get loaded from the
WAS7 stack BEFORE those in our application and we'd see things ranging from
"incompatible class..." to "no class def found..." types of errors.  *Or...
the CLIENT call that gets sent is then not compatible with the CMIS SERVER
you are now calling* - perhaps in this case, the MTOM encoding is not
occurring because WAS is interfering

You almost have to think of it this way.  You're running a CMIS client
application to talk to a CMIS server application.  BOTH applications have
similar dependencies, especially where the JAX-WS client/service stack is
concerned.  You only want those JARs --- which are *shipped with the
OpenCMIS distribution*, involved ... and want to *avoid anything that the
Websphere stack is "providing"*.

We are now using mostly Tomcat servers for our implementation and have been
moving away from WAS so, of late, have not been battling this.  As I
recall, there was a time when a websphere-specific JAR was provided with
OpenCMIS, but I believe that stopped after 0.8.0 - when I look at 0.11.0, I
don't see that anymore.

*HTH*

Mark


On Wed, Jul 9, 2014 at 10:09 AM, Florian Müller <fmui@apache.org> wrote:

> Hi Alex,
>
> The CMIS spec defines that *all* CMIS Web Services calls have to be MTOM
> encoded.
> If you are developing your own Web Services CMIS client, make sure that
> this is
> the case,
>
> If you are seeing an OpenCMIS client receiving this exception, you are
> probably
> using the wrong JAX-WS library.
> Please make sure that you have all OpenCMIS client dependency libraries on
> your
> classpath.
>
> - Florian
>
>
> > Hello,
> >
> > I am using WebSphere 8.5 and open CMIS 0.11. With my deployment, I could
> get
> > CMIS clients like workbench and other mobile clients to connect to the
> server.
> > However, there seems to be an issue if there's a client using some
> selective
> > CMIS services directly like the repository and navigation service.
> >
> > This client ends up with "The request is not MTOM encoded" error. The
> error is
> > being thrown from CmisWebServicesServlet (code snippet below).
> >
> > When using the same client, I noticed the request doesn't go
> > to CmisWebServicesServlet if the web application is deployed on Tomcat. I
> > guess this has something to do with the deployment descriptor but I am
> not
> > sure how to resolve it on WebSphere.
> >
> > /*  53
> > */     String contentType = request.getContentType();
> > /*  54
> > */     if ((contentType == null) ||
> > (!contentType.toLowerCase(Locale.ENGLISH).startsWith("multipart/"))) {
> > /*  55
> > */       throw new ServletException("Invalid
> > multipart request!");
> >
> > Any ideas?
> >
> > Thanks
> > Alex
>
Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message