[ http://jira.andromda.org/browse/WS-24?page=comments#action_15710 ]
Michael Brindamour commented on WS-24: -------------------------------------- This issue can be closed... it was my fault. I had modeled a 0..* MyObject[], so there was some redundancy there that confused andromda or axis. Should have been modeled as MyObject[] [0..1] Thanks! > MyObject modeled with 0..* collections of both MyObject (tree structure) and > MyOtherObj 0..* results in wsdl with incorrect name for the ArrayOfMyOtherObj > elements. > -------------------------------------------------------------------------------------------------------------------------------------------------------------------- > > Key: WS-24 > URL: http://jira.andromda.org/browse/WS-24 > Project: WebService Cartridge > Type: Bug > Environment: Win32 (vista), Cygwin, Andromda, Axis2, Java6, maven, MagicDraw > Reporter: Michael Brindamour > Assignee: Chad Brandon > > I have modeled two objects, one in a tree structure, and the other as a > collection to that first object. (the subObjects forming the tree structure > are a similarly modeled collection and both are 0..*) > When andromda creates the wsdl & the server code, it is incorrectly setting > the name in the response to that of the parent object type, rather than that > of the collection's type. See below for an example. > <xsd:complexType name="ArrayOfObject"> > <xsd:sequence> > <xsd:element name="myObject" minOccurs="0" > maxOccurs="unbounded" form="qualified" type="impl:MyObject" /> > </xsd:sequence> > </xsd:complexType> > <!-- wsdl looks like below, which looks correct, but the response xml is > incorrectly making the element name="myObject" --> > <xsd:complexType name="ArrayOfMyOtherObj"> > <xsd:sequence> > <xsd:element name="myOtherObj" minOccurs="0" > maxOccurs="unbounded" form="qualified" type="impl:MyOtherObj" /> > </xsd:sequence> > </xsd:complexType> > <!-- Therefore the wsdl needs to be changed to this (below the code sample), > in order to use the code in a webservices client, and makes the code look > wrong, as it appears as though you're looking for the wrong type: > MyObject obj // gotten from the webservices. > List<MyOtherObj> list = obj.getMyOtherObjects().getMyObject() /// should > be List<MyOtherObj> list = obj.getMyOtherObjects().getMyOtherObject(); > --> > <xsd:complexType name="ArrayOfMyOtherObj"> > <xsd:sequence> > <xsd:element name="myOtherObj" minOccurs="0" > maxOccurs="unbounded" form="qualified" type="impl:MyOtherObj" /> > </xsd:sequence> > </xsd:complexType> > andromda.xml webservices namespace: > <namespace name="webservice"> > <properties> > <property > name="schemaTypeMappingsUri">AxisWSDLMappings</property> > <property > name="languageMappingsUri">AxisJavaMappings</property> > <property name="defaultProvider">RPC</property> > <property name="defaultStyle">wrapped</property> > <property name="defaultUse">literal</property> > <property > name="wsdlSoapAddress">http://${webservice.host}:${webservice.port}/axis/services</property> > <property > name="namespacePattern">http://fyuzn.com/schema/V1.0.0</property> > <property > name="rpcClassNamePattern">{0}.{1}WSDelegator</property> > <property name="applicationName">FyuznServer</property> > <property name="wsdls">${webservice.generated.dir}</property> > <property > name="configuration">${webservice.generated.dir}</property> > <property > name="webservice-types">${core.generated.dir}</property> > <property > name="mergeMappingsUri">file:${pom.basedir}/conf/wsmerge.xml</property> > </properties> > </namespace> -- This message is automatically generated by JIRA. - If you think it was sent incorrectly contact one of the administrators: http://jira.andromda.org/secure/Administrators.jspa - For more information on JIRA, see: http://www.atlassian.com/software/jira ------------------------------------------------------------------------- This SF.Net email is sponsored by the Moblin Your Move Developer's challenge Build the coolest Linux based applications with Moblin SDK & win great prizes Grand prize is a trip for two to an Open Source event anywhere in the world http://moblin-contest.org/redirect.php?banner_id=100&url=/