Closed glassfishrobot closed 17 years ago
Reported by jfialli@java.net
vivekp@java.net said: Most probably its fixed, assigning to rama to further comment on it.
ramapulavarthi@java.net said: Fixed
mmatula@java.net said: This issue was fixed before we created 1.0 branch, so the fix is in 1.0 -> setting target milestone to say so.
Was assigned to ramapulavarthi@java.net
This issue was imported from java.net JIRA WSIT-111
Marked as fixed on Tuesday, November 13th 2007, 11:46:28 pm
Error occured reading the metadata of a 2004 member submission endpointreference.
Given following xml element (that is a 2004 Member Submission Addressing Element), WSEndpointRefernece.parseMetadata() is walking off the end of the document, calling next when xmlstreamreader is on END_DOCUMENT.
Here is stack trace of problem:
javax.xml.ws.WebServiceException: javax.xml.stream.XMLStreamException: at com.sun.xml.ws.api.addressing.WSEndpointReference$Metadata.(WSEndpointReference.java:803)
at
com.sun.xml.ws.api.addressing.WSEndpointReference$Metadata.(WSEndpointReference.java:781)
at
com.sun.xml.ws.api.addressing.WSEndpointReference.getMetaData(WSEndpointReference.java:773)
at
com.sun.xml.ws.client.WSServiceDelegate.getPort(WSServiceDelegate.java:300)
at
com.sun.xml.ws.client.WSServiceDelegate.getPort(WSServiceDelegate.java:292)
at javax.xml.ws.Service.getPort(Service.java:285)
Here is code in question and comments from debug session:
WSEndpointReference.parseMetaData() .... do { //If the current element is metadata enclosure, look inside if (xsr.getLocalName().equals(version.eprType.metadataElement)) { String localName; String ns; XMLStreamBuffer mark; while ((mark = xsr.nextTagAndMark()) != null) { localName = xsr.getLocalName(); ns = xsr.getNamespaceURI(); if (localName.equals(version.eprType.serviceName))
{ String portStr = xsr.getAttributeValue(null, version.eprType.portName); serviceName = getElementTextAsQName(xsr); if (serviceName != null) portName = new QName(serviceName.getNamespaceURI(), portStr); }
else if (localName.equals(version.eprType.portTypeName))
{ portTypeName = getElementTextAsQName(xsr); }
else if (ns.equals(WSDLConstants.NS_WSDL) && localName.equals(WSDLConstants.QNAME_DEFINITIONS.getLocalPart()))
{ wsdlSource = new XMLStreamBufferSource(mark); }
else
{ XMLStreamReaderUtil.skipElement(xsr); }
} } else
{ //Skip is it is not root element if (!xsr.getLocalName().equals(rootElement)) XMLStreamReaderUtil.skipElement(xsr); }
} while (xsr.nextTag() == XMLStreamReader.START_ELEMENT);
Comments: ALL children elements of a 2004 EndpointReference are checked for metadata since there was not a wsa:metaData tag. The inner whle look with nextTagAndMark() iterates over children elements "address" and "ReferenceParameters". Then that look exist. The outer do/while calls nextTag() and that throws XMLStreamException since the END_DOCUMENT tag had already been reached.
Environment
Operating System: All Platform: All
Affected Versions
[current]