4 Replies Latest reply on Nov 30, 2004 12:01 PM by Shawn Dahlen

    Using XSD:ANY

    Shawn Dahlen Newbie

      Hello -

      I am attempting to create an implementation of a web service in which a particular operation is defined as follows:

      ....

      <xs:element name="getAllResponse">
      <xs:complexType>
      <xs:sequence>
      <xs:any namespace="http://iss.lmco.com/schema/action-item-summary" maxOccurs="1"/>
      </xs:sequence>
      </xs:complexType>
      </xs:element>

      ....














      According the JAX-RPC 1.1 specification, I should have the following interface created:

      public interface ActionItemPort extends Remote {
      GetAllResponse getAll() throws RemoteException;
      }

      And the GetAllResponse bean should have a _any property of type SOAPElement.

      However, when I run wscompile on the given WSDL definition, I instead recieve the following interface:

      public interface ActionItemPort extends Remote {
      SOAPElement getAll() throws RemoteException;
      }

      For some reason, wscompile unwraps my GetAllResponse bean if the only element within it is of type XSD:ANY. I have the WSI feature turned on, and explicitly say donotunwrap. I am using JWSDP version 1.4.

      I know that JBossWS only allows Apache Axis document style, and therefore this unwrapped interface doesn't work.

      Is this a bug in wscompile? I looked around but did not see it mentioned anywhere. How can I overcome this issue, without hand-editing the generated interfaces?

      I appreciate any help you can afford.

      Shawn Dahlen

        • 1. Re: Using XSD:ANY
          Shawn Dahlen Newbie

          It appears part of my WSDL definition was lost. Here it is:

          <message name="getAllInput"/>
          <message name="getAllInput"/>
          <message name="getAllOutput">
           <part name="result" element="service:getAllResponse"/>
          </message>
          
           <portType name="actionItemPort">
           <operation name="getAll">
           <input message="service:getAllInput"/>
           <output message="service:getAllOutput"/>
           </operation>
           </portType>
          


          • 2. Re: Using XSD:ANY
            Thomas Diesler Master

            Maybe this is an issue with ananomous schema types. You could try

            <xs:complexType name="GetAllResponseType">
            <xs:sequence>
            <xs:any namespace="http://iss.lmco.com/schema/action-item-summary" maxOccurs="1"/>
            </xs:sequence>
            </xs:complexType>
            <xs:element name="getAllResponse" type="schema:GetAllResponseType">
            


            • 3. Re: Using XSD:ANY
              Shawn Dahlen Newbie

              Thank you for your response. Unfortunately, switching from anonymous types did not help the situation. WSCOMPILE still unwraps the type containing only an xsd:any element.

              If anyone has other suggestions, I would appreciate it. Otherwise, who or what organization should I contact about a potential bug within WSCOMPILE if it truely is a bug?

              Thanks,

              Shawn Dahlen

              • 4. Re: Using XSD:ANY
                Shawn Dahlen Newbie

                For those who are curious, I found the solution to the issue I was having.

                JAXRPC 1.1 does not support xsd:any with a specified namespace. It only supports the namespace values of ##any and ##other. When I used one of those values, the appropriate Java class was generated by wscompile. JAXRPC 2.0 will support a specified namespace.