factory.setWsdlLocation( "classpath:repro.wsdl" );
factory.setAddress( "file://" + IOR );
factory.setServiceName( SERVICE_NAME );
ReproService port = (ReproService) factory.create();
ReproData in = new ReproData();
in.setABool( true );
in.setALong( 42 );
in.setAString( "-" );
// this call succeeds
int out = port.works( in );
assertTrue ("Value should be 42", out == 42);
ReproDatas outs = port.failsEmpty( in );
assertFalse ("Value should not be empty", outs.getItem().isEmpty());
for( ReproData d : outs.getItem()) {
TestUtils.getLogger().debug( "===> [" + d.isABool() + ":" + d.getALong() + ":" + d.getAString() + "]");
}
// this call fails with a null pointer exception during unmarshal
// (the service gets called correctly, but the client chokes on result data)
ReproData d = port.failsCrash( in );
assertTrue (d.isABool() == true);
TestUtils.getLogger().debug( "===> [" + d.isABool() + ":" + d.getALong() + ":" + d.getAString() + "]");
}