7 Replies Latest reply on Dec 10, 2012 3:07 PM by Invinceable (Vince)

    Calling web service with Complex Input Parameters

    Invinceable (Vince)
      I have a jsf fragment with a table of rows that I retrieved from a data control based on a web service. The row of data consists of various data items defined in a xml data type named fuel_log. After the page is displayed, I want to to iterate through each of the rows being displayed and call another web service passing each row of data. The input to the second web service contains a data item named payload. Payload is an xml data type of fuel_log. Here is the code that I have in my backing bean:

      public String validateAllFuelLogs() {
      DCBindingContainer bindings = (DCBindingContainer) BindingContext.getCurrent().getCurrentBindingsEntry();
      DCIteratorBinding iterBind= (DCIteratorBinding) bindings.get("fuel_logIterator");
      for (Row row : iterBind.getAllRowsInRange()) {
      validateFuelLog((DCDataRow) row);

      return null;

      public String validateFuelLog(DCDataRow row) {
      BindingContainer bindings = BindingContext.getCurrent().getCurrentBindingsEntry();
      OperationBinding operationBinding = bindings.getOperationBinding("validate");
      Map operationParms = operationBinding.getParamsMap();
      operationParms.put("payload", row.getDataProvider());

      Object result = operationBinding.execute();
      if (!operationBinding.getErrors().isEmpty()) {
      return null;
      return null;

      When I debug the code, I get the following errors in the console:

      <SOAPProvider> <createComplexPart> Value for parameter 'quantity' cannot be null
      <SOAPProvider> <createComplexPart> Value for parameter 'unit_of_measure' cannot be null
      <SOAPProvider> <createComplexPart> Value for parameter 'fuel_type' cannot be null

      <WebServiceConnectionMessages> <debugExecuteFailure> Failed to execute a SAAJ interaction.
      oracle.j2ee.ws.client.jaxws.JRFSOAPFaultException: Client received SOAP Fault from server : null
           at oracle.j2ee.ws.client.jaxws.DispatchImpl.throwJAXWSSoapFaultException(DispatchImpl.java:1040)
      additional stack trace info here...

      <SOAPProvider> <handleFault> Verify if all the necessary parameter values are provided correctly and confirm to the schema constraints as defined in the WSDL
      <SOAPProvider> <handleFault> If the service requires any SOAP headers, Verify that they have been correctly defined in the request
      <SOAPProvider> <handleFault> The Web Service may have generated an exception in an attempt to handle the request, and has returned a SOAP fault to indicate that exception.

      What is the correct way to copy the row of data from web service 1 to the input payload parameter for web service 2?

      I am using J Developer

      Thanks in advance.