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

4

1 回答 1

0

你看过GenericWebServiceSample.java

以下是代码片段。身份验证片段:受保护的静态最终字符串 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>" 

检索带有附件片段的项目:

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>";

尝试添加connectString=\"SCHEMA=ICMADMIN\"您的请求中缺少的内容。

于 2014-05-02T12:15:36.247 回答