Skip to Main Content

Java Development Tools

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

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

Luigi B.Feb 4 2014 — edited Feb 7 2014

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?

This post has been answered by Shay Shmeltzer-Oracle on Feb 4 2014
Jump to Answer

Comments

Answer

When you have an object as a parameter in a data control you should also see a parameter object created that has the simple types in it.

See for example the video here:

https://blogs.oracle.com/shay/entry/calling_web_service_with_complex

Marked as Answer by Luigi B. · Sep 27 2020

Hi,

in the first case, have a look at the constructors in the DC. It will have the object (entity) as a node. You use this to e.g. create an edit form for the method call. The iterator --> get current row of the parameter form is then the object it wants you to pass. So no need to change the WS

Frank

Luigi B.

I still find the fact that ADF has different behaviors, depending on the name of the operation/element really odd, but this solves my problem without changing the service, so I'm good with that, thanks!

1 - 3
Locked Post
New comments cannot be posted to this locked post.

Post Details

Locked on Mar 7 2014
Added on Feb 4 2014
3 comments
1,621 views