TestLogger.logger.debug("test: " + getName());
BookStoreService service = new BookStoreService();
JAXBContext ctx = JAXBContext.newInstance("org.apache.axis2.jaxws.client.soapaction");
Dispatch dispatch = service.createDispatch(new QName(targetNamespace, portName),
ctx, Mode.PAYLOAD);
Map<String, Object> requestCtx = dispatch.getRequestContext();
requestCtx.put(BindingProvider.SOAPACTION_USE_PROPERTY, Boolean.TRUE);
requestCtx.put(BindingProvider.SOAPACTION_URI_PROPERTY, "http://jaxws.axis2.apache.org/client/soapaction/getPrice");
ObjectFactory of = new ObjectFactory();
GetPriceType gpt = of.createGetPriceType();
gpt.setItem("TEST");
// The element that is sent should be <getPriceWithAction>
// so it will resolve to the getPriceWithAction operation
// defined in the WSDL.
JAXBElement<GetPriceType> getPrice = of.createGetPriceWithAction(gpt);
JAXBElement<GetPriceResponseType> getPriceResponse = (JAXBElement<GetPriceResponseType>) dispatch.invoke(getPrice);
GetPriceResponseType value = getPriceResponse.getValue();
assertNotNull("The response was null", value);
float price = value.getPrice();