2 Replies Latest reply on Apr 7, 2006 1:37 PM by jbabuscio

    JBossWS Schema Errors

    jbabuscio

      I am using public WSDLs and public schemas. They can be viewed at

      http://docs.oasis-open.org/

      I am implementing a web service that follows the base notification standard.

      When I attempt to deploy my webservices, I get these Warnings:

      [PortComponentMetaData] < wsdl-port > element in webservices.xml not namespace qualified: NotificationProducerPort
      [PortComponentMetaData] < wsdl-port > element in webservices.xml not namespace qualified: NotificationConsumerPort
      [PortComponentMetaData] < wsdl-port > element in webservices.xml not namespace qualified: SubscriptionManagerPort

      then it says it cannot deploy my .ear file which contains the .war file which contains the webservice configurations...

      because org.jboss.ws.WSException: Cannot load schema:...

      Then it lists all the schema that I am using in my application

      Error
      at org.jboss.ws.tools.JavaToXSD.parseSchema(JavaToXSD.java:197)
      at org.jboss.ws.metadata.wsdl.WSDL11Reader.processTypes(WSDL11Reader.java:118)


      I recently could not get these web services to work on JBoss WS4EE because it was giving invalid element errors. I was told to switch to this and the new stack might possibly solve the problem because it has better schema support.

      Could anyone offer some help for this.

      Thank you.

        • 1. Re: JBossWS Schema Errors

          Can you supply the relevant WSDL parts that describe the ports and your webservice.xml? The WSDL type declarations would be interesting as well.

          • 2. Re: JBossWS Schema Errors
            jbabuscio

            This is my WSDL file.

            <?xml version="1.0"?>
            
            <definitions name="MyDefinition"
             targetNamespace="http://abc.com/my/wsdl/namespace"
             xmlns="http://schemas.xmlsoap.org/wsdl/"
             xmlns:tns="http://abc.com/my/wsdl/namespace"
             xmlns:xsd="http://www.w3.org/2001/XMLSchema"
             xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/"
             xmlns:wsrp="http://docs.oasis-open.org/wsrf/2004/06/wsrf-WS-ResourceProperties-1.2-draft-01.xsd"
             xmlns:wsrpw="http://docs.oasis-open.org/wsrf/2004/06/wsrf-WS-ResourceProperties-1.2-draft-01.wsdl"
             xmlns:wsrlw="http://docs.oasis-open.org/wsrf/2004/06/wsrf-WS-ResourceLifetime-1.2-draft-01.wsdl"
             xmlns:wsntw="http://docs.oasis-open.org/wsn/2004/06/wsn-WS-BaseNotification-1.2-draft-01.wsdl"
             xmlns:mex="http://schemas.xmlsoap.org/ws/2004/09/mex"
             xmlns:wsa04="http://schemas.xmlsoap.org/ws/2004/08/addressing">
            
             <import namespace="http://docs.oasis-open.org/wsrf/2004/06/wsrf-WS-ResourceProperties-1.2-draft-01.wsdl"
             location="wsrf/WS-ResourceProperties-1_2-Draft_01.wsdl"/>
            
             <import namespace="http://docs.oasis-open.org/wsrf/2004/06/wsrf-WS-ResourceLifetime-1.2-draft-01.wsdl"
             location="wsrf/WS-ResourceLifetime-1_2-Draft_01.wsdl"/>
            
             <import namespace="http://docs.oasis-open.org/wsn/2004/06/wsn-WS-BaseNotification-1.2-draft-01.wsdl"
             location="wsn/WS-BaseNotification-1_2-Draft_01.wsdl"/>
            
             <types>
             <schema elementFormDefault="qualified"
             targetNamespace="http://abc.com/my/wsdl/namespace"
             xmlns="http://www.w3.org/2001/XMLSchema"
             xmlns:xsd="http://www.w3.org/2001/XMLSchema"
             xmlns:wsrl="http://docs.oasis-open.org/wsrf/2004/06/wsrf-WS-ResourceLifetime-1.2-draft-01.xsd"
             xmlns:wsbf="http://docs.oasis-open.org/wsrf/2004/06/wsrf-WS-BaseFaults-1.2-draft-01.xsd"
             xmlns:wsnt="http://docs.oasis-open.org/wsn/2004/06/wsn-WS-BaseNotification-1.2-draft-01.xsd">
            
             <xsd:import namespace="http://docs.oasis-open.org/wsrf/2004/06/wsrf-WS-BaseFaults-1.2-draft-01.xsd"
             schemaLocation="wsrf/WS-BaseFaults-1_2-Draft_01.xsd"/>
            
             <xsd:import namespace="http://docs.oasis-open.org/wsrf/2004/06/wsrf-WS-ResourceLifetime-1.2-draft-01.xsd"
             schemaLocation="wsrf/WS-ResourceLifetime-1_2-Draft_01.xsd"/>
            
             <xsd:import namespace="http://docs.oasis-open.org/wsn/2004/06/wsn-WS-BaseNotification-1.2-draft-01.xsd"
             schemaLocation="wsn/WS-BaseNotification-1_2-Draft_01.xsd"/>
            
             <!-- *** Add an element definition here for each of your custom resource properties *** -->
             <!-- *** e.g.: <element name="MyProperty" type="xsd:string" /> *** -->
            
             <!-- Resource Properties Document Schema -->
             <element name="ResourceProperties">
             <complexType>
             <sequence>
            
             <!-- *** If you wish to implement the wsrl:ScheduledResourceTermination portType,
             uncomment the below two lines *** -->
             <!--
             <element ref="wsrl:CurrentTime" />
             <element ref="wsrl:TerminationTime" />
             -->
            
             <!-- *** If you wish to implement the wsnt:NotificationProducer portType,
             uncomment the below three lines *** -->
             <!--
             <element ref="wsnt:Topic" maxOccurs="unbounded" />
             <element ref="wsnt:FixedTopicSet" />
             <element ref="wsnt:TopicExpressionDialects" maxOccurs="unbounded" />
             -->
            
             <!-- *** Add an element ref here for each of the custom resource property elements you defined above *** -->
             <!-- *** e.g.: <element ref="tns:MyProperty" /> (NOTE: default is minOccurs="1" and maxOccurs="1") *** -->
             <!-- *** or: <element ref="tns:MyOtherProperty" minOccurs="0" maxOccurs="unbounded" /> *** -->
            
             <!-- *** Uncomment the below any element if you want to permit resource property elements
             with arbitrary names (not generally recommended) *** -->
             <!--
             <any minOccurs="0" maxOccurs="unbounded" namespace="##other" processContents="lax"/>
             -->
            
             </sequence>
             </complexType>
             </element>
            
             <!-- *** Add element definitions for custom request/response/fault types here *** -->
            
             </schema>
             </types>
            
             <!-- *** Add message definitions for custom request/response/fault types here *** -->
            
             <portType name="NotificationProducerPortType" wsrp:ResourceProperties="tns:ResourceProperties">
            
             <operation name="GetResourceProperty">
             <input name="GetResourcePropertyRequest" message="wsrpw:GetResourcePropertyRequest"/>
             <output name="GetResourcePropertyResponse" message="wsrpw:GetResourcePropertyResponse"/>
             <fault name="ResourceUnknownFault" message="wsrpw:ResourceUnknownFault"/>
             <fault name="InvalidResourcePropertyQNameFault" message="wsrpw:InvalidResourcePropertyQNameFault"/>
             </operation>
            
            
            
             <!-- *** If you wish to implement the WSNT NotificationProducer portType,
             uncomment the below two operation blocks *** -->
            
             <operation name="Subscribe">
             <input message="wsntw:SubscribeRequest" />
             <output message="wsntw:SubscribeResponse" />
             <fault name="ResourceUnknownFault" message="wsntw:ResourceUnknownFault" />
             <fault name="SubscribeCreationFailedFault" message="wsntw:SubscribeCreationFailedFault" />
             <fault name="TopicPathDialectUnknownFault" message="wsntw:TopicPathDialectUnknownFault" />
             </operation>
            
             <operation name="GetCurrentMessage">
             <input message="wsntw:GetCurrentMessageRequest" />
             <output message="wsntw:GetCurrentMessageResponse" />
             <fault name="ResourceUnknownFault" message="wsntw:ResourceUnknownFault" />
             <fault name="InvalidTopicExpressionFault" message="wsntw:InvalidTopicExpressionFault" />
             <fault name="TopicNotSupportedFault" message="wsntw:TopicNotSupportedFault" />
             <fault name="NoCurrentMessageOnTopicFault" message="wsntw:NoCurrentMessageOnTopicFault" />
             </operation>
            
             </portType>
            
             <binding name="NotificationProducerSoapHttpBinding" type="tns:NotificationProducerPortType">
            
             <soap:binding style="document" transport="http://schemas.xmlsoap.org/soap/http"/>
            
             <operation name="GetResourceProperty">
             <soap:operation style="document"/>
             <input>
             <soap:body use="literal"/>
             </input>
             <output>
             <soap:body use="literal"/>
             </output>
             <fault name="ResourceUnknownFault">
             <soap:fault name="ResourceUnknownFault" use="literal"/>
             </fault>
             <fault name="InvalidResourcePropertyQNameFault">
             <soap:fault name="InvalidResourcePropertyQNameFault" use="literal"/>
             </fault>
             </operation>
            
             <!-- *** If you wish to implement the WSRP GetMultipleResourceProperties portType,
             uncomment the below operation block *** -->
            
            
            
            
            
            
            
             <!-- *** If you wish to implement the WSNT NotificationProducer portType,
             uncomment the below two operation blocks *** -->
            
             <operation name="Subscribe">
             <soap:operation style="document"/>
             <input>
             <soap:body use="literal"/>
             </input>
             <output>
             <soap:body use="literal"/>
             </output>
             <fault name="ResourceUnknownFault">
             <soap:fault name="ResourceUnknownFault" use="literal"/>
             </fault>
             <fault name="SubscribeCreationFailedFault">
             <soap:fault name="SubscribeCreationFailedFault" use="literal"/>
             </fault>
             <fault name="TopicPathDialectUnknownFault">
             <soap:fault name="TopicPathDialectUnknownFault" use="literal"/>
             </fault>
             </operation>
             <operation name="GetCurrentMessage">
             <soap:operation style="document"/>
             <input>
             <soap:body use="literal"/>
             </input>
             <output>
             <soap:body use="literal"/>
             </output>
             <fault name="ResourceUnknownFault">
             <soap:fault name="ResourceUnknownFault" use="literal"/>
             </fault>
             <fault name="InvalidTopicExpressionFault">
             <soap:fault name="InvalidTopicExpressionFault" use="literal"/>
             </fault>
             <fault name="TopicNotSupportedFault">
             <soap:fault name="TopicNotSupportedFault" use="literal"/>
             </fault>
             <fault name="NoCurrentMessageOnTopicFault">
             <soap:fault name="NoCurrentMessageOnTopicFault" use="literal"/>
             </fault>
             </operation>
            
            
            
             <!-- *** Add an operation block here for each of your custom operations *** -->
            
             </binding>
            
             <service name="NotificationProducerService">
             <!-- Note: the port name becomes the service name in the wsdd generated by Wsdl2Java -->
             <!-- *** Change the port name and the soap:address location below to reflect the desired endpoint URL *** -->
             <port name="NotificationProducerPort" binding="tns:NotificationProducerSoapHttpBinding">
             <soap:address location="https://localhost/NotificationProducer" />
             </port>
             </service>
            
            </definitions>
            




            This is my webservices.xml. It has 3 servlets because I'm running 3 services. The WSDL file I copied in at the top is for the NotificationProducer service. I am getting my error when I try to send a subscribe message.

            <?xml version="1.0" encoding="UTF-8"?>
            <webservices>
             <webservice-description>
             <webservice-description-name>NotificationProducer</webservice-description-name>
             <wsdl-file>WEB-INF/wsdl/NotificationProducer.wsdl</wsdl-file>
             <jaxrpc-mapping-file>WEB-INF/np-mapping.xml</jaxrpc-mapping-file>
             <port-component>
             <port-component-name>NotificationProducerPort</port-component-name>
             <wsdl-port>NotificationProducerPort</wsdl-port>
             <service-endpoint-interface>com.jb.ws.notificationproducer.NotificationProducerPortType</service-endpoint-interface>
             <service-impl-bean>
             <servlet-link>NotificationProducerServlet</servlet-link>
             </service-impl-bean>
             </port-component>
             </webservice-description>
            
             <webservice-description>
             <webservice-description-name>NotificationConsumer</webservice-description-name>
             <wsdl-file>WEB-INF/wsdl/NotificationConsumer.wsdl</wsdl-file>
             <jaxrpc-mapping-file>WEB-INF/nc-mapping.xml</jaxrpc-mapping-file>
             <port-component>
             <port-component-name>NotificationConsumerPort</port-component-name>
             <wsdl-port>NotificationConsumerPort</wsdl-port>
             <service-endpoint-interface>com.jb.ws.notificationconsumer.NotificationConsumerPortType</service-endpoint-interface>
             <service-impl-bean>
             <servlet-link>NotificationConsumerServlet</servlet-link>
             </service-impl-bean>
             </port-component>
             </webservice-description>
            
             <webservice-description>
             <webservice-description-name>SubscriptionManager</webservice-description-name>
             <wsdl-file>WEB-INF/wsdl/SubscriptionManager.wsdl</wsdl-file>
             <jaxrpc-mapping-file>WEB-INF/sm-mapping.xml</jaxrpc-mapping-file>
             <port-component>
             <port-component-name>SubscriptionManagerPort</port-component-name>
             <wsdl-port>SubscriptionManagerPort</wsdl-port>
             <service-endpoint-interface>com.jb.ws.subscriptionmanager.SubscriptionManagerPortType</service-endpoint-interface>
             <service-impl-bean>
             <servlet-link>SubscriptionManagerServlet</servlet-link>
             </service-impl-bean>
             </port-component>
             </webservice-description>
            
            </webservices>