You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@cxf.apache.org by ozjackroo <oz...@gmail.com> on 2015/04/09 07:30:16 UTC

apache cxf client integration problem

Hi All,
    There is a remote Microsoft CRM system which exposes CRUD operation on
it's data. This system also has a token based security layer on top of the
this CRUD services.  I developed a Java client application using Apache CXF
and Spring 3.0 to generate java classes from the remote WSDL (by wsdl2java)
and use spring to create ws-security.sts.client bean to take care of the
token based security at client side. All good, I then use the service and
port to retrieve data from the remote system by pure java API calls. e.g.
below

public static void main(String[] args) throws MalformedURLException,
IOrganizationServiceRetrieveMultipleOrganizationServiceFaultFaultFaultMessage
{
		// TODO Auto-generated method stub
		URL wsdlLocation = new
URL("https://xxxxxxxxxxx/XRMServices/2011/Organization.svc?wsdl");	  
		  SpringBusFactory factory = new SpringBusFactory();
		  Bus bus = factory.createBus("/META-INF/spring/app-context.xml");
		  BusFactory.setDefaultBus(bus);

                  OrganizationService service = new
OrganizationService(wsdlLocation);
		  IOrganizationService port =
service.getCustomBindingIOrganizationService();	  
		  QueryExpression query = new QueryExpression();
		  query.setEntityName("dsl_dispatchgrid");
		  ColumnSet cs = new ColumnSet();
		  ArrayOfstring aos = new ArrayOfstring();
		  aos.getStrings().add("dsl_description");
		  cs.setColumns(aos);
		  query.setColumnSet(cs);	  
		  EntityCollection result = port.*retrieveMultiple*(query);
		  List <Entity> entities = result.getEntities().getEntities();



However, my customer wants any internal applications to just make SOAP call
to the CRM system instead of writing java code as above. Say I want to
expose the method retrieveMultiple with all the dependent objects
initialized in the java code be supplied through XML (i.e webservices). How
to do it, hope everyone gets me. Happy to clarify or explain further. Note:
I cannot directly make SOAP calls to the original webservice due to the
security abstraction.

Thanks
oz



--
View this message in context: http://cxf.547215.n5.nabble.com/apache-cxf-client-integration-problem-tp5755812.html
Sent from the cxf-user mailing list archive at Nabble.com.