Generate Java code from WSDL file - java

I am new to Java. I am trying to create SOAP Web service client to consume a vendors webservice which requires username password and ssl certificate.
A vendor provided me SoapUI project file. I imported the project file in SoapUI and ran the tests. Those tests worked successfully.
I then exported the wsdl file using SoapUI and tried to generate java code using wsimport. I am unable to generate code. I am getting all sorts of errors which I tried to resolve by searching online but none of the solutions work.
I am using jdk1.8.0_152. and SoapUI version 5.3.0 by SmartBear.
I tried to use this wsimport command on command line of Windows 7:
wsimport -keep -verbose -s src vendor.wsdl
and I received this message:
[WARNING] Simple type "RiskType" was not mapped to Enum due to EnumMemberSizeCap limit. Facets count: 365, current limit: 256. You can use customization attribute "typesafeEnumMaxMembers" to extend the limit.
line 4317 of file:/C:/Projects/soapclient/vendor.xsd
With the SoapUI Project file they also sent me the below files:
jaxbbinding.xml
wsdlbinding.xml
ACORD_v2.2.0.xsd
ACORD-WSP_v2.0.0.xsd
Soap12-Envelope.xsd
xml.xsd
So tried wsimport with -b option like below:
wsimport -keep -verbose -s src vendor.wsdl -b ../jaxb/jaxbbinding.xml -b ../jaxb/wsdlbinding.xml
I received this error :
[ERROR] "file:/C:/Projects/soapclient/.../ACORD_v2.2.0.xsd" is not a part of this compilation. Is this a mistake for "file:/C:/Projects/soapclient/..../ProcessSuretyBond_1_2.xsd"?
line 13 of file:/C:/Projects/TestProjects/soapclient/..../jaxb/jaxbbinding.xml
Exception in thread "main" com.sun.tools.internal.ws.wscompile.AbortException
at com.sun.tools.internal.ws.processor.modeler.wsdl.JAXBModelBuilder.bind(JAXBModelBuilder.java:129)
at com.sun.tools.internal.ws.processor.modeler.wsdl.WSDLModeler.buildJAXBModel(WSDLModeler.java:2283)
at com.sun.tools.internal.ws.processor.modeler.wsdl.WSDLModeler.internalBuildModel(WSDLModeler.java:183)
at com.sun.tools.internal.ws.processor.modeler.wsdl.WSDLModeler.buildModel(WSDLModeler.java:126)
at com.sun.tools.internal.ws.wscompile.WsimportTool.buildWsdlModel(WsimportTool.java:429)
at com.sun.tools.internal.ws.wscompile.WsimportTool.run(WsimportTool.java:190)
at com.sun.tools.internal.ws.wscompile.WsimportTool.run(WsimportTool.java:168)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:498)
at com.sun.tools.internal.ws.Invoker.invoke(Invoker.java:159)
at com.sun.tools.internal.ws.WsImport.main(WsImport.java:42)
Not sure but should I request new binding files from the vendor ?
It works in SoapUI so shouldn't it work with wsimport ?
I tried all solution out there to resolve this issue including creating jaxb.properties file in jdk folder, adding jvm argument in maven's system settings etc. None worked.
I will appreciate if someone can point me in right direction and help resolve this issue. Many thanks in advance.

Try this:
wsimport ./vendor.wsdl -Xnocompile -d ./src -extension -keep -XadditionalHeaders -B-XautoNameResolution
You don’t need to use the binding files from your vendor. You will need the last 4 files you received from your vendor to make the above command work.

Related

org.apache.axis2.wsdl.codegen.CodeGenerationException: java.lang.RuntimeException: XMLBeans binding extension not in classpath

I'm trying to generate java code starting from a wsdl file as in the https://axis.apache.org/axis2/java/core/docs/userguide-creatingclients-xmlbeans.html guide.
I created this simple axis2wsdlToJava.bat to be customized for my future edits, but still I can't figure it out why or what dependency is missing.
set JAVA_HOME=C:\PROGRA~1\Java\jdk1.8.0_121
set AXIS2_HOME=C:\Users\conr72\Downloads\axis2-1.8.0
set FILE_NAME=Axis2UserGuide.wsdl
set PACKAGE=org.apache.axis2.axis2userguide
%AXIS2_HOME%\bin\wsdl2java.bat -uri %FILE_NAME% -p %PACKAGE% -d xmlbeans -s -o build\client
I edited the C:\Users\conr72\Downloads\axis2-1.8.0\bin\wsdl2java.bat, adding an echo Using AXIS2_CLASS_PATH: %AXIS2_CLASS_PATH% , to check what is the AXIS2_CLASS_PATH it's using.
And if I run axis2wsdlToJava.bat, I get the following error message:
C:\Users\conr72\Desktop\k8s\workspace\wsdl>C:\Users\conr72\Downloads\axis2-1.8.0\bin\wsdl2java.bat -uri Axis2UserGuide.wsdl -p org.apache.axis2.axis2userguide -d xmlbeans -s -o build\client
Using AXIS2_HOME: C:\Users\conr72\Downloads\axis2-1.8.0
Using JAVA_HOME: C:\PROGRA~1\Java\jdk1.8.0_121
Using AXIS2_CLASS_PATH: C:\Users\conr72\Downloads\axis2-1.8.0;C:\Users\conr72\Downloads\axis2-1.8.0\lib\annotations-13.0.jar;C:\Users\conr72\Downloads\axis2-1.8.0\lib\antlr-2.7.7.jar;C:\Users\conr72\Downloads\axis2-1.8.0\lib\apache-mime4j-core-0.8.4.jar;C:\Users\conr72\Downloads\axis2-1.8.0\lib\axiom-api-1.3.0.jar;C:\Users\conr72\Downloads\axis2-1.8.0\lib\axiom-dom-1.3.0.jar;C:\Users\conr72\Downloads\axis2-1.8.0\lib\axiom-impl-1.3.0.jar;C:\Users\conr72\Downloads\axis2-1.8.0\lib\axiom-jaxb-1.3.0.jar;C:\Users\conr72\Downloads\axis2-1.8.0\lib\axis2-adb-1.8.0.jar;C:\Users\conr72\Downloads\axis2-1.8.0\lib\axis2-adb-codegen-1.8.0.jar;C:\Users\conr72\Downloads\axis2-1.8.0\lib\axis2-ant-plugin-1.8.0.jar;C:\Users\conr72\Downloads\axis2-1.8.0\lib\axis2-clustering-1.8.0.jar;C:\Users\conr72\Downloads\axis2-1.8.0\lib\axis2-codegen-1.8.0.jar;C:\Users\conr72\Downloads\axis2-1.8.0\lib\axis2-corba-1.8.0.jar;C:\Users\conr72\Downloads\axis2-1.8.0\lib\axis2-fastinfoset-1.8.0.jar;C:\Users\conr72\Downloads\axis2-1.8.0\lib\axis2-java2wsdl-1.8.0.jar;C:\Users\conr72\Downloads\axis2-1.8.0\lib\axis2-jaxbri-codegen-1.8.0.jar;C:\Users\conr72\Downloads\axis2-1.8.0\lib\axis2-jaxws-1.8.0.jar;C:\Users\conr72\Downloads\axis2-1.8.0\lib\axis2-jibx-1.8.0.jar;C:\Users\conr72\Downloads\axis2-1.8.0\lib\axis2-jibx-codegen-1.8.0.jar;C:\Users\conr72\Downloads\axis2-1.8.0\lib\axis2-json-1.8.0.jar;C:\Users\conr72\Downloads\axis2-1.8.0\lib\axis2-kernel-1.8.0.jar;C:\Users\conr72\Downloads\axis2-1.8.0\lib\axis2-metadata-1.8.0.jar;C:\Users\conr72\Downloads\axis2-1.8.0\lib\axis2-mtompolicy-1.8.0.jar;C:\Users\conr72\Downloads\axis2-1.8.0\lib\axis2-saaj-1.8.0.jar;C:\Users\conr72\Downloads\axis2-1.8.0\lib\axis2-soapmonitor-servlet-1.8.0.jar;C:\Users\conr72\Downloads\axis2-1.8.0\lib\axis2-spring-1.8.0.jar;C:\Users\conr72\Downloads\axis2-1.8.0\lib\axis2-transport-base-1.8.0.jar;C:\Users\conr72\Downloads\axis2-1.8.0\lib\axis2-transport-http-1.8.0.jar;C:\Users\conr72\Downloads\axis2-1.8.0\lib\axis2-transport-jms-1.8.0.jar;C:\Users\conr72\Downloads\axis2-1.8.0\lib\axis2-transport-local-1.8.0.jar;C:\Users\conr72\Downloads\axis2-1.8.0\lib\axis2-transport-mail-1.8.0.jar;C:\Users\conr72\Downloads\axis2-1.8.0\lib\axis2-transport-tcp-1.8.0.jar;C:\Users\conr72\Downloads\axis2-1.8.0\lib\axis2-transport-udp-1.8.0.jar;C:\Users\conr72\Downloads\axis2-1.8.0\lib\axis2-transport-xmpp-1.8.0.jar;C:\Users\conr72\Downloads\axis2-1.8.0\lib\axis2-xmlbeans-1.8.0.jar;C:\Users\conr72\Downloads\axis2-1.8.0\lib\bcel-6.4.1.jar;C:\Users\conr72\Downloads\axis2-1.8.0\lib\checker-qual-3.8.0.jar;C:\Users\conr72\Downloads\axis2-1.8.0\lib\codemodel-2.3.4.jar;C:\Users\conr72\Downloads\axis2-1.8.0\lib\commons-cli-1.4.jar;C:\Users\conr72\Downloads\axis2-1.8.0\lib\commons-codec-1.11.jar;C:\Users\conr72\Downloads\axis2-1.8.0\lib\commons-fileupload-1.4.jar;C:\Users\conr72\Downloads\axis2-1.8.0\lib\commons-io-2.11.0.jar;C:\Users\conr72\Downloads\axis2-1.8.0\lib\commons-lang3-3.12.0.jar;C:\Users\conr72\Downloads\axis2-1.8.0\lib\commons-logging-1.2.jar;C:\Users\conr72\Downloads\axis2-1.8.0\lib\dtd-parser-1.4.4.jar;C:\Users\conr72\Downloads\axis2-1.8.0\lib\encoder-1.2.3.jar;C:\Users\conr72\Downloads\axis2-1.8.0\lib\error_prone_annotations-2.5.1.jar;C:\Users\conr72\Downloads\axis2-1.8.0\lib\failureaccess-1.0.1.jar;C:\Users\conr72\Downloads\axis2-1.8.0\lib\geronimo-annotation_1.0_spec-1.1.1.jar;C:\Users\conr72\Downloads\axis2-1.8.0\lib\geronimo-jaxws_2.2_spec-1.2.jar;C:\Users\conr72\Downloads\axis2-1.8.0\lib\geronimo-ws-metadata_2.0_spec-1.1.3.jar;C:\Users\conr72\Downloads\axis2-1.8.0\lib\google-java-format-1.7.jar;C:\Users\conr72\Downloads\axis2-1.8.0\lib\gson-2.8.7.jar;C:\Users\conr72\Downloads\axis2-1.8.0\lib\guava-30.1.1-jre.jar;C:\Users\conr72\Downloads\axis2-1.8.0\lib\httpclient-4.5.13.jar;C:\Users\conr72\Downloads\axis2-1.8.0\lib\httpcore-4.4.14.jar;C:\Users\conr72\Downloads\axis2-1.8.0\lib\istack-commons-runtime-3.0.12.jar;C:\Users\conr72\Downloads\axis2-1.8.0\lib\istack-commons-tools-3.0.12.jar;C:\Users\conr72\Downloads\axis2-1.8.0\lib\j2objc-annotations-1.3.jar;C:\Users\conr72\Downloads\axis2-1.8.0\lib\jakarta.activation-1.2.1.jar;C:\Users\conr72\Downloads\axis2-1.8.0\lib\jakarta.activation-api-1.2.1.jar;C:\Users\conr72\Downloads\axis2-1.8.0\lib\jakarta.annotation-api-1.3.5.jar;C:\Users\conr72\Downloads\axis2-1.8.0\lib\jakarta.jws-api-2.1.0.jar;C:\Users\conr72\Downloads\axis2-1.8.0\lib\jakarta.mail-1.6.7.jar;C:\Users\conr72\Downloads\axis2-1.8.0\lib\jakarta.xml.bind-api-2.3.3.jar;C:\Users\conr72\Downloads\axis2-1.8.0\lib\jakarta.xml.soap-api-1.4.2.jar;C:\Users\conr72\Downloads\axis2-1.8.0\lib\jakarta.xml.ws-api-2.3.3.jar;C:\Users\conr72\Downloads\axis2-1.8.0\lib\javac-shaded-9+181-r4173-1.jar;C:\Users\conr72\Downloads\axis2-1.8.0\lib\javax.servlet-api-3.1.0.jar;C:\Users\conr72\Downloads\axis2-1.8.0\lib\javax.transaction-api-1.3.jar;C:\Users\conr72\Downloads\axis2-1.8.0\lib\jaxb-jxc-2.3.3.jar;C:\Users\conr72\Downloads\axis2-1.8.0\lib\jaxb-runtime-2.3.4.jar;C:\Users\conr72\Downloads\axis2-1.8.0\lib\jaxb-xjc-2.3.4.jar;C:\Users\conr72\Downloads\axis2-1.8.0\lib\jaxen-1.2.0.jar;C:\Users\conr72\Downloads\axis2-1.8.0\lib\jaxws-tools-2.3.3.jar;C:\Users\conr72\Downloads\axis2-1.8.0\lib\jettison-1.4.1.jar;C:\Users\conr72\Downloads\axis2-1.8.0\lib\jibx-bind-1.3.3.jar;C:\Users\conr72\Downloads\axis2-1.8.0\lib\jibx-run-1.3.3.jar;C:\Users\conr72\Downloads\axis2-1.8.0\lib\joda-time-2.10.5.jar;C:\Users\conr72\Downloads\axis2-1.8.0\lib\jsr305-3.0.2.jar;C:\Users\conr72\Downloads\axis2-1.8.0\lib\jsr311-api-1.1.1.jar;C:\Users\conr72\Downloads\axis2-1.8.0\lib\kotlin-stdlib-1.4.31.jar;C:\Users\conr72\Downloads\axis2-1.8.0\lib\kotlin-stdlib-common-1.4.20.jar;C:\Users\conr72\Downloads\axis2-1.8.0\lib\listenablefuture-9999.0-empty-to-avoid-conflict-with-guava.jar;C:\Users\conr72\Downloads\axis2-1.8.0\lib\log4j-api-2.14.1.jar;C:\Users\conr72\Downloads\axis2-1.8.0\lib\log4j-core-2.14.1.jar;C:\Users\conr72\Downloads\axis2-1.8.0\lib\log4j-jcl-2.14.1.jar;C:\Users\conr72\Downloads\axis2-1.8.0\lib\mex-1.8.0-impl.jar;C:\Users\conr72\Downloads\axis2-1.8.0\lib\moshi-1.12.0.jar;C:\Users\conr72\Downloads\axis2-1.8.0\lib\moshi-adapters-1.12.0.jar;C:\Users\conr72\Downloads\axis2-1.8.0\lib\neethi-3.1.1.jar;C:\Users\conr72\Downloads\axis2-1.8.0\lib\okio-2.10.0.jar;C:\Users\conr72\Downloads\axis2-1.8.0\lib\qdox-1.12.1.jar;C:\Users\conr72\Downloads\axis2-1.8.0\lib\relaxng-datatype-2.3.4.jar;C:\Users\conr72\Downloads\axis2-1.8.0\lib\rngom-2.3.4.jar;C:\Users\conr72\Downloads\axis2-1.8.0\lib\serializer-2.7.2.jar;C:\Users\conr72\Downloads\axis2-1.8.0\lib\spring-aop-5.3.9.jar;C:\Users\conr72\Downloads\axis2-1.8.0\lib\spring-expression-5.3.9.jar;C:\Users\conr72\Downloads\axis2-1.8.0\lib\spring-jcl-5.3.9.jar;C:\Users\conr72\Downloads\axis2-1.8.0\lib\stax2-api-4.2.1.jar;C:\Users\conr72\Downloads\axis2-1.8.0\lib\tomcat-juli-10.0.8.jar;C:\Users\conr72\Downloads\axis2-1.8.0\lib\tomcat-tribes-10.0.8.jar;C:\Users\conr72\Downloads\axis2-1.8.0\lib\txw2-2.3.4.jar;C:\Users\conr72\Downloads\axis2-1.8.0\lib\woden-core-1.0M10.jar;C:\Users\conr72\Downloads\axis2-1.8.0\lib\woodstox-core-6.2.6.jar;C:\Users\conr72\Downloads\axis2-1.8.0\lib\wsdl4j-1.6.3.jar;C:\Users\conr72\Downloads\axis2-1.8.0\lib\xalan-2.7.2.jar;C:\Users\conr72\Downloads\axis2-1.8.0\lib\xml-resolver-1.2.jar;C:\Users\conr72\Downloads\axis2-1.8.0\lib\xmlbeans-3.0.1.jar;C:\Users\conr72\Downloads\axis2-1.8.0\lib\xmlschema-core-2.2.5.jar;C:\Users\conr72\Downloads\axis2-1.8.0\lib\xpp3-1.1.3.4.O.jar;C:\Users\conr72\Downloads\axis2-1.8.0\lib\xsom-2.3.4.jar
Retrieving document at 'Axis2UserGuide.wsdl'.
Exception in thread "main" org.apache.axis2.wsdl.codegen.CodeGenerationException: java.lang.RuntimeException: XMLBeans binding extension not in classpath
at org.apache.axis2.wsdl.codegen.CodeGenerationEngine.generate(CodeGenerationEngine.java:163)
at org.apache.axis2.wsdl.WSDL2Code.main(WSDL2Code.java:54)
at org.apache.axis2.wsdl.WSDL2Java.main(WSDL2Java.java:24)
Caused by: java.lang.RuntimeException: XMLBeans binding extension not in classpath
at org.apache.axis2.wsdl.codegen.extension.XMLBeansExtension.engage(XMLBeansExtension.java:90)
at org.apache.axis2.wsdl.codegen.CodeGenerationEngine.generate(CodeGenerationEngine.java:116)
... 2 more
Since I see in the classpath the C:\Users\conr72\Downloads\axis2-1.8.0\lib\xmlbeans-3.0.1.jar; dependency... What am I missing?
While decompiling axis2-codegen-1.8.0
I found out the required class org.apache.axis2.xmlbeans.CodeGenerationUtility from axis2-xmlbeans-1.8.0 is missing.
But in version 1.7.9 that class is present, so I tried copypasting axis2-xmlbeans-1.7.9, renaming it, in the new classpath and it worked out.
From 1.8 onward you also need to add axis2-xmlbeans-codegen to the classpath to run code generation with XML beans.

Using wsimport from windows - url = http://www.webservicex.net/geoipservice.asmx?WSDL

I get this error when I used the URL
http://www.webservicex.net/geoipservice.asmx?WSDL
C:\Program Files (x86)\Java\jdk1.6.0_18\bin>wsimport **<URL>**
parsing WSDL...
[WARNING] Ignoring SOAP port "GeoIPServiceSoap12": it uses non-standard SOAP 1.2
binding.
You must specify the "-extension" option to use this binding.
line 197 of **<URL>**
[WARNING] ignoring port "GeoIPServiceHttpGet": no SOAP address specified. try ru
nning wsimport with -extension switch.
line 200 of **<URL>**
[WARNING] ignoring port "GeoIPServiceHttpPost": no SOAP address specified. try r
unning wsimport with -extension switch.
line 203 of **<URL>**
generating code...
**[ERROR] .\net\webservicex\GeoIP.java (The system cannot find the path specified)**
C:\Program Files (x86)\Java\jdk1.6.0_18\bin>
This error suggests the compiler needs GeoIP.java in order to progress - which should (technically) be given by your WSDL. I had this error, and it was because I did not have permissions to write to the directory (in this case, you're writing to C:\Program Files (x86)\Java\jdk1.6.0_18\bin - simple test would just be to try and run mkdir TEST in this directory) so GeoIP (for example) could not be written.
Specify a directory using the -d switch or change your working directory to one where you have permissions.
This error is coming because of permission issue.
C:\Program Files\Java\jdk1.8.0_65\bin> mkdir test
Access is denied.
Try using another directory to place generated files.
wsimport [options] < WSDL_URL > -d <directory>
specifies where to place generated output files
E:\sei is the directory, i am using to place output class files.
C:\Program Files\Java\jdk1.8.0_65\bin> wsimport -d E:\sei http://www.webservicex.net/geoipservice.asmx?wsdl
In case http://www.webservicex.net/geoipservice.asmx?WSDL is not responding, use http://wsgeoip.lavasoft.com/ipservice.asmx?WSDL instead.

Windows Authentication using Apache CFX wsdl2java

I am trying to use Apache CFX wsdl2java command on Mac OSX.
I have run this command ./wsdl2java .
The error I get is the following: WSDLToJava Error: org.apache.cxf.wsdl11.WSDLRuntimeException: Fail to create wsdl definition from :
Caused by : WSDLException: faultCode=PARSER_ERROR: Problem parsing ''.: java.io.IOException: Server returned HTTP response code: 401 for URL:
I believe the reason I get this error is because it requires Windows Authentication. I have tried to search on how to do this, but I have had no luck so far.
I would be extremely thankful for any help or ideas on this topic.
Thanks ahead of time.
If Axis 1.3, you can try
wsdl2java -uri http://user:pass#myapp.example.com/service/myService.wsdl
If Axis 1.4+ you can try
wsdl2java -http-proxy-user user -http-proxy-password pass -uri http://myapp.example.com/service/myService.wsdl
Use singleWsdl rather than wsdl, save it and reference the local copy in command parameters.
use abc/service/myService.singleWsdl rather than abc/service/myService.wsdl

Jruby Applets: (LoadError) no such file to load

I'm currently having real problems trying to get the gem Nokogiri to work in my applet. I have the jruby-complete-1.7.3 jar and have attempted to install gems using the normal install line:
java -jar jruby-compelete-1.7.3.jar -S gem install nokogiri
And also I have tried the Gem-In-A-Jar method. At first it works fine, and allows me to eval ruby code and store the data returned. My problem arises when I add in the line:
require 'nokogiri'
While that line works fine in the irb, when trying to access it from the applet I get the following error:
classpath:/META-INF/jruby.home/lib/ruby/shared/rubygems.rb:396 warning: can't
canonicalize loaded names due to security restrictions; disabling
Message: (LoadError) no such file to load -- nokogiri
Stacktrace:
org.jruby.exceptions.RaiseException: (LoadError) no such file to load -- nokogiri
at org.jruby.RubyKernel.require(org/jruby/RubyKernel.java:1027)
at RUBY.require(classpath:/META-INF/jruby.home/lib/ruby/shared/rubygems/custom_require.rb:36)
at RUBY.(root)(<script>:2)
I simply can't figure out why this exception is occuring. I've tried:
moving the gems manually into the "META-INF/jruby.home/lib/ruby/gems/shared" folder
I've added "require 'rubygems'" above the the nokogiri call.
Accessing the gems via the Gems-in-a-jar method: http://blog.nicksieger.com/articles/2009/01/10/jruby-1-1-6-gems-in-a-jar/
If anyone has an idea where I've gone wrong, or a solution to this issue, I'd greatly appreciate it.

SoapUI "failed to load url" error when loading WSDL

I keep having some weird problems. The main one is that I keep getting the following error when trying to add a WSDL to a new project:
Error loading [https://.../token?wsdl]: java.lang.Exception: Failed to load url; https://.../token?wsdl, 0 -
Here's the message recorded in the error.log file:
java.lang.Exception: Failed to load url; https://.../token?wsdl, 0 -
at com.eviware.soapui.impl.wsdl.support.wsdl.UrlWsdlLoader.load(UrlWsdlLoader.java:184)
at com.eviware.soapui.impl.wsdl.support.wsdl.WsdlLoader.loadXmlObject(WsdlLoader.java:121)
at com.eviware.soapui.impl.wsdl.support.xsd.SchemaUtils.getDefinitionParts(SchemaUtils.java:535)
at com.eviware.soapui.impl.wsdl.support.xsd.SchemaUtils.getDefinitionParts(SchemaUtils.java:524)
at com.eviware.soapui.impl.support.definition.support.AbstractDefinitionCache.update(AbstractDefinitionCache.java:97)
at com.eviware.soapui.impl.support.definition.support.AbstractDefinitionContext$Loader.construct(AbstractDefinitionContext.java:226)
at com.eviware.soapui.support.swing.SwingWorkerDelegator.construct(SwingWorkerDelegator.java:46)
at com.eviware.soapui.support.swing.SwingWorker$2.run(SwingWorker.java:149)
at java.lang.Thread.run(Unknown Source)
I verified that the application at that URL is up and running, and I can get to the WSDL from a web browser, but I keep getting this error message no matter what. I am using SoapUI 4.5.0 (32-bit) on a Windows 7 box. I've also tried the 64-bit version with the same results. It happens whether I am on VPN or not.
Do you know why I might be getting this error?
I have had the same problem. I resolved it by disabling the proxy in the SoapUI preferences.
(source : http://www.eviware.com/forum/viewtopic.php?f=13&t=12460)
In my case the server were the service was installed was configured only for TLS. SSL was not allowed. So you have to update SoapUI vmoptions file by adding the server TLS version
-Dsoapui.https.protocols=TLSv1.2
You can find vmoptions file under SoapUI installation folder:
C:\Program Files (x86)\SmartBear\SoapUI-5.0.0\bin\soapUI-5.0.0.vmoptions
I have had similar problems and worked around them by saving the WSDL locally. Don't forget to save any XSD files as well. You may need to edit the WSDL to specify an appropriate location for XSDs.
I got this error when trying to load a WebService implemented in MS Dynamics AX. Because I was connecting via VPN to my network, something went wrong with IPv6 settings. After Googling, I found the solution here: http://support.microsoft.com/kb/929852
In my case the
Error loading [https://.../token?wsdl]: java.lang.Exception: Failed to load url; https://.../token?wsdl, 0
was caused by fake certificate.
If you get the following in browser
"There is a problem with this website’s security certificate."
this is the case.
The resolution was to import a certificate to
C:\Program Files (x86)\SmartBear\SoapUI-5.0.0\jre\lib\security\cacerts
Which is default java used by SOAPUI
This could be a problem with IPV6 address SOAP UI picking. Adding the following JVM option fixed it for me:
-Djava.net.preferIPv4Stack=true
I added it here:
C:\Program Files\SmartBear\soapUI-4.5.2\bin\soapUI-4.5.2.vmoptions
Inside the wsdl file look for the import element, which looks like this :
`<import namespace="nameSpaceValue" location="Users/myname/.../targetxsdName.xsd"/>`
Change the location attribute in the above element to the location of your xsd files stored locally, and it should work.
The following solution helped me:
-Djsse.enableSNIExtension=false
In SoapUI-5.3.0.vmoptions.
This error is due to an erroneous schemaLocation in the WSDL file.
Indicate the correct location (either path on the disk or xsd url) of the xsd file in the wsdl file
exp
<xsd:import namespace="http://xyz:8080/" schemaLocation="http://172.17.16.53:9080/auth/authorizationBS?xsd=1"></xsd:import>
I had this issue when trying to use a SOCKS proxy. It appears that SoapUI does not support SOCKS proxys. I am using the Boomerang Chrome app instead.
I had this error and in my case, the problem was that I was using "localhost" in the URL.
I resolved that changing the localhost word for the respective IP, (Windows + R -> cmd -> ipconfig) then read the IP and write it to the URL replacing the "localhost" word
Close and reopen soapui. Probably is a bug of the application
Update SoapUI version to SoapUI 5.5.0. This error causes when I tried to load wsdl, because of old SoapUI version
If you are running your Web Application with the default port of 8080, please try to change the port to some other value and run your application again and trigger again your SOAPUI request. As you might have history projects in your SOAP UI workspace with port number 8080, might create issues.
My solution was to modify the java.security file:
\SoapUI-5.3.0\jre\lib\security\java.security
Comment code syntax:
#jdk.certpath.disabledAlgorithms=MD2, DSA, RSA keySize < 2048
#jdk.certpath.disabledAlgorithms=MD2, RSA keySize < 1024
For java version above 1.8,
Use below command to setup soapUI jar
java -jar --add-modules java.xml.bind --add-modules java.xml.ws <path for jar file+jar file name.jar>

Categories

Resources