Hi all,
Unfortunately, I am by no means proficient in Java, so am not sure if
this is a problem with Axis, or my java implementation. Anyway, I am
trying to build a client and server for XMLVend 2.0 (wsdl and schema
available on:
http://nrs.eskom.co.za/xmlvend/docs/Specification/November2005/XMLVend20.asp)
I have autogenerated the client code using AXIS 1.3 WSDL2Java (AXIS 2.0
fails with an error about type 'string' already being defined?), using
the command:
java -classpath $AXIS1_CLASSPATH org.apache.axis.wsdl.WSDL2Java -p
expertron_client -B xmlvend-full-2.0.wsdl
The skeleton client program is attached (hacked from the Calculator
example client.
Executig the client shows a soap request going out, but the xml tags for
all of the abstract fields are empty. The simple and complex types are
filled in, but all abstract types are empty.
If anybody could let me know if the fault is with my client, or axis, I
would greatly apreciate it...
If any help is required in chasing the problem down, I would be glad to
assist in any way, but unfortunately, my Java knowledge is limited :-( .
Thank you,
Justin Schoeman
// UNIX:
package expertron_client;
public class Client
{
public static void main(String args[])
{
Client c = new Client();
try
{
c.foo();
}
catch(Exception e)
{
System.out.println(e);
}
}
void foo() throws Exception
{
expertron_client.XMLVendService20Locator xs = new expertron_client.XMLVendService20Locator();
expertron_client.XMLVendServiceSoap_PortType port = xs.getXMLVendServiceSoap(new java.net.URL("http://127.0.0.1:8080/axis1/services/XMLVendServiceSoap"));
expertron_client.ConfirmCustomerReq req = new expertron_client.ConfirmCustomerReq();
req.setClientID(new EANDeviceID("1234567890123"));
req.setTerminalID(new EANDeviceID("1234567890123"));
req.setMsgID(new MsgID("20060127181800", new org.apache.axis.types.PositiveInteger("1")));
MeterIdentifier meter = new MeterNumber("07037709032");
req.setIdMethod(new VendIDMethod(meter));
//req.setMsgID(new MsgID());
port.confirmCustomerRequest(req);
}
}