And the new error is very likely because your SOAP message has an empty
<ns1:brokerage/> element, which is not valid for an xsd:decimal value.
- Dennis
Dan Washusen wrote:
Thanks for that Sanjiva, you were spot on. I did have the elements
out of order in the SOAP envolope...
I'm not getting:
[junit] Testcase:
testprocess(org.apache.axis2.RetrieveClientDetailsTest): Caused
an ERROR
[junit] java.lang.NumberFormatException: For input string: ""
[junit] java.lang.RuntimeException:
java.lang.NumberFormatException : For input string: ""
[junit] at
org.apache.axis2.RetrieveClientDetailsStub.fromOM(RetrieveClientDetailsStub.java:345)
[junit] at
org.apache.axis2.RetrieveClientDetailsStub.process(RetrieveClientDetailsStub.java
:114)
[junit] at
org.apache.axis2.RetrieveClientDetailsTest.testprocess(RetrieveClientDetailsTest.java:24)
[junit] Caused by: java.lang.NumberFormatException: For input
string: ""
[junit] at
java.lang.NumberFormatException.forInputString(NumberFormatException.java:48)
[junit] at java.lang.Long.parseLong(Long.java:415)
[junit] at java.lang.Long.parseLong(Long.java:452)
[junit] at
org.apache.axis2.databinding.utils.ConverterUtil.convertTolong(ConverterUtil.java:269)
[junit] at
au.com.nxf.www.nxfmessagetypes.ClientDetailsType$Factory.parse(ClientDetailsType.java:571)
[junit] at
au.com.nxf.www.retrieveclientdetails.RetrieveClientDetailsProcessResponse$Factory.parse(RetrieveClien
tDetailsProcessResponse.java:149)
[junit] at
org.apache.axis2.RetrieveClientDetailsStub.fromOM(RetrieveClientDetailsStub.java
:337)
[junit] ... 17 more
But that's probably a whole new issue...
As a side note, if any of the Asix2 developers are listening. You
could possibly improve the user friendliness of Axis by making the
exceptions a bit more informative...
e.g. "Unexpected subelement fees, expected element contact. It's
possible the SOAP envelope doesn't adhere to the XSD" or something...
On 5/12/06, * Sanjiva Weerawarana* <[EMAIL PROTECTED]
<mailto:[EMAIL PROTECTED]>> wrote:
On Fri, 2006-05-12 at 12:21 +1000, Dan Washusen wrote:
> Hi All,
> I'm getting a weird error and I was hoping someone could tell me
what
> I'm doing wrong because I have no idea what's going on...
>
> <xsd:element name="company" type="xsd:string"
> nillable="true"/>
> <xsd:element name="abnacn" type="xsd:string"
> nillable="true"/>
> <xsd:element name="cmtAccount1Id" type="xsd:long"
> nillable="true"/>
> <xsd:element name="cmtAccount2Id" type="xsd:long"
> nillable="true"/>
> <xsd:element name="contact" type="ContactType"
> nillable="true" minOccurs="1" maxOccurs="unbounded"/>
> <xsd:element name="address" type="SiteType"
> nillable="true" minOccurs="1" maxOccurs="unbounded"/>
> <xsd:element name="fees" type="ClientFeesType"/>
So according to your schema, before the <fees> element, there must
be at
least one <contact> element and an <address> element.
> <ns1:company/>
> <ns1:abnacn/>
> <ns1:fees>
> <ns1:lineFee>7.5</ns1:lineFee>
> <ns1:shortFee>10</ns1:shortFee>
> <ns1:brokerage/>
> <ns1:interestRate> 5.75</ns1:interestRate>
> <ns1:rebate/>
> </ns1:fees>
But the SOAP message doesn't have it. It looks like whoever generated
the SOAP envelope is not adhering to the schema.
Sanjiva.