XFire
  1. XFire
  2. XFIRE-392

WSDL Error from XFire example when using InfoPath or Acrobat Designer

    Details

    • Type: Bug Bug
    • Status: Open Open
    • Priority: Major Major
    • Resolution: Unresolved
    • Affects Version/s: 1.1-RC1
    • Fix Version/s: None
    • Component/s: None
    • Labels:
      None
    • Environment:
      Windows XP running Tomcat 5.5.16 and JDK 1.5_06
    • Number of attachments :
      2

      Description

      An error occurs when using integrating XFire 1.1RC1 with InfoPath or Acrobat Designer.

      The test is the quick start example (http://xfire.codehaus.org/Quick+Start)

      The error returned is:
      The error that I was getting was
      "/schema/element[4][@name='findBookResponse']/complexType[1]/element[1][
      @name='out']
      Undeclared XSD type : '

      {http://xfiretest}

      Book'.

      The services.xml is configured as follows:

      <beans xmlns="http://xfire.codehaus.org/config/1.0">
      <service>
      <name>BookService</name>
      <namespace>http://xfire.codehaus.org/BookService</namespace>
      <!--
      <namespace>https://localhost/solreports/services/BookService</namespace>
      -->
      <serviceClass>xfiretest.BookService</serviceClass>
      </service>
      </beans>

      The WDSL returned is:
      <?xml version="1.0" encoding="UTF-8"?>
      <wsdl:definitions xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/" xmlns:ns1="http://xfiretest" xmlns:soap11="http://schemas.xmlsoap.org/soap/envelope/" xmlns:soap12="http://www.w3.org/2003/05/soap-envelope" xmlns:soapenc11="http://schemas.xmlsoap.org/soap/encoding/" xmlns:soapenc12="http://www.w3.org/2003/05/soap-encoding" xmlns:tns="http://xfire.codehaus.org/BookService" xmlns:wsdlsoap="http://schemas.xmlsoap.org/wsdl/soap/" xmlns:xsd="http://www.w3.org/2001/XMLSchema" targetNamespace="http://xfire.codehaus.org/BookService">
      <wsdl:types>
      <xsd:schema targetNamespace="http://xfire.codehaus.org/BookService" elementFormDefault="qualified" attributeFormDefault="qualified">
      <xsd:element name="getBooks">
      <xsd:complexType/>
      </xsd:element>
      <xsd:element name="getBooksResponse">
      <xsd:complexType>
      <xsd:sequence>
      <xsd:element name="out" type="ns1:ArrayOfBook" nillable="true" minOccurs="1" maxOccurs="1"/>
      </xsd:sequence>
      </xsd:complexType>
      </xsd:element>
      <xsd:element name="findBook">
      <xsd:complexType>
      <xsd:sequence>
      <xsd:element name="in0" type="xsd:string" nillable="true" minOccurs="1" maxOccurs="1"/>
      </xsd:sequence>
      </xsd:complexType>
      </xsd:element>
      <xsd:element name="findBookResponse">
      <xsd:complexType>
      <xsd:sequence>
      <xsd:element name="out" type="ns1:Book" nillable="true" minOccurs="1" maxOccurs="1"/>
      </xsd:sequence>
      </xsd:complexType>
      </xsd:element>
      </xsd:schema>
      <xsd:schema targetNamespace="http://xfiretest" elementFormDefault="qualified" attributeFormDefault="qualified">
      <xsd:complexType name="ArrayOfBook">
      <xsd:sequence>
      <xsd:element name="Book" type="ns1:Book" nillable="true" minOccurs="0" maxOccurs="unbounded"/>
      </xsd:sequence>
      </xsd:complexType>
      <xsd:complexType name="Book">
      <xsd:sequence>
      <xsd:element name="author" type="xsd:string" minOccurs="0" nillable="true"/>
      <xsd:element name="isbn" type="xsd:string" minOccurs="0" nillable="true"/>
      <xsd:element name="title" type="xsd:string" minOccurs="0" nillable="true"/>
      <xsd:any minOccurs="0" maxOccurs="unbounded"/>
      </xsd:sequence>
      <xsd:anyAttribute/>
      </xsd:complexType>
      </xsd:schema>
      </wsdl:types>
      <wsdl:message name="getBooksRequest">
      <wsdl:part element="tns:getBooks" name="parameters"/>
      </wsdl:message>
      <wsdl:message name="findBookRequest">
      <wsdl:part element="tns:findBook" name="parameters"/>
      </wsdl:message>
      <wsdl:message name="findBookResponse">
      <wsdl:part element="tns:findBookResponse" name="parameters"/>
      </wsdl:message>
      <wsdl:message name="getBooksResponse">
      <wsdl:part element="tns:getBooksResponse" name="parameters"/>
      </wsdl:message>
      <wsdl:portType name="BookServicePortType">
      <wsdl:operation name="getBooks">
      <wsdl:input message="tns:getBooksRequest" name="getBooksRequest"/>
      <wsdl:output message="tns:getBooksResponse" name="getBooksResponse"/>
      </wsdl:operation>
      <wsdl:operation name="findBook">
      <wsdl:input message="tns:findBookRequest" name="findBookRequest"/>
      <wsdl:output message="tns:findBookResponse" name="findBookResponse"/>
      </wsdl:operation>
      </wsdl:portType>
      <wsdl:binding name="BookServiceHttpBinding" type="tns:BookServicePortType">
      <wsdlsoap:binding style="document" transport="http://schemas.xmlsoap.org/soap/http"/>
      <wsdl:operation name="getBooks">
      <wsdlsoap:operation soapAction=""/>
      <wsdl:input name="getBooksRequest">
      <wsdlsoap:body use="literal"/>
      </wsdl:input>
      <wsdl:output name="getBooksResponse">
      <wsdlsoap:body use="literal"/>
      </wsdl:output>
      </wsdl:operation>
      <wsdl:operation name="findBook">
      <wsdlsoap:operation soapAction=""/>
      <wsdl:input name="findBookRequest">
      <wsdlsoap:body use="literal"/>
      </wsdl:input>
      <wsdl:output name="findBookResponse">
      <wsdlsoap:body use="literal"/>
      </wsdl:output>
      </wsdl:operation>
      </wsdl:binding>
      <wsdl:service name="BookService">
      <wsdl:port binding="tns:BookServiceHttpBinding" name="BookServiceHttpPort">
      <wsdlsoap:address location="https://localhost/solreports/services/BookService"/>
      </wsdl:port>
      </wsdl:service>
      </wsdl:definitions>

      1. MyWSDLFile.wsdl
        14 kB
        Jmd
      1. screenshot-1.jpg
        86 kB

        Activity

        Hide
        Jmd added a comment -

        I found this: http://www.myeclipseide.com/PNphpBB2+file-viewtopic-t-16028.html

        So if i add the 2 next lines in the wsdl -> no more error in the wsdl level:

        <xsd:import namespace = "http://to.dt.nrb.be"/>
        <xsd:import namespace = "http://error.common.nrb.be"/>

        But how can i force these lines in the xfire generated wsdl file ?

        Show
        Jmd added a comment - I found this: http://www.myeclipseide.com/PNphpBB2+file-viewtopic-t-16028.html So if i add the 2 next lines in the wsdl -> no more error in the wsdl level: <xsd:import namespace = "http://to.dt.nrb.be"/> <xsd:import namespace = "http://error.common.nrb.be"/> But how can i force these lines in the xfire generated wsdl file ?
        Hide
        Jmd added a comment -

        That's it.

        By correcting the wsdl (now source.wsdl) with the 2 previous import and using it threw @WebService(serviceName = "SourceManagerService", endpointInterface = "be.nrb.dt.service.SourceManager", wsdlLocation="source.wsdl") it's OK

        Now, i can access my WS with a VB application or Infopath (web form)

        So the workaround for me is :
        1) let xfire generate the wsdl file
        2) correct the wsdl file by adding missing import
        3) use wsdlLocation to specify the wsdl to use (so do not use auto generate one)
        4) and voila ...

        Show
        Jmd added a comment - That's it. By correcting the wsdl (now source.wsdl) with the 2 previous import and using it threw @WebService(serviceName = "SourceManagerService", endpointInterface = "be.nrb.dt.service.SourceManager", wsdlLocation="source.wsdl") it's OK Now, i can access my WS with a VB application or Infopath (web form) So the workaround for me is : 1) let xfire generate the wsdl file 2) correct the wsdl file by adding missing import 3) use wsdlLocation to specify the wsdl to use (so do not use auto generate one) 4) and voila ...
        Hide
        Abdullah Kauchali added a comment -

        Yup - JMD, you've nailed it. I suppose MSXML4 is throwing a validation error when schemas are being loaded into its schema cache. If one schema references a complex type and the import syntax is not explicitly made in the referencing schema, a schema validation error is thrown.

        I've tested both Delphi SOAP and .NET Web Service client api - they both have no problems invoking XFire webservices, but any SOAP toolkit that uses MSXML will NOT work against XFire. Grrrrr.

        Show
        Abdullah Kauchali added a comment - Yup - JMD, you've nailed it. I suppose MSXML4 is throwing a validation error when schemas are being loaded into its schema cache. If one schema references a complex type and the import syntax is not explicitly made in the referencing schema, a schema validation error is thrown. I've tested both Delphi SOAP and .NET Web Service client api - they both have no problems invoking XFire webservices, but any SOAP toolkit that uses MSXML will NOT work against XFire. Grrrrr.
        Hide
        Ken Young added a comment -

        Are there any updates / planed fixes to this issue. I would vote on it, but I am unable to as I reported the issue.

        Thanks

        Show
        Ken Young added a comment - Are there any updates / planed fixes to this issue. I would vote on it, but I am unable to as I reported the issue. Thanks
        Hide
        Abdullah Kauchali added a comment -

        I think this is related:

        http://codehaus01a.managed.contegix.com/browse/XFIRE-551

        I am using PocketSoap and the toolkit, much like Eclipse, expects the correct xsd:imports to be present.

        http://www.pocketsoap.com/wsdl/wsdl2.aspx

        "Known Issues"
        ....
        "Multiple XSD schema's must use import correctly, many generated WSDL's do not currently generate all the required import statements."
        ...

        Show
        Abdullah Kauchali added a comment - I think this is related: http://codehaus01a.managed.contegix.com/browse/XFIRE-551 I am using PocketSoap and the toolkit, much like Eclipse, expects the correct xsd:imports to be present. http://www.pocketsoap.com/wsdl/wsdl2.aspx "Known Issues" .... "Multiple XSD schema's must use import correctly, many generated WSDL's do not currently generate all the required import statements." ...

          People

          • Assignee:
            Dan Diephouse
            Reporter:
            Ken Young
          • Votes:
            3 Vote for this issue
            Watchers:
            4 Start watching this issue

            Dates

            • Created:
              Updated: