wsdl2java

Axis2's wsdl2java fails on RPC/Encoded style web services

跟風遠走 提交于 2019-12-04 09:35:56
问题 Is there any alternative to Axis2? Or the way to make it work (different data binding, for example)? Retrieving document at '...'. Exception in thread "main" org.apache.axis2.wsdl.codegen.CodeGenerationException: java.lang.RuntimeException: java.lang.reflect.InvocationTargetException at org.apache.axis2.wsdl.codegen.CodeGenerationEngine.generate(CodeGenerationEngine.java:271) at org.apache.axis2.wsdl.WSDL2Code.main(WSDL2Code.java:35) at org.apache.axis2.wsdl.WSDL2Java.main(WSDL2Java.java:24)

How to use CXF client in thread safe way

天大地大妈咪最大 提交于 2019-12-04 06:32:56
I have created the client stub for below service using apache-cxf 's wsdl2java command. http://wsf.cdyne.com/WeatherWS/Weather.asmx?WSDL Then I invoke the getWeatherInformation() method as below. Weather weatherService = new Weather(); WeatherSoap weatherSoap = weatherService.getWeatherSoap(); ArrayOfWeatherDescription result = weatherSoap.getWeatherInformation(); I have read that cxf clients are thread safe. But I have a doubt whether it is safe to use the same WeatherSoap instance accross multiple threads? Or instead should/can I use an instance of Weather class, accross multiple threads?

javax.xml.ws.WebServiceException: Port {http://tempuri.org/}WSHttpBinding_IDWService not found

大憨熊 提交于 2019-12-04 05:04:22
I'm trying to consume a webservice in java, using a client generated from the wsdl file with wsdl2java. I'm using Eclipse version Helios and jdk 1.6.0_20, and I've generated the .class files using wsld2java with the options: "-d c:\WebServices\Generated -client -verbose -compile -autoNameResolution -p org.dwservice -sn DWService -wsdlLocation /WEB-INF/wsdl/DWService.wsdl c:\WebServices\DWService.wsdl" I packed the resultant files into a .jar and added it to my project that compiles ok. But when I try to use the webservice, I got the exception: javax.xml.ws.WebServiceException: Port {http:/

Scala equivalent to wsdl2java?

北城以北 提交于 2019-12-04 00:16:20
Is ther any equivalent to wsdl2java that will take a WSDL file and generate scala stubs for the server and/or client? I googled, but either there isn't or my google-fu is weak. Thomas Lockney scalaxb has some support for this, but it's still very much experimental and it's still client-side only. The only reliable techniques I've seen for handling the server side is either to generate the Java code via wsdl2java or other tools and then wrap that in Scala or, possibly, to use annotations to generate the WSDL from the Scala code. The later option is likely to lead to some pain, though, as you

WSP0075: Policy assertion “TransportBinding” was evaluated as “UNKNOWN”. Why?

故事扮演 提交于 2019-12-03 10:34:54
I am a client to a SOAP service I do not control (implemented in .NET). The service provides a WSDL. I use Apache CXF to generate the java client from the WSDL (specifically, I am using the cxf-codegen-plugin for Maven, which uses wsdl2java under the hood). However, when I instantiate the generated service class, the following warnings are logged: Sep 04, 2014 5:18:00 PM [com.sun.xml.internal.ws.policy.EffectiveAlternativeSelector] selectAlternatives WARNING: WSP0075: Policy assertion "{http://schemas.xmlsoap.org/ws/2005/07/securitypolicy}TransportBinding" was evaluated as "UNKNOWN". Sep 04,

CXF - Wsdl2java - the XX property is already defined

不想你离开。 提交于 2019-12-03 03:51:05
I use CXF to generate client class to access web service server. The web service are based on WCF (.NET). When I call wsdl2java, I have the following error : The id property is already defined. use <jaxb:property> to resolve this conflict. The following location matches the above error : http://*****/WcfDemandService.svc?xsd=xsd2 [0,0] This error does not appear if I ask xmlbeans databinding (use "db xmlbeans" option). Is there any way to generate classes with JAXB databinding? This type of problem often occurs when a type has an attribute and element with the same name. schema.xsd <?xml

How to use Axis WSDL2Java generated files?

那年仲夏 提交于 2019-12-03 01:20:01
I generated Java files from WSDL with WSDL2Java converter, but I don't know how can I use service with these files, because there are no examples. I'm implementing client side. Regarding Axis2: read these these links they contain some examples: http://ws.apache.org/axis2/1_5_1/quickstartguide.html#clients http://ws.apache.org/axis2/1_0/userguide3.html EDIT: Regarding Axis1: it is based on JAX-RPC and you need to instantiate stub object or use service locator to get stub instance and all WS operations will be in that. An example is given here : public class Tester { public static void main

Adding custom Soap Header to Webservice Request

大城市里の小女人 提交于 2019-12-02 08:12:37
问题 i have generated stub for a webserivce using apache axis2 and i want to add custom soap header to the request i want soap header to look like this <soapenv:Header xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/"><ns1:soapHeader xmlns:ns1="urn:oasis:names:core" soapenv:mustUnderstand="0"><ns1:Username>myuser</ns1:Username><ns1:Password>mypass</ns1:Password></ns1:soapHeader></soapenv:Header> and im writing this code org.apache.axiom.soap.SOAPEnvelope env = null; org.apache.axiom.om

MyEclipse6.0 安装axis2插件, 调用加密的SAP webservice

吃可爱长大的小学妹 提交于 2019-12-01 13:19:35
首先鄙视一下自己,还在用myeclipse,竟然还是6.0版本,没办法,用习惯了,而且自己的开发机配置不高,装过一些别的IDE,发现用的都不是很流畅。 项目要用java调用sap的webservice接口,自己决定用axis2的wsdl2java根据wsdl文件生成java类然后调用接口。网上到处找资料,折腾了一天,终于把接口调通了。下面介绍一下安装调试的过程 首先参照的是这篇博文,资料和描述相当楚 http://blog.csdn.net/seven_zhao/article/details/6089747 我对下面的下载地址做过改动,我下的插件是1_4_1这个目录下的,war包是1.5.x releases下面的 1. 下载 Myeclipse Axis2 插件 http://archive.apache.org/dist/ws/axis2/tools/1_4_1/ 下载 axis2-eclipse-codegen-wizard.zip 和 axis2-eclipse-service-archiver-wizard.zip http://axis.apache.org/axis2/java/core/download.cgi 下载 axis2-1.5-war.zip 2 .解压插件 ($ECLIPSE_HOME 表示你安装的 myeclipse 主目录 )

Axis2 generated Stubs are thread-safe?

瘦欲@ 提交于 2019-12-01 08:17:31
Are the Stubs generated by WSDL2JAVA (using XMLBeans binding option) through Axis2 1.5.4 thread-safe? Actually I have created one Stub for a Web Service that I am invoking through multiple threads. I have configured my own MultiThreadedHttpConnectionmanager and set the HTTPConstants.REUSE_HTTP_CLIENT as well but I am seeing some NullPointerExceptions in stub._getServiceClient().cleanupTransport that I call after each invocation. Sometimes the threads hang too. At the same time I noticed that in the generated Stub in the Web Service operation method, cleanup() is called already in the finally