What value SERVICE_NAMESPACE  has  ?

On 2/3/07, Deno Vichas <[EMAIL PROTECTED]> wrote:




I'm trying to get WS-Security following the sample that comes with xfire and
http://arsenalist.com/2007/01/18/implementing-ws-security-with-jsr181-annotations-using-wss4j-in-xfire/#comments



When I add WSS4JOutHandler to the client I'm getting a NamespaceURI cannot
be null expection.  What Namespace is the expection referring to?





      . . .



            Service serviceModel = new
ObjectServiceFactory().create(VehicleLookupService.class,"VehicleLookupService",
SERVICE_NAMESPACE, null);



            VehicleLookupService service = (VehicleLookupService) new
XFireProxyFactory().create(serviceModel,_serviceUrl);



            Client client = ((XFireProxy)
Proxy.getInvocationHandler(service)).getClient();

            client.addOutHandler(new DOMOutHandler());

            Properties properties = new Properties();

            configureOutProperties(properties);

            client.addOutHandler(new WSS4JOutHandler(properties));



            LookupVehiclesRequest lookupRequest =
RequestBuilder.buildLookupVehiclesRequest(cmd);



            LookupVehiclesResponse r = service.getVehicles(lookupRequest);

      . . .





    private void configureOutProperties(Properties
properties) {

        // Action to perform : user token

        properties.setProperty(WSHandlerConstants.ACTION,
WSHandlerConstants.USERNAME_TOKEN);



        // Set password type to hashed


properties.setProperty(WSHandlerConstants.PASSWORD_TYPE,
WSConstants.PW_DIGEST);



        // Username in keystore

        properties.setProperty(WSHandlerConstants.USER, "root");



        // Used do retrive password for given user name


properties.setProperty(WSHandlerConstants.PW_CALLBACK_CLASS,
PasswordHandler.class.getName());

    }





2007-01-19 09:44:55,842 ERROR
[org.apache.catalina.core.ContainerBase.[Catalina].[localhost].[/oracle].[spring]]
- Servlet.service() for servlet spring threw exception

org.codehaus.xfire.XFireRuntimeException: Could not invoke
service.. Nested exception is
org.codehaus.xfire.fault.XFireFault: NamespaceURI cannot be
null

org.codehaus.xfire.fault.XFireFault: NamespaceURI cannot be
null

      at
org.codehaus.xfire.fault.XFireFault.createFault(XFireFault.java:89)

      at
org.codehaus.xfire.util.dom.DOMSerializer.writeMessage(DOMSerializer.java:47)

      at
org.codehaus.xfire.transport.http.HttpChannel.writeWithoutAttachments(HttpChannel.java:56)

      at
org.codehaus.xfire.transport.http.CommonsHttpMessageSender.getByteArrayRequestEntity(CommonsHttpMessageSender.java:388)

      at
org.codehaus.xfire.transport.http.CommonsHttpMessageSender.send(CommonsHttpMessageSender.java:326)

      at
org.codehaus.xfire.transport.http.HttpChannel.sendViaClient(HttpChannel.java:123)

      at
org.codehaus.xfire.transport.http.HttpChannel.send(HttpChannel.java:48)

      at
org.codehaus.xfire.handler.OutMessageSender.invoke(OutMessageSender.java:26)

      at
org.codehaus.xfire.handler.HandlerPipeline.invoke(HandlerPipeline.java:131)

      at
org.codehaus.xfire.client.Invocation.invoke(Invocation.java:75)

      at
org.codehaus.xfire.client.Client.invoke(Client.java:335)

      at
org.codehaus.xfire.client.XFireProxy.handleRequest(XFireProxy.java:77)

      at
org.codehaus.xfire.client.XFireProxy.invoke(XFireProxy.java:57)

      at $Proxy11.getVehicles(Unknown Source)

      at
com.autoreturn.service.VehicleLookupServiceController.handle(VehicleLookupServiceController.java:72)

      at
org.springframework.web.servlet.mvc.AbstractCommandController.handleRequestInternal(AbstractCommandController.java:82)

      at
org.springframework.web.servlet.mvc.AbstractController.handleRequest(AbstractController.java:153)

      at
org.springframework.web.servlet.mvc.SimpleControllerHandlerAdapter.handle(SimpleControllerHandlerAdapter.java:45)

      at
org.springframework.web.servlet.DispatcherServlet.doDispatch(DispatcherServlet.java:806)

      at
org.springframework.web.servlet.DispatcherServlet.doService(DispatcherServlet.java:736)

      at
org.springframework.web.servlet.FrameworkServlet.processRequest(FrameworkServlet.java:396)

      at
org.springframework.web.servlet.FrameworkServlet.doGet(FrameworkServlet.java:350)

      at
javax.servlet.http.HttpServlet.service(HttpServlet.java:689)

      at
javax.servlet.http.HttpServlet.service(HttpServlet.java:802)

      at
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:252)

      at
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)

      at
org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:213)

      at
org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:178)

      at
org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:126)

      at
org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:105)

      at
org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:107)

      at
org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:148)

      at
org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:869)

      at
org.apache.coyote.http11.Http11BaseProtocol$Http11ConnectionHandler.processConnection(Http11BaseProtocol.java:664)

      at
org.apache.tomcat.util.net.PoolTcpEndpoint.processSocket(PoolTcpEndpoint.java:527)

      at
org.apache.tomcat.util.net.LeaderFollowerWorkerThread.runIt(LeaderFollowerWorkerThread.java:80)

      at
org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:684)

      at java.lang.Thread.run(Thread.java:595)

Caused by: javax.xml.stream.XMLStreamException:
NamespaceURI cannot be null

      at
com.sun.xml.stream.writers.XMLStreamWriterImpl.writeAttribute(XMLStreamWriterImpl.java:324)

      at
org.codehaus.xfire.util.STAXUtils.writeElement(STAXUtils.java:366)

      at
org.codehaus.xfire.util.STAXUtils.writeNode(STAXUtils.java:391)

      at
org.codehaus.xfire.util.STAXUtils.writeElement(STAXUtils.java:380)

      at
org.codehaus.xfire.util.STAXUtils.writeNode(STAXUtils.java:391)

      at
org.codehaus.xfire.util.STAXUtils.writeElement(STAXUtils.java:380)

      at
org.codehaus.xfire.util.STAXUtils.writeNode(STAXUtils.java:391)

      at
org.codehaus.xfire.util.STAXUtils.writeElement(STAXUtils.java:380)

      at
org.codehaus.xfire.util.STAXUtils.writeNode(STAXUtils.java:391)

      at
org.codehaus.xfire.util.STAXUtils.writeElement(STAXUtils.java:380)

      at
org.codehaus.xfire.util.STAXUtils.writeDocument(STAXUtils.java:285)

      at
org.codehaus.xfire.util.dom.DOMSerializer.writeMessage(DOMSerializer.java:40)

      ... 36 more







Thanks,,, deno




--
-----
When one of our products stops working, we'll blame another vendor
within 24 hours.

---------------------------------------------------------------------
To unsubscribe from this list please visit:

   http://xircles.codehaus.org/manage_email

Reply via email to