JDeveloper's WSDL Editor - how to get better clues

Recently, I have been helping customers with broken WSDL files. I decided it would be valuable to others as well. Here are my 2 tips.

  • JDeveloper Editor

  • As you can see in the screen shoot below, you can get usefull hint from the WSDL editor in JDeveloper 10g R3:

    1. Switch the Editor view from Design to Source.

    2. If there is any syntax error, you will see some orange or red on the right side of the screen.

    3. If you mouse-over the lines that are underline in orange or red, you will see the pop-up window with some information describing the syntax error. In this case, there is something wrong with the <include> element.

    WSDL Editor

    Once you have the first hint, you are on the right path to solve your problem. The next step is to compare the broken WSDL with other valid samples. It becomes easier to figure out that the include element need to be wrapped and is not in the expected namespace.
        <schema xmlns="http://www.w3.org/2001/XMLSchema"
          <import namespace="http://vs.cegetel.com" schemaLocation="./test1.xsd"/>
    Finding that include should be replace with import may be a little harder to figure out, at first.

  • WSA ant task analyze

  • Another powerfull tool in your toolbox is the analyze task. Here is a very simple ant script that can be used, within JDeveloper:

      <project name="otn" basedir="." xmlns:o="antlib:oracle">
          property file="build.properties"/>
        <target name="check-wsdl">
          <o:analyze wsdl="./src/test.wsdl"/>

    The error message, when you execute the target 'check-wsdl' will give you another hint:
    model error: element "{http://vs.cegetel.com}creerContracSimp" not found.
    'creerContracSimp' is defined in test1.xsd but is not found by the WSDL processor. This is the second hint that guide you toward the invalid include element.

With the two tools combined, you are in good hands.

Hope you will find this usefull.


Popular posts from this blog

Changing the version of JDK used by JDeveloper

Connection reset from a WCF Web Service

Test locally first, then deploy to the cloud.