Håkon, Note that even though the Roles element has no prefix, it is still in the right namespace.
Andreas 2009/8/10 Håkon Sagehaug <[email protected]>: > Hi all, > > I got a definition like this in the schema I use in my wsdl > > <complexType name="ProjectMemberType"> > <sequence> > <element name="UserId" nillable="true" type="xsd:int" /> > <element name="Username" nillable="true" type="xsd:string" /> > <element name="Email" nillable="true" type="tns:Email" /> > <element name="Roles" nillable="true" type="tns:Roles" /> > </sequence> > </complexType> > > <complexType name="Roles"> > <sequence> > <element maxOccurs="unbounded" name="Role" nillable="true" > type="tns:Role" /> > </sequence> > </complexType> > > <simpleType name="Role"> > <restriction base="xsd:string"> > <enumeration value="ADMIN" /> > <enumeration value="USER" /> > <enumeration value="TESTER" /> > <enumeration value="GUEST" /> > </restriction> > </simpleType> > > And then I make a element out of this in my wsdl schema part like this. > > > <xsd:element name="ProjectMembers"> > <xsd:complexType> > <xsd:sequence> > <xsd:element name="Memeber" > type="pgm:ProjectMemberType" minOccurs="1" maxOccurs="unbounded"/> > > </xsd:sequence> > </xsd:complexType> > </xsd:element> > > And I want all the sub elements of ProjectMemberType to have prefixes, to be > qualified. I've set the attribute elementFormDefault to qualified both in > the schema and schema in the wsdl, but when my web service returns a > instance of this element it looks like this > > <ns2:ProjectMembers> > <ns2:Memeber> > <ns1:UserId > xmlns:ns1="http://bccs.uib.no/esysbio/projectmgnt/schema">234</ns1:UserId> > <ns1:Username > xmlns:ns1="http://bccs.uib.no/esysbio/projectmgnt/schema">[email protected]</ns1:Username> > <ns1:Email > xmlns:ns1="http://bccs.uib.no/esysbio/projectmgnt/schema">[email protected]</ns1:Email> > <Roles > xmlns="http://bccs.uib.no/esysbio/projectmgnt/schema"> > <Role>ADMIN</Role> > </Roles> > </ns2:Memeber> > </ns2:ProjectMembers> > > No prefix for Roles element. Is this the way it should be, or is it > something wrong. I use axis 1.4.1 and adb for binding when generating the > code using wsdl2code. > > Any help on this subject > > cheers, Håkon > > -- > Håkon Sagehaug, Scientific Programmer > Parallab, Bergen Center for Computational Science (BCCS) > UNIFOB AS (University of Bergen Research Company) >
