axis-java-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Jimmy Shah (Commented) (JIRA)" <axis-...@ws.apache.org>
Subject [jira] [Commented] (AXIS-2624) SOAP header element attributes "mustUnderstand" and "actor" added twice
Date Fri, 06 Jan 2012 19:25:39 GMT

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

Jimmy Shah commented on AXIS-2624:
----------------------------------

here is the soap request that caused the above exception for me. In my code I am adding the
userid/password elements in the header and the attribute soapenv:actor is duplicate:

<?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>
<ns1:gw_auth_user_prop soapenv:actor="http://schemas.xmlsoap.org/soap/actor/next" soapenv:actor="http://schemas.xmlsoap.org/soap/actor/next"
soapenv:mustUnderstand="0" xsi:type="soapenc:string" 
xmlns:ns1="http://www.abc.com/soap" xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/">username</ns1:gw_auth_user_prop>
<ns2:gw_auth_password_prop soapenv:actor="http://schemas.xmlsoap.org/soap/actor/next" soapenv:mustUnderstand="0"
xsi:type="soapenc:string" xmlns:ns2="http://www.abc.com/soap" xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/">password
</ns2:gw_auth_password_prop>
</soapenv:Header>
<soapenv:Body>
...............
................
</soapenv:Body></soapenv:Envelope>
                
> 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: current (nightly), 1.4
>         Environment: OS: Windows XP Professional SP2
> Application Server: Apache Tomcat 5.5.17
>            Reporter: Martin Dreier
>         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 is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

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


Mime
View raw message