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.
With the two tools combined, you are in good hands.
Hope you will find this usefull.
-ecco
- JDeveloper Editor
- Switch the Editor view from Design to Source.
- If there is any syntax error, you will see some orange or red on the right side of the screen.
- 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.
- WSA ant task analyze
As you can see in the screen shoot below, you can get usefull hint from the WSDL editor in JDeveloper 10g R3:
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.
<wsdl:types>
<schema xmlns="http://www.w3.org/2001/XMLSchema"
targetNamespace="http://ws.cegetel.com/unautrens">
<import namespace="http://vs.cegetel.com" schemaLocation="./test1.xsd"/>
</schema>
</wsdl:types>
Finding that include should be replace with import may be a little harder to figure out, at first.
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"/>
</target>
</project>
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.
-ecco
Comments