Topic
8 replies Latest Post - ‏2010-12-01T21:47:51Z by SystemAdmin
SystemAdmin
SystemAdmin
32 Posts
ACCEPTED ANSWER

Pinned topic Help Webservices component

‏2010-11-30T20:52:08Z |
Hi,

I have been able to install Oct Tech Preview for CMIS implementation. This URL works for me.
http://localhost:9080/cm8cmis/resources/icmnlsdb/Query?q=select * from MEMBER_DOC

Next step testing webservices using Web services explorer within Rational (I am using WID 7.0)

Service endpoint is set to http://localhost:9080/cm8cmis/ObjectService
operation is getObject

Request

<soapenv:Envelope xmlns:soapenv=
"http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsd=
"http://www.w3.org/2001/XMLSchema" xmlns:xsi=
"http://www.w3.org/2001/XMLSchema-instance"> <soapenv:Body> <query xmlns=
"http://docs.oasis-open.org/ns/cmis/messaging/200908/" xmlns:ns2=
"http://docs.oasis-open.org/ns/cmis/core/200908/"> <repositoryId>icmnlsdb</repositoryId> <statement>SELECT * from MEMBER_DOC</statement> <searchAllVersions>false</searchAllVersions> <includeAllowableActions>false</includeAllowableActions> <includeRelationships>none</includeRelationships> <maxItems>10</maxItems> <skipCount>0</skipCount> </query> </soapenv:Body> </soapenv:Envelope>


Response

<soapenv:Envelope xmlns:soapenv=
"http://schemas.xmlsoap.org/soap/envelope/"> <soapenv:Body> <soapenv:Fault xmlns:axis2ns12=
"http://schemas.xmlsoap.org/soap/envelope/"> <faultcode>axis2ns12:Client</faultcode> <faultstring>The endpoint reference (EPR) 

for the Operation not found is http:
//localhost:9080/cm8cmis/ObjectService and the WSA Action =</faultstring>  <detail /> </soapenv:Fault> </soapenv:Body> </soapenv:Envelope>


Should service endpoint be set to something else. Thank you for your help.
Updated on 2010-12-01T21:47:51Z at 2010-12-01T21:47:51Z by SystemAdmin
  • TigerTrix
    TigerTrix
    30 Posts
    ACCEPTED ANSWER

    Re: Help Webservices component

    ‏2010-11-30T21:21:44Z  in response to SystemAdmin
    First, verify the service is up & running, and accessible by checking the index page (http://localhost:9080/cm8cmis/index.jsp). For more information about this page, ports, and verification steps, you will find this in the "Verify" section of the "install.html" instructions in the install folder.

    On the index page, you will find URLs to 2 CMIS service description docs that describe the CMIS services, one each for ither REST or WS. So you are probably looking for the WSDL for the WS. You should find the URL for that listed directly on the index.jsp page. Try that one. There are no other URLs you can assume. These are the two docs for discovery by generic CMIS applications.
    • SystemAdmin
      SystemAdmin
      32 Posts
      ACCEPTED ANSWER

      Re: Help Webservices component

      ‏2010-11-30T21:34:35Z  in response to TigerTrix
      Thank you for responding.

      The web application is running. Also, within a browser this url
      http://localhost:9080/cm8cmis/ObjectService

      returns

      {http://docs.oasis-open.org/ns/cmis/ws/200908/}ObjectService
      Hello! This is an Axis2 Web Service!

      So I guess it's working fine. I was hoping to test the WebService using Web Services explorer. Still working on this .. any pointers would be appreciated.
    • TigerTrix
      TigerTrix
      30 Posts
      ACCEPTED ANSWER

      Re: Help Webservices component

      ‏2010-11-30T21:40:52Z  in response to TigerTrix
      After re-reading your post, I'm not sure I answered your question. Can you confirm that you have used the CMIS server's WS description document from the index page to make sure you are using the right one? Assuming you are building URLs correctly and not assuming any non-standard or non-discovery-based URL construction, all the WS should at least exist as end points. The cm8cmis has the same WS handler as fncmis. However actual implementation of the cm8cmis WS implementation once received has limitations in the tech preview. But they should work. I have tested the tech preview level of code with a popular WS-based client and had no problem connecting and browsing on one system, and had some application-side errors due when connected to another system, but not this server error you report.
      • SystemAdmin
        SystemAdmin
        32 Posts
        ACCEPTED ANSWER

        Re: Help Webservices component

        ‏2010-11-30T21:56:13Z  in response to TigerTrix
        WSDL document is from Index page. I just saved it and imported into Rational.

        After that when you right click on the WSDL file, you get an option "Web Services -> Test with Web Services Explorer".

        Within Web services explorer, I selected ObjectService -> ObjectServiceBinding -> getObject.

        Within the body of the SOAP request ... I plugged in this XML

        
        <query xmlns=
        "http://docs.oasis-open.org/ns/cmis/messaging/200908/" xmlns:ns2=
        "http://docs.oasis-open.org/ns/cmis/core/200908/"> <repositoryId>icmnlsdb</repositoryId> <statement>SELECT * from MEMBER_DOC</statement> <searchAllVersions>false</searchAllVersions> <includeAllowableActions>false</includeAllowableActions> <includeRelationships>none</includeRelationships> <maxItems>10</maxItems> <skipCount>0</skipCount> </query>
        


        and hit Go.

        No modifications to WSDL file that I got from the index.jsp. It's quite simple actually.
        • TigerTrix
          TigerTrix
          30 Posts
          ACCEPTED ANSWER

          Re: Help Webservices component

          ‏2010-11-30T22:38:38Z  in response to SystemAdmin
          I see. Sorry, I haven't tried with web services explorer. I suspect you are missing some XML elements or have the wrong name for something? For manual testing like this, I normally use REST which is more adept at manual URL entry & XML, and I use WS more for just generating stubs and using them programmatically. That is just to say I cannot say for sure because I have not tried this the same way you are trying it. You have a query clause within what you called a getObject operation. Can you do that? On the REST side, you have ways to query and get a single object back. Maybe you need a different method? It might be simpler to just use WSDL-generated stubs than to work with XML directly if you are going to use WS instead of REST. Another way is to trace the TCP/IP communication from a WS-based app that works with cm8cmis when you just point the app at the wsdl doc to learn about the cmis ws service. Then maybe you can tell what is missing about the XML syntax, end points, or operation for manual entry. OpenWorkdesk is one that should work with cm8cmis tech preview, sepending on how clean the cm8 server data is. I could browse and create on one system, and had a NPE within the app itself when connecting to another.

          Has anyone else used the WS XML directly that can offer advice for what needs to be done?
          • TigerTrix
            TigerTrix
            30 Posts
            ACCEPTED ANSWER

            Re: Help Webservices component

            ‏2010-11-30T22:51:18Z  in response to TigerTrix
            typo: sepending --> depending
            • TigerTrix
              TigerTrix
              30 Posts
              ACCEPTED ANSWER

              Re: Help Webservices component

              ‏2010-12-01T00:00:04Z  in response to TigerTrix
              Someone pointed out to me that your URL doesn't look right. The URL might not be the one directed by the WSDL doc. Your WS URL will probably look like:

              http://yourServerHostName:9080/cm8cmis/RepositoryService
              • SystemAdmin
                SystemAdmin
                32 Posts
                ACCEPTED ANSWER

                Re: Help Webservices component

                ‏2010-12-01T21:47:51Z  in response to TigerTrix
                I am finally able to resolve the Web services issue. I found that soapUI to be a much better tool to test Web Services.

                Thank you for your time and help.