aspose file tools*
The moose likes Web Services and the fly likes Calling .NET webservice from java client Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Web Services
Bookmark "Calling .NET webservice from java client" Watch "Calling .NET webservice from java client" New topic
Author

Calling .NET webservice from java client

ramu prabakaran
Greenhorn

Joined: Mar 20, 2006
Posts: 9
A simple .NET webservice deployed in IIS server. Form that wsdl, i have created the stub and proxies (using weblogic 9.2 "clientgen" ant task).
When I try to invoke the service, I get the following error.


Before calling the service !
java.rmi.RemoteException: SOAPFaultException - FaultCode [{http://schemas.xmlsoap.org/soap/envelope/}Server] FaultString [System.Web.Services.Protocols.SoapHeaderException: Server unavailable, please try later ---> System.ApplicationException: An error occured processing an outgoing fault response
--- End of inner exception stack trace ---] FaultActor [http://w2lzkf0p01/ACDR/Service1.asmx]No Detail; nested exception is:
javax.xml.rpc.soap.SOAPFaultException: System.Web.Services.Protocols.SoapHeaderException: Server unavailable, please try later ---> System.ApplicationException: An error occured processing an outgoing fault response
--- End of inner exception stack trace ---


Could anyone help me in this. thanks in advance.

My client code is


public class WindowsClient {

/**
* @param args
*/
public static void main(String[] args) {
String wsdl_path = "http://w2lzkf0p01/ACDR/Service1.asmx?wsdl";

try {

System.out.println("Before calling the service !");
Service1 service1 = new Service1_Impl(wsdl_path);
Service1Soap service1Soap = service1.getService1Soap();
service1Soap.invokeDiadem("a", "b", "c", "d", "e", "f");
System.out.println("Service is Called !");
} catch (ServiceException e) {
System.out.println(e);
} catch (RemoteException e) {
System.out.println(e);
}

}

}
William Brogden
Author and all-around good cowpoke
Rancher

Joined: Mar 22, 2000
Posts: 12836
    
    5
nested exception is:
javax.xml.rpc.soap.SOAPFaultException: System.Web.Services.Protocols.SoapHeaderException: Server unavailable, please try later -


I suppose the first thing to check is whether the Server was actually unavailable at the time.

Bill
ramu prabakaran
Greenhorn

Joined: Mar 20, 2006
Posts: 9
Yes, the server is available. Even I could able to access the WSDL. And is there any extra configuration needed for .NET web service for invoking from other clinet?
fj dumags
Greenhorn

Joined: May 12, 2008
Posts: 4
Originally posted by ramu prabakaran:
Yes, the server is available. Even I could able to access the WSDL. And is there any extra configuration needed for .NET web service for invoking from other clinet?


One suggestion is to use netbeans 6.0 or later version since it gives you an option to create a webservice client on your existing project, all you need to do is publish you webservice in .net and then make sure that you can access the wsdl file, by typing on your browser http:\\localhost:<port>\<webservice_name>\wsdl? you can also try to look for resources that provides example in consuming a webservice in java. Hope it gives you a head start.
naveen babu
Greenhorn

Joined: Aug 13, 2008
Posts: 3
I am creating Midlet application to access web services using JAX-RPC API in Netbeans 6.0 IDE. While creating the client stub, the netbeans is creating the client stub for Soap Body and not able to create the stub / classes for Soap Header.

Can any one help me what is wrong in my doing or provide information about any client stub generator that generates client stub using JAX-RPC API. Please help me as this is very urgent. I was trying to do this since one week.
 
It is sorta covered in the JavaRanch Style Guide.
 
subject: Calling .NET webservice from java client