wsimport

XSD and WSDL in different directories

有些话、适合烂在心里 提交于 2019-12-03 08:12:57
At my work used jaxws-maven-plugin for code generation. I have two projects are "common" and'' client ". Structure roughly as follows: app/ common/ resource/ some.xsd client/ resource/ some.wsdl How can I generate classes from wsdl in the project "client", using the xsd from the project "common"? pom.xml: <plugin> <groupId>org.codehaus.mojo</groupId> <artifactId>jaxws-maven-plugin</artifactId> <executions> <execution> <goals> <goal>wsimport</goal> </goals> <configuration> <verbose>true</verbose> <bindingFiles> <bindingFile>${project.parent.basedir}/common/resource/some.xsd</bindingFile> <

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

本小妞迷上赌 提交于 2019-12-03 05:30:01
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 operation. (i guess i should run wsimport from the command line...) Exception in thread "main" java.lang.NoClassDefFoundError: javax/activation/DataSource at com.sun.xml.bind.v2.model.impl.RuntimeBuiltinLeafInfoImpl.<clinit>(RuntimeBuiltinLeafInfoImpl.java:461) at com.sun.xml.bind.v2.model.impl.RuntimeTypeInfoSetImpl.<init>(RuntimeTypeInfoSetImpl.java

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

a 夏天 提交于 2019-12-03 01:52:50
问题 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 "mypackage.SomeClass" is already in use. Use a class customization to resolve this conflict. line ?? of http://myservice?wsdl When I generate the web services client

“Portable” JAX-WS client

随声附和 提交于 2019-12-02 23:51:19
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 code to access my service. (The ip of service may change...) Pascal Thivent This is covered in the FAQ of JAX-WS: Q. How can I change the Web Service address dynamically for a request ? ((BindingProvider)proxy).getRequestContext().put(BindingProvider.ENDPOINT

java.lang.NoClassDefFoundError : ADT 17 known issue

元气小坏坏 提交于 2019-12-02 16:13:07
问题 I'm using wsimport.exe from the android sdk, and importing manually (dragging in the output classes) into my project (no external jars - the imported files are part of the src folder). It works great on a java test project, but when I'm trying to implement it on an android project I'm facing this weird problem. I already read some information about a known problem with ADT 17 changes but it all related to external jars reordering. I'm not importing any jar so it's not relevant to me. Does

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

☆樱花仙子☆ 提交于 2019-12-02 15:30:06
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 "mypackage.SomeClass" is already in use. Use a class customization to resolve this conflict. line ?? of http://myservice?wsdl When I generate the web services client using Axis 1.4 (using the Eclipse WebTools plug-in). Does anybody know what can I do in order to use

Using JAXB binding extensions in wsimport

喜夏-厌秋 提交于 2019-12-02 02:26:05
问题 I know how to enable extensions in a plain JAXB bindings file - list them in the root element's extensionBindingPrefixes : <jaxb:bindings version="1.0" xmlns:jaxb="http://java.sun.com/xml/ns/jaxb" xmlns:xjc="http://java.sun.com/xml/ns/jaxb/xjc" jaxb:extensionBindingPrefixes="xjc" ...> However, a JAX-WS bindings file doesn't have anywhere to put this attribute. <jaxws:bindings version="2.0" xmlns:jaxws="http://java.sun.com/xml/ns/jaxws" xmlns:jaxb="http://java.sun.com/xml/ns/jaxb" xmlns:xjc=

Using JAXB binding extensions in wsimport

旧时模样 提交于 2019-12-02 01:45:52
I know how to enable extensions in a plain JAXB bindings file - list them in the root element's extensionBindingPrefixes : <jaxb:bindings version="1.0" xmlns:jaxb="http://java.sun.com/xml/ns/jaxb" xmlns:xjc="http://java.sun.com/xml/ns/jaxb/xjc" jaxb:extensionBindingPrefixes="xjc" ...> However, a JAX-WS bindings file doesn't have anywhere to put this attribute. <jaxws:bindings version="2.0" xmlns:jaxws="http://java.sun.com/xml/ns/jaxws" xmlns:jaxb="http://java.sun.com/xml/ns/jaxb" xmlns:xjc="http://java.sun.com/xml/ns/jaxb/xjc" wsdlLocation="../wsdl/schema.wsdl" ...> It cannot go in the root,

How can I generate a WSDL file from a WSDL URL?

眉间皱痕 提交于 2019-12-01 19:49:02
My problem is that I created a web service client with wsimport and when creating its service object, it fails because of the HTTPS, like that: MyService_Service service = new MyService_Service( new URL("https://www.aaa.com/myws/MyService?WSDL")); So, I am trying to initialize a service object from a WSDL file, but how can I create a WSDL file from that URL " https://www.aaa.com/myws/MyService?WSDL "? Thanks a lot. Navigate to the URL in a browser and save the file it generates. You'll need to make sure you also save any schemas imported by the wsdl. JAX-WS needs WSDL document every time one

How to customize the schema inlined inside an imported WSDL

蓝咒 提交于 2019-12-01 17:59:44
I have a.wsdl & b.wsdl where a.wsdl imports b.wsdl. Now I have to customize the schema inside b.wsdl using wsimport and JAXB. but using below customization is giving error that "XPath evaluation of "wsdl:definitions/wsdl:types/xsd:schema[@targetNamespace='b']" results in an empty target node I am not able to find a way to customize the inlined schema in imported b.wsdl when generating the client code using wsimport. <jaxws:bindings node="wsdl:definitions/wsdl:types/xsd:schema[@targetNamespace='b']" xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/" xmlns:jaxws="http://java.sun.com/xml/ns/jaxws"