You are viewing a plain text version of this content. The canonical link for it is here.
Posted to java-dev@axis.apache.org by Mark Badorrek <mb...@avoga.com.au> on 2007/04/16 03:21:18 UTC

Problems reading attributes

 
I have a soap request using axis2-1.1  to generate the client and server bindings.
The client seems to render the xml just fine, but the server side seems to have a problem.
 
Specifically, here is a snippet of code that is generated from the client:
 
<Field Id="TOTALSUMINSURED" xmlns:ns0="http://***********************">100000</Field <http://aon.com.au/ebixconvertortypes/2007">100000</Field> >
 
If I attempt to do an xmlText() on the element I get the following string: 
 
<xml-fragment Id="TOTALSUMINSURED" xmlns:ns0="http://***********************" xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/">100000</xml-fragment>
 
This appears correct to me. This snippet is referred to in the generated code as a "FieldType".
 
FieldType blah = fieldArr[i];    // OK

String str = blah.getStringValue();   //OK

String id = blah.getId();    //Fails - returns null

 
'str' will be set to '100000', whilst 'Id' will be set to null. I would have expected 'Id' to be 'TOTALSUMINSURED'.
Does anyone else have problems retrieving attributes with axis2 or am I just doing something silly here?
 
BTW, where is snippet from the scheme:
 
 <complexType name="FieldType">
  <simpleContent>
   <extension base="string">
    <attribute name="Id" type="string" use="required"/>
   </extension>
  </simpleContent>
 </complexType>
 
Cheers,
 
Mark B
 
 

RE: Problems reading attributes

Posted by Mark Badorrek <mb...@avoga.com.au>.
The databinding is XMLbeans. Seems fixed in the latest RC.

________________________________

From: Amila Suriarachchi [mailto:amilasuriarachchi@gmail.com]
Sent: Mon 4/16/2007 2:37 PM
To: axis-dev@ws.apache.org
Subject: Re: Problems reading attributes


What is the databinding framwrok you use? 
Can you test this with a nightly build or RC2?


On 4/16/07, Mark Badorrek < mbadorrek@avoga.com.au <ma...@avoga.com.au> > wrote: 

	 
	I have a soap request using axis2-1.1  to generate the client and server bindings.
	The client seems to render the xml just fine, but the server side seems to have a problem.
	 
	Specifically, here is a snippet of code that is generated from the client:
	 
	<Field Id="TOTALSUMINSURED" xmlns:ns0="http:// ***********************">100000</Field <http://aon.com.au/ebixconvertortypes/2007%22%3E100000%3C/Field> >
	 
	If I attempt to do an xmlText() on the element I get the following string: 
	 
	<xml-fragment Id="TOTALSUMINSURED" xmlns:ns0="http://*********************** " xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/">100000</xml-fragment <http://schemas.xmlsoap.org/soap/envelope/%22%3E100000%3C/xml-fragment> >
	 
	This appears correct to me. This snippet is referred to in the generated code as a "FieldType".
	 
	FieldType blah = fieldArr[i];    // OK

	String str = blah.getStringValue();   //OK

	String id = blah.getId();    //Fails - returns null

	 
	'str' will be set to '100000', whilst 'Id' will be set to null. I would have expected 'Id' to be 'TOTALSUMINSURED'.
	Does anyone else have problems retrieving attributes with axis2 or am I just doing something silly here?
	 
	BTW, where is snippet from the scheme:
	 
	 <complexType name="FieldType">
	  <simpleContent>
	   <extension base="string">
	    <attribute name="Id" type="string" use="required"/>
	   </extension>
	  </simpleContent>
	 </complexType>
	 
	Cheers,
	 
	Mark B
	 
	 




-- 
Amila Suriarachchi,
WSO2 Inc. 

Re: Problems reading attributes

Posted by Amila Suriarachchi <am...@gmail.com>.
What is the databinding framwrok you use?
Can you test this with a nightly build or RC2?

On 4/16/07, Mark Badorrek <mb...@avoga.com.au> wrote:
>
>
> I have a soap request using axis2-1.1  to generate the client and server
> bindings.
> The client seems to render the xml just fine, but the server side seems to
> have a problem.
>
> Specifically, here is a snippet of code that is generated from the client:
>
> <Field Id="TOTALSUMINSURED" xmlns:ns0="http://***********************
> ">100000</Field<http://aon.com.au/ebixconvertortypes/2007%22%3E100000%3C/Field>
> >
>
> If I attempt to do an xmlText() on the element I get the following
> string:
>
> <xml-fragment Id="TOTALSUMINSURED" xmlns:ns0="
> http://***********************" xmlns:soapenv="
> http://schemas.xmlsoap.org/soap/envelope/">100000</xml-fragment<http://schemas.xmlsoap.org/soap/envelope/%22%3E100000%3C/xml-fragment>
> >
>
> This appears correct to me. This snippet is referred to in the generated
> code as a "FieldType".
>
>
> FieldType blah = fieldArr[i];    // OK
>
> String str = blah.getStringValue();   //OK
>
> String id = blah.getId();    //Fails - returns null
>
> 'str' will be set to '100000', whilst 'Id' will be set to null. I would
> have expected 'Id' to be 'TOTALSUMINSURED'.
> Does anyone else have problems retrieving attributes with axis2 or am I
> just doing something silly here?
>
> BTW, where is snippet from the scheme:
>
>  <complexType name="FieldType">
>   <simpleContent>
>    <extension base="string">
>     <attribute name="Id" type="string" use="required"/>
>    </extension>
>   </simpleContent>
>  </complexType>
>
> Cheers,
>
> Mark B
>
>
>



-- 
Amila Suriarachchi,
WSO2 Inc.

RE: Problems reading attributes

Posted by Mark Badorrek <mb...@avoga.com.au>.
However, it appears to work correctly in the latest release candidate (1.2).
 
This seems to be a somewhat related thread:
 
http://www.mail-archive.com/axis-user@ws.apache.org/msg25025.html
 
So..... I guess we can let this one go.   :-)

________________________________

From: Mark Badorrek [mailto:mbadorrek@avoga.com.au]
Sent: Mon 4/16/2007 11:21 AM
To: axis-dev@ws.apache.org
Subject: Problems reading attributes


 
I have a soap request using axis2-1.1  to generate the client and server bindings.
The client seems to render the xml just fine, but the server side seems to have a problem.
 
Specifically, here is a snippet of code that is generated from the client:
 
<Field Id="TOTALSUMINSURED" xmlns:ns0="100000http://schemas.xmlsoap.org/soap/envelope/">100000</xml-fragment <http://aon.com.au/ebixconvertortypes/2007">100000</Field> >
 
This appears correct to me. This snippet is referred to in the generated code as a "FieldType".
 
FieldType blah = fieldArr[i];    // OK

String str = blah.getStringValue();   //OK

String id = blah.getId();    //Fails - returns null

 
'str' will be set to '100000', whilst 'Id' will be set to null. I would have expected 'Id' to be 'TOTALSUMINSURED'.
Does anyone else have problems retrieving attributes with axis2 or am I just doing something silly here?
 
BTW, where is snippet from the scheme:
 
 <complexType name="FieldType">
  <simpleContent>
   <extension base="string">
    <attribute name="Id" type="string" use="required"/>
   </extension>
  </simpleContent>
 </complexType>
 
Cheers,
 
Mark B