xml editor

Products

Features

  EPUB
Supported platforms

Supports Windows 7 & Mac OS X Lion

Ready for XML Editor data server software
W3C Member

Oxygen Editor and WSDL analyzer

Questions about XML that are not covered by the other forums should go here.

Oxygen Editor and WSDL analyzer

Postby geezenslaw » Wed Nov 23, 2011 10:48 pm

Hello Oxygen, I have a curious situation with a public WSDL.

The target WSDL has been generated by a .NET WS.

The WSDL has a property attribute 'any' already defined in the same node.

Therefore when I try to run wsdl2java or wsimport to generate the Java stubs for my SOAP client I get the following error condition returned:

********************************************************
WSDLToJava Error: Thrown by JAXB:
Thrown by JAXB:
Property "Any" is already defined. Use <jaxb:property> to resolve this conflict.
at line 48 column 19 of schema http://ts2.nbs-us.com/TestWS/Service.asmx?WSDL
********************************************************

When I run the same WSDL in the WSDL Analyzer the correct SOAP request and response envelopes are generated.

The question is then: what does the WSDL analyzer do to clean the target WSDL to avoid the error?

Can what the Oxygen Editor WSDL analyzer be applied using a xsd binding?
geezenslaw
 
Posts: 1
Joined: Wed Nov 23, 2011 6:33 pm

Re: Oxygen Editor and WSDL analyzer

Postby Radu » Thu Nov 24, 2011 12:16 pm

Hi,

So your WSDL contains in the embedded XML Schema at some point the following construct:

Code: Select all
<s:element minOccurs="0" maxOccurs="1" name="GetDataTableResult">
                    <s:complexType>
                        <s:sequence>
                            <s:any minOccurs="0" maxOccurs="unbounded"
                                namespace="http://www.w3.org/2001/XMLSchema" processContents="lax"/>
                            <s:any minOccurs="1"
                                namespace="urn:schemas-microsoft-com:xml-diffgram-v1"
                                processContents="lax"/>
                        </s:sequence>
                    </s:complexType>
                </s:element>


Oxygen uses the Xerces parser to validate and construct SOAP messages from the embedded XML Schema types.
So for an XML validator which fully complies with the XML Schema specification there does not seem to be any problem with the embedded schema.

But WSDL2Java uses from what it seems an engine JAXB which has issues with certain constructs in the XML Schema.
if you google for the exact error message you will find some advice about how to configure JAXB to avoid this problem.
Another idea is for you to manually modify the schema and remove one of the <any> constructs, depending on whether it is necessary or not, of course.

Regards,
Radu
Radu Coravu
<oXygen/> XML Editor, Schema Editor and XSLT Editor/Debugger
http://www.oxygenxml.com
Radu
 
Posts: 1509
Joined: Fri Jul 09, 2004 5:18 pm


Return to General XML Questions

Who is online

Users browsing this forum: No registered users and 0 guests

XML Editor | XML Author | WYSIWYG Editors | Schema Editor | XSD Documentation | XSL/XSLT Editor | XQuery | XML Databases | SVN Client
© 2002-2011 SyncRO Soft Ltd. All rights reserved. | Sitemap | Privacy Policy | This website was created & generated with <oXygen/>® XML Editor