ws-wsif-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Roberto Podesta'" <rop...@laser.dist.unige.it>
Subject WSDL4J question
Date Thu, 08 May 2003 15:06:09 GMT
When I try to do a dynamic Invocation of a simple service I have to write:

    WSIFOperation operation = port.createOperation("operationName",
"messageName",null);

after having received the WSIFPort of  the WSIFService.
My question is: WSDL4J does not parse the WSDL Message section? can there be
a way to set automatically the messageName and the operationName?
With the static invocation I have understood that this task is delegated to
the stub. It is right?
I'm using the file wsdl4j-20021124.jar.
thanks in advance
Roberto

The client code of my sample (that runs without porblems) is:

public class RunAxis1 {
    private  static void send(WSIFPort port) {
        try {
            WSIFOperation operation =
                port.createOperation("getOneByte",
                                     "AddArray",
                                     null);
            WSIFMessage input = operation.createInputMessage();
            WSIFMessage output = operation.createOutputMessage();
            WSIFMessage fault = operation.createFaultMessage();
            byte[] arrOfByte = new byte [1000];
            input.setObjectPart("theArr", arrOfByte);
            System.out.println(" ---(client dinamico) --- Sto aggiungendo
l'array  del BigByte test");
            if (operation.executeRequestResponseOperation(input, output,
fault)) {
                Byte  num  = (Byte)output.getObjectPart("aByte");
                System.out.println(num.byteValue());
            } else {
            }
        } catch (WSIFException we) {
            System.out.println("Got exception from WSIF, details:");
            we.printStackTrace();
        }
    }
    public static void main(String[] args) throws Exception {
        if (args.length != 1) {
            System.out.println(
                "Usage: java xdr.client.dynamic.Run <wsdl location>");
            System.exit(1);
        }
        WSIFServiceFactory factory = WSIFServiceFactory.newInstance();
        WSIFService service =
            factory.getService(
                args[0],
                null,
                null,
                "urn:BigByteServer",
                "BigBytePortType");
        WSIFPort port = service.getPort();
        send(port);
    }
}


Mime
View raw message