dev@jax-ws.java.net

schemaLocation="null?xsd=1" when creating endpoints

From: Marcus Eriksson <krummas_at_gmail.com>
Date: Wed, 1 Jul 2009 22:19:36 +0200

Hi guys

I'm currently extending GuiceManaged so that it does not need (much) web.xml
or sun-jaxws.xml (i'm using the sweet guice servlets to create the
servlets). But i'm getting an error when generating the WSDL files from the
endpoint implementation.

The problems i'm getting in the WSDL are
1. <xsd:import namespace="http://example/" schemaLocation="null?xsd=1"/>
2. <soap:address location="REPLACE_WITH_ACTUAL_URL"/>

I.e. my question is, where is the wsdl location taken from when generating
wsdl from java?

This is what i'm doing when creating the endpoint (some parts left out):

QName serviceName =
EndpointFactory.getDefaultServiceName(ec.getImplementation());
QName portName = EndpointFactory.getDefaultPortName(serviceName,
ec.getImplementation());
BindingID bindingID = BindingID.parse(ec.getImplementation());
WebServiceFeatureList wsfl = new WebServiceFeatureList();
if(ec.getMtom()) {
   wsfl.add(new MTOMFeature());
}
wsfl.addAll(bindingID.createBuiltinFeatureList());
WSBinding binding = bindingID.createBinding(wsfl.toArray());

WSEndpoint<?> endpoint =
EndpointFactory.createEndpoint(ec.getImplementation()
                ,false
                ,null
                ,serviceName
                ,portName
                ,container
                ,binding
                ,null
                ,null
                ,null
                ,true);
adapters.add(servletAdapterList.createHttpAdapter(key, key, endpoint));

I'm using jax-ws 2.2

/Marcus