asked on
<sch:SpeedInfo>
<ns:Bandwidth xmlns:ns="http://lpp.att.com/logical/classofservice/schema/v1">4000000</ns:Bandwidth>
<ns:AccessSpeed xmlns:ns="http://lpp.att.com/logical/classofservice/schema/v1">4000000</ns:AccessSpeed>
</sch:SpeedInfo>
My Java condition: if (request.getSpeedInfo() == null || (request.getSpeedInfo() == null && request.getSpeedInfo().getBandwidth() == null)){
throw new Exception(" SpeedInfo Bandwidth must be passed in the request ");
}
1. if <speedInfo> itself is not present
2. <sch:SpeedInfo> is present, but bandwidth not present:
<sch:SpeedInfo>
<ns:AccessSpeed xmlns:ns="http://lpp.att.com/logical/classofservice/schema/v1">40000000</ns:AccessSpeed>
</sch:SpeedInfo>
3. Bandwidth is present but no value
<sch:SpeedInfo>
<ns:Bandwidth xmlns:ns="http://lpp.att.com/logical/classofservice/schema/v1"></ns:Bandwidth>
<ns:AccessSpeed xmlns:ns="http://lpp.att.com/logical/classofservice/schema/v1">40000000</ns:AccessSpeed>
</sch:SpeedInfo>
ASKER
org.apache.cxf.interceptor.Fault: Unmarshalling Error: cvc-datatype-valid.1.2.1: '' is not a valid value for 'integer'.
at org.apache.cxf.jaxb.JAXBEncoderDecoder.unmarshall(JAXBEncoderDecoder.java:908)
at org.apache.cxf.jaxb.JAXBEncoderDecoder.unmarshall(JAXBEncoderDecoder.java:712)
Java is a platform-independent, object-oriented programming language and run-time environment, designed to have as few implementation dependencies as possible such that developers can write one set of code across all platforms using libraries. Most devices will not run Java natively, and require a run-time component to be installed in order to execute a Java program.
TRUSTED BY
ASKER
Bandwidth is an Integer type.
Open in new window
this is one of the scenarios that I will be testing on my request:
Open in new window