facebook

HelloWorld Example XML Parsing Error: duplicate attribute

  1. MyEclipse Archived
  2.  > 
  3. Web Services
Viewing 12 posts - 1 through 12 (of 12 total)
  • Author
    Posts
  • #263903 Reply

    Trying the HelloWorld Web Service example and am getting an error
    in the WS Explorer:

    IWAB0379E Unable to open http://localhost:8080/HelloWorld/services/HelloWorld?WSDL.
    IWAB0135E An unexpected error has occurred.
    WSDLException
    WSDLException: faultCode=OTHER_ERROR: http://localhost:8080/HelloWorld/services/HelloWorld?WSDL

    And an error if trying in the browser:

    XML Parsing Error: duplicate attribute
    Location: http://localhost:8080/HelloWorld/services/HelloWorldService?wsdl
    Line Number 4, Column 173:<xsd:schema xmlns:xsd=”http://www.w3.org/2001/XMLSchema&#8221; targetNamespace=”http://wsexample.dot.state.mn.us&#8221; elementFormDefault=”qualified” attributeFormDefault=”qualified” xmlns:xsd=”http://www.w3.org/2001/XMLSchema”&gt;
    —————————————————————————————————————————————————————————-^

    <?xml version=”1.0″ encoding=”UTF-8″?>
    <wsdl:definitions targetNamespace=”http://wsexample.dot.state.mn.us&#8221; xmlns:tns=”http://wsexample.dot.state.mn.us&#8221; xmlns:wsdlsoap=”http://schemas.xmlsoap.org/wsdl/soap/&#8221; xmlns:soap12=”http://www.w3.org/2003/05/soap-envelope&#8221; xmlns:xsd=”http://www.w3.org/2001/XMLSchema&#8221; xmlns:soapenc11=”http://schemas.xmlsoap.org/soap/encoding/&#8221; xmlns:soapenc12=”http://www.w3.org/2003/05/soap-encoding&#8221; xmlns:soap11=”http://schemas.xmlsoap.org/soap/envelope/&#8221; xmlns:wsdl=”http://schemas.xmlsoap.org/wsdl/”&gt;
    <wsdl:types>
    <xsd:schema xmlns:xsd=”http://www.w3.org/2001/XMLSchema&#8221; targetNamespace=”http://wsexample.dot.state.mn.us&#8221; elementFormDefault=”qualified” attributeFormDefault=”qualified” xmlns:xsd=”http://www.w3.org/2001/XMLSchema”&gt;
    <xsd:element name=”example”>
    <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=”exampleResponse”>
    <xsd:complexType>
    <xsd:sequence>
    <xsd:element name=”out” type=”xsd:string” nillable=”true” minOccurs=”1″ maxOccurs=”1″/>
    </xsd:sequence>
    </xsd:complexType>
    </xsd:element>
    </xsd:schema> </wsdl:types>

    <wsdl:message name=”exampleResponse”>
    <wsdl:part name=”parameters” element=”tns:exampleResponse”/>
    </wsdl:message>
    <wsdl:message name=”exampleRequest”>
    <wsdl:part name=”parameters” element=”tns:example”/>
    </wsdl:message>
    <wsdl:portType name=”HelloWorldServicePortType”>
    <wsdl:operation name=”example”>
    <wsdl:input name=”exampleRequest” message=”tns:exampleRequest”/>

    <wsdl:output name=”exampleResponse” message=”tns:exampleResponse”/>
    </wsdl:operation>
    </wsdl:portType>
    <wsdl:binding name=”HelloWorldServiceHttpBinding” type=”tns:HelloWorldServicePortType”>
    <wsdlsoap:binding style=”document” transport=”http://schemas.xmlsoap.org/soap/http”/&gt;
    <wsdl:operation name=”example”>
    <wsdlsoap:operation soapAction=””/>
    <wsdl:input name=”exampleRequest”>
    <wsdlsoap:body use=”literal”/>

    </wsdl:input>
    <wsdl:output name=”exampleResponse”>
    <wsdlsoap:body use=”literal”/>
    </wsdl:output>
    </wsdl:operation>
    </wsdl:binding>
    <wsdl:service name=”HelloWorldService”>
    <wsdl:port name=”HelloWorldServiceHttpPort” binding=”tns:HelloWorldServiceHttpBinding”>
    <wsdlsoap:address location=”http://localhost:8080/HelloWorld/services/HelloWorldService”/&gt;

    </wsdl:port>
    </wsdl:service>
    </wsdl:definitions>
    __________________________________________________________________________________
    Eclipse SDK
    Version: 3.2.1
    Build id: M20060921-0945
    MyEclipse Enterprise
    5.1.0 GA
    Build 20061111-5.1.0-GA
    Tomcat 5.5.17
    Windows XP SP2
    Java 1.5.0_06

    #263904 Reply

    Also – http://localhost:8080/HelloWorld/services in browser will show services:

    Services:

    * HelloWorldService [wsdl]

    But clicking on the [wsdl] link results in the duplicate error.

    #263907 Reply

    Found codeHaus jira error that is related:
    http://jira.codehaus.org/browse/XFIRE-559

    XFire
    Generated WSDL elements: duplicate xmlns:xsd attribute

    #263908 Reply

    How do I get the new XFire into myeclipse as it has a fix for:
    Fix for duplicate attribute in WSDL bug.

    Tuesday, October 3, 2006
    XFire 1.2.2 Released!

    The Codehaus XFire team is proud to announce XFire 1.2.2! XFire is an open source Java SOAP framework built on a high performance, streaming XML model. XFire includes support for web service standards, an easy to use API, Spring integration, JBI support, and plugable bindings for POJOs, JAXB, and XMLBeans.

    Please see the release notes for download information and upgrade instructions.

    XFire 1.2.2 many fixes since 1.2.1:

    * Fix for NPE when using collections on Java5
    * Fix for NPE in SoapBodyHandler when using JAX-WS
    * Fix for duplicate attribute in WSDL bug
    * Support for xsi:type inheritance with Maps
    * Fix bug in server/client generation for RPC/Literal services
    * Add support for JAXB @XmlJavaTypeAdapter annotations

    Many thanks to those who helped build and test this release!

    #263909 Reply

    I checked and the following are the jar versions of xfire in my lib dir.
    Directory of C:\apps\apache-tomcat-5.5.17\webapps\HelloWorld\WEB-INF\lib

    12/27/2006 10:30 AM 2,637,587 xbean-2.1.0.jar
    12/27/2006 10:30 AM 134,186 xbean-spring-2.5.jar
    12/27/2006 10:30 AM 124,024 xfire-aegis-1.2.2.jar
    12/27/2006 10:30 AM 27,011 xfire-annotations-1.2.2.jar
    12/27/2006 10:30 AM 410,712 xfire-core-1.2.2.jar
    12/27/2006 10:30 AM 22,370 xfire-java5-1.2.2.jar
    12/27/2006 10:30 AM 45,592 xfire-jaxws-1.2.2.jar
    12/27/2006 10:30 AM 8,074 xfire-jsr181-api-1.0-M1.jar
    12/27/2006 10:30 AM 56,574 xfire-spring-1.2.2.jar
    12/27/2006 10:30 AM 127,961 XmlSchema-1.1.jar

    #263968 Reply

    Brian Fernandes
    Moderator

    MDOT,

    I apologize for the delay in responding. Thanks for tracking this issue down – if you are using MyEclipse 5.1.0 (which you are, according to your log), you already do have XFire 1.2.2 – if you still see the problem that means the issue hasn’t been fully / correctly resolved in XFire 1.2.2. I’ll look into this problem and take it up with the XFire team if necessary. Could you tell me how you generated this web service? Did you follow our tutorial? I ask because the WSDL file generated does not seem to correspond to the WSDL file I see generated in my tests.

    To upgrade to a more recent version of XFire, you can go to Window > Preferences > MyEclipse > Project Capabilities > Web Services – XFire and make replace the old JARs with freshly downloaded versions. The next MyEclipse release in under a months time will include XFire 1.2.3 or 1.2.4.

    Hope this helps.

    #264001 Reply

    Brian – Yes I was following the tutorial.
    Sounds like I should wait and try it again with the update next month.
    Close this for now and I will wait for the update.

    #264070 Reply

    Brian Fernandes
    Moderator

    Hi,

    I’m trying to follow this up with the XFire team, apparently this might happen with some library combinations. Could you tell me what MyEcipse libraries you added to your project?

    #268402 Reply

    dandubinsky
    Participant

    Has anyone figured this out? I’ve been experimenting with XFire with Oracle OC4J and I get this error in OC4J 10.1.3, but it works OK in 10.1.2. In 10.1.3 it’s putting in the xmlns:xsd twice.

    #271535 Reply

    fperedo
    Member

    Hi!
    I have just downloaded MyEclipse 5.5.1, and tried to create a very simple webservice (it should just say “Hi!”, and got this error:

    Error de parseo XML: atributo duplicado
    Lugar: http://localhost:8888/TestOc4jME/services/GreetService?wsdl
    Línea 16, Columna 152:<xsd:schema xmlns:xsd=”http://www.w3.org/2001/XMLSchema&#8221; targetNamespace=”http://test&#8221; elementFormDefault=”qualified” attributeFormDefault=”qualified” xmlns:xsd=”http://www.w3.org/2001/XMLSchema”&gt;
    ——————————————————————————————————————————————————-^

    As you can see… it is the exact same error the original poster had:
    Error de parseo XML: atributo duplicado = “XML Parsing Error: duplicate attribute ” (just translate spanish to english, BTW do you know how can I force java to work in engish?)

    So? what is happening? is this some kind of MyEclipse + XFire + OC4J 10.1.3.2 compatiblity failure? (Please help)

    #271536 Reply

    dandubinsky
    Participant

    I’ve done some research into this. It’s a problem between Oracle 10.1.3 and XFire (nothing to do with MyEclipse). It doesn’t work on a production server either. The thing is you can still invoke an XFire web service, just the wsdl generation doesn’t work. I’ve tried a bunch of different things, but so far no success. There is also a report of this issue on the XFire web site. I tried some of the solutions on there, but they didn’t work for me.

    So for now, we are avoiding OC4J 10.1.3 altogether. We’ve had a bunch of other issues with it as well involving XML stuff on that server (some JAXB code we have stopped working when we deployed to 10.1.3). We also had some trouble getting EJBs projects hot redeployed in the development environment. For now we are staying with 10.1.2 and will take another look when 10.1.4 comes out.

    #274528 Reply

    steppoll
    Member

    When deploying an application in the Oracle AS (10.1.3), there is a part of the deployment where you can configure the deployment plan. The last option is “Configure Class Loading”. If you click on the “Go to Task” option, it will bring you to another screen. Uncheck every option there in the table. After I did that it worked. I suppose it is just one library that conflicts, but I was to lazy to figure out which one exactly. If somebody has the time to do that then please let us know your findings.

Viewing 12 posts - 1 through 12 (of 12 total)
Reply To: HelloWorld Example XML Parsing Error: duplicate attribute

You must be logged in to post in the forum log in