wsimport

wsimport from https: [ERROR] java.security.cert.CertificateException: No subject alternative names present

扶醉桌前 提交于 2019-12-10 12:13:46
问题 I'm trying to generate a webservice client using wsimport from https wsdl: call wsimport -d bin -s src -p mypackage.ws https://x.x.x.x:8181/services/SomeService?wsdl For solving security errors I added a server's certificate to Java's keystore: keytool -import -keystore c:\Java\jdk1.6.0_38\jre\lib\security\cacerts -file c:\ca-dev.crt But when I do wsimport error appears: [ERROR] java.security.cert.CertificateException: No subject alternative names present Failed to read the WSDL document:

Java-Missing WS-Addressing header: “{http://www.w3.org/2005/08/addressing}Action”

隐身守侯 提交于 2019-12-10 11:36:39
问题 I try to client to web service in java 7. I get it: WARNING: A required header representing a Message Addressing Property is not present, Problem header:{http://www.w3.org/2005/08/addressing}Action com.sun.xml.internal.ws.addressing.model.MissingAddressingHeaderException: Missing WS-Addressing header: "{http://www.w3.org/2005/08/addressing}Action" How can I solve this error? Thanks a lot. --web service security looks like following parts in SOAPUI-- <wsse:Security soapenv:mustUnderstand="1"

WSDL import 'location' attribute -vs- XSD import 'schemaLocation' attribute

橙三吉。 提交于 2019-12-09 18:20:40
问题 What is the relationship between: the import element in WSDL -and- the import element and in XML Schema ... and in particular the relationship between the location attribute of the former and the schemaLocation attribute of the latter? Though I can use a catalog file (in a JAX-WS / wsimport toolchain) to "override" schemaLocation attributes for the xsd:import element it seems that I can't do the same for the location attributes of the wsdl:import statement. 回答1: In both cases, the import

Error parsing WSDL with exception use=“encoded”

耗尽温柔 提交于 2019-12-09 09:25:23
问题 Everytime I run wsimport , I get this error: [ERROR] "Use of SOAP Encoding is not supported. SOAP extension element on line 65 in file:dummy.wsdl has use="encoded" " Failed to parse the WSDL. WSDL (error block): <wsdl:input name="dummyRequest"> <wsdlsoap:body encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" namespace="urn:cmg.stdapp.webservices.generalplugin" use="encoded" /> </wsdl:input> 回答1: This is because the given WSDL is using 'encoded' which is a RPC encoding and a very old

Equivalent of org.apache.axis.components.net.SunFakeTrustSocketFactory for wsimport

谁说我不能喝 提交于 2019-12-09 05:37:55
问题 When I generate webservice client stubs using Apache Axis, I disable the server certificate trust check in my code using the client stubs by calling the following method AxisProperties.setProperty("axis.socketSecureFactory", "org.apache.axis.components.net.SunFakeTrustSocketFactory"); How do I disable the trust check with client stubs that were generated by running wsimport ? I use this when I am running some test code. 回答1: All that's happening in that class is the provision of a bogus trust

How to surpass gradle wsimport task JDK 8 access restrictions?

◇◆丶佛笑我妖孽 提交于 2019-12-08 16:09:55
问题 I have a wsimport task in my gradle build working fine until Java 7: task wsimport { ext.destDir = file("${buildDir}/generated/java") ext.wsdlSrc = file("src/main/resources/schema/example/my.wsdl") ext.bindingSrc = file("src/main/resources/schema/example/bindings.xsd") outputs.dir destDir doLast { ant { destDir.mkdirs() taskdef(name: 'wsimport', classname: 'com.sun.tools.ws.ant.WsImport', classpath: configurations.jaxws.asPath) wsimport(keep: true, package: 'net.example.my', xnocompile: true,

need to use custom classes instead of generated (by wsimport) in web-services

主宰稳场 提交于 2019-12-07 11:27:37
问题 Could you, please, help with the following issue? When generate WS client code (with wsimport ant task), all classes are generated automatically in the same package (e.g. helloservice.endpoint) as web service, e.g. if my web-service has method public Node getNode(); so class helloservice.endpoint.Node is generated. Nevertheless, I have my own helloservice.Node class that I want to use in web-service. I defined bind.xml file : <bindings version="2.0" xmlns="http://java.sun.com/xml/ns/jaxb"

Generating Metro Client Using Local WSDL File

家住魔仙堡 提交于 2019-12-07 03:25:12
问题 I have generated a Metro client using wsimport before, but in that case the WSDL was accessed over https. My commaned looked like this: wsimport https://service.net/services/Service?wsdl -d C:\ClientProject\src\main\java -keep and everything worked fine. Now I am trying to generate a client, however, I only have a local copy of the WSDL file. My project directory is set up like this (in c:\Devel): ClientProject |- src |- main |- java |- resources |- META-INF |- service.wsdl |- wsimport.bat

Why does wsimport have trouble with server object having @XmlRootElement annotation?

天大地大妈咪最大 提交于 2019-12-06 15:02:56
问题 I was completing work on a web service using JAX-WS on the server side. In many of the domain objects I used @XmlRootElement to help facilitate the unmarshaling of XML files into the service using JAXB. All went well and the output was what I expected to see using SoapUI. However, when I used wsimport to create the client (as a convenience DAO for other developers), I started encountering NullPointerExceptions in my client integration-test class. The call to the webservice worked correctly,

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

淺唱寂寞╮ 提交于 2019-12-06 06:10:59
问题 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:DictServiceHttpGet"> <http:address location="http://services.aonaware.com/DictService/DictService.asmx" /> </wsdl:port> <wsdl:port name="DictServiceHttpPost" binding="tns