This blog post is a walkthrough of an example web service call to the IDCWS web service in Oracle Webcenter Content and follows on from the introduction in the previous post. Using Jdeveloper WSDL Proxy Generation Class Functionality we take the IDCWS wsdl and generate the Web Service Proxy classes. Following this we construct a SOAP request and execute that against Webcenter Content.
As already mentioned in the Introduction post the Generic Soap Service is a wrapper for executing IdcServices, the services through which operations are performed on Webcenter Content. Therefore the Generic Soap Service only has one operation called the GenericSoapOperation that takes parameters releated to the desired IdcService and the operation executed. Please note that the parameters are defined by the IdcService rather than the GenericSoapOperation. The response can then be retrieved and processed.
Here is the walkthrough video:
In our example I have chosen to execute the GET_SEARCH_RESULTS IdcService. I have specified a query text of 'hello' and also a dSecurityGroup of ‘PersonalSpaces’. I have previously checked in a document into this security group so that it will appear in our Search Results.
As you may have seen in the video, the user credentials are stored in the GenericSoapPortClient Java class. The username and password are encrypted and added to the Authorization http request header to authenticate against Webcenter Content using Basic Authentication security. The credentials are protected by SSL encryption during the transmission from client to server over https in a Fusion Applications SaaS environment. Depending on the policy configuration on the Fusion Applications SaaS environment, various other authentication methods can be used. SAML is an example but would require help from Oracle Support to create the relevant security files in the Fusion Applications SaaS environment.
So here is the SOAP request that is constructed by the Java code in the video:
<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:ucm="http://www.oracle.com/UCM"> <soapenv:Header> <wsse:Security xmlns:wsse="http://docs.oasis-open.org/wss/2004/01/ oasis-200401-wss-wssecurity-secext-1.0.xsd" xmlns:wsu="http://docs.oasis-open.org/wss/2004/01/ oasis-200401-wss-wssecurity-utility-1.0.xsd"> </wsse:Security> </soapenv:Header> <soapenv:Body> <ucm:GenericRequest webKey="cs"> <ucm:Service IdcService="GET_SEARCH_RESULTS"> <ucm:Document> <ucm:Field name="QueryText">hello</ucm:Field> </ucm:Document> </ucm:Service> </ucm:GenericRequest> </soapenv:Body> </soapenv:Envelope>
We have covered how to execute the IDCWS web services using Java. In this example we used the IdcService called GET_SEARCH_RESULTS however any IdcService that the user has access to in the UI can also be accessed through this web service. For further details on what services can be executed please see the Webcenter Content Services Reference Guide.
Here are some web links for further information on this subject