Hi,

I'm using jbossws-cxf-3.0.5, as I could found CXF 2.1, not sure if perhaps a
2.1.x.

I'm using Java First development with JaxbBinding, Java WS with Annotations
in a war file.

What is happening is that when I turn on validation it starts with strange
behaviors,
In the first call, it doesn't recognize the  soap payload (in this case
login), from the
2nd. call and on it doesn't recognize elements from the payload.

If I turn validation off, it works fine.

There is no information in the logs that may explain this behavior, just the
exception
thrown when I call the service.

Errors and examples

Error returned from the 2nd and on call
Exception in thread "main" javax.xml.ws.soap.SOAPFaultException: 
Unmarshalling Error: cvc-elt.1: Cannot find the declaration of element
'clientSystemKey'. 

Request
<S:Envelope xmlns:S="http://schemas.xmlsoap.org/soap/envelope/";>
    <S:Body>
        <ns6:login
            xmlns:ns6="http://www.mccg.net/services/phoenix/application";>
            <clientSystemKey>Windows_Client</clientSystemKey>
            <sbuId>23</sbuId>
            <userName>mccg</userName>
            <password>c0c0nut</password>
        </ns6:login>
    </S:Body>
</S:Envelope>

This is the relevant WSDL definition
      <xsd:element name="login" type="tns:login"/>
      <xsd:complexType name="login">
        <xsd:sequence>
          <xsd:element minOccurs="0" name="clientSystemKey"
type="xsd:string"/>
          <xsd:element name="sbuId" type="xsd:long"/>
          <xsd:element minOccurs="0" name="userName" type="xsd:string"/>
          <xsd:element minOccurs="0" name="password" type="xsd:string"/>
        </xsd:sequence>
      </xsd:complexType>

Endpoint definition 
        <jaxws:endpoint id="application"
                implementor="net.mccg.ibs.phoenix.ws.impl.ApplicationWs"
address="/application">
                <jaxws:properties>
                        <entry key="schema-validation-enabled" 
value="${mccg.serverValidation}"
/>
                </jaxws:properties>
        </jaxws:endpoint>

Any ideas on what can be happening will be greatly appreciatted
thanks in advance
tonio
-- 
View this message in context: 
http://www.nabble.com/Turning-on-validation-strange-behaviour-tp23206780p23206780.html
Sent from the cxf-user mailing list archive at Nabble.com.

Reply via email to