You are viewing a plain text version of this content. The canonical link for it is here.
Posted to java-user@axis.apache.org by Yura Tkachenko <yu...@gmail.com> on 2006/11/02 20:00:12 UTC
Usage xsd:any types with Axis 1.x
Hi, there.
I have a technical question about usage xsd:any type.
For example in my wsdl I have such complex type:
<complexType name="EnterpriseObject">
> - <#> <sequence>
> <element name="APPLICATION_ID" type="xsd:long" />
> <element name="DEFINITION_ID" type="xsd:long" />
> <element name="id" type="xsd:long" />
> <element name="name" nillable="true" type="xsd:string" />
> <element name="routingId" type="xsd:long" />
> <any maxOccurs="unbounded" minOccurs="0" namespace="##targetNamespace"processContents
> ="lax" />
> </sequence>
> </complexType>
>
So in my java bean I have such declaration:
public class EnterpriseObject implements Serializable, AnyContentType {
private long id;
private long routingId;
private String name;
private long APPLICATION_ID;
private long DEFINITION_ID;
private MessageElement[] _any;
.......................
public MessageElement[] get_any() {
return _any;
}
public void set_any(MessageElement[] messageElements) {
_any = messageElements;
}
...........
}
In my server-config.wsdd I made typeMapping for this class using
BeanFactorySerializer.
But when I wrote my client using .NET 1.1. I got simple EnterpriseObject
from my web service and the fields was:
id: 1234
routingId: -1
name: Example
APPLICATION_ID: 23
DEFINITION_ID: 2345
Any: <undefined value> (data type System.Xml.XmlElement[])
So I guess there is something wrong with my xsd:any element. Can you suggest
me whether my mapping for EnterpriseObject method is correct? Any help high
appreciate.
--
Thanks,
Yura Tkachenko.
Usage xsd:any types with Axis 1.x
Posted by Yura Tkachenko <yu...@gmail.com>.
Hi, there.
I have a technical question about usage xsd:any type.
For example in my wsdl I have such complex type:
< complexType name="EnterpriseObject">
> - <#10eaa0aeb158a661_> <sequence>
> <element name="APPLICATION_ID " type="xsd:long" />
> <element name="DEFINITION_ID" type="xsd:long" />
> <element name="id" type="xsd:long" />
> <element name="name" nillable="true" type="xsd:string" />
> <element name="routingId" type="xsd:long" />
> <any maxOccurs="unbounded" minOccurs="0" namespace="##targetNamespace"processContents
> ="lax" />
> </sequence>
> </complexType>
>
So in my java bean I have such declaration:
public class EnterpriseObject implements Serializable, AnyContentType {
private long id;
private long routingId;
private String name;
private long APPLICATION_ID;
private long DEFINITION_ID;
private MessageElement[] _any;
.......................
public MessageElement[] get_any() {
return _any;
}
public void set_any(MessageElement[] messageElements) {
_any = messageElements;
}
...........
}
In my server-config.wsdd I made typeMapping for this class using
BeanFactorySerializer.
But when I wrote my client using .NET 1.1. I got simple EnterpriseObject
from my web service and the fields was:
id: 1234
routingId: -1
name: Example
APPLICATION_ID: 23
DEFINITION_ID: 2345
Any: <undefined value> (data type System.Xml.XmlElement[])
So I guess there is something wrong with my xsd:any element. Can you suggest
me whether my mapping for EnterpriseObject method is correct? Any help high
appreciate.
--
Thanks,
Yura Tkachenko.
--
Thanks,
Yura.