Posts

Showing posts with the label JDeveloper Web Service WSDL

Why do I get a null value back...

Why do I get a null value back from my JAVA object when the data was there in my XML stream? This is a question, that I have seen over and over with different O2X mapping technologies. Sometime using JAXB, sometime using Web Services, and now with SDO. It's also a common issue with .NET Web services. I do see the data on the wire or in my XML file, but I am getting a null value once I try to retrive it using the JAVA accessor APIs. How is this possible, is this a bug? The short answer is No. It's a feature!!! When the instance data do not match with the schema definition, it will be silently ignored by the XML processor (a.k.a. de-serialization layer). Let me try to give a simple example to illustrate this. XML Schema 1 <? xml version = "1.0" encoding = "UTF-8" ?> 2 < xsd:schema xmlns = "http://www.oracle.com/ias/automation/dte" 3 xmlns:xsd = "http://www.w3.org/2001/XMLSchema" 4 targetNamespace...

Multiple servies in a single application.

Image
Here are some simple step by step instructions to be able to package two Web Services that implement the same service with different SEI, using a single contract (the wire format as described in the WSDL). Here is the Ant task once would write to achieve this: <o:topdownassemble uri="PojoPricer" output="./to_hide" classname="com.siebel.ordermanagement.quote.psp.PojoPriceCalculator" input="./classes" wsdl="./etc/calculateprice.wsdl"/> <o:topdownassemble uri="XmlPricer" output="./to_hide" classname="com.siebel.ordermanagement.quote.psp.XmlPriceCalculator" input="./classes" wsdl="./etc/calculateprice.wsdl" ear="./dist/${app.name}.ear" databinding="false" appendtoexistingdds="true/> Unfortunately, this will not work, as the two service endpoints are using the same service name. [o:topDownAssemble] oracle.j2ee.ws.common.tools.api.Vali...

model error: element "{http://...}foo" not found

As I got some reply off-line, on my previous post, it's time to gives the explanation for the first invalid WSDL. First, here is my ANT script (build.xml), that can be used to validate any WSDL in JDeveloper 10.1.3: <project name="blog-demo" default="all" basedir="." xmlns:o="antlib:oracle"> < property file="build.properties"/> < target name="analyze"> < o:analyze wsdl="http://www.rajkovic.org/ws/wsdl/bads/annotatedBank.wsdl"/> < /target> < /project> and the output analyze: model error: element "{http://ws.rajkovic.org/demo/annotatedBank}create-account" not found. In annotatedBank.wsdl , there is a missing element: < types> . The < schema> element cannot be a direct child of the < definitions> element. In my broken sample, the schema is invisible, and therefore the element 'create-account' cannot be found. Check the valid WSD...