Try naming your derived simpleType:

<xs:element name="AntalBarnHemma" type ="tns:AntaBarnHemmaType"/>
<xs:simpleType name="AnteBarnHemmaType">
       <xs:restriction base="xs:short">
       <xs:totalDigits value="1" />
       <xs:minInclusive value="0" />
       <xs:maxInclusive value="9" />
       </xs:restriction>
</xs:simpleType>

This will force Axis to generate a type for you, and then you cast the
short to this type.

Anne

On Thu, Jun 12, 2008 at 5:42 PM, Roger P
<[EMAIL PROTECTED]> wrote:
> On Wed, Jun 11, 2008 at 8:48 PM, David Ojeda <[EMAIL PROTECTED]> wrote:
>> Hello,
>>
>> I didn't notice you were using axis 1.2.1. Is axis generating a 
>> AntalBarnHemma
>> class? How do you set this? Could you send that piece of code?
>> I am guessing that BeraknaBostadsbidragRequest has a setAntalBarnHemma method
>> that receives a short, but perhaps there is a method that receives a
>> different object...
>
> Yes, there is a class and a setter that takes a short, all generated
> by Axis. The code isn't very interesting. It looks like something like
> this:
> myReq.setAntalBarnHemma((short) 1);
>
> There isn't any other method to set the value but there is a lot of
> configuration options and maybe there is some method that could be
> over ridden to change the XML that Axis generates.
>
> <AntalBarnHemma xsi:type="xsd:short">1</AntalBarnHemma>
>
> At the moment I'm leaning towards ditching Axis an use some simple XML
> templates. I did however find a possible explanation i this thread:
> http://www.mail-archive.com/[EMAIL PROTECTED]/msg17417.html
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
>

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to