My Problem is:
 
I am to create a webservice. I'm currently using CXF 2.1, but that doesnt
seem to be the point, I also tried 2.0.6 and 2.0.7. with no different
outcome.
I have the WSDL and some XSD files defining the main request and response
messages. Thing is, the WSDL only defines 2 elements, and then refers to a
xsd:any element, so it would accept every data that follows. There is no
clear connection to the XSDs. I can generate Java Code out of them though.
Now when I use Jetty to start the webservice on my machine I see that it is
working. I can send messages to the webservice, but CXF only seems to
unmarshall the elements which are defined in the wsdl, everything else is
being summed up in an instance of ElementNSImpl (from xerces). Thanks to
debugging my webservice I found out that this Object actually has all my
information in it, in some kind of DOM-Tree, it's just not being
unmarshalled. As far as I see it, it seems that JaxB either doesnt recognize
the generated files of the xsd's (because there is no connection between the
wsdl and the xsds) or JaxB doesnt accept them. Either way, I have no
solution. Can someone help me?

wsdl-snippet:
 
<s:element name="GetVehicleOwnerHolderByChassisAndDate"> 
    <s:complexType>
        <s:sequence>
            <s:element minOccurs="0" maxOccurs="1"
name="VehOwnerHolderByChassisAndDate">
                <s:complexType mixed="true">
                    <sequence>
                        <s:any  />
                    </s:sequence>
                </s:complexType>
            </s:element>
        </s:sequence>
    </s:complexType>
</s:element>

Xsd-snippet:

<xs:element name="VehOwnerHolderByChassisAndDate"
type="VehOwnerHolderByChassisAndDateType"/>

<xs:complexType name="VehOwnerHolderByChassisAndDateType">
    <xs:sequence>
        <xs:element name="Header" type="HeaderType"/>
        <xs:element name="Body">
            <xs:complexType>
                <xs:sequence>
                    <xs:element name="Request">
                        <xs:complexType>
                            <xs:sequence>
                                <xs:element name="VehCountryReq"
type="xs:string" nillable="false"/>
                                <xs:element
name="VehIdentificationNumberReq" type="xs:string"/>
                                <xs:element name="ReferenceDateTimeReq"
type="xs:dateTime" minOccurs="0"/>
                            </xs:sequence>
                        </xs:complexType>
                    </xs:element>
                </xs:sequence>
            </xs:complexType>
        </xs:element>
    </xs:sequence>
</xs:complexType>

Generated-code:

@XmlAccessorType(XmlAccessType.FIELD)
@XmlType(name = "", propOrder = {
    "vehOwnerHolderByChassisAndDate"
})
@XmlRootElement(name = "GetVehicleOwnerHolderByChassisAndDate")
public class GetVehicleOwnerHolderByChassisAndDate {

    @XmlElement(name = "VehOwnerHolderByChassisAndDate")
    protected
GetVehicleOwnerHolderByChassisAndDate.VehOwnerHolderByChassisAndDate
vehOwnerHolderByChassisAndDate;


    public
GetVehicleOwnerHolderByChassisAndDate.VehOwnerHolderByChassisAndDate
getVehOwnerHolderByChassisAndDate() {
        return vehOwnerHolderByChassisAndDate;
    }


    public void
setVehOwnerHolderByChassisAndDate(GetVehicleOwnerHolderByChassisAndDate.VehOwnerHolderByChassisAndDate
value) {
        this.vehOwnerHolderByChassisAndDate = value;
    }


     */
    @XmlAccessorType(XmlAccessType.FIELD)
    @XmlType(name = "", propOrder = {
        "content"
    })
    public static class VehOwnerHolderByChassisAndDate {

        @XmlMixed
        @XmlAnyElement(lax = true)
        protected List content;


        public List getContent() {
            if (content == null) {
                content = new ArrayList();
            }
            return this.content;
        }
-- 
View this message in context: 
http://www.nabble.com/CXF%2C-trouble-to-find-Classes-to-unmarshal-to-tp17983289p17983289.html
Sent from the cxf-user mailing list archive at Nabble.com.

Reply via email to