About Question enthuware.ocejws.v6.2.167 :
Posted: Tue Nov 04, 2014 2:06 am
For the question:
Correct answer:
The proxy type (or portType class) should be "MathTableImpl" and not "MathTableService"? =)
Code: Select all
We have a Web Service that requires Addressing headers to be present in all requests.
@Addressing(required=true)
@WebService
public class MathTableImpl implements MathTableService {
@Override
public SimpleMathTable getTable(Integer number) throws NegativeNumberException {
if (number < 0) {
throw new NegativeNumberException("Number cannot be negative");
}
SimpleMathTable table = new SimpleMathTable(number);
return table;
}
}
The Web Service is injected in a client. What is the correct code to enable Addressing?
Code: Select all
@Stateless
public class MyClient {
@Addressing
@WebServiceRef( MathTableImplService.class )
private MathTableService service;
...
}