I've looked at the examples of calling a simple web service on the
Apache Axis website.
I've also looked at the examples of using WSS4J in conjunction with
Axis. I'm confused about how WSS4J can be used in the context of the
basic TestClient example (below). There is no specific example
corresponding to this.

I'd like to be able to add SAML tokens to a SOAP message, but I have a
couple of basic questions:

1. The WSS4J examples make use of a callback class to manipulate the
SOAP message. How is this callback class registered, in the context of
the example below.

2. The examples get a reference to the SOAP envelope object, but how do
I obtain this, in the context of the example below.

Some lines of code would be ideal, just to clarify the usage of WSS4J in
this situation.

Thanks.


1   import org.apache.axis.client.Call;
2   import org.apache.axis.client.Service;
3   import javax.xml.namespace.QName;
4   
5   public class TestClient {
6     public static void main(String [] args) {
7       try {
8         String endpoint =
9             "http://ws.apache.org:5049/axis/services/echo";;
10  
11        Service  service = new Service();
12        Call     call    = (Call) service.createCall();
13  
14        call.setTargetEndpointAddress( new java.net.URL(endpoint) );
15        call.setOperationName(new QName("http://soapinterop.org/";,
echoString"));
16  
17        String ret = (String) call.invoke( new Object[] { "Hello!" }
);
18  
19        System.out.println("Sent 'Hello!', got '" + ret + "'");
20      } catch (Exception e) {
21        System.err.println(e.toString());
22      }
23    }
24  }



---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to