Questions tagged [wsimport]

wsimport is a command-line tool to generate client and service artifacts from WSDL. The utility is part of the JAX-WS standard and began shipping with the Java platform starting with version 6.

494 questions
46
votes
13 answers

JAX-WS Loading WSDL from jar

I'm writing a fat client that makes use of a SOAP service for some features (bug reporting etc.) I've got JAX-WS working fine, but by default (in netbeans at least) it fetches the WSDL from the remote server every time the service is initialized. I…
Cogsy
  • 5,584
  • 4
  • 35
  • 47
42
votes
4 answers

Problem generating Java SOAP web services client with JDK tool wsimport from a WSDL generated by a .NET 2.0 application

I'm trying to generate a client for some SOAP web services using the JDK 6 tool wsimport. The WSDL was generated by a .NET 2.0 application. For .NET 3.X applications, it works fine. When I run wsimport -keep -p mypackage http://myservice?wsdl it…
razenha
  • 7,660
  • 6
  • 37
  • 53
40
votes
7 answers

How to generate classes from wsdl using Maven and wsimport?

When I attempt to run "mvn generate-sources" this is my output : SLF4J: Failed to load class "org.slf4j.impl.StaticLoggerBinder". SLF4J: Defaulting to no-operation (NOP) logger implementation SLF4J: See…
blue-sky
  • 51,962
  • 152
  • 427
  • 752
32
votes
2 answers

How does a wsimport generated client work?

Before anything else, I want you to know that I can already connect to the web service server. I'm asking this question because I want to gain a deeper knowledge on how a wsimport generated client works. Based from my research, wsimport uses JAXWS.…
Arci
  • 6,647
  • 20
  • 70
  • 98
28
votes
4 answers

Get rid of JAXBElement in classes generated by wsimport called from ant

I have the following problem: I'm using the wsimport ant task to create a webservice client (for salesforce.com). Everything's working fine but the generated classes all use this strange JAXBElement class for all bean properties. Eg: public void…
MisterY
  • 445
  • 1
  • 6
  • 8
24
votes
5 answers

Replacement for wsimport with JDK 11

I'm currently working on a project which need wsimport but we use JDK11 and I just discovered that wsimport was removed from JDK since this version. I searched for answers and I tried adding this dependency but it's not working at the moment. …
Etienne Ringot
  • 241
  • 1
  • 2
  • 4
24
votes
5 answers

JAX-WS error on WSDL file: "Error resolving component 's:schema'"

The Error I am using wsimport in a Java project to generate sources for three SOAP web services. The first two work fine: I use the JAX-WS Maven plugin to grab the WSDL file and generate corresponding Java source files. This fails for one web…
Nick
  • 2,827
  • 4
  • 29
  • 39
23
votes
4 answers

java.lang.NoClassDefFoundError: javax/activation/DataSource on wsimport Intellij java 9

i'm trying to generate class stubs for a wsdl with Intellij-Idea 2017.2.5 (Webservices -> Generate code from wsdl...) using JDK-9 I'm getting this exception and i wonder how to tell intellij to pass "--add-modules java.activation" to complete the…
George
  • 354
  • 1
  • 3
  • 8
21
votes
2 answers

wsimport - Two declarations cause a collision, same line given

Trying to use wsimport to generate a client for a SOAP endpoint. The WSDL and all XSD files used are local copies. This is the command being executed: wsimport ./bwWsdl.xml -p com.generated -Xnocompile -d ../src -extension -keep -XadditionalHeaders…
Cuga
  • 17,668
  • 31
  • 111
  • 166
19
votes
7 answers

The constructor Service(URL, QName, WebServiceFeature[]) is undefined

I got The constructor Service(URL, QName, WebServiceFeature[]) is undefined error after I run wsimport for my client web service. Im using JDK 1.6. Please help.
chinna_82
  • 6,353
  • 17
  • 79
  • 134
19
votes
2 answers

wsimport doesnt generate code related to soap headers

I'm generating client java code from a wsdl using 'wsimport'. The wsdl has soap:header in the operation definitions like this
thehpi
  • 5,683
  • 4
  • 17
  • 24
18
votes
9 answers

Java Web Service error: com.ctc.wstx.exc.WstxEOFException: Unexpected EOF in prolog

I have a problem creating and connecting a Java client to a running Web Service. I use the following code: Service myService = null; URL wsdlLocation = new URL("http://myservice?wsdl"); QName serviceName = new QName(wsdlLocation,…
Kumite
  • 2,129
  • 3
  • 15
  • 15
17
votes
2 answers

wsimport "Cannot resolve the name..."

I've been trying to import the following web service: http://soap.genome.jp/KEGG.wsdl with ${JAVA_HOME}/bin/wsimport: wsimport -version JAX-WS RI 2.1.6 in JDK 6 but I got the following error: parsing WSDL... [WARNING] src-resolve: Cannot resolve…
Pierre
  • 34,472
  • 31
  • 113
  • 192
17
votes
1 answer

Where to download and how to install JAX-WS wsimport tools?

Can somebody tell me where to download and how to install JAX-WS wsimport tools? I need to download it and install it. Actually I want to consume SOAP webservices in my code, and I need JAX-WS wsimport tool for that. My google search has not helped…
user2882662
  • 535
  • 1
  • 6
  • 18
17
votes
4 answers

Applying external JAXB binding file to schema elements imported from WSDL

The XPath expression in my external binding files can't target the elements in my XML schemas which are imported into my WSDL. Everything runs if I do inline binding customization but I really wanted to have external binding files that way I never…
Chase
  • 3,123
  • 1
  • 30
  • 35
1
2 3
32 33