wsimport

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 expect this helps provide some versioning support etc., but it's not what I want. I've ...

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 shows several error messages like this: [ERROR] A class/interface with the same name ...

java 6 web services share domain specific classes between server and client

Hi all, Context: Considering below defined Engine class being parameter of some webservice method. As we have both server and client in java we may have some benefits (???) in sharing Engine class between server and client ( i.e we may put in a common jar file to be added to both client and server classpath ) Some benefits would b...

"Portable" JAX-WS client

I deployed a JAX-WS Service and use wsimport to generate client code. Because I run wsimport on localhost, I got the client code with binind on "localhost" address. But I want to reuse those client code on other computers which access my deployed service with a public IP y.y.y.y. How can dynamically use those (once) generated client cod...

Either WSDL or wsimport and wsdl (mono) are horribly broken

EDIT I started off with the example given below, but I have now: Tried the example from the W3C spec. After fixing another error (binding was called StockQuoteSoapBinding in one place, StockQuoteBinding in another), it gives the same issue. Tried the mono generator wsdl to see if wsimport was to blame. It gives an equivalent error. S...

wsdl xmlns problems with NetBeans and wsimport

Hi Our application provides a SOAP API. Our wsdl starting lines are something like <wsdl:definitions name='ControlDServices' ... xmlns:soap='http://schemas.xmlsoap.org/wsdl/soap/' ... This usually works OK, but a customer complained that when they try to use our SOAP API in NetBeans with the wsdl we provide they got this error: Web S...

Impossible to yield classes from wsdl file made with contents of URL, but works with original wsdl file

Hi, I'm having extremely painful difficulties to have wsimport working to generate my client classes, as per the following method: 1/ I open my endpoint/URL in a web browser, 2/ I copy-paste the contents of this page in a .wsdl file, 3/ and I try to yield the classes by running wsimport against the file I've just created => it fails. ...

wsimport out of memory issues in Java 1.6

I'm using wsimport in Java 1.6 (i.e. build 1.6.0-b105) on Windows XP 5.1 and I'm getting a out of memory exception. I used to JConsole and it seems wsimport process is maxing out at 64 MB. How can I increase the heap memory for wsimport? Thanks, ...

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

Hi, 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 setLastName(JAXBElement<String> value) { this.lastName = ((JAXBElement<String> ) ...

How to generate meaningful list names in JAX-WS web services.

I have a schema with something along the lines of <xs:element ref="Item" minOccurs="0" maxOccurs="unbounded" /> and it is referenced in my wsdl. When I use wsimport to create java code, the class gets a field called List<Item> item; Is there a way to get it to name the field something more standard like items or itemList? I don't...

wsimport "Cannot resolve the name..."

Hi all, 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 the name 'soapenc:Array' to a(n) 'type definition' component. line 19 of http:...

Communicating with web service on SSL

Hi, I have a web service which previously was deployed on http. I used to generate stub classes using wsimport using wsimport http://localhost:8080/MiniForumService/MiniForumService?wsdl. Now I deployed it on SSL. But when I try to generate the stub classes from it using wsimport https://localhost:8443/MiniForumService/MiniForumServi...

Is there any JAX-WS implementation that support dynamic namespace in generated client ?

I generated a JAX-WS client (proxy API) using JAXWS-RI wsimport.bat from a WSDL having as namespace "http://a.mydomain". I'd like to reuse the same generated proxy against a service having as namespace "http://b.mydomain" but targetnamespace "http://a.mydomain" is harcoded all over the generated classes. Does anybody know any good solu...

how to printout all the requested object (created from wsimport)

I have wsdl and with wsimport I create client classes. What I want to do is to System.out.println(requestedObject). DictService service = new DictService(); DictServiceSoap port = service.getDictServiceSoap(); WordDefinition response = port.define("food"); System.out.println(response.toString()); The result is: com.aonaware.services.w...

how to reconcile conflict between original and generated file within Java web services?

I have a legacy Java application that uses class mypackage.Foo. I would like that application to utilize a web service that returns instances of Foo. To connect to this web service, I use wsimport on the WSDL to generate the artifacts, and it gives me another Foo.java file. Ideally, I would like to tell wsimport to generate artifacts ...

wsimport how to create web service client from WSDL for http:binding GET/POST

I have wsdl and I create classes with wsimport tool. Everything is going ok for SOAP messages but for http:binding GET/POST I get error. Part of the WSDL follows: <wsdl:binding name="DictServiceHttpPost" type="tns:DictServiceHttpPost"> <http:binding verb="POST" /> ... ... ... <wsdl:port name="DictServiceHttpGet" binding="tns:DictS...

Does wsimport tool from JAX-WS allows to create RESTful class clients?

Im using wsimport but I cant find why or how to create classes for RESTful web services/ports defined in WSDL. Does wsimport tool from JAX-WS allows to create RESTful class clients? ...

Correct use of WSDL-generated sources

How can I easily convert between manually written classes and WSDL-generated equivalents? I have a Java SE 6 thick client that calls a web service to get and store data. The client has a DAO that works with my entity classes, calls <Entity>.toDto() to convert them to DTOs, and sends/receives that data with the web service. My issue stem...

wsimport and header params for logging

I have this situation. Generating form based on the WSDL. I made it but I came to the situation when the wsimport tool generates classes with methods with params for header(for authentication) and the params are not just simple types. But some complex. The problem is that I dont know which classes will be generated so I need simple type...

Accessing identical web services using the same client

Hi. I have some web services and I am creating a web client using ws-import. When creating the client I have this line: MyServiceService service = new MyServiceService(); It works fine as it is. I have the same web service running on another server and I was wondering if I could access them using the same client. Is it possible t...