6 Replies Latest reply: May 6, 2011 9:50 AM by 844125 RSS

    validation errors weblogic-webservices.xml during deploy for valid dd

    844125
      Hi,

      I am trying to set the login-config for my JAXWS EJB webservice endpoint, but I weblogic doesn't accept my weblogic-webservices.xml

      I validated my weblogic-webservices.xml using several xml validator tools and all say it is valid.

      Here is the weblogic-webservices.xml

      <?xml version='1.0' encoding='UTF-8'?>
      <weblogic-webservices
           xmlns="http://xmlns.oracle.com/weblogic/weblogic-webservices"
           xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
      xmlns:j2ee="http://java.sun.com/xml/ns/j2ee"
           xsi:schemaLocation="http://xmlns.oracle.com/weblogic/weblogic-webservices http://xmlns.oracle.com/weblogic/weblogic-webservices/1.1/weblogic-webservices.xsd http://java.sun.com/xml/ns/j2ee http://java.sun.com/xml/ns/j2ee/web-app_2_4.xsd">

      <webservice-description>
      <webservice-description-name>AppManager</webservice-description-name>
      <port-component>
      <port-component-name>AppManager</port-component-name>
      <service-endpoint-address>
      <webservice-contextpath>/AppManagerService</webservice-contextpath>
      <webservice-serviceuri>/AppManager</webservice-serviceuri>
      </service-endpoint-address>
      <login-config>
      <j2ee:auth-method>BASIC</j2ee:auth-method>
      <j2ee:realm-name>myrealm</j2ee:realm-name>
      </login-config>
      </port-component>
      </webservice-description>
      </weblogic-webservices>

      Here are the validation errors I get during deployment:

      VALIDATION PROBLEMS WERE FOUND problem: cvc-complex-type.2.4a: Expected elements 'auth-method@http://java.sun.com/xml/ns/j2ee realm-name@http://java.sun.com/xml/ns/j2ee form-login-config@http://java.sun.com/xml/ns/j2ee' instead of 'auth-method@http://xmlns.oracle.com/weblogic/weblogic-webservices' here in element login-config@http://xmlns.oracle.com/weblogic/weblogic-webservices:<null> problem: cvc-complex-type.2.4a: Expected elements 'auth-method@http://java.sun.com/xml/ns/j2ee realm-name@http://java.sun.com/xml/ns/j2ee form-login-config@http://java.sun.com/xml/ns/j2ee' instead of 'realm-name@http://xmlns.oracle.com/weblogic/weblogic-webservices' here in element login-config@http://xmlns.oracle.com/weblogic/weblogic-webservices:<null>

      Error VALIDATION PROBLEMS WERE FOUND problem: cvc-complex-type.2.4a: Expected elements 'auth-method@http://java.sun.com/xml/ns/j2ee realm-name@http://java.sun.com/xml/ns/j2ee form-login-config@http://java.sun.com/xml/ns/j2ee' instead of 'auth-method@http://xmlns.oracle.com/weblogic/weblogic-webservices' here in element login-config@http://xmlns.oracle.com/weblogic/weblogic-webservices:<null> problem: cvc-complex-type.2.4a: Expected elements 'auth-method@http://java.sun.com/xml/ns/j2ee realm-name@http://java.sun.com/xml/ns/j2ee form-login-config@http://java.sun.com/xml/ns/j2ee' instead of 'realm-name@http://xmlns.oracle.com/weblogic/weblogic-webservices' here in element login-config@http://xmlns.oracle.com/weblogic/weblogic-webservices:<null>

      If I remove the namespace indicator 'j2ee' it complains about the same. So it would seem that weblogic ignores the 'j2ee' resulting indeed in a invalid xml.

      Can someone please help me to a weblogic-webservices.xml (example with login-config) that was accepted by weblogic?
      Thanks a lot,
      Eltjo.
        • 1. Re: validation errors weblogic-webservices.xml during deploy for valid dd
          Jay SenSharma MiddlewareMagic
          Hi,

          Please try the following: ( Looks like you are mixing the Tag contents of web.xml  as well as weblogic-webservice.xml   together.... )

          weblogic-webservice.xml
          <?xml version='1.0' encoding='UTF-8'?>
          <weblogic-webservices xmlns="http://www.bea.com/ns/weblogic/weblogic-webservices" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.bea.com/ns/weblogic/weblogic-webservices http://www.bea.com/ns/weblogic/weblogic-webservices/1.0/weblogic-webservices.xsd">
                <webservice-description>
                    <webservice-description-name>AppManager</webservice-description-name>
                    <port-component>
                    <port-component-name>AppManager</port-component-name>
                           <service-endpoint-address>
                              <webservice-contextpath>/AppManagerService</webservice-contextpath>
                              <webservice-serviceuri>/AppManager</webservice-serviceuri>
                           </service-endpoint-address>
                    </port-component>
                </webservice-description>
          </weblogic-webservices>
          And Now provide the <login-config> information separately inside *"web.xml"* file
          <login-config>
               <auth-method>BASIC</j2ee:auth-method>
               <realm-name>myrealm</j2ee:realm-name>
          </login-config>
          .
          .
          Thanks
          Jay SenSharma
          • 2. Re: validation errors weblogic-webservices.xml during deploy for valid dd
            844125
            Hi Jay SenSharma,

            That is by design. The weblogic-webservices.xml schema indicates that it is correct to have the login-config.

            snippit from the http://xmlns.oracle.com/weblogic/weblogic-webservices/1.1/weblogic-webservices.xsd:
            ---
            <complexType name="port-componentType">
            <sequence>
            <xsd:element name="port-component-name"
            type="j2ee:string"/>
            <xsd:element name="service-endpoint-address"
            type="wls:webservice-addressType"
            minOccurs="0"/>
            <xsd:element name="login-config"
            type="j2ee:login-configType"
            minOccurs="0"/>
            ---

            As you can see the login-config a type defined by a standardized spec (web servlet spec).

            A seperate web.xml is not an option as I am developeling an ejb annotated with @WebService so it is not a war I am creating.

            Thanks.
            Eltjo.
            • 4. Re: validation errors weblogic-webservices.xml during deploy for valid dd
              731177
              we hit the same issue. with auth-method = CLIENT-CERT rather than BASIC thouugh

              <login-config>
              <xp:auth-method xmlns:xp='http://java.sun.com/xml/ns/j2ee'>CLIENT-CERT</xp:auth-method>
              </login-config>

              The web-serive was generated via JWSC, and worked fine in 10.3, but throws the same error at deploy-time. Looks like a mismatch in the weblogic-webservice xsd to us.

              I have an SR open with support on it.
              -richard
              • 5. Re: validation errors weblogic-webservices.xml during deploy for valid dd
                731177
                reproduced in support on 10.3.4 and 10.3.3, works in 10.3 Reference SR 3-3199378481 when discussing with support. No bug-number yet.

                It would appear the parser at deploy-time is ignoring any name-space declarations. Which in this case means, no connection from web-service generated by jwsc (owner: oracle) and deployed in weblogic (owner: oracle) and making reference to J2EE security framework (owner: oracle, but standardised). But that's only an intial diagnosis
                -richard
                • 6. Re: validation errors weblogic-webservices.xml during deploy for valid dd
                  844125
                  This is still a valid issue to us, which version contains the correction and if not available where can I track the progress?

                  Thanks,
                  Eltjo.