Announcement

Collapse
No announcement yet.
X
  • Filter
  • Time
Clear All
new posts

    SmartGWT & WSDL error

    I have an application trying to load a web service, but I'm getting an error on load. The error is:

    Code:
    00:00:32.792 [ERROR] 12:13:15.524:XRP8:WARN:schemaLoader:isc_SchemaSet_0:SchemaSet with targetNamespace 'undefined' could not find SchemaSet for namespace: 'http://system.ws.server.com/'. Pass autoLoadImports to loadWSDL()/loadXMLSchema() or separately load via loadWSDL/loadXMLSchema jsp tag or method
    com.smartgwt.client.core.JsObject$SGWT_WARN: 12:13:15.524:XRP8:WARN:schemaLoader:isc_SchemaSet_0:SchemaSet with targetNamespace 'undefined' could not find SchemaSet for namespace: 'http://system.ws.server.com/'. Pass autoLoadImports to loadWSDL()/loadXMLSchema() or separately load via loadWSDL/loadXMLSchema jsp tag or method 	at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method) 	at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:39) 	at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:27) 	at java.lang.reflect.Constructor.newInstance(Constructor.java:513) 	at com.google.gwt.dev.shell.MethodAdaptor.invoke(MethodAdaptor.java:105) 	at com.google.gwt.dev.shell.MethodDispatch.invoke(MethodDispatch.java:71) 	at com.google.gwt.dev.shell.OophmSessionHandler.invoke(OophmSessionHandler.java:157) 	at com.google.gwt.dev.shell.BrowserChannel.reactToMessages(BrowserChannel.java:1668) 	at com.google.gwt.dev.shell.BrowserChannelServer.processConnection(BrowserChannelServer.java:401) 	at com.google.gwt.dev.shell.BrowserChannelServer.run(BrowserChannelServer.java:222) 	at java.lang.Thread.run(Thread.java:619)
    I'm already passing autoLoadImports to loadWSDL (here's my load):

    Code:
            XMLTools.loadWSDL(SYSTEM_WSDL_URL,
                              new WSDLLoadCallback()
            {
                public void execute(WebService service)
                {
                    if (service == null)
                    {
                        // Error loading the WSDL.
                    }
                    else
                    {
    				    // Lots of processing now that I have the service.
                    }
                }
            }, new RPCRequest(), true);
    Note that above I'm using an empty RPCRequest() - I just pass it so I can pass 'true' to the loadWSDL().

    Below is my WSDL (as generated by netbeans):

    Code:
    <?xml version="1.0" encoding="UTF-8" standalone="yes"?>
    <!-- Generated by JAX-WS RI at http://jax-ws.dev.java.net. RI's version is JAX-WS RI 2.1.3.3-hudson-757-SNAPSHOT. -->
    <definitions targetNamespace="http://system.ws.server.com/" name="SystemWSService" xmlns="http://schemas.xmlsoap.org/wsdl/" xmlns:tns="http://system.ws.server.com/" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/" xmlns:wsu="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd">
      <types>
        <xsd:schema>
          <xsd:import namespace="http://system.ws.server.com/" schemaLocation="SystemWSService_schema1.xsd"/>
        </xsd:schema>
      </types>
      <!-- lots of message names here -->
      <!-- lots of operations here -->
      <!-- lots of dindings here -->
      <service name="SystemWSService">
        <port name="SystemWSPort" binding="tns:SystemWSPortBinding">
          <soap:address location="actual URL
        </port>
      </service>
    </definitions>
    The error talks of an undefined targetNamespace - but as far as I can see I've correctly defined the targetNamespace. And it also talks of a missing SchemaSet - but I'm using autoLoadImports.

    Any suggestions?

    #2
    Budfudder,

    HAve you ever fixed this? I've got the same problem.

    Comment


      #3
      With autoLoadImports, you should expect a request to fetch "SystemWSService_schema1.xsd" because of the schemaLocation attribute on your <xsd:import> tag. You can see whether that's succeeding using the RPC tab in the Developer Console. If it isn't, that's the problem.

      If that's not the problem, then the problem would be a further import in the "SystemWSService_schema1.xsd" file, or bad definitions within that file or elsewhere in the WSDL file, so you'd have to post those.

      Comment


        #4
        autoLoadImports is true and xsd file is downloaded, I see it in Developer Tools of Chrome and in the server access log.

        wsdl:
        Code:
        <definitions xmlns="http://schemas.xmlsoap.org/wsdl/" xmlns:tns="http://soapproba/" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/" targetNamespace="http://soapproba/" name="CIService"> 
          <types> 
            <xsd:schema> 
              <xsd:import schemaLocation="/data/logalyze.xsd" namespace="http://soapproba/"></xsd:import> 
            </xsd:schema> 
          </types> 
          <message name="getCollectorConfigs"> 
            <part element="tns:getCollectorConfigs" name="parameters"></part> 
          </message> 
          <message name="getCollectorConfigsResponse"> 
            <part element="tns:getCollectorConfigsResponse" name="parameters"></part> 
          </message> 
          <portType name="CI"> 
            <operation name="getCollectorConfigs"> 
              <input message="tns:getCollectorConfigs"></input> 
              <output message="tns:getCollectorConfigsResponse"></output> 
            </operation> 
          </portType> 
          <binding name="CIPortBinding" type="tns:CI"> 
            <soap:binding style="document" transport="http://schemas.xmlsoap.org/soap/http"></soap:binding> 
            <operation name="getCollectorConfigs"> 
              <soap:operation soapAction=""></soap:operation> 
              <input> 
                <soap:body use="literal"></soap:body> 
              </input> 
              <output> 
                <soap:body use="literal"></soap:body> 
              </output> 
            </operation> 
          </binding> 
          <service name="CIService"> 
            <port name="CIPort" binding="tns:CIPortBinding"> 
              <soap:address location="/data/logalyze"></soap:address> 
            </port> 
          </service> 
        </definitions>
        xsd:
        Code:
        <xs:schema targetNamespace="http://soapproba/" version="1.0" xmlns:tns="http://soapproba/" xmlns:xs="http://www.w3.org/2001/XMLSchema"> 
         
          <xs:element name="getCollectorConfigs" type="tns:getCollectorConfigs"></xs:element> 
         
          <xs:element name="getCollectorConfigsResponse" type="tns:getCollectorConfigsResponse"></xs:element> 
         
          <xs:complexType name="getCollectorConfigs"> 
            <xs:sequence> 
              <xs:element nillable="true" maxOccurs="unbounded" name="arg0" type="xs:string" minOccurs="0"></xs:element> 
            </xs:sequence> 
          </xs:complexType> 
         
          <xs:complexType name="getCollectorConfigsResponse"> 
            <xs:sequence> 
              <xs:element maxOccurs="unbounded" name="return" type="tns:collectorConfig" minOccurs="0"></xs:element> 
            </xs:sequence> 
          </xs:complexType> 
         
          <xs:complexType name="collectorConfig"> 
            <xs:sequence> 
              <xs:element name="dfConfig" type="tns:dfConfig" minOccurs="0"></xs:element> 
              <xs:element name="dtpConfig" type="tns:dtpConfig" minOccurs="0"></xs:element> 
              <xs:element name="id" type="xs:string" minOccurs="0"></xs:element> 
              <xs:element name="name" type="xs:string" minOccurs="0"></xs:element> 
              <xs:element name="startupConfig" type="tns:startupConfig" minOccurs="0"></xs:element> 
              <xs:element name="weight" type="xs:string" minOccurs="0"></xs:element> 
            </xs:sequence> 
          </xs:complexType> 
         
          <xs:complexType name="dfConfig"> 
            <xs:sequence> 
              <xs:element name="type" type="xs:string" minOccurs="0"></xs:element> 
            </xs:sequence> 
          </xs:complexType> 
         
          <xs:complexType name="dtpConfig"> 
            <xs:sequence> 
              <xs:element name="type" type="xs:string" minOccurs="0"></xs:element> 
            </xs:sequence> 
          </xs:complexType> 
         
          <xs:complexType name="startupConfig"> 
            <xs:sequence> 
              <xs:element name="mode" type="tns:startupMode" minOccurs="0"></xs:element> 
            </xs:sequence> 
          </xs:complexType> 
         
          <xs:simpleType name="startupMode"> 
            <xs:restriction base="xs:string"> 
              <xs:enumeration value="disabled"></xs:enumeration> 
              <xs:enumeration value="scheduled"></xs:enumeration> 
              <xs:enumeration value="manual"></xs:enumeration> 
              <xs:enumeration value="automatic"></xs:enumeration> 
            </xs:restriction> 
          </xs:simpleType> 
        
        </xs:schema>

        Comment


          #5
          Originally posted by Isomorphic
          With autoLoadImports, you should expect a request to fetch "SystemWSService_schema1.xsd" because of the schemaLocation attribute on your <xsd:import> tag. You can see whether that's succeeding using the RPC tab in the Developer Console. If it isn't, that's the problem.
          It appears to be loading the xsd correctly. From the RPC console, I can see the request:
          Code:
          {
              "actionURL":"http://localhost:8157/sib-user/SystemWSService?xsd=1", 
              "showPrompt":false, 
              "transport":"xmlHttpRequest", 
              "useSimpleHttp":true, 
              "promptStyle":"dialog", 
              "httpMethod":"GET", 
              "sendNoQueue":true, 
              "callback":{
                  "target":null, 
                  "methodName":"$37c"
              }, 
              "serverOutputAsString":true
          }
          and then what appears to be a successful response:

          Code:
          <?xml version="1.0" encoding="UTF-8"?><!-- Published by JAX-WS RI at http://jax-ws.dev.java.net. RI's version is JAX-WS RI 2.1.3.3-hudson-757-SNAPSHOT. -->
          <xs:schema xmlns:tns="http://system.ws.server.com/" xmlns:xs="http://www.w3.org/2001/XMLSchema" version="1.0" targetNamespace="http://system.ws.server.com/">
          
          <xs:element name="WSFault" type="tns:WSFault"></xs:element>
          
          <xs:element name="createSystem" type="tns:createSystem"></xs:element>
          
          <xs:element name="createSystemResponse" type="tns:createSystemResponse"></xs:element>
          
          <xs:element name="deleteSystem" type="tns:deleteSystem"></xs:element>
          
          <xs:element name="deleteSystemResponse" type="tns:deleteSystemResponse"></xs:element>
          
          <xs:element name="readSystem" type="tns:readSystem"></xs:element>
          
          <xs:element name="readSystemResponse" type="tns:readSystemResponse"></xs:element>
          
          <xs:element name="readSystems" type="tns:readSystems"></xs:element>
          
          <xs:element name="readSystemsResponse" type="tns:readSystemsResponse"></xs:element>
          
          <xs:element name="updateSystem" type="tns:updateSystem"></xs:element>
          
          <xs:element name="updateSystemResponse" type="tns:updateSystemResponse"></xs:element>
          
          <xs:complexType name="createSystem">
          <xs:sequence>
          <xs:element name="system" type="tns:systemData" minOccurs="0"></xs:element>
          </xs:sequence>
          </xs:complexType>
          
          <xs:complexType name="systemData">
          <xs:sequence>
          <xs:element name="businessCriticality" type="xs:int"></xs:element>
          <xs:element name="comments" type="xs:string" minOccurs="0"></xs:element>
          <xs:element name="reviewDayOfMonth" type="xs:int"></xs:element>
          <xs:element name="reviewFrequency" type="xs:int"></xs:element>
          <xs:element name="systemId" type="xs:long"></xs:element>
          <xs:element name="systemName" type="xs:string" minOccurs="0"></xs:element>
          </xs:sequence>
          </xs:complexType>
          
          <xs:complexType name="createSystemResponse">
          <xs:sequence>
          <xs:element name="return" type="xs:long"></xs:element>
          </xs:sequence>
          </xs:complexType>
          
          <xs:complexType name="WSFault">
          <xs:sequence>
          <xs:element name="code" type="xs:int"></xs:element>
          <xs:element name="message" type="xs:string" minOccurs="0"></xs:element>
          </xs:sequence>
          </xs:complexType>
          
          <xs:complexType name="readSystems">
          <xs:sequence></xs:sequence>
          </xs:complexType>
          
          <xs:complexType name="readSystemsResponse">
          <xs:sequence>
          <xs:element name="return" type="tns:systemData" minOccurs="0" maxOccurs="unbounded"></xs:element>
          </xs:sequence>
          </xs:complexType>
          
          <xs:complexType name="updateSystem">
          <xs:sequence>
          <xs:element name="system" type="tns:systemData" minOccurs="0"></xs:element>
          </xs:sequence>
          </xs:complexType>
          
          <xs:complexType name="updateSystemResponse">
          <xs:sequence></xs:sequence>
          </xs:complexType>
          
          <xs:complexType name="deleteSystem">
          <xs:sequence>
          <xs:element name="sysId" type="xs:long"></xs:element>
          </xs:sequence>
          </xs:complexType>
          
          <xs:complexType name="deleteSystemResponse">
          <xs:sequence>
          <xs:element name="return" type="xs:string" minOccurs="0"></xs:element>
          </xs:sequence>
          </xs:complexType>
          
          <xs:complexType name="readSystem">
          <xs:sequence>
          <xs:element name="sysId" type="xs:long"></xs:element>
          </xs:sequence>
          </xs:complexType>
          
          <xs:complexType name="readSystemResponse">
          <xs:sequence>
          <xs:element name="return" type="tns:systemData" minOccurs="0"></xs:element>
          </xs:sequence>
          </xs:complexType>
          </xs:schema>
          Originally posted by Isomorphic
          If that's not the problem, then the problem would be a further import in the "SystemWSService_schema1.xsd" file, or bad definitions within that file or elsewhere in the WSDL file, so you'd have to post those.
          I've had a further look in both the WSDL file and the xsd file, and can't see any other imports or any bad definitions (I should note that both files are automatically generated by netbeans). In any case, here they are:

          WSDL
          Code:
          <?xml version="1.0" encoding="UTF-8" standalone="yes"?>
          <!-- Generated by JAX-WS RI at http://jax-ws.dev.java.net. RI's version is JAX-WS RI 2.1.3.3-hudson-757-SNAPSHOT. -->
          <definitions targetNamespace="http://system.ws.server.com/" name="SystemWSService" xmlns="http://schemas.xmlsoap.org/wsdl/" xmlns:tns="http://system.ws.server.com/" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/" xmlns:wsu="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd">
            <types>
              <xsd:schema>
                <xsd:import namespace="http://system.ws.server.com/" schemaLocation="SystemWSService_schema1.xsd"/>
              </xsd:schema>
            </types>
            <message name="readSystem">
              <part name="parameters" element="tns:readSystem"/>
            </message>
            <message name="readSystemResponse">
              <part name="parameters" element="tns:readSystemResponse"/>
            </message>
            <message name="WSFault">
              <part name="fault" element="tns:WSFault"/>
            </message>
            <message name="readSystems">
              <part name="parameters" element="tns:readSystems"/>
            </message>
            <message name="readSystemsResponse">
              <part name="parameters" element="tns:readSystemsResponse"/>
            </message>
            <message name="updateSystem">
              <part name="parameters" element="tns:updateSystem"/>
            </message>
            <message name="updateSystemResponse">
              <part name="parameters" element="tns:updateSystemResponse"/>
            </message>
            <message name="deleteSystem">
              <part name="parameters" element="tns:deleteSystem"/>
            </message>
            <message name="deleteSystemResponse">
              <part name="parameters" element="tns:deleteSystemResponse"/>
            </message>
            <message name="createSystem">
              <part name="parameters" element="tns:createSystem"/>
            </message>
            <message name="createSystemResponse">
              <part name="parameters" element="tns:createSystemResponse"/>
            </message>
            <portType name="SystemWS">
              <operation name="readSystem">
                <input message="tns:readSystem"/>
                <output message="tns:readSystemResponse"/>
                <fault message="tns:WSFault" name="WSFault"/>
              </operation>
              <operation name="readSystems">
                <input message="tns:readSystems"/>
                <output message="tns:readSystemsResponse"/>
                <fault message="tns:WSFault" name="WSFault"/>
              </operation>
              <operation name="updateSystem">
                <input message="tns:updateSystem"/>
                <output message="tns:updateSystemResponse"/>
                <fault message="tns:WSFault" name="WSFault"/>
              </operation>
              <operation name="deleteSystem">
                <input message="tns:deleteSystem"/>
                <output message="tns:deleteSystemResponse"/>
                <fault message="tns:WSFault" name="WSFault"/>
              </operation>
              <operation name="createSystem">
                <input message="tns:createSystem"/>
                <output message="tns:createSystemResponse"/>
                <fault message="tns:WSFault" name="WSFault"/>
              </operation>
            </portType>
            <binding name="SystemWSPortBinding" type="tns:SystemWS">
              <soap:binding transport="http://schemas.xmlsoap.org/soap/http" style="document"/>
              <operation name="readSystem">
                <soap:operation soapAction=""/>
                <input>
                  <soap:body use="literal"/>
                </input>
                <output>
                  <soap:body use="literal"/>
                </output>
                <fault name="WSFault">
                  <soap:fault name="WSFault" use="literal"/>
                </fault>
              </operation>
              <operation name="readSystems">
                <soap:operation soapAction=""/>
                <input>
                  <soap:body use="literal"/>
                </input>
                <output>
                  <soap:body use="literal"/>
                </output>
                <fault name="WSFault">
                  <soap:fault name="WSFault" use="literal"/>
                </fault>
              </operation>
              <operation name="updateSystem">
                <soap:operation soapAction=""/>
                <input>
                  <soap:body use="literal"/>
                </input>
                <output>
                  <soap:body use="literal"/>
                </output>
                <fault name="WSFault">
                  <soap:fault name="WSFault" use="literal"/>
                </fault>
              </operation>
              <operation name="deleteSystem">
                <soap:operation soapAction=""/>
                <input>
                  <soap:body use="literal"/>
                </input>
                <output>
                  <soap:body use="literal"/>
                </output>
                <fault name="WSFault">
                  <soap:fault name="WSFault" use="literal"/>
                </fault>
              </operation>
              <operation name="createSystem">
                <soap:operation soapAction=""/>
                <input>
                  <soap:body use="literal"/>
                </input>
                <output>
                  <soap:body use="literal"/>
                </output>
                <fault name="WSFault">
                  <soap:fault name="WSFault" use="literal"/>
                </fault>
              </operation>
            </binding>
            <service name="SystemWSService">
              <port name="SystemWSPort" binding="tns:SystemWSPortBinding">
                <soap:address location="actual URL"/>
              </port>
            </service>
          </definitions>
          XSD
          Code:
          <?xml version="1.0" encoding="UTF-8" standalone="yes"?>
          <xs:schema version="1.0" targetNamespace="http://system.ws.server.com/" xmlns:tns="http://system.ws.server.com/" xmlns:xs="http://www.w3.org/2001/XMLSchema">
          
            <xs:element name="WSFault" type="tns:WSFault"/>
          
            <xs:element name="createSystem" type="tns:createSystem"/>
          
            <xs:element name="createSystemResponse" type="tns:createSystemResponse"/>
          
            <xs:element name="deleteSystem" type="tns:deleteSystem"/>
          
            <xs:element name="deleteSystemResponse" type="tns:deleteSystemResponse"/>
          
            <xs:element name="readSystem" type="tns:readSystem"/>
          
            <xs:element name="readSystemResponse" type="tns:readSystemResponse"/>
          
            <xs:element name="readSystems" type="tns:readSystems"/>
          
            <xs:element name="readSystemsResponse" type="tns:readSystemsResponse"/>
          
            <xs:element name="updateSystem" type="tns:updateSystem"/>
          
            <xs:element name="updateSystemResponse" type="tns:updateSystemResponse"/>
          
            <xs:complexType name="createSystem">
              <xs:sequence>
                <xs:element name="system" type="tns:systemData" minOccurs="0"/>
              </xs:sequence>
            </xs:complexType>
          
            <xs:complexType name="systemData">
              <xs:sequence>
                <xs:element name="businessCriticality" type="xs:int"/>
                <xs:element name="comments" type="xs:string" minOccurs="0"/>
                <xs:element name="reviewDayOfMonth" type="xs:int"/>
                <xs:element name="reviewFrequency" type="xs:int"/>
                <xs:element name="systemId" type="xs:long"/>
                <xs:element name="systemName" type="xs:string" minOccurs="0"/>
              </xs:sequence>
            </xs:complexType>
          
            <xs:complexType name="createSystemResponse">
              <xs:sequence>
                <xs:element name="return" type="xs:long"/>
              </xs:sequence>
            </xs:complexType>
          
            <xs:complexType name="WSFault">
              <xs:sequence>
                <xs:element name="code" type="xs:int"/>
                <xs:element name="message" type="xs:string" minOccurs="0"/>
              </xs:sequence>
            </xs:complexType>
          
            <xs:complexType name="readSystems">
              <xs:sequence/>
            </xs:complexType>
          
            <xs:complexType name="readSystemsResponse">
              <xs:sequence>
                <xs:element name="return" type="tns:systemData" minOccurs="0" maxOccurs="unbounded"/>
              </xs:sequence>
            </xs:complexType>
          
            <xs:complexType name="updateSystem">
              <xs:sequence>
                <xs:element name="system" type="tns:systemData" minOccurs="0"/>
              </xs:sequence>
            </xs:complexType>
          
            <xs:complexType name="updateSystemResponse">
              <xs:sequence/>
            </xs:complexType>
          
            <xs:complexType name="deleteSystem">
              <xs:sequence>
                <xs:element name="sysId" type="xs:long"/>
              </xs:sequence>
            </xs:complexType>
          
            <xs:complexType name="deleteSystemResponse">
              <xs:sequence>
                <xs:element name="return" type="xs:string" minOccurs="0"/>
              </xs:sequence>
            </xs:complexType>
          
            <xs:complexType name="readSystem">
              <xs:sequence>
                <xs:element name="sysId" type="xs:long"/>
              </xs:sequence>
            </xs:complexType>
          
            <xs:complexType name="readSystemResponse">
              <xs:sequence>
                <xs:element name="return" type="tns:systemData" minOccurs="0"/>
              </xs:sequence>
            </xs:complexType>
          </xs:schema>
          Thanks for looking into this for me.

          Comment


            #6
            Any help would be gratefully received.

            Comment


              #7
              Are either of you having trouble actually using the loaded service? This warning looks like it may be spurious.

              Comment


                #8
                Originally posted by Isomorphic
                Are either of you having trouble actually using the loaded service? This warning looks like it may be spurious.
                We're loading the service fine, and happily using it. We're just concerned about this error, even though as far as we can see nothing bad is happening because of it.

                Comment


                  #9
                  Same here. Everything works fine except those Warning message appears while the application is loading.

                  Comment

                  Working...
                  X