我正在使用DB2 Content Manager Enterprise Edition V8.4.2。要管理内容管理器,我正在使用Web服务。我从URL http://ibmcm/CMBSpecificWebService/services/CMWebService?wsdl
获取了wsdl文件( ibmcm 是我安装内容管理器的服务器的名称。)
但对于 RetrieveItemRequest ,它不会返回正确的响应。所以Apache CXF无法处理响应。有人遇到过这个问题吗?
请求
<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&server=icmnlsdb&dsType=ICM"/>
</sch:RetrieveItemRequest>
</soapenv:Body>
</soapenv:Envelope>
回复:
答案 0 :(得分:0)
您是否看过GenericWebServiceSample.java
以下是代码片段。身份验证代码段: 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>"
检索带附件代码段的项目:
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\"
。