Post

1 follower Follow
0
Avatar

Please generate single WSDL file for API?

One of the java tools I'd like to use with your API is having problems with the recursive XSD imports.

My understanding is that it's relatively easy with later versions of WCF to create a single WSDL file.

Thanks in advance!

Import from old forum Answered

Please sign in to leave a comment.

3 comments

0
Avatar

You can continue to ignore this stupid question.

I thought that there was a problem with the recursive use within the various schema files, but that has nothing to do with a single WSDL (which you already provide). I know multiple namespaces require multiple schemas.

Definitely a case of PEBCAK (Problem Exists Between Chair and Keyboard).

FYI, through the magic of JAXB bindings files, I have managed to generate Apache CXF java stubs and skeletons. There were name conflicts that were causing duplicates in the ObjectFactory that had to be worked around in the bindings. Still testing, but looking good.

Import from old forum 0 votes
Comment actions Permalink
0
Avatar

I am trying to work with the WSDL file provided but am running into the following error messages.

[ERROR] A class/interface with the same name
" org.netbeans.j2ee.wsdl.clarizenwebservice.Query" is already in use. Use a
class customization to resolve this conflict.

line 1 of
file.../xml-resources/web-service-references/Clarizen2/wsdl/ api.clarizen.com/v1.0/Clarizen.svc.xsd_xsd0.xsd

ERROR another
"Query" is generated from here.

line 1 of
file.../xml-resources/web-service-references/Clarizen2/wsdl/ api.clarizen.com/v1.0/Clarizen.svc.xsd_xsd3.xsd

[ERROR] Two declarations cause a collision in
the ObjectFactory class.

line 1 of
file.../xml-resources/web-service-references/Clarizen2/wsdl/ api.clarizen.com/v1.0/Clarizen.svc.xsd_xsd3.xsd

ERROR This is the
other declaration. 

line 1 of
file:/C:/Baecore/Clarizen_AlertsEscalations/xml-resources/web-service-references/Clarizen2/wsdl/ api.clarizen.com/v1.0/Clarizen.svc.xsd_xsd0.xsd

[ERROR] Two declarations cause a collision in
the ObjectFactory class.

line 1 of
file.../xml-resources/web-service-references/Clarizen2/wsdl/ api.clarizen.com/v1.0/Clarizen.svc.xsd_xsd0.xsd

ERROR This is the
other declaration. 

line 1 of
file.../xml-resources/web-service-references/Clarizen2/wsdl/ api.clarizen.com/v1.0/Clarizen.svc.xsd_xsd1.xsd

[ERROR] Two declarations cause a collision in
the ObjectFactory class.

line 1 of
file.../xml-resources/web-service-references/Clarizen2/wsdl/ api.clarizen.com/v1.0/Clarizen.svc.xsd_xsd0.xsd

ERROR This is the
other declaration. 

line 1 of
file.../xml-resources/web-service-references/Clarizen2/wsdl/ api.clarizen.com/v1.0/Clarizen.svc.xsd_xsd0.xsd

I tried to adjust the naming scheme within the WSDL however this did not resolve the issue.

What did you change to resolve the duplication issue?

Thanks,

Mac

Import from old forum 0 votes
Comment actions Permalink
0
Avatar

The naming conflict solution is dependent on the code generation tool you are using. I am using JAXB xjc/wsdl2java (under Apache CXF). This problem is so common that you should be able to find help on StackOverflow or elsewhere.

The package names you are generating looking like you are using NetBeans IDE, which I don't know, but probably supports multiple code gen tools. The error output looks similar though, so maybe you just need to configure in a bindings file that performs the class customization. I didn't run into a problem with Query, however. Here's my current bindings file that fixed issues is xsd0.

<jxb:bindings xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:jxb="http://java.sun.com/xml/ns/jaxb" version="2.0">

<jxb:bindings schemaLocation="https://api.clarizen.com/v1.0/Clarizen.svc?xsd=xsd0" node="/xs:schema">

<jxb:bindings node="//xs:element[@name='Login']">

<jxb:bindings node=".//xs:element[@name='options']">

<jxb:class name="ExtendedLoginOptions"/>

/jxb:bindings

/jxb:bindings

<jxb:bindings node="//xs:element[@name='Duration']">

<jxb:class name="Durations"/>

/jxb:bindings

/jxb:bindings

/jxb:bindings

Import from old forum 0 votes
Comment actions Permalink