Forum Stats

  • 3,853,194 Users
  • 2,264,189 Discussions
  • 7,905,283 Comments

Discussions

ADF WS Data Control - Methods with "Object" instead of native types

Luigi B.
Luigi B. Member Posts: 4
edited Feb 7, 2014 8:18AM in JDeveloper and ADF

Recently we noticed an odd behavior when integrating SOA Suite services with ADF Web Service Data Controls:

- Considering a service, where the WSDL has the following operation:

<wsdl:operation name="CreateEmployee">
  <wsdl:input message="inp1:requestCreateEmployeeMessage"/>
  <wsdl:output message="inp1:replyCreateEmployeeMessage"/>
</wsdl:operation>

- And the request message is:

<wsdl:message name="requestCreateEmployeeMessage">
  <wsdl:part name="payload" element="inp1:CreateEmployeeRequest"/>
</wsdl:message>

- And the element in the message:

<element name="CreateEmployeeRequest">
  <complexType>
  <sequence>
  <element name="EmployeeId" type="int" minOccurs="0"/>
  <element name="EmployeeName" type="string" minOccurs="0" nillable="true"/>
  <element name="Salary" type="decimal" minOccurs="0"/>
  </sequence>
  </complexType>
</element>

- If that service is added to an ADF project as a Web Service Data Control, the method in the data control will be show as:

CreateEmployee(Object)

- However, if you change the WSDL, so that the element has the EXACT same name as the opperation:

<wsdl:message name="requestCreateEmployeeMessage">
  <wsdl:part name="payload" element="inp1:CreateEmployee"/>
</wsdl:message>
<element name="CreateEmployee">
  <complexType>
  <sequence>
  <element name="EmployeeId" type="int" minOccurs="0"/>
  <element name="EmployeeName" type="string" minOccurs="0" nillable="true"/>
  <element name="Salary" type="decimal" minOccurs="0"/>
  </sequence>
  </complexType>
</element>

- Then Data Control method will be shown as:

CreateEmployee(Integer, String, BigDecimal)

This is strange because the WSDL is still valid if the root element of the request has a different name than the operation (this SOA service was actually created using JDeveloper).

Besides this solution I'm sharing, alternatives would be:

1) Create a proxy for the service and register the proxy as a Data Control instead

2) Programatically invoke the service, as shown here

Is this a Bug?

Tagged:

Best Answer

Answers

This discussion has been closed.