question

Upvotes
Accepted
2 0 1 2

Issue building java classes from WSDL

Hello

We are facing an issue trying to build java classes from WSDL.

The WSDL we are using is:

http://api.trkd.thomsonreuters.com/schemas/Fundamentals/wsdl/Fundamentals_1_HttpAndRKDToken.wsdl

Our environment is configured following developer guide, chapter 40.

Software versions are:

  • Oracle jdk build 1.8.0_191-b12
  • Sun Metro framework 2.3.1
  • Apache Ant 1.10.5

We are executing the following Ant script:

 <?xml version="1.0"?>
<project default="build" basedir=".">
    <record name="build.log" loglevel="verbose"/>
    <property environment="env"/>
    <path id="class.path">
        <fileset dir="${env.METRO_HOME}/lib/" includes="* .jar"/>
    </path>
    <target name="build">
        <taskdef name="wsimport" classname="com.sun.tools.ws.ant.WsImport" 
        classpathref="class.path"/>
        <property name="wsdl" value="http://api.trkd.thomsonreuters.com/schemas/Fundamentals/wsdl/Fundamentals_1_HttpAndRKDToken.wsdl"/>
        <wsimport wsdl="${wsdl}" sourcedestdir="src" xnocompile="true" extension="true" verbose="true">
            <binding dir="${env.ANT_HOME}/etc" includes="*.xml" />
        </wsimport>
    </target>
</project>

But Ant throws these errors:

build:
 [wsimport] Consider using <depends>/<produces> so that wsimport won't do unnecessary compilation
 [wsimport] JAX-WS RI 2.2.10
 [wsimport] command line: wsimport/opt/jdk1.8.0_191/jre/bin/java -extension -keep -s /home/jalonso/TRKD/src -verbose -Xnocompile Fundamentals_1_HttpAndRKDToken.wsdl
 [wsimport] analizando WSDL...
 [wsimport] 
 [wsimport] 
 [wsimport] [WARNING] unknown extensibility element or attribute "EndpointReference" (in namespace "http://www.w3.org/2005/08/addressing")
 [wsimport]   line 590 of file:/home/jalonso/TRKD/Fundamentals_1_HttpAndRKDToken.wsdl
 [wsimport] 
 [wsimport] [ERROR] Property "Value" is already defined. Use <jaxb:property> to resolve this conflict.
 [wsimport]   line 56 of jar:file:/opt/metro/lib/webservices-tools.jar!/com/sun/xml/xsom/impl/parser/datatypes.xsd
 [wsimport] 
 [wsimport] [ERROR] The following location is relevant to the above error
 [wsimport]   line 430 of http://api.trkd.thomsonreuters.com/schemas/Fundamentals/LookUp_1.xsd
 [wsimport] 

Could you please help us with this?

Thanks in advance.

Regards.

rkd-apirkd
icon clock
10 |1500

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

Sent an email chasing a reply to Nitesh Saha, Shaikh Waseem, cc Wim Ooms.

@javier.alonso

Hi,

Thank you for your participation in the forum.

Is the reply below satisfactory in resolving your query? If yes please click the 'Accept' text next to the most appropriate reply.

If you have an answer, please share your answer, and then accept it. This will guide all community members who have a similar question.

Otherwise please post again offering further insight into your question.

Thanks,

AHS

1 Answer

· Write an Answer
Upvote
Accepted
32.2k 40 11 20

Hello @javier.alonso,

Our TRKD web service, and WSDL, on release, undergoes rigorous testing and verification process, so we all can be sure there are no issues on the web service side. We have confirmed with the product development group that this process does not include java code build. So there is no official way to build java. The quickstart guides for TRKD are available, and are in .NET and Perl.

Myself, I prefer Netbeans IDE for building a web service java client, as it takes care of the skeleton work for you. The steps are described in Developing WS Clients Tutorial.

And this is a link to ANT WS Client building resource that is preferred by my developer colleague, which is in line with what your approach.

We hope you find this info useful and are able to proceed.

icon clock
10 |1500

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

Write an Answer

Hint: Notify or tag a user in this post by typing @username.

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.