Directory Services as a Web Service

DSEE - Directory Services Enterprise Edition,  provides a Web Services access (HTTP/SOAP binding) using the  DSMLv2 standard. Development of  WS clients using the contract-first approach requires a corresponding WSDL file describing the service.

I recently wrote such WSDL file. I had to modify slightly some regular expressions present in the DSML types as IDEs like NetBeans or JDeveloper complain during xml binding generation, that's the reason why it may worth sharing this. An updated WSDL file is available here.  You can use it as such for Web Service client code generation but don't forget to override the service port binding at the end of the file.

Comments:

I had generate service from your wsdl, but I dont know how to finished, so can you tell me how to get batchResponse with batchRequest input parameter.
(I have put the valid url in the wsdl service port)

@WebService(serviceName = "dsmlQueryService", portName = "dsmlSoapQuery", endpointInterface = "oasis.names.tc.dsml._2._0.core.DsmlSoap", targetNamespace = "urn:oasis:names:tc:DSML:2:0:core", wsdlLocation = "WEB-INF/wsdl/NewWebServiceFromWSDL/dsmlQueryService.wsdl")
public class NewWebServiceFromWSDL {

public oasis.names.tc.dsml._2._0.core.BatchResponse directoryRequest(oasis.names.tc.dsml._2._0.core.BatchRequest batchRequest) {

BatchResponse batchResponse = new BatchResponse();
....
return batchResponse;
}
}

Thanks.

Posted by Marko on June 13, 2010 at 05:26 AM CEST #

Hi,

Here is a code sniplet to generate a DSML request and get the response:
Note that the (stub) classed used may slightly vary depending on the tools used to gnerate them.

// create dsml request

BatchRequest batchRequest = new BatchRequest();
ObjectFactory factory = new ObjectFactory();
SearchRequest searchRequest = factory.createSearchRequest();
searchRequest.setDn("uid=u1,ou=people");
Filter filter = factory.createFilter();
AttributeDescription desc = factory.createAttributeDescription();
desc.setName("objectclass");
filter.setPresent(desc);
searchRequest.setFilter(filter);
searchRequest.setDerefAliases("neverDerefAliases");
searchRequest.setScope("wholeSubtree");

batchRequest.getBatchRequests().add(searchRequest);

// submit request and get responses back

BatchResponse rsp = myPort.directoryRequest(batchRequest);

// decode batch response

...

Hope this helps

-Sylvain

Posted by Sylvain Duloutre on June 17, 2010 at 06:16 AM CEST #

Post a Comment:
  • HTML Syntax: NOT allowed
About


I am Sylvain Duloutre, I work as a Software Architect in the Oracle Directory Integration Team, the customer-facing part of Directory Services & Identity Management Product Development, working on Technical Field Enablement.

The views expressed on this blog are my own and do not necessarily reflect the views of Oracle.

Search

Archives
« April 2014
SunMonTueWedThuFriSat
  
1
2
3
4
5
6
7
9
10
11
12
13
14
16
18
19
20
21
22
23
24
25
26
27
28
29
30
   
       
Today