Hi,
we are making a loaditem SOAP request to contentSOAP endpoint to retrieve information on a contentitem as well as its related item by setting the includeRelated parameter to true.
Here are the steps we followed precisely :
-
retrieved the design folder under c:\Rhythmyx and loaded them under soapui plugin in eclipse to have local proxies to query the webservices
-
proceeded with a login request to retrieve a sessionid - works ok
-
used sessionid to make requests for loaditems or viewitems calls provided by the contentSOAP api, itemid being xxx and includeRelated set to true. In both cases we get the same error :“The contract was violated for service ‘loadItems/viewitems’. The underlying error was: missing required related item relationship.”
Our current conclusion is that if the relationship parameter is indeed a required one, it should be listed in the xsd definition for the api calls for viewitems and loaditems. It is not and there is no way to pass that parameter when making calls to loaditems or viewitems
Does anyone know how to retrieve the related items information for a given content item using the SOAP API.
The loaditem soap call is :
<soapenv:Envelope xmlns:soapenv=“http://schemas.xmlsoap.org/soap/envelope/” xmlns:com=“urn:www.percussion.com/6.0.0/common” xmlns:con=“urn:www.percussion.com/6.0.0/content”><br/> <soapenv:Header><br/> <com:PSAuthenticationHeader><br/> <com:Session>a8c9281235d0c38708ef850d22c137794d612243</com:Session><br/> </com:PSAuthenticationHeader><br/> </soapenv:Header><br/> <soapenv:Body><br/> <con:LoadItemsRequest><br/> <!–1 or more repetitions: xxx is an actual integer we are sending–><br/> <con:Id>xxx</con:Id> <br/> <con:IncludeFolderPath>true</con:IncludeFolderPath><br/> <con:IncludeRelated>true</con:IncludeRelated><br/> </con:LoadItemsRequest><br/> </soapenv:Body><br/></soapenv:Envelope><br/><br/>The response received is :<br/><br/><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”><br/> <soapenv:Body><br/> <soapenv:Fault><br/> <faultcode>soapenv:Server.generalException</faultcode><br/> <faultstring/><br/> <detail><br/> <ns1:PSContractViolationFault code=“1” errorMessage=“The contract was violated for service ‘loadItems’. The underlying error was: missing required related item relationship.” stack="java.lang.IllegalArgumentException: missing required related item relationship at com.percussion.webservices.transformation.converter.PSItemConverterUtils.toClientRelatedContent(Unknown Source) at com.percussion.webservices.transformation.converter.PSItemConverter.convert(Unknown Source) at com.percussion.webservices.PSBaseSOAPImpl.convert(Unknown Source) at com.percussion.webservices.content.ContentSOAPImpl.convertItems(Unknown Source) at com.percussion.webservices.content.ContentSOAPImpl.loadItems(Unknown Source) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source) at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) at java.lang.reflect.Method.invoke(Unknown Source) at org.apache.axis.providers.java.RPCProvider.invokeMethod(RPCProvider.java:397) at org.apache.axis.providers.java.RPCProvider.processMessage(RPCProvider.java:186) at org.apache.axis.providers.java.JavaProvider.invoke(JavaProvider.java:323) at org.apache.axis.strategies.InvocationStrategy.visit(InvocationStrategy.java:32) at org.apache.axis.SimpleChain.doVisiting(SimpleChain.java:118) at org.apache.axis.SimpleChain.invoke(SimpleChain.java:83) at org.apache.axis.handlers.soap.SOAPService.invoke(SOAPService.java:453) at org.apache.axis.server.AxisServer.invoke(AxisServer.java:281) at org.apache.axis.transport.http.AxisServlet.doPost(AxisServlet.java:699) at javax.servlet.http.HttpServlet.service(HttpServlet.java:717) at org.apache.axis.transport.http.AxisServletBase.service(AxisServletBase.java:327) at javax.servlet.http.HttpServlet.service(HttpServlet.java:810) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:252) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173) at com.percussion.webdav.PSWebDavRequestFilter.doFilter(Unknown Source) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:202) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173) at com.percussion.servlets.PSSecurityFilter.doFilter(Unknown Source) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:202) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173) at org.jboss.web.tomcat.filters.ReplyHeaderFilter.doFilter(ReplyHeaderFilter.java:81) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:202) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173) at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:213) at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:178) at org.jboss.web.tomcat.security.CustomPrincipalValve.invoke(CustomPrincipalValve.java:39) at org.jboss.web.tomcat.security.SecurityAssociationValve.invoke(SecurityAssociationValve.java:159) at org.jboss.web.tomcat.security.JaccContextValve.invoke(JaccContextValve.java:59) at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:126) at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:105) at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:107) at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:148) at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:856) at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.processConnection(Http11Protocol.java:744) at org.apache.tomcat.util.net.PoolTcpEndpoint.processSocket(PoolTcpEndpoint.java:527) at org.apache.tomcat.util.net.MasterSlaveWorkerThread.run(MasterSlaveWorkerThread.java:112) at java.lang.Thread.run(Unknown Source) " xmlns:ns1=“urn:www.percussion.com/6.0.0/faults”/><br/> <ns2:exceptionName xmlns:ns2=“http://xml.apache.org/axis/”>com.percussion.webservices.faults.PSContractViolationFault</ns2:exceptionName><br/> <ns3:hostname xmlns:ns3=“http://xml.apache.org/axis/”>gvacmst01</ns3:hostname><br/> </detail><br/> </soapenv:Fault><br/> </soapenv:Body><br/></soapenv:Envelope><br/>
Thanks
Interibex SA