0

I am using DB2 Content Manager Enterprise Edition, Version 8.4.2. To manage the content manager i am using the web services. I got wsdl file from the URL http://ibmcm/CMBSpecificWebService/services/CMWebService?wsdl (ibmcm is the name of the server where i installed content manager).

But for the RetrieveItemRequest it doesn't return the proper response. So the Apache CXF not able to process the response. Anyone faced this issue ?

Request :

<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:sch="http://www.ibm.com/xmlns/db2/cm/beans/1.0/schema">
   <soapenv:Header/>
   <soapenv:Body>
      <sch:RetrieveItemRequest retrieveOption="CONTENT" contentOption="ATTACHMENTS" version="latest-version" checkout="false">
         <!--Optional:-->
         <sch:AuthenticationData connectString="" configString="?" connectToWorkflow="false">
            <sch:ServerDef>
               <!--You may enter the following 2 items in any order-->
               <!--Optional:-->
               <sch:ServerType>ICM</sch:ServerType>
               <sch:ServerName>icmnlsdb</sch:ServerName>
            </sch:ServerDef>
            <!--You have a CHOICE of the next 2 items at this level-->

            <sch:LoginData>
               <sch:UserID>icmadmin</sch:UserID>
               <sch:Password>password</sch:Password>
            </sch:LoginData>
         </sch:AuthenticationData>
         <!--Zero or more repetitions:-->
         <sch:Item URI="http://ibmcm/CMBSpecificWebService/CMBGetPIDUrl?pid=86 3 ICM8 icmnlsdb7 STUDENT59 26 A1001001A14D23B30730I1246518 A14D23B30730I124651 14 1087&amp;server=icmnlsdb&amp;dsType=ICM"/>
      </sch:RetrieveItemRequest>
   </soapenv:Body>
</soapenv:Envelope>

Response :

enter image description here

SANN3
  • 9,459
  • 6
  • 61
  • 97
  • 1
    Are you sure that your request is valid? – GuyT May 02 '14 at 09:52
  • Yes. I done via soapUI. Its Proper request only. – SANN3 May 02 '14 at 09:54
  • 1
    So, if I do understand you correctly: when you send a request with soapUI you get a valid response and the expected result? Copy your soapUI envelope request and paste it in your program(testing purpose). – GuyT May 02 '14 at 09:57
  • Ya i tried in java code and soapUI. Same improper response. – SANN3 May 02 '14 at 10:02
  • Probably the `RetrieveItem` function isn't working properly. The tests with soapUI have to succeed before you can proceed. Have you already looked at your console to see the exact request(network tab)? Can you post the `RetrieveItem` function? – GuyT May 02 '14 at 10:06

1 Answers1

0

Have you looked at the GenericWebServiceSample.java

The following is a snippet of the code. Authentication snippet: protected static final String AUTHENTICATION_DATA_TEMPLATE =

"<AuthenticationData  connectString=\"SCHEMA=ICMADMIN\" configString=\"\">" + 
  "<ServerDef>"                                                 + 
    "<ServerType>{0}</ServerType>"                              + 
    "<ServerName>{1}</ServerName>"                              + 
  "</ServerDef>"                                                + 
  "<LoginData>"                                                 + 
    "<UserID>{2}</UserID>"                                      + 
    "<Password>{3}</Password>"                                  + 
  "</LoginData>"                                                + 
"</AuthenticationData>" 

Retrieve item with attachments snippet:

protected static final String RETRIEVE_ITEM_WITH_ATTACHMENTS_TEMPLATE = 
        "<RetrieveItemRequest contentOption=\"ATTACHMENTS\" retrieveOption=\"CONTENT\" " +
                              "xmlns=\"http://www.ibm.com/xmlns/db2/cm/beans/1.0/schema\">" +
            "{0}" +
            "<Item URI=\"{1}\"/>" +
        "</RetrieveItemRequest>";

Try to add connectString=\"SCHEMA=ICMADMIN\" which is missing in your request.

Tahir Malik
  • 6,623
  • 15
  • 22