File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
Win a copy of Clojure in Action this week in the Clojure forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Calling .NET webservice from java client

 
ramu prabakaran
Greenhorn
Posts: 9
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 13048
6
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 9
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 4
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 3
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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.
 
I agree. Here's the link: http://aspose.com/file-tools
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic