I have a requirement where i have to develop a Web service Client to consume a web service.
The WSDL shows that the SOAP Binding is 1.2
but the JDK version in Development and JRE in App server is 1.4.
I tried to develop the Web service Proxy through JDeveloper 10.1.2 but it failed the generation saying that the WSDL is invalid.
Is Soap Binding 1.2 supported by java 1.4???
SOAP is not part of Java SE.
Some SOAP support is included Java EE ... via the javax.wsl.soap, but it looks like you would be better of using the JAX-WS support in Metro 1.4.
Unfortunately for you, Metro 1.4 requires Java 1.5 (u2) or later.
However, you should be seriously considering a platform upgrade anyway. Java 1.4 was end-of-lifed a long time ago. Unless you are paying for Oracle support, you won't have access to security patches ... and there have been some significant ones recently.
Related
I wanted to implement Wso2 authentication and authorization on an old existing java web application in jdk 1.5 and running in oc4j.
Is wso2 identity jars are available in the version 1.5?
We are using IS 5.3 (Latest Version).How can I achieve this in an old application
No, IS 5.3.0 supports only Java 1.7+.
It's very strange to hear such a requirement in 2017. Even Oracle doesn't support Java 1.5 now.
I am using JAX-WS wsimport to generate stubs to call Web Services. I need JAX-WS 2.2 or above - which is default only with JDK/JRE 7. What is the minimum JRE/JDK JAX-WS 2.2 can be used against? Can it be used with JRE5. Can it it be used with JRE6. The JAX-WS documentation describes how to use JAX-WS 2.2.x with JDK 6 - https://jax-ws.java.net/2.2.7/docs/ch02.html#running-on-top-of-jdk-6
However, this documentation seems to be for web services on the server side. I couldn't find anything clear in the documentation about whether it can be used for client stubs with JRE 6 (i.e. generation client stubs with JAX-WS 2.2.x & then running them against JRE 6).
Is this fully supported? Any caveats?
Using the Java Endorsed Standards Override Mechanism is the way to go for both client and server.
This mechanism also applies to Java 5 but I don't expect there was much testing of JAX-WS 2.2 on it.
I have a Java EE application that uses JAX-WS 2.2 and I have to deploy it on WebSphere Application Server 7, but it seems that this version of WAS supports just up to JAX-WS 2.1.
Is there any way of enabling JAX-WS 2.2 on WAS 7? Thanks.
At fix pack 7 for WAS 7 (7.0.0.7), configuration options were added to disable IBM provided JAX-WS engine that ships with product, and configure a third party JAX-WS engine. You may see details about this fix at PK93756: ENABLE USE OF THIRD PARTY JAX-WS WEB SERVICES ENGINE IN WEBSPHERE
So you shall be able to configure JAX-WS 2.2 implementation of your choice. You may find information on how to configure your server to disable IBM provided JAX-WS engine, and then configure your own implementation at DeveloperWorks and WAS 7 Infocenter.
I have old application that works in Websphere 5 with Java 1.3.
I cannot change Java version or app server version.
I need to add to this application code that will call web service.
AFAIK target web service supports both SOAP 1.1 and SOAP 1.2.
Unfortunately I have only little experience with WS clients. Some time ago I wrote WS client using Java 5. It was very simple, I used wsimport tool that generated all necessary classes from WSDL.
But, as I understand, Java 1.3 and Websphere 5 doesn't have such possibility. Words like JAX-WS and JAXB are related to the latest java versions.
Could someone please provide me with some guide (or just advise :)) what should I do?
Thanks in advance!
Some suggestions though I haven't tried them out:
Look into Apache Axis and try
out the tutorials
Read a similar
question for more suggestions in
case the first one doesn't work out
WebSphere 5 does not support Axis. If you have related WebSphere Studio you can easily create SOAP client using wizard. Maybe WebSphere 5 have command line tool like wsimport
I am new to webservices in general. I am trying to write a Java stand-alone client which can get a response back from a webservice.
I tried searching SO and Google but now I got more confused. The below are the links I went through extensively.
Simple (standalone) Java SOAP web service client from WSDL using Maven
Java webservice (soap) client - use certificates
java webservice client
https://cwiki.apache.org/CXF20DOC/how-do-i-develop-a-client.html
Java Webservice Client (Best way)
Steps in creating a web service using Axis2 - The client code
I have a url like: http://api.something.com/remote/wsdl/SomeEncryptedText
I also have a SOAP request something like:
<?xml version="1.0" encoding="utf-8"?>
<soap12:Envelope xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:soap12="http://www.w3.org/2003/05/soap-envelope">
<soap12:Body>
<AuthUsername>someName#someWhere.com</AuthUsername>
<AuthPassword>mypassword</AuthPassword>
<Sid>12121</Sid>
<DynamicProductFeedsRequest xmlns="http://api.something.com/remote/SomeEncryptedText">
</DynamicProductFeedsRequest>
</soap12:Body>
</soap12:Envelope>
With this how do I write a stand-alone Java client which I would want to integrate with some web application at a later stage?
From the resources mentioned earlier looks there is a wide choice of softwares: SoapUI, WSDL2Java, Apache Axis, Maven Plugin, JAX-WS, Apache CXF.
I used http://www.soapclient.com/soaptest.html in one of the SO answers mentioned above and I am able to get a perfect html/xml file on the browser.
Now I am confused on which is the software I should use? The information in the links are little in bits and pieces which I am unable to correlate with one another since I do not know anything in SOA.
Could anyone please tell me the high level steps in writing a stand-alone Java client which takes in the WSDL URL and SOAP request and gives me the output of it?
Please let me know if I missed any information.
This question all depends on the following:
The JDK version of your Java compiler.
Your WSDL version (there's 1.0, 1.2 and 2.0).
Basically, if you are using Java annotations to generate web services, then you'll need Java 5 related Web Services libraries (which supports annotations).
Some articles on Using Java Web Services with annotations (JAX-WS):
Introducing JAX-WS 2.0 With the Java SE 6 Platform
JAX-WS 2.0
I'll start from generating Web Service client with Java that doesn't support annotations. The well known client that generates WSDL to Java is Apache Axis (the last version is 1.4 released in 22 April 2006). This basically takes a WSDL definition and generates it back to client. It supports the old version of WSDL (1.0) and crashes if you use the newer versions of WSDL (1.2 and 2.0).
What this basically does, it takes your WSDL and generates a java Proxy that communicates to your Web Service. It can allow RPC based as well as XML based communication.
For Java that supports annotations there are, effectively, 2 ways of doing this:
Using Java's own wsimport command (the executable is found under the JDK_HOME/bin/ folder).
Using 3rd Party libaries such as Apache Axis 2 (which effectively replaces Apache Axis and supports WSDL version 2.0) or Apache CXF (which supports WSDL up to 1.2).
To use wsimport, you basically need to go to a shell command (or write a script) and effectively do something of this effect:
wsimport -d [outputdir] wsdl_file
and your java proxy will be found in the [outputdir] folder.
wsimport is found in JDK 1.6 (I don't know if it exists in earlier versions). More source here, and here.
For Apache Axis, Apache Axis 2 or Apache CXF, there's a WSDL2Java class file that does source code generation.
Here's a guide on how to use WSDL2Java in Apache CXF and in Apache Axis 2.
I hope this helps you in some way as much as I spent like 30 minutes off work doing this. :-)