Hi All,

  I just started with CXF, So I anyone can help me solving that issues...  

I get a fault for the following request complaining that XXXX:EL1 shall in fact 
be from the namespace https://yyyy.com/Services/.

I included the WSDL below.  It`s probably a misunderstood from my part 
regarding namespace.  But this example comes from a production env and the 
request is generated using SoapUi...

I rather not disable the validation.  

Is anyone can tell me where exactly is my mistake or how I can have CXF accepts 
this request ?

Thanks  for your help

David


REQUEST
---------------------------------------------------------------------------
<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/";
                  xmlns:ser="https://yyyy.com/Services/";
                  xmlns:xxxx="http://www.xxx.ca/WS/XXXX";>
    <soapenv:Header/>
    <soapenv:Body>
        <ser:Request>
            <xxxx:EL1/>
        </ser:Request>
    </soapenv:Body>
</soapenv:Envelope>


RESPONSE FAULT
---------------------------------------------------------------------------
<soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/";>
    <soap:Body>
        <soap:Fault>
            <faultcode>soap:Client</faultcode>
            <faultstring>Unmarshalling Error: cvc-complex-type.2.4.a: Invalid 
content was found starting with element 'xxxx:EL1'. One of 
'{"https://yyyy.com/Services/":EL1}' is expected.</faultstring>
        </soap:Fault>
    </soap:Body>
</soap:Envelope>


WSDL
------------------------------------------------------------
<?xml version="1.0" encoding="utf-8"?>
<wsdl:definitions xmlns:s1="http://www.xxx.ca/WS/XXXX"; 
xmlns:http="http://schemas.xmlsoap.org/wsdl/http/"; 
                  xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/"; 
                  xmlns:s="http://www.w3.org/2001/XMLSchema"; 
                  xmlns:tns="https://yyyy.com/Services/"; 
                  targetNamespace="https://yyyy.com/Services/"; 
                  xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/";>
    <wsdl:types>
        <s:schema elementFormDefault="qualified" 
targetNamespace="https://yyyy.com/Services/";>
            <s:import namespace="http://www.xxx.ca/WS/XXXX"; />
            <s:element name="Request">
                <s:complexType>
                    <s:sequence>
                        <s:element minOccurs="0" maxOccurs="1" ref="s1:EL1" />
                    </s:sequence>
                </s:complexType>
            </s:element>
            <s:element name="Response">
                <s:complexType>
                    <s:sequence>
                        <s:element minOccurs="1" maxOccurs="1" 
name="RequestResult" type="s:int" />
                    </s:sequence>
                </s:complexType>
            </s:element>
        </s:schema>
        <s:schema elementFormDefault="qualified" 
targetNamespace="http://www.xxx.ca/WS/XXXX";>
            <s:element name="EL1" type="s1:EL1" />
            <s:complexType name="EL1">
                <s:sequence>
                    <s:element minOccurs="0" maxOccurs="1" name="EL2" 
type="s:string" />
                </s:sequence>
            </s:complexType>
        </s:schema>
    </wsdl:types>
    <wsdl:message name="RequestSoapIn">
        <wsdl:part name="parameters" element="tns:Request" />
    </wsdl:message>
    <wsdl:message name="RequestSoapOut">
        <wsdl:part name="parameters" element="tns:Response" />
    </wsdl:message>
    <wsdl:portType name="WSSoap">
        <wsdl:operation name="Request">
            <wsdl:input message="tns:RequestSoapIn" />
            <wsdl:output message="tns:RequestSoapOut" />
        </wsdl:operation>
    </wsdl:portType>
    <wsdl:binding name="WSSoap" type="tns:WSSoap">
        <soap:binding transport="http://schemas.xmlsoap.org/soap/http"; 
style="document" />
        <wsdl:operation name="Request">
            <soap:operation soapAction="https://yyyy.com/Services/Request"; 
style="document" />
            <wsdl:input>
                <soap:body use="literal" />
            </wsdl:input>
            <wsdl:output>
                <soap:body use="literal" />
            </wsdl:output>
        </wsdl:operation>
    </wsdl:binding>
    <wsdl:service name="TestService">
        <wsdl:port name="WSSoap" binding="tns:WSSoap">
            <soap:address location="https://xxx.com/OnlineServices/Service"; />
        </wsdl:port>
    </wsdl:service>
</wsdl:definitions>

Reply via email to