Trying to create a java web service client using axis2
Ammu Isac
Greenhorn
Joined: Dec 04, 2009
Posts: 6
posted
0
Hi All,
I am trying to create a java client for accesing a .NET web service. The below code gives an exception : Exception in thread "main" org.apache.axis2.AxisFault: The input stream for an incoming message is null.
Can anyone please help me to solve this.
import org.apache.axiom.om.OMAbstractFactory;
import org.apache.axiom.om.OMElement;
import org.apache.axiom.om.OMFactory;
import org.apache.axiom.om.OMNamespace;
import org.apache.axis2.addressing.EndpointReference;
import org.apache.axis2.client.Options;
import org.apache.axis2.client.ServiceClient;
public class NewTest {
public static void main(String args[]) throws Exception {
System.out.println("H");
ServiceClient client = new ServiceClient();
Options opts = new Options();
opts.setTo(new EndpointReference("http://ip/Service.asmx"));
opts.setAction("http://tempuri.org/GetDetails");
client.setOptions(opts);
OMElement res = client.sendReceive(createPayLoad());
WSDL2Java.bat is not recognised as an internal or external command.
Please help to solve this.
Ulf Dittmer
Marshal
Joined: Mar 22, 2005
Posts: 35250
7
posted
0
If you want to create Java code you had better be using Axis2/Java, not Axis2/C. The current version is 1.5.1, but that requires Java 5. Version 1.4 works with Java 1.4, though.
I agree. Here's the link: http://ej-technologies/jprofiler - if it wasn't for jprofiler, we would need to
run our stuff on 16 servers instead of 3.
subject: Trying to create a java web service client using axis2