I have implemented a webservice using the JAXB2 service factory, configured
through spring. My XML schema defines a namespace
http://www.me.com/mynamespace, and my service is exposed at the endpoint
{http://www.me.com/mynamespace}MyService, as expected.
When I try to access it with a client like this:
ServiceFactory fact = (ServiceFactory)
getContext().getBean("xfire.serviceFactory");
Service serviceModel = fact.create(MyService.class);
String tns = serviceModel.getTargetNamespace();
XFire myXfire = (XFire) getContext().getBean("xfire");
XFireProxyFactory proxyFactory = new XFireProxyFactory(myXfire);
AirAvailabilityService service = (MyService)
proxyFactory.create(serviceModel,
"http://localhost:48232/MyService");
assertNotNull(service);
MyServiceRQ request = getMyServiceRQ();
MyServiceRS response = service.getAvailability(request);
the endpoint that the client tries to access is:
{http://interfaces.service.mycompany.com}MyService
That is, the namespace is based on the package name, not what is in the
schema. Thus a SOAP Fault is returned.
So how do I make the client use the right namepspace?
Thanks,
Stan
--------------------------------------------------------------------
mail2web - Check your email from the web at
http://mail2web.com/ .
---------------------------------------------------------------------
To unsubscribe from this list please visit:
http://xircles.codehaus.org/manage_email