Hi Romain, 

The Directory directive solved the WebAppInfo error - thanks !

As for accessing the webservice via injection (annotation) I ran wsimport
and it generated my CalculatorService endpoint as follows:



/**
 * This class was generated by the JAX-WS RI.
 * JAX-WS RI 2.1.6 in JDK 6
 * Generated source version: 2.1
 * 
 */
@WebServiceClient(name = "CalculatorService", targetNamespace =
"http://superbiz.org/wsdl";, wsdlLocation =
"http://localhost:8080/Calculator?wsdl";)
public class CalculatorService
    extends Service
{

    private final static URL CALCULATORSERVICE_WSDL_LOCATION;
    private final static Logger logger =
Logger.getLogger(com.prsx.wsClient.CalculatorService.class.getName());

    static {
        URL url = null;
        try {
            URL baseUrl;
            baseUrl =
com.prsx.wsClient.CalculatorService.class.getResource(".");
            url = new URL(baseUrl, "http://localhost:8080/Calculator?wsdl";);
        } catch (MalformedURLException e) {
            logger.warning("Failed to create URL for the wsdl Location:
'http://localhost:8080/Calculator?wsdl', retrying as a local file");
            logger.warning(e.getMessage());
        }
        CALCULATORSERVICE_WSDL_LOCATION = url;
    }

    public CalculatorService(URL wsdlLocation, QName serviceName) {
        super(wsdlLocation, serviceName);
    }

    public CalculatorService() {
        super(CALCULATORSERVICE_WSDL_LOCATION, new
QName("http://superbiz.org/wsdl";, "CalculatorService"));
    }

    /**
     * 
     * @return
     *     returns CalculatorWs
     */
    @WebEndpoint(name = "CalculatorPort")
    public CalculatorWs getCalculatorPort() {
        return super.getPort(new QName("http://superbiz.org/wsdl";,
"CalculatorPort"), CalculatorWs.class);
    }

    /**
     * 
     * @param features
     *     A list of {@link javax.xml.ws.WebServiceFeature} to configure on
the proxy.  Supported features not in the <code>features</code> parameter
will have their default values.
     * @return
     *     returns CalculatorWs
     */
    @WebEndpoint(name = "CalculatorPort")
    public CalculatorWs getCalculatorPort(WebServiceFeature... features) {
        return super.getPort(new QName("http://superbiz.org/wsdl";,
"CalculatorPort"), CalculatorWs.class, features);
    }

}



I am assuming I do not need to do anything other than ....

private static CalculatorService service;

CalculatorWs port = service.getPort(CalculatorWs.class);
                if(port !=null) {
                        System.out.println("Port is not null");
                }
                else {
                        System.out.println("Port is null");
                }
                        int value = port.sum(i, j);


However, I get a null pointer exception on the getPort



--
View this message in context: 
http://openejb.979440.n4.nabble.com/WARNING-WebAppInfo-not-found-tp4660077p4660101.html
Sent from the OpenEJB User mailing list archive at Nabble.com.

Reply via email to