[ 
https://issues.apache.org/jira/browse/AXIS-2624?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17405373#comment-17405373
 ] 

Klerisson Paixao commented on AXIS-2624:
----------------------------------------

Just for the record, I just found a workaround: 
http://mathieuhicauber-java.blogspot.com/2013/05/concurrent-calls-in-axis-14-thread.html

> SOAP header element attributes "mustUnderstand" and "actor" added twice
> -----------------------------------------------------------------------
>
>                 Key: AXIS-2624
>                 URL: https://issues.apache.org/jira/browse/AXIS-2624
>             Project: Axis
>          Issue Type: Bug
>          Components: Serialization/Deserialization
>    Affects Versions: 1.4
>         Environment: OS: Windows XP Professional SP2
> Application Server: Apache Tomcat 5.5.17
>            Reporter: Martin Dreier
>            Priority: Major
>         Attachments: console transcript.txt
>
>
> Hello,
> the described issue occurs in the following environment: web service A is 
> called from a client. During processing, it calls in turn a web service B, 
> running on the same engine. During the call, a handler is used on the client 
> side, which adds a new SOAP header block. The resulting message:
> <?xml version="1.0" encoding="utf-8"?>
> <soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/"; 
> xmlns:xsd="http://www.w3.org/2001/XMLSchema"; 
> xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance";>
>       <soapenv:Header>
>               <wssb:wssbUUID mustUnderstand="0" 
> actor="http://schemas.xmlsoap.org/soap/actor/next"; mustUnderstand="0" 
> actor="" 
> xmlns:wssb="http://www.sap.com/wssb";>0dd3c106-1028-4ef2-b71e-15f6076383b4</wssb:wssbUUID>
>       </soapenv:Header>
>       <soapenv:Body>
>               <ns1:getAllAvailCardiologists 
> soapenv:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"; 
> xmlns:ns1="HPIndex"/>
>       </soapenv:Body>
> </soapenv:Envelope>
> As you can see, the attributes "mustUnderstand" and "actor" of the 
> "wssb:wssbUUID" header element appear twice. Debugging has led me to the 
> conclusion that these attribute duplicates are added during serialization at 
> the client side. I have confirmed that immediately before serialization both 
> attributes appear only once each.
> This is the code in the handler to add the header:
>       Name uuidNodeName = 
> currentMessage.getSOAPEnvelope().createName("wssbUUID", "wssb", NAMESPACE);
>       uuidNode = 
> currentMessage.getSOAPHeader().addHeaderElement(uuidNodeName);
>       uuidNode.setMustUnderstand(false);
>       uuidNode.setActor(Constants.URI_SOAP11_NEXT_ACTOR);
>       uuidNode.addTextNode(uuid.toString());
> All web services run perfectly well if adding the header is omitted (i.e. the 
> above lines are commented out). This issue occurs on Axis, release 1.4 as 
> well as on the current SVN checkout. It also appears on the latest released 
> Xalan and Xerces versions as well as on their latest SVN checkouts.
> The above issue leads to a SAXParseException on the server. The message text 
> reads "Attribute "mustUnderstand" was already specified for element 
> "wssb:wssbUUID"". The stack trace of this exception:
> Thread [http-8080-Processor21] (Suspended (exception SAXParseException))      
>       DeserializationContext(DefaultHandler).fatalError(SAXParseException) 
> line: not available        
>       ErrorHandlerWrapper.fatalError(String, String, XMLParseException) line: 
> not available   
>       XMLErrorReporter.reportError(XMLLocator, String, String, Object[], 
> short) line: not available   
>       XMLErrorReporter.reportError(String, String, Object[], short) line: not 
> available       
>       XMLNSDocumentScannerImpl.scanStartElement() line: not available 
>       
> XMLNSDocumentScannerImpl$NSContentDispatcher(XMLDocumentFragmentScannerImpl$FragmentContentDispatcher).dispatch(boolean)
>  line: not available    
>       
> XMLNSDocumentScannerImpl(XMLDocumentFragmentScannerImpl).scanDocument(boolean)
>  line: not available      
>       XIncludeAwareParserConfiguration(XML11Configuration).parse(boolean) 
> line: not available 
>       
> XIncludeAwareParserConfiguration(XML11Configuration).parse(XMLInputSource) 
> line: not available  
>       SAXParserImpl$JAXPSAXParser(XMLParser).parse(XMLInputSource) line: not 
> available        
>       SAXParserImpl$JAXPSAXParser(AbstractSAXParser).parse(InputSource) line: 
> not available   
>       SAXParserImpl$JAXPSAXParser.parse(InputSource) line: not available      
>       SAXParserImpl(SAXParser).parse(InputSource, DefaultHandler) line: not 
> available 
>       DeserializationContext.parse() line: 227        
>       SOAPPart.getAsSOAPEnvelope() line: 695  
>       Message.getSOAPEnvelope() line: 435     
>       MustUnderstandChecker.invoke(MessageContext) line: 62   
>       InvocationStrategy.visit(Handler, MessageContext) line: 32      
>       SOAPService(SimpleChain).doVisiting(MessageContext, 
> HandlerIterationStrategy) line: 118 
>       SOAPService(SimpleChain).invoke(MessageContext) line: 83        
>       SOAPService.invoke(MessageContext) line: 454    
>       AxisServer.invokeService(MessageContext) line: 234      
>       AxisServer.invoke(MessageContext) line: 375     
>       AxisServlet.doPost(HttpServletRequest, HttpServletResponse) line: 689   
>       AxisServlet(HttpServlet).service(HttpServletRequest, 
> HttpServletResponse) line: 709     
>       AxisServlet(AxisServletBase).service(HttpServletRequest, 
> HttpServletResponse) line: 327 
>       AxisServlet(HttpServlet).service(ServletRequest, ServletResponse) line: 
> 802     
>       ApplicationFilterChain.internalDoFilter(ServletRequest, 
> ServletResponse) line: 252      
>       ApplicationFilterChain.doFilter(ServletRequest, ServletResponse) line: 
> 173      
>       StandardWrapperValve.invoke(Request, Response) line: 213        
>       StandardContextValve.invoke(Request, Response) line: 178        
>       StandardHostValve.invoke(Request, Response) line: 126   
>       ErrorReportValve.invoke(Request, Response) line: 105    
>       StandardEngineValve.invoke(Request, Response) line: 107 
>       CoyoteAdapter.service(Request, Response) line: 148      
>       Http11Processor.process(InputStream, OutputStream) line: 869    
>       
> Http11Protocol$JmxHttp11ConnectionHandler(Http11BaseProtocol$Http11ConnectionHandler).processConnection(TcpConnection,
>  Object[]) line: 664      
>       PoolTcpEndpoint.processSocket(Socket, TcpConnection, Object[]) line: 
> 527        
>       LeaderFollowerWorkerThread.runIt(Object[]) line: 80     
>       ThreadPool$ControlRunnable.run() line: 684      
>       ThreadWithAttributes(Thread).run() line: 595    
> This exception is also printed out to the console (stdout), however with a 
> different stack trace. The console transcript is attached to this message.
> I also found a bug report with a similar issue. However, I do not know if the 
> two are related: https://issues.apache.org/jira/browse/AXIS-1466.
> Best regards,
> Martin Dreier



--
This message was sent by Atlassian Jira
(v8.3.4#803005)

---------------------------------------------------------------------
To unsubscribe, e-mail: java-dev-unsubscr...@axis.apache.org
For additional commands, e-mail: java-dev-h...@axis.apache.org

Reply via email to