3 Replies Latest reply on Jul 21, 2009 3:49 PM by Jerrod Lankford

    NotImplementedException

    Jerrod Lankford Newbie

      I am trying to invoke a client handler and add headers to the soap message before they leave. I am getting a NotImplementedException on the following line of code

       SOAPEnvelope myEnvelope = (SOAPEnvelope) soapMsgContext.getMessage().getSOAPPart().getEnvelope();
      
      


      I have added the following jars to endorsed/lib but to no avail: jaxws-rt.jar, jbossws-native-jaxrpc.jar, jbossws-native-jaxws.jar, jbossws-native-jaxws-ext.jar, jaxb-api.jar, jbossws-native-saaj.jar. If the appendChild method is not implemented am i using the wrong version of one of the jars? If not is there any way to implement it. I need to attach something to the context so that it persists throughout all the services, thats why i was attempting to use the headers. This code also works fine on the server side handler. If it is helpful i am attaching the handler in the following way:

      CustomerService cs = new CustomerService();
       customer = cs.getCustomerPort();
      
      
       List<Handler> handlerChain =
       ((BindingProvider)customer).getBinding().getHandlerChain();
       JaxWSClientHandler sh = new JaxWSClientHandler(new QName("http://wtp/","lookupCustomer"));
       List<Handler> new_handlerChain = new ArrayList<Handler>();
       new_handlerChain.add(sh);
       ((BindingProvider)customer).getBinding().setHandlerChain(new_handlerChain);
      


      org.jboss.util.NotImplementedException
       at org.jboss.ws.core.soap.SOAPPartImpl.appendChild(SOAPPartImpl.java:298)
       at com.sun.xml.bind.marshaller.SAX2DOMEx.startElement(SAX2DOMEx.java:176)
       at com.sun.xml.ws.message.AbstractMessageImpl.writeTo(AbstractMessageImpl.java:158)
       at com.sun.xml.ws.message.AbstractMessageImpl.readAsSOAPMessage(AbstractMessageImpl.java:193)
       at com.sun.xml.ws.handler.SOAPMessageContextImpl.getMessage(SOAPMessageContextImpl.java:79)
       at com.ibm.management.soa.agent.genericdc.JaxWSTracker.attachCorrelatorToMessage(JaxWSTracker.java:146)
       at com.ibm.management.soa.agent.ITMTracker.clientRequest(ITMTracker.java:424)
       at com.ibm.management.soa.agent.GenericTracker.dispatch(GenericTracker.java:300)
       at com.ibm.management.soa.agent.GenericTracker.invoke(GenericTracker.java:257)
       at com.ibm.management.soa.agent.genericdc.JaxWSClientHandler.handleMessage(JaxWSClientHandler.java:115)
       at com.ibm.management.soa.agent.genericdc.JaxWSClientHandler.handleMessage(JaxWSClientHandler.java:1)
       at com.sun.xml.ws.handler.HandlerProcessor.callHandleMessage(HandlerProcessor.java:292)
       at com.sun.xml.ws.handler.HandlerProcessor.callHandlersRequest(HandlerProcessor.java:133)
       at com.sun.xml.ws.handler.ClientSOAPHandlerTube.callHandlersOnRequest(ClientSOAPHandlerTube.java:138)
       at com.sun.xml.ws.handler.HandlerTube.processRequest(HandlerTube.java:116)
       at com.sun.xml.ws.api.pipe.Fiber.__doRun(Fiber.java:595)
       at com.sun.xml.ws.api.pipe.Fiber._doRun(Fiber.java:554)
       at com.sun.xml.ws.api.pipe.Fiber.doRun(Fiber.java:539)
       at com.sun.xml.ws.api.pipe.Fiber.runSync(Fiber.java:436)
       at com.sun.xml.ws.client.Stub.process(Stub.java:248)
       at com.sun.xml.ws.client.sei.SEIStub.doProcess(SEIStub.java:135)
       at com.sun.xml.ws.client.sei.SyncMethodHandler.invoke(SyncMethodHandler.java:109)
       at com.sun.xml.ws.client.sei.SyncMethodHandler.invoke(SyncMethodHandler.java:89)
       at com.sun.xml.ws.client.sei.SEIStub.invoke(SEIStub.java:118)
       at $Proxy197.lookupCustomerInNewDB2(Unknown Source)
       at com.ibm.wsm.samples.retail.lc.Customer.lookupCustomer(Customer.java:134)
       at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
       at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
       at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
       at java.lang.reflect.Method.invoke(Method.java:597)
       at org.jboss.wsf.container.jboss50.invocation.InvocationHandlerJSE.invoke(InvocationHandlerJSE.java:106)
       at org.jboss.ws.core.server.ServiceEndpointInvoker.invoke(ServiceEndpointInvoker.java:219)
       at org.jboss.wsf.stack.jbws.RequestHandlerImpl.processRequest(RequestHandlerImpl.java:474)
       at org.jboss.wsf.stack.jbws.RequestHandlerImpl.handleRequest(RequestHandlerImpl.java:295)
       at org.jboss.wsf.stack.jbws.RequestHandlerImpl.doPost(RequestHandlerImpl.java:205)
       at org.jboss.wsf.stack.jbws.RequestHandlerImpl.handleHttpRequest(RequestHandlerImpl.java:131)
       at org.jboss.wsf.common.servlet.AbstractEndpointServlet.service(AbstractEndpointServlet.java:85)
       at javax.servlet.http.HttpServlet.service(HttpServlet.java:717)
       at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290)
       at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
       at org.jboss.web.tomcat.filters.ReplyHeaderFilter.doFilter(ReplyHeaderFilter.java:96)
       at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
       at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
       at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:235)
       at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:191)
       at org.jboss.web.tomcat.security.SecurityAssociationValve.invoke(SecurityAssociationValve.java:190)
       at org.jboss.web.tomcat.security.JaccContextValve.invoke(JaccContextValve.java:92)
       at org.jboss.web.tomcat.security.SecurityContextEstablishmentValve.process(SecurityContextEstablishmentValve.java:126)
       at org.jboss.web.tomcat.security.SecurityContextEstablishmentValve.invoke(SecurityContextEstablishmentValve.java:70)
       at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:127)
       at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102)
       at org.jboss.web.tomcat.service.jca.CachedConnectionValve.invoke(CachedConnectionValve.java:158)
       at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
       at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:330)
       at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:829)
       at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:601)
       at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:447)
       at java.lang.Thread.run(Thread.java:619)