I've worked with web service clients before, but this is my first foray into
using xFile. I've taken a simple WSDL that defines a service which fetches and
returns user information from LDAP, and created a xFire client. When I try and
run the client, ala:
package ca.huskyenergy;
import util.global.huskyenergy.ca.UserInformation;
import ca.huskyenergy.ws.UserInfoClient;
public class WSTest {
public static void main(String[] args) {
WSTest test = new WSTest();
test.run();
}
private void run() {
UserInfoClient client = new UserInfoClient();
UserInformation userInfo =
client.getv1Port_Document().getUserInformation("zcs8m");
System.out.println( userInfo );
}
}
I get this stack dump:
Exception in thread "main" org.codehaus.xfire.XFireRuntimeException: Could not
invoke service.. Nested exception is org.codehaus.xfire.fault.XFireFault:
0003BACE774A00700000039D00006AE90004335AE48ADC5A : Found 0 operation
definitions using keys: Key name:'first-body-element-ns' key
value:'urn:userInfoWsd/userInfoVi/document'; Key name:'SoapRequestWrapper' key
value:'getUserInformation';
org.codehaus.xfire.fault.XFireFault:
0003BACE774A00700000039D00006AE90004335AE48ADC5A : Found 0 operation
definitions using keys: Key name:'first-body-element-ns' key
value:'urn:userInfoWsd/userInfoVi/document'; Key name:'SoapRequestWrapper' key
value:'getUserInformation';
at
org.codehaus.xfire.fault.Soap11FaultSerializer.readMessage(Soap11FaultSerializer.java:31)
at
org.codehaus.xfire.fault.SoapFaultSerializer.readMessage(SoapFaultSerializer.java:28)
at
org.codehaus.xfire.soap.handler.ReadHeadersHandler.checkForFault(ReadHeadersHandler.java:111)
at
org.codehaus.xfire.soap.handler.ReadHeadersHandler.invoke(ReadHeadersHandler.java:67)
at org.codehaus.xfire.handler.HandlerPipeline.invoke(HandlerPipeline.java:131)
at org.codehaus.xfire.client.Client.onReceive(Client.java:406)
at
org.codehaus.xfire.transport.http.HttpChannel.sendViaClient(HttpChannel.java:139)
at org.codehaus.xfire.transport.http.HttpChannel.send(HttpChannel.java:48)
at org.codehaus.xfire.handler.OutMessageSender.invoke(OutMessageSender.java:26)
at org.codehaus.xfire.handler.HandlerPipeline.invoke(HandlerPipeline.java:131)
at org.codehaus.xfire.client.Invocation.invoke(Invocation.java:79)
at org.codehaus.xfire.client.Invocation.invoke(Invocation.java:114)
at org.codehaus.xfire.client.Client.invoke(Client.java:336)
at org.codehaus.xfire.client.XFireProxy.handleRequest(XFireProxy.java:77)
at org.codehaus.xfire.client.XFireProxy.invoke(XFireProxy.java:57)
at $Proxy12.getUserInformation(Unknown Source)
at ca.huskyenergy.WSTest.run(WSTest.java:19)
at ca.huskyenergy.WSTest.main(WSTest.java:14)
This error is returned from the J2EE server hosting the web service. The web
service is installed and operating, since I can execute it via other means
(from a web client, or from a web service checker tool inside of Eclipse).
BTW, the WSDL came from the same server where the web service is hosted.
Thanks!