понедельник, 30 июня 2008 г.

ODTUG: My Non-Apex sessions

The main reason for me to come to the ODTUG conference was -- besides presenting our own paper -- to see what other Oracle users are doing with the tool. So, most of the sessions I followed were Apex-related. As you can read on different other blogs, it is clear that Apex is hot. So, it is the right momentum to start using the tool, if you not already did.

But I also tried to follow some other sessions. A short impression:

"Service-enable Oracle E-Business Suite with Oracle SOA Suite BPEL Process Manager", by Basheer Khan. Basheer is a very gentle and nice person, especially for newbies. I met him during the “Presenters Drink” where he invited me to his session. During his presentation he showed how to create a BPEL process that integrates with Oracle E-Business Suite using Web Services. When you are used to Apex, is this a totally different world, but a world that sooner or later we will also need to integrate within Apex.

Since I doing also a lot of pre-sales activities and always get some questions on Oracle Forms, I decided to attend a session on this matter: "How to Turn Older Oracle Forms Applications into a SOA Application". Grant Ronald did the introduction. He emphasized (again) that Oracle Forms is not going away, but that you need start looking at other tools and technologies. His most important message was that -- for Oracle customers struggling with the question which Oracle tool they need to choose -- it is no longer an OR ... OR decision, but rather an AND ... AND... solution. An Oracle Forms application can continue existing, aside an ADF application with SOA integration or even an apex development environment for enterprise-alike applications. I have the impression that the ADF-guru’s are not yet convinced by this, but a comment of Tom Kyte on an “Apex versus ADF” post is very enlightening on this matter: “APEX is as capable of building an enterprise-y application as anything else. … APEX can build anything from tiny to huge - you do not need the infrastructure and overheads the java environment would pull along in order to build big. … There are times for Java, there are times for APEX, there are times for each of the tools - they have their strengths and weakness.

Of course, I also wanted to attend a session of Steven Feuerstein, thé PL/SQL Evangelist. This is real entertainment, but with a high level of knowlegde transfer, maybe we should call it "knowledge-tainment". All his “knowledge” can be found on his site and the presentation on Weird PL/SQL can be downloaded from here.

The most interesting session for me (besides the apex ones) was given by Sue Harper: "Oracle SQL Developer: An Overview and New Feaures". The most recent version (1.5) confirms the fact that it becomes a valid and mature alternative for the Toads or SQL Navigators … and it is free. This shouldn’t be surprising since the driving force and ‘intellectual father’ of the tool is Mike Hichwa, as for Oracle Application Express.
And SQL Developer becomes even better since they announced that the tool will be extended with Data Modeling capabilities (ERDs, physical schema design, dimensional modeling, reverse engineering and more …). Finally, an alternative for the “data”-part of Oracle Designer. I’am really looking forward to this new extension.

воскресенье, 29 июня 2008 г.

Sometimes cornerRadius just isn't enough

Two tips for coders new to Flex... if you want to have rounded corners in mx.containers like VBox, HBox, Canvas, etc, set the borderStyle to solid and the borderThickness to 0, and then set your cornerRadius to whatever you want. If the borderStyle is left at none (default), the cornerRadius attribute seems broken and ineffective.

The second tip, if you want rounded corners at the top and bottom of your Panel, there's a property called roundedBottomCorners which defaults to false. When set to true, you will see rounding both top and bottom.

Here's an example http://www.crazedcoders.com/demos/rounded/

I should point out that this has been blogged previously here.

суббота, 28 июня 2008 г.

ODTUG: My Non-Apex sessions

The main reason for me to come to the ODTUG conference was -- besides presenting our own paper -- to see what other Oracle users are doing with the tool. So, most of the sessions I followed were Apex-related. As you can read on different other blogs, it is clear that Apex is hot. So, it is the right momentum to start using the tool, if you not already did.



But I also tried to follow some other sessions. A short impression:



"Service-enable Oracle E-Business Suite with Oracle SOA Suite BPEL Process Manager", by Basheer Khan. Basheer is a very gentle and nice person, especially for newbies. I met him during the “Presenters Drink” where he invited me to his session. During his presentation he showed how to create a BPEL process that integrates with Oracle E-Business Suite using Web Services. When you are used to Apex, is this a totally different world, but a world that sooner or later we will also need to integrate within Apex.



Since I doing also a lot of pre-sales activities and always get some questions on Oracle Forms, I decided to attend a session on this matter: "How to Turn Older Oracle Forms Applications into a SOA Application". Grant Ronald did the introduction. He emphasized (again) that Oracle Forms is not going away, but that you need start looking at other tools and technologies. His most important message was that -- for Oracle customers struggling with the question which Oracle tool they need to choose -- it is no longer an OR ... OR decision, but rather an AND ... AND... solution. An Oracle Forms application can continue existing, aside an ADF application with SOA integration or even an apex development environment for enterprise-alike applications. I have the impression that the ADF-guru’s are not yet convinced by this, but a comment of Tom Kyte on an “Apex versus ADF” post is very enlightening on this matter: “APEX is as capable of building an enterprise-y application as anything else. … APEX can build anything from tiny to huge - you do not need the infrastructure and overheads the java environment would pull along in order to build big. … There are times for Java, there are times for APEX, there are times for each of the tools - they have their strengths and weakness.



Of course, I also wanted to attend a session of Steven Feuerstein, thé PL/SQL Evangelist. This is real entertainment, but with a high level of knowlegde transfer, maybe we should call it "knowledge-tainment". All his “knowledge” can be found on his site and the presentation on Weird PL/SQL can be downloaded from here.



The most interesting session for me (besides the apex ones) was given by Sue Harper: "Oracle SQL Developer: An Overview and New Feaures". The most recent version (1.5) confirms the fact that it becomes a valid and mature alternative for the Toads or SQL Navigators … and it is free. This shouldn’t be surprising since the driving force and ‘intellectual father’ of the tool is Mike Hichwa, as for Oracle Application Express.

And SQL Developer becomes even better since they announced that the tool will be extended with Data Modeling capabilities (ERDs, physical schema design, dimensional modeling, reverse engineering and more …). Finally, an alternative for the “data”-part of Oracle Designer. I’am really looking forward to this new extension.

пятница, 27 июня 2008 г.

Sometimes cornerRadius just isn't enough

Two tips for coders new to Flex... if you want to have rounded corners in mx.containers like VBox, HBox, Canvas, etc, set the borderStyle to solid and the borderThickness to 0, and then set your cornerRadius to whatever you want. If the borderStyle is left at none (default), the cornerRadius attribute seems broken and ineffective.



The second tip, if you want rounded corners at the top and bottom of your Panel, there's a property called roundedBottomCorners which defaults to false. When set to true, you will see rounding both top and bottom.



Here's an example http://www.crazedcoders.com/demos/rounded/



I should point out that this has been blogged previously here.

ODTUG: My Non-Apex sessions

The main reason for me to come to the ODTUG conference was -- besides presenting our own paper -- to see what other Oracle users are doing with the tool. So, most of the sessions I followed were Apex-related. As you can read on different other blogs, it is clear that Apex is hot. So, it is the right momentum to start using the tool, if you not already did.



But I also tried to follow some other sessions. A short impression:



"Service-enable Oracle E-Business Suite with Oracle SOA Suite BPEL Process Manager", by Basheer Khan. Basheer is a very gentle and nice person, especially for newbies. I met him during the “Presenters Drink” where he invited me to his session. During his presentation he showed how to create a BPEL process that integrates with Oracle E-Business Suite using Web Services. When you are used to Apex, is this a totally different world, but a world that sooner or later we will also need to integrate within Apex.



Since I doing also a lot of pre-sales activities and always get some questions on Oracle Forms, I decided to attend a session on this matter: "How to Turn Older Oracle Forms Applications into a SOA Application". Grant Ronald did the introduction. He emphasized (again) that Oracle Forms is not going away, but that you need start looking at other tools and technologies. His most important message was that -- for Oracle customers struggling with the question which Oracle tool they need to choose -- it is no longer an OR ... OR decision, but rather an AND ... AND... solution. An Oracle Forms application can continue existing, aside an ADF application with SOA integration or even an apex development environment for enterprise-alike applications. I have the impression that the ADF-guru’s are not yet convinced by this, but a comment of Tom Kyte on an “Apex versus ADF” post is very enlightening on this matter: “APEX is as capable of building an enterprise-y application as anything else. … APEX can build anything from tiny to huge - you do not need the infrastructure and overheads the java environment would pull along in order to build big. … There are times for Java, there are times for APEX, there are times for each of the tools - they have their strengths and weakness.



Of course, I also wanted to attend a session of Steven Feuerstein, thé PL/SQL Evangelist. This is real entertainment, but with a high level of knowlegde transfer, maybe we should call it "knowledge-tainment". All his “knowledge” can be found on his site and the presentation on Weird PL/SQL can be downloaded from here.



The most interesting session for me (besides the apex ones) was given by Sue Harper: "Oracle SQL Developer: An Overview and New Feaures". The most recent version (1.5) confirms the fact that it becomes a valid and mature alternative for the Toads or SQL Navigators … and it is free. This shouldn’t be surprising since the driving force and ‘intellectual father’ of the tool is Mike Hichwa, as for Oracle Application Express.

And SQL Developer becomes even better since they announced that the tool will be extended with Data Modeling capabilities (ERDs, physical schema design, dimensional modeling, reverse engineering and more …). Finally, an alternative for the “data”-part of Oracle Designer. I’am really looking forward to this new extension.

понедельник, 23 июня 2008 г.

She goes ICT

For all fellow Evangilisation misses and IT misses (it's available in flemish or french):

суббота, 21 июня 2008 г.

Sometimes cornerRadius just isn't enough

Two tips for coders new to Flex... if you want to have rounded corners in mx.containers like VBox, HBox, Canvas, etc, set the borderStyle to solid and the borderThickness to 0, and then set your cornerRadius to whatever you want. If the borderStyle is left at none (default), the cornerRadius attribute seems broken and ineffective.

The second tip, if you want rounded corners at the top and bottom of your Panel, there's a property called roundedBottomCorners which defaults to false. When set to true, you will see rounding both top and bottom.

Here's an example http://www.crazedcoders.com/demos/rounded/

I should point out that this has been blogged previously here.

пятница, 20 июня 2008 г.

The Apex Development Workplace

We talked about "The Apex Project Workplace" during our presentation at ODTUG Kaleidoscope. This workplace could look like something as presented on the following picture:


The desk, where a developer is working, is like a workbench where all necessary materials are available that can help to efficiently guide and increase the productivity of the development process.

In your development environment, you should always be looking for manners to improve the productivity of your work: do it quicker, but don't compromise the quality of your work. The latter is one of the reasons why we started our QA-Viewer-for-Apex.

Therefore, my favorite -- and in my opinion -- the most useful Apex session at the conference was given by Patrick Wolf.

He showed how you can write quicker and better code by extending the "toolset" within your apex development workplace with "open source" tools. On the one hand, Patrick demonstrated a set of tools around Mozilla Firefox which are useful for any webdevelopment (Firebug, WebDeveloper, Yslow and Live HTTP Header). On the other hand, Patrick developed his own extensions on top of the Apex Application Builder: the ApexLib, the Apex Builder plug in and Apex Essentials. Probably you can read more about in on other blogs or on Patrick's site

Bottom line is, that everybody should consider to add this tools to his Apex development workplace.

среда, 18 июня 2008 г.

Sometimes cornerRadius just isn't enough

Two tips for coders new to Flex... if you want to have rounded corners in mx.containers like VBox, HBox, Canvas, etc, set the borderStyle to solid and the borderThickness to 0, and then set your cornerRadius to whatever you want. If the borderStyle is left at none (default), the cornerRadius attribute seems broken and ineffective.

The second tip, if you want rounded corners at the top and bottom of your Panel, there's a property called roundedBottomCorners which defaults to false. When set to true, you will see rounding both top and bottom.

Here's an example http://www.crazedcoders.com/demos/rounded/

I should point out that this has been blogged previously here.

Meeting up with Speakers & Ambassadors

Yesterday evening the ODTUG team had arranged a reception for the speakers and ambassadors in the Sheraton hotel where all activity is taking place.

The meet-up was great and I could attend also as being the ambassador for 2 of my colleagues Karen Van Hellemont and Jan Huyzentruyt who gave a presentation regarding the QA-tool our Apex Core Team has build for developing quality-proof Apex Applications.

We had the opportunity to meet up with European Colleagues and ACE Directors whilst having great cocktails, which spiced up the conversations ;o)

Frans Thamura, Mauricio Naranjo, Basheer Khan, Ameed Taylor, ... were some of the different ACE's I was able to meet-up with on the reception, and we had some great discussions ;o) More or less Oracle related, hobby related in some sort, ... it was fun and I'm very grateful this reception was organized to be able to meet all presenters and ambassadors.

In the next article you will get to see how an ambassador looks like ;o))

вторник, 17 июня 2008 г.

Sometimes cornerRadius just isn't enough

Two tips for coders new to Flex... if you want to have rounded corners in mx.containers like VBox, HBox, Canvas, etc, set the borderStyle to solid and the borderThickness to 0, and then set your cornerRadius to whatever you want. If the borderStyle is left at none (default), the cornerRadius attribute seems broken and ineffective.

The second tip, if you want rounded corners at the top and bottom of your Panel, there's a property called roundedBottomCorners which defaults to false. When set to true, you will see rounding both top and bottom.

Here's an example http://www.crazedcoders.com/demos/rounded/

I should point out that this has been blogged previously here.

понедельник, 16 июня 2008 г.

3D Product Viewer in Flex and PV3D

I’m constantly asked about ‘getting started’ tutorials in Flex and PV3D. Don’t have time to write any, so I try to point out good sources when they become available. This article on Creating a 3D Product Viewer in Flex 3 covers everything from installing PV3D to model creation to setting up a project [...]

суббота, 14 июня 2008 г.

Sometimes cornerRadius just isn't enough

Two tips for coders new to Flex... if you want to have rounded corners in mx.containers like VBox, HBox, Canvas, etc, set the borderStyle to solid and the borderThickness to 0, and then set your cornerRadius to whatever you want. If the borderStyle is left at none (default), the cornerRadius attribute seems broken and ineffective.

The second tip, if you want rounded corners at the top and bottom of your Panel, there's a property called roundedBottomCorners which defaults to false. When set to true, you will see rounding both top and bottom.

Here's an example http://www.crazedcoders.com/demos/rounded/

I should point out that this has been blogged previously here.

пятница, 13 июня 2008 г.

ApEx: ORA-20001: Sync Error

While trying to publish an translated application I keep running into the next error:

ORA-20001: Sync error: WWV_FLOW_PAGE_PLUGS.PLUG_QUERY_NO_DATA_FOUND ...

After trying some more I got:

WWV_FLOW_PAGE_PLUGS.CSV_OUTPUT_LINK_TEXT
WWV_FLOW_PAGE_PLUGS.PLUG_FOOTER
WWV_FLOW_PAGE_PLUGS.PRN_PAGE_HEADER

After trying 25 times it was finally published but I was not planning to try that often each time. If you are running ApEx version 3.0.1.00.07 or 3.0.1.00.08 then this is actually a database bug but you can find a patch for a workaround on Metalink, Patch nr: 6456920.

Description ORA-22922 WHEN PUBLISHING A TRANSLATED APPLICATION
Product Oracle Application Express (formerly HTML DB)
Release 10.2.0.3

After running this patch I could publish my translated application without any problem.

среда, 11 июня 2008 г.

Sometimes cornerRadius just isn't enough

Two tips for coders new to Flex... if you want to have rounded corners in mx.containers like VBox, HBox, Canvas, etc, set the borderStyle to solid and the borderThickness to 0, and then set your cornerRadius to whatever you want. If the borderStyle is left at none (default), the cornerRadius attribute seems broken and ineffective.

The second tip, if you want rounded corners at the top and bottom of your Panel, there's a property called roundedBottomCorners which defaults to false. When set to true, you will see rounding both top and bottom.

Here's an example http://www.crazedcoders.com/demos/rounded/

I should point out that this has been blogged previously here.

Migrate from Hibernate to Oracle Toplink (EclipseLink)

Douglas Clark, Director of Product Management, has recently participated in a discussion with Oracle ACE's regarding the key differentiators of Oracle Toplink versus other ORM Mappings.

This is a very interesting discussion for key decision makers who are thinking about ORM Solutions for their existing or new JEE Applications.

The key differentiators according to Doug Clark:

  1. Performance and scalability: Our out of the box caching architecture is allows us to minimize object creation and share instances. The caching offers out of the box support for single node and clustered deployments. We have been involved in many internal and external benchmarking efforts that maintain our confidence that we have the best performing and scaling ORM solution available.
  2. Support for leading relation databases: We continue to support all leading relational databases with extensions specific to each. We are also the best ORM solution for the Oracle database. We continue to enhance this support in 11gR1 and EclipseLink.
  3. A comprehensive persistence solution: While we offer industry leading object-relational support we have also leveraged our core mapping functionality to deliver object-XML (JAXB), Service Data Object (SDO), as well as non-relational (EIS via JCA) and Database Web Services. Depending on your requirements you can use one or more of the persistence services based on the same core persistence engine.
  4. Donated to Open Source Community: Full functionality of Oracle TopLink now available in open source EclipseLink project. OracleAS/SOA customers will continue to leverage the functionality of TopLink now developed in open source. Those looking for an open source solution can now choose to use EclipseLink and gain the benefits of our long commercial usage and our ongoing development efforts.
  5. JPA Support: As the JPA 1.0 specification co-leads Oracle and the TopLink/EclipseLink team has been focussed on delivering a JPA compliant solution with supporting integration with JDeveloper, ADF, Spring, and the Elcipse IDE (Dali project). We have delivered the JPA 1.0 reference implementation and with EclipseLink will now deliver the JPA 2.0 reference implementation. We are focussed on standards based development while still offering many advanced capabilities as well.While Hibernate may have the current lead in developer mind-share we are focussed on continuing to deliver our world-class functionality to the entire Java community.

вторник, 10 июня 2008 г.

Sometimes cornerRadius just isn't enough

Two tips for coders new to Flex... if you want to have rounded corners in mx.containers like VBox, HBox, Canvas, etc, set the borderStyle to solid and the borderThickness to 0, and then set your cornerRadius to whatever you want. If the borderStyle is left at none (default), the cornerRadius attribute seems broken and ineffective.

The second tip, if you want rounded corners at the top and bottom of your Panel, there's a property called roundedBottomCorners which defaults to false. When set to true, you will see rounding both top and bottom.

Here's an example http://www.crazedcoders.com/demos/rounded/

I should point out that this has been blogged previously here.

понедельник, 9 июня 2008 г.

Migrate from Hibernate to Oracle Toplink (EclipseLink)

Douglas Clark, Director of Product Management, has recently participated in a discussion with Oracle ACE's regarding the key differentiators of Oracle Toplink versus other ORM Mappings.

This is a very interesting discussion for key decision makers who are thinking about ORM Solutions for their existing or new JEE Applications.

The key differentiators according to Doug Clark:

  1. Performance and scalability: Our out of the box caching architecture is allows us to minimize object creation and share instances. The caching offers out of the box support for single node and clustered deployments. We have been involved in many internal and external benchmarking efforts that maintain our confidence that we have the best performing and scaling ORM solution available.
  2. Support for leading relation databases: We continue to support all leading relational databases with extensions specific to each. We are also the best ORM solution for the Oracle database. We continue to enhance this support in 11gR1 and EclipseLink.
  3. A comprehensive persistence solution: While we offer industry leading object-relational support we have also leveraged our core mapping functionality to deliver object-XML (JAXB), Service Data Object (SDO), as well as non-relational (EIS via JCA) and Database Web Services. Depending on your requirements you can use one or more of the persistence services based on the same core persistence engine.
  4. Donated to Open Source Community: Full functionality of Oracle TopLink now available in open source EclipseLink project. OracleAS/SOA customers will continue to leverage the functionality of TopLink now developed in open source. Those looking for an open source solution can now choose to use EclipseLink and gain the benefits of our long commercial usage and our ongoing development efforts.
  5. JPA Support: As the JPA 1.0 specification co-leads Oracle and the TopLink/EclipseLink team has been focussed on delivering a JPA compliant solution with supporting integration with JDeveloper, ADF, Spring, and the Elcipse IDE (Dali project). We have delivered the JPA 1.0 reference implementation and with EclipseLink will now deliver the JPA 2.0 reference implementation. We are focussed on standards based development while still offering many advanced capabilities as well.While Hibernate may have the current lead in developer mind-share we are focussed on continuing to deliver our world-class functionality to the entire Java community.

суббота, 7 июня 2008 г.

Sometimes cornerRadius just isn't enough

Two tips for coders new to Flex... if you want to have rounded corners in mx.containers like VBox, HBox, Canvas, etc, set the borderStyle to solid and the borderThickness to 0, and then set your cornerRadius to whatever you want. If the borderStyle is left at none (default), the cornerRadius attribute seems broken and ineffective.

The second tip, if you want rounded corners at the top and bottom of your Panel, there's a property called roundedBottomCorners which defaults to false. When set to true, you will see rounding both top and bottom.

Here's an example http://www.crazedcoders.com/demos/rounded/

I should point out that this has been blogged previously here.

пятница, 6 июня 2008 г.

Migrate from Hibernate to Oracle Toplink (EclipseLink)

Douglas Clark, Director of Product Management, has recently participated in a discussion with Oracle ACE's regarding the key differentiators of Oracle Toplink versus other ORM Mappings.

This is a very interesting discussion for key decision makers who are thinking about ORM Solutions for their existing or new JEE Applications.

The key differentiators according to Doug Clark:

  1. Performance and scalability: Our out of the box caching architecture is allows us to minimize object creation and share instances. The caching offers out of the box support for single node and clustered deployments. We have been involved in many internal and external benchmarking efforts that maintain our confidence that we have the best performing and scaling ORM solution available.
  2. Support for leading relation databases: We continue to support all leading relational databases with extensions specific to each. We are also the best ORM solution for the Oracle database. We continue to enhance this support in 11gR1 and EclipseLink.
  3. A comprehensive persistence solution: While we offer industry leading object-relational support we have also leveraged our core mapping functionality to deliver object-XML (JAXB), Service Data Object (SDO), as well as non-relational (EIS via JCA) and Database Web Services. Depending on your requirements you can use one or more of the persistence services based on the same core persistence engine.
  4. Donated to Open Source Community: Full functionality of Oracle TopLink now available in open source EclipseLink project. OracleAS/SOA customers will continue to leverage the functionality of TopLink now developed in open source. Those looking for an open source solution can now choose to use EclipseLink and gain the benefits of our long commercial usage and our ongoing development efforts.
  5. JPA Support: As the JPA 1.0 specification co-leads Oracle and the TopLink/EclipseLink team has been focussed on delivering a JPA compliant solution with supporting integration with JDeveloper, ADF, Spring, and the Elcipse IDE (Dali project). We have delivered the JPA 1.0 reference implementation and with EclipseLink will now deliver the JPA 2.0 reference implementation. We are focussed on standards based development while still offering many advanced capabilities as well.While Hibernate may have the current lead in developer mind-share we are focussed on continuing to deliver our world-class functionality to the entire Java community.

вторник, 3 июня 2008 г.

Sometimes cornerRadius just isn't enough

Two tips for coders new to Flex... if you want to have rounded corners in mx.containers like VBox, HBox, Canvas, etc, set the borderStyle to solid and the borderThickness to 0, and then set your cornerRadius to whatever you want. If the borderStyle is left at none (default), the cornerRadius attribute seems broken and ineffective.

The second tip, if you want rounded corners at the top and bottom of your Panel, there's a property called roundedBottomCorners which defaults to false. When set to true, you will see rounding both top and bottom.

Here's an example http://www.crazedcoders.com/demos/rounded/

I should point out that this has been blogged previously here.

Calling Webservices from pl/sql

For a client of us we had to call a webservice from a database, and the received information that we received from this call was needed in another procedure.

It was the first time for me that I had to do this and I believe that not so many people now of this functionality in the database and that’s why it is obviously a good idea to post this on our blog.

It is even possible to let the database be a webservice provider, but in this case the webservice already existed and should simply be called by the database.

What was the objective: we wanted to call the webservice from the database, get the resulting XML file and analyze some of the content of the returned XML file and then do some actions with the information that the webservice provided us.

Therefore I wrote 3 procedures in a package:
• fnc$_get_xml
• fnc$_handle_xml
• prc$_ws_call

As you will see when you look at the code it is possible to make this much more dynamically but for this case we only had to call only one specific webservice, as usual you can make it very complex but for the blog I made the procedures and functions as simple as possible.

The first function that I will explain is the prc$_ws_call
This procedure will contact the function fnc$_get_xml that will get the xml file. After this function the fnc$_handle_xml will be called to retrieve specific information out of the XML file.
When this is done the received values will be printed



PROCEDURE prc$_ws_call
IS
v_xml VARCHAR2(32767);
v_type cab_base_adres.type%TYPE;
r_receive r_info;
BEGIN
v_xml := fnc$_get_xml(p_search => 'search value'); --call to webservice
r_receive := fnc$_handle_xml(v_xml); --analization of xml content
dbms_output.put_line(‘value nr1=’||r_receive.value1) ;
dbms_output.put_line(‘value nr2=’||r_receive.value2) ;
EXCEPTION
WHEN OTHERS THEN
dbms_output.put_line(sqlcode||sqlerrm) ;
END;


fnc$_get_xml
This function will receive a parameter(search) this parameter will be included in the soap call(called v_soap_request).
Ones that I have build my soap envelope, I have to create a httpRequest, this is the variable v_httpRequest which is of the type utl_http.req.
For this variable I have to set some parameters like the webservice url that I will call, the content-type (plain text in this case), the content_length of the soap envelope and the specification that this is a soapaction. This is the preparation for the call to the webservice.

Next thing to do is to write this data to the body of the http request, this is done with the utl_http.write_text where we give in the http_request and the soap_request.
Now we want to receive the response from our soap call.
This will be created with the utl_http.get_response which is of the utl_http.resp type.

Next thing we want, is to have this file in a readable form. Therefore we use the utl_http.read_text, that will translate the response in a readable variable.

FUNCTION fnc$_get_xml(p_search VARCHAR2)
RETURN VARCHAR2
IS
v_soapRequest VARCHAR2(32000);
v_soapResponse VARCHAR2(32767);
v_httpRequest utl_http.req;
v_httpResponse utl_http.resp;
BEGIN
v_soapRequest :=
'<?xml version="1.0" encoding="utf-8" standalone="no"?>
<SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" xmlns:apachesoap="http://xml.apache.org/xml-soap" xmlns:impl="<the webservice>" xmlns:intf="<the webservice>" xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/" xmlns:tns1=" " xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/" xmlns:wsdlsoap="http://schemas.xmlsoap.org/wsdl/soap/" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" >
<SOAP-ENV:Body>
<mns: <webservice name>xmlns:mns="<services link>" SOAP-ENV:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/">
<inputAddress xsi:type="tns1: <input parameter name>">
<input search xsi:type="xsd:string">'||p_search||'</search>
</mns: <webservice name> >
</SOAP-ENV:Body>
</SOAP-ENV:Envelope>';

v_httpRequest:= utl_http.begin_request
(' '
,'POST'
,'HTTP/1.1');

utl_http.set_header(v_httpRequest, 'Content-Type', 'text/xml');
utl_http.set_header(v_httpRequest, 'Content-Length', length(v_soapRequest));
utl_http.set_header(v_httpRequest, 'SOAPAction', '');

utl_http.write_text(v_httpRequest, v_soapRequest);
v_httpResponse:= utl_http.get_response(v_httpRequest);
utl_http.read_text(v_httpResponse, v_soapResponse);
utl_http.end_response(v_httpResponse);
RETURN v_soapResponse;
EXCEPTION
WHEN OTHERS THEN
dbms_output.put_line(sqlcode||sqlerrm) ;
dbms_output.put_line('Error in fnc$_get_xml') ;
utl_http.end_response(v_httpResponse);
raise;
RETURN NULL;
END;


Great, we have now received the xml file that contains the result of our request. Now we want to retrieve the data we need, out of this XML file.
Therefore I will call the fnc$_handle_xml function with the received XM file as parameter.

I will have to handle the content of the xml file. To make this easier I am going to put the content of the XML file into an XMLType by using the XMLType.createXML function. Now the parameter resp contains the XML file. But I am only interested in a certain part of the XML file. By using the ‘extract’ function I am able to get a certain part out of the hierarchical structure of the XML file.

Next thing that I want to receive is the information of certain parts of this resp variable. I will put his in the resp1 variable which make it possible to always use the resp file for the next value I want to retrieve.

In this example I get 2 values out of the XML file. And I will return this back to the calling procedure.

FUNCTION fnc$_handle_xml(p_xml VARCHAR2)
RETURN r_info
IS
resp XMLType;
resp1 XMLType;
r_result r_info;
BEGIN
resp:= XMLType.createXML(p_xml);
resp:= resp.extract('/soap:Envelope/soap:Body/child::node()'
, 'xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/"'
);

resp1:= resp.extract('/multiRef[2]/<xml level>/text()'
, 'xmlns:ns2="<beans url>"'
);
IF resp1 IS NOT NULL THEN
r_result.value1 := resp1.getStringVal();
END IF;

resp1:= resp.extract('/multiRef[2]/<xml level>/text()'
, 'xmlns:ns2="<beans url>"'
);
IF resp1 IS NOT NULL THEN
r_result.value2 := resp1.getStringVal();
END IF;

RETURN r_result;
EXCEPTION
WHEN OTHERS THEN
dbms_output.put_line(sqlcode||sqlerrm) ;
RETURN r_result;
END;


понедельник, 2 июня 2008 г.

Sometimes cornerRadius just isn't enough

Two tips for coders new to Flex... if you want to have rounded corners in mx.containers like VBox, HBox, Canvas, etc, set the borderStyle to solid and the borderThickness to 0, and then set your cornerRadius to whatever you want. If the borderStyle is left at none (default), the cornerRadius attribute seems broken and ineffective.

The second tip, if you want rounded corners at the top and bottom of your Panel, there's a property called roundedBottomCorners which defaults to false. When set to true, you will see rounding both top and bottom.

Here's an example http://www.crazedcoders.com/demos/rounded/

I should point out that this has been blogged previously here.

How to reformat the highwatermark of a table after a delete?

For test purpose I had to delete and recreate a lot of records in a database.
So I just did a delete of all the records, every time I wanted to clean up my database.

Some of these tables have a few millions of records. So after a couple of times cleaning up and re-entering data into the database,
I had the impression that the database was getting slower and slower in showing me the results of my query.

I thought that this could have something to do with my indexes but I didn't know how to fix this.

That's why I contacted a few of my expert database colleagues and they learned me the following:
The table uses a highwatermark value and every time you add a record into the table the table will raise this value.
When you do a simple delete the value of this highwatermark will be kept, so I was wrong in suspecting the index to be the cause of this problem it was in fact the table itself who caused this.

So how do you fix this?

If you want to clean a lot of records in a database(in bulk) you have 2 possibilities to keep your Highwatermark clean.

First option, and the one that worked best in my case was: use TRUNCATE TABLE This will remove all the content of the table and will put the 'highwatermark' back to 0.

The advantage of this option is that is will will work a bit faster then a normal deletion.
But there is also one disadvantage. If you want to use this, you will have to disable all the foreign keys for this table before starting the truncate.

So doing this in a live database is not really the best thing to do I believe :-)


The other option is just use the delete as you used to do, but after the deletion of the records use : ALTER TABLE SHRINK SPACE
You can even use the cascade option for this shrink, this will shrink all the highwatermarks of the depending objects.
This option is only available from oracle 10g.

Thanks Erwin and Hans for helping me with this!

воскресенье, 1 июня 2008 г.

Sometimes cornerRadius just isn't enough

Two tips for coders new to Flex... if you want to have rounded corners in mx.containers like VBox, HBox, Canvas, etc, set the borderStyle to solid and the borderThickness to 0, and then set your cornerRadius to whatever you want. If the borderStyle is left at none (default), the cornerRadius attribute seems broken and ineffective.

The second tip, if you want rounded corners at the top and bottom of your Panel, there's a property called roundedBottomCorners which defaults to false. When set to true, you will see rounding both top and bottom.

Here's an example http://www.crazedcoders.com/demos/rounded/

I should point out that this has been blogged previously here.