Hi,
I am generating my domain classes from xsd's using xjc this works fine.
Then I am using Spring and Xfire to expose the wsdl from the annotations
produced from the xjc generation.
This all works fine, however the xml produced and the wsdl do not
reflect the original xsd, and therefore any xml produced from the soap
services will fail validation. This is due to changing of case and a few
minor changes. However there are a suite of xsd's and wsdl's produced
and any published xml services do not correspond to the published xsds.
Xsd:
...
<xs:element name="SP_AirBookItinerariesRS">
<xs:complexType>
<xs:sequence>
<xs:element name="SessionId" type="SessionIdType"
minOccurs="1" maxOccurs="1">
</xs:element>
<xs:choice>
<xs:sequence>
<xs:element name="Success" type="SuccessType">
</xs:element>
<xs:element name="Warnings" type="WarningsType"
minOccurs="0">
</xs:element>
<xs:element name="PricedItinerary"
type="SP_PricedItinerary" maxOccurs="unbounded">
</xs:element>
</xs:sequence>
<xs:element name="Errors" type="ErrorsType">
</xs:element>
</xs:choice>
</xs:sequence>
</xs:complexType>
</xs:element>
...
Produces the following xml:
..
<SPAirBookItinerariesRS xmlns="http://domain.sabrepacific.com.au">
<errors xsi:nil="true"/>
<sessionId>70c58825:110c412ac3b:-7ff1</sessionId>
<success/>
<warnings xsi:nil="true"/>
...
I am injecting the JAXBServiceFactory into my web service bean in the
Spring Context file and using
<bean id="xfire.jaxbServiceFactory"
class="org.codehaus.xfire.jaxb2.JaxbServiceFactory" singleton="true">
<constructor-arg ref="xfire.transportManager"/>
</bean>
<bean id="webAnnotations"
class="org.codehaus.xfire.annotations.jsr181.Jsr181WebAnnotations" />
<bean id="handlerMapping"
class="org.codehaus.xfire.spring.remoting.Jsr181HandlerMapping">
<property name="typeMappingRegistry"
ref="xfire.typeMappingRegistry"/>
<property name="xfire" ref="xfire"/>
<property name="webAnnotations"
ref="webAnnotations"/>
</bean>
<bean
class="org.springframework.web.servlet.handler.SimpleUrlHandlerMapping">
<property name="urlMap">
<map>
<entry key="/">
<ref
bean="handlerMapping"/>
</entry>
</map>
</property>
</bean>
Any suggestions?
TIA
Joe Latty