I am creating a service from a service factory and have run in to some
difficulty with Maps and the generated WSDL. The generated WSDL defines all
Maps as "anyType2anyTypeMap" despite the inclusion of generics, where as it
defines the contents of lists and arrays explicitly. Any help in getting
explicit definitions for Maps into the WSDL would be very appreciated.
More details:
When I specify a parameter or return type that contains Map as part of the
interface, the resulting WSDL defines a complex type with element:
type="tns:anyType2anyTypeMap", and then never defines the type
anyType2anyTypeMap.
Here is a test interface I am working with:
public interface MapTestInterface { public Map<String, String[]>
getMap();
public void setMap(Map<String, String[]> theMap);
}
Which results in:
<xsd:element name="getMapResponse">
<xsd:complexType>
<xsd:sequence>
<xsd:element maxOccurs="1" minOccurs="1" name="in0" nillable="true"
type="tns:anyType2anyTypeMap"/>
</xsd:sequence>
</xsd:complexType>
</xsd:element>
Where as I would expect something similair to:
<xsd:element name="getMapResponse">
<xsd:complexType>
<xsd:sequence>
<xsd:element maxOccurs="1" minOccurs="1" name="in0" nillable="true"
type="tns:String2ArrayOfStringMap"/>
</xsd:sequence>
</xsd:complexType>
</xsd:element>
<xsd:complexType name="String2ArrayOfStringMapp">
<xsd:sequence>
<xsd:element maxOccurs="unbounded" minOccurs="0" name="string"
nillable="true" type="xsd:string"/>
<xsd:element maxOccurs="unbounded" minOccurs="0" name="string"
nillable="true" type="tns:ArrayOfString"/>
</xsd:sequence>
</xsd:complexType>
<xsd:complexType name="ArrayOfString">
<xsd:sequence>
<xsd:element maxOccurs="unbounded" minOccurs="0" name="string"
nillable="true" type="xsd:string"/>
</xsd:sequence>
</xsd:complexType>
I have tried binding using the following and the problem persists:
ServiceFactory factory = new
ObjectServiceFactory(getXFire().getTransportManager(), null);
ServiceFactory factory= new ObjectServiceFactory(new AegisBindingProvider(new
org.codehaus.xfire.jaxb2.JaxbTypeRegistry()));
ServiceFactory factory= new org.codehaus.xfire.jaxb2.JaxbServiceFactory();
---------------------------------------------------------------------
To unsubscribe from this list please visit:
http://xircles.codehaus.org/manage_email