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!

Incorrect web service types generation

Andrey DokuchaevAug 27 2014 — edited Aug 27 2014

Hi all!

I use JDeveloper 11.1.1.3 to generate web service from WSDL. XSD file contains structure like this

<?xml version="1.0" encoding="UTF-8"?>

<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema"

           xmlns:tns="..." targetNamespace="...">

  <xs:element name="banks">

  <xs:complexType>

  <xs:sequence>

  <xs:element name="item" minOccurs="0" maxOccurs="unbounded">

  <xs:complexType>

  <xs:sequence>

  <xs:element name="bank_id" type="xs:long" minOccurs="0">

  </xs:element>

  <xs:element name="address" minOccurs="0">

  <xs:complexType>

  <xs:sequence>

  <xs:element name="item" minOccurs="0" maxOccurs="unbounded">

  <xs:complexType>

  <xs:sequence>

  <xs:element name="addresstype" minOccurs="0">

  <xs:simpleType>

  <xs:restriction base="xs:string">

  <xs:maxLength value="100"/>

  </xs:restriction>

  </xs:simpleType>

  </xs:element>

  more elements...

  </xs:sequence>

  </xs:complexType>

  </xs:element>

  </xs:sequence>

  </xs:complexType>

  </xs:element>

  </xs:sequence>

  </xs:complexType>

  </xs:element>

  </xs:sequence>

  </xs:complexType>

  </xs:element>

</xs:schema>

Wizard create java class like this:

package ru.rdtex.b2b.registration.view.contragents.types;

public class testBanks {

    public static class Item {

        public static class Address {

             public static class Item {

            }

        }

    }

}

Compilations give me error

  • Error(6,29): ru.rdtex.b2b.registration.view.contragents.types.testBanks.Item is already defined in ru.rdtex.b2b.registration.view.contragents.types.testBanks

How can I avoid this situation? XSD file structure is incorrect? Or it's maybe a bug in wizard?

Comments

611407
If you want to prevent a user entering data in a feld when they do a query, set the item's Query Allowed property for No.

Otherwise, the trigger you're looking for is key-entqry.
Tony Garabedian
If you want to prevent the item from being queried you can set the "Query Allowed" property to "No" in the item's property palette.

If you want to do it programatically you can use the SET_ITEM_PROPERTY('item_name', QUERY_ALLOWED, PROPERTY_FALSE);
But remember to set it back when you cancel or exit the enter-query mode.

Tony
622131
Hello everybody,
I want to disable the perticular item when i press enter query but it is showing FRM 41032 can not ENABLE attribute of current item.

I have written this code in KEY-ENTQRY trigger

set_item_property('EMPNO', enabled, property_false);

can any one please suggest.

Regards
Anutosh
622131
Hello everybody,
I want to disable the perticular item when i press enter query but it is showing FRM 41032 can not ENABLE attribute of current item.

I have written this code in KEY-ENTQRY trigger

set_item_property('EMPNO', enabled, property_false);

can any one please suggest.

Regards
Anutosh
622131
hello experts,
i want to disable some perticular items when the form moves into enter query mode, in the trigger

KEY-ENTQRY

i have written this statement

set_item_property('EMPNO', enabled, property_false);

but it is not working .can any body suggest what can i do.

Regards
Anutosh
622131
hello experts,
i want to disable some perticular items when the form moves into enter query mode, in the trigger

KEY-ENTQRY

i have written this statement

set_item_property('EMPNO', enabled, property_false);

but it is not working .can any body suggest what can i do.

Regards
Anutosh
Tony Garabedian
user619128 wrote:
hello experts,
i want to disable some perticular items when the form moves into enter query mode, in the trigger

KEY-ENTQRY

i have written this statement

set_item_property('EMPNO', enabled, property_false);

but it is not working .can any body suggest what can i do.
what do you mean by it's not working??? are you getting an error???
Like I said in my previous post, you can set the item's property false for "Query Allowed" this will not allow the user to use this item as a query item.


Tony

Edited by: Tony Garabedian on Aug 28, 2008 5:44 PM
622131
Hi tony,
Thanks for the reply .I am not getting error when i am using the

set_item_property('EMPNO', enabled, property_false);
or
set_item_property('EMPNO', QUERY_ALLOWED, property_false);

but the error is that even after writing such kind of code in the run time when i am in enter query mode , i am able to insert char or number inside the empno field.

That is the problem it is behaving like it is not disabled.

I think now i am clear.

Regards
Anutosh

Edited by: user619128 on Aug 28, 2008 7:44 AM
611407
You can't set the enabled property if the cursor is in the item and I expect it's the same for the query_allowed property. if the cursor is in the item which you set to Query_Allowed=false and then you go to enter-query mode, perhaps forms doesn't know what item to move the cursor to, so just leaves it where it is.

You can solve the problem by moving to a different item (with go_item) before setting the property.

When do you need to set the item back to enabled? If you want it enabled at all times other than when a query is being entered then use the Property Pallet to set the Query Allowed property. If you want to disable the field under certain conditions then the when-new-record-instance trigger might be better for you. Eg
if :system.mode = 'ENTER-QUERY' and <condition> then
  go_item(<another item>);
  set_item_property(<item>, enabled, property_false);
else
  set_item_property(<item>, enabled, property_true);
  set_item_property(<item>, update_allowed, property_true);
  set_item_property(<item>, navigable, property_true);
  set_item_property(<item>, update_null, property_true);
end if;
It might be better to set the query_allowed property instead of the enabled property, but I can't check right now whether that's possible after the enter-query mode has begun.

The update_allowed, update_null and navigable properties are all set to false as a consequence of the enabled property being set to false. If they should be true then you need to reset them after reenabling the item.
622131
hi u3,
Thank you very much for your reply.can you please tell me the name of the smart trigger in which i should write the codes.

currently i am using the KEY-ENTQRY trigger.please suggest correct trigger if it is wrong one.


Regards
Anutosh
Tony Garabedian
user619128 wrote:
Hi tony,
Thanks for the reply .I am not getting error when i am using the

set_item_property('EMPNO', enabled, property_false);
or
set_item_property('EMPNO', QUERY_ALLOWED, property_false);

but the error is that even after writing such kind of code in the run time when i am in enter query mode , i am able to insert char or number inside the empno field.

That is the problem it is behaving like it is not disabled.

I think now i am clear.

Regards
Anutosh

Edited by: user619128 on Aug 28, 2008 7:44 AM
In your KEY-ENTQRY write the below code: this is tested on Forms 10g
If you need to disable querying of an item under a certain condition, include that condition in the trigger too
IF ... THEN
  SET_ITEM_PROPERTY('ENAME', QUERYABLE, PROPERTY_FALSE);
END IF;
ENTER_QUERY;
This will prevent the user from entering any text in the item when the KEY-ENTQRY trigger is fired. Remember to set it back to true when you cancel the query or when the query is executed.

Tony
Tony Garabedian
If you need to prevent the user from querying an item constantly, you can simply use the property palette and set the "Query Allowed" property to "No"

Tony
611407
I get the impression you're not reading the replies fully. For example, I said what trigger to put that code in, just above the code snippet, and you've not responded to numerous suggestions that you use the Query Allowed property of the item. Setting that property would be the best way to implement this functionality unless you need the item to be queryable under certain conditions.

The code I posted above will not work, please accept my apologies. The Enabled property has no effect in enter-query mode. However, this code has been tried and tested:
if <condition> then
  set_item_property(<item>, queryable, property_true);
else
  set_item_property(<item>, queryable, property_fase);
end if;

enter_query;
The code should go in the key-entqry trigger.
622131
Hi tony and u3
Thank you very much for your support but still even after writting this code into my KEY-ENTQRY trigger in the run time i am able to enter values in the perticular item.

I am using oracle 6i and the code is


if :system.mode = 'ENTER-QUERY' then

go_item('empname');

set_item_property('empno', queryable, property_false);


end if;
ENTER-QUERY;


can you people please suggest any thing.

Regards
Anutosh


can you please suggest.
611407
Answer
My main suggestion is that you read what people write. The code for the key-entqry trigger does not contain
if :system.mode = 'ENTER-QUERY' then
because you are not in enter-query mode at that point. This was only required in the when-new-record-instance trigger but, as I wrote before, that code sample will not work.

The solution is already here. I'm out.
Marked as Answer by 622131 · Sep 27 2020
622131
Hi u3 and tony

Thank you buddy ,thank you very much at last the code compiled and it is working like a dream.
The field is disabled,and i want to give thank all the people who have give there great idea from there very busy
schedule.really it is very nice to be in india and communicate with the rest of the world through the forum.

Thank you every body specially u3 and tony.


Thanks and Regards
Anutosh Bhattacharya
Tony Garabedian
you're welcome.

PS: If your question has been answered, please mark the question as answered, so it helps other people when they search the forums.

Edited by: Tony Garabedian on Aug 29, 2008 2:29 PM
1 - 17
Locked Post
New comments cannot be posted to this locked post.

Post Details

Locked on Sep 24 2014
Added on Aug 27 2014
3 comments
141 views