[b]When I deploy my JAX-WS webservice to Glassfish Server v3.0.1-22 the datatypes used in my service messages get modified against my will.[/b]
My service's WSDL uses an XSD to define my request and response messages. The XSD is referenced in the wsdl as an include because XSD shares the same namespace as the WSDL.
[b]My original WSDL file contains the following:[/b]
<xs:schema targetNamespace="
http://r20100601.logging.service.benwilcock.net/"
elementFormDefault="qualified" version="r20100601">
<xs:include schemaLocation="20100601_logging_service.xsd"/>
</xs:schema>
[b]At deployment time Glassfish Server changes this to:[/b]
<xsd:schema> <xsd:import namespace="
http://r20100601.logging.service.benwilcock.net/" schemaLocation="
http://localhost:8080/r20100601.logging.service.benwilcock.net/LoggingService?xsd=1" /> </xsd:schema>
[b]The original XSD file contains the following element definitions:[/b]
<xs:import namespace="
http://commontypes.model.benwilcock.net/r20100601/" schemaLocation="20100601_common_types.xsd"/>
<xs:element name="MsgBodyLoggingRequest" type="[b]cdt:TypeAlpha10[/b]"/>
<xs:element name="MsgBodyLoggingResponse" type="[b]cdt:TypeAlpha20[/b]"/>
[b]However at runtime if you follow the schemaLocation of
http://localhost:8080/r20100601.logging.service.benwilcock.net/LoggingService?xsd=1 Glassfish has changed definition of the elements to:[/b]
<xs:element name="MsgBodyLoggingRequest" type="[b]xs:string[/b]" />
<xs:element name="MsgBodyLoggingResponse" type="[b]xs:string[/b]" />
As you can see the types have radically changed, the datatypes are weakly types, my restriction mission and my import of my simple datatypes XSD has been removed.
[u]Glassfish Embedded does not share this behavior, it deploys exatly the same WAR correctly and honours the type restrictions defined in my original XSD.[/u]
[b]Does anyone know if this problem has an explanation or should it be raised as a defect?[/b]
[Message sent by forum member 'benwilcock']
http://forums.java.net/jive/thread.jspa?messageID=475362