cancel
Showing results for 
Search instead for 
Did you mean: 

Axis throwing an exception with 1.1.2, unclear why

rsfeir
Champ in-the-making
Champ in-the-making
Ok so I read the API, looked at the examples, and very little of my code had to change to adapt to 1.1.2, however the part of the code that didn't change is simply throwing an exception and I'm not understanding why it would, mainly because AXIS is so great with exception reporting.  Can anyone tell me if you've seen this, and what the problem might be?  The code throwing this exception is this:

public static RepositoryServiceSoapBindingStub getRepositoryWebService() throws ServiceException
    {
        // Create the respository service, adding the WS security header information
        EngineConfiguration config = new FileProvider(new ByteArrayInputStream(AlfrescoRepositoryHelper.WS_SECURITY_INFO.getBytes()));
        RepositoryServiceLocator repositoryServiceLocator = new RepositoryServiceLocator(config);
        return (RepositoryServiceSoapBindingStub)repositoryServiceLocator.getRepositoryService();
    }

pulled directly from web service sample 1, with a slight change to the class name I use.  This used to work fine in 1.0.

The Exception is:

Feb 1, 2006 4:53:36 PM org.apache.axis.InternalException <init>
SEVERE: Exception:
org.apache.axis.ConfigurationException: org.xml.sax.SAXException: Fatal Error: URI=null Line=1: Element type "parameter" must be followed by either attribute specifications, ">" or "/>".
org.xml.sax.SAXException: Fatal Error: URI=null Line=1: Element type "parameter" must be followed by either attribute specifications, ">" or "/>".
   at org.apache.axis.utils.XMLUtils$ParserErrorHandler.fatalError(XMLUtils.java:723)
   at com.sun.org.apache.xerces.internal.util.ErrorHandlerWrapper.fatalError(ErrorHandlerWrapper.java:218)
   at com.sun.org.apache.xerces.internal.impl.XMLErrorReporter.reportError(XMLErrorReporter.java:386)
   at com.sun.org.apache.xerces.internal.impl.XMLErrorReporter.reportError(XMLErrorReporter.java:316)
   at com.sun.org.apache.xerces.internal.impl.XMLScanner.reportFatalError(XMLScanner.java:1438)
   at com.sun.org.apache.xerces.internal.impl.XMLNSDocumentScannerImpl.scanStartElement(XMLNSDocumentScannerImpl.java:218)
   at com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl$FragmentContentDispatcher.dispatch(XMLDocumentFragmentScannerImpl.java:1693)
   at com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl.scanDocument(XMLDocumentFragmentScannerImpl.java:368)
   at com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse(XML11Configuration.java:834)
   at com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse(XML11Configuration.java:764)
   at com.sun.org.apache.xerces.internal.parsers.XMLParser.parse(XMLParser.java:148)
   at com.sun.org.apache.xerces.internal.parsers.DOMParser.parse(DOMParser.java:250)
   at com.sun.org.apache.xerces.internal.jaxp.DocumentBuilderImpl.parse(DocumentBuilderImpl.java:292)
   at org.apache.axis.utils.XMLUtils.newDocument(XMLUtils.java:369)
   at org.apache.axis.utils.XMLUtils.newDocument(XMLUtils.java:388)
   at org.apache.axis.configuration.FileProvider.configureEngine(FileProvider.java:179)
   at org.apache.axis.AxisEngine.init(AxisEngine.java:172)
   at org.apache.axis.AxisEngine.<init>(AxisEngine.java:156)
   at org.apache.axis.client.AxisClient.<init>(AxisClient.java:52)
   at org.apache.axis.client.Service.getAxisClient(Service.java:104)
   at org.apache.axis.client.Service.<init>(Service.java:144)
   at org.alfresco.www.ws.service.repository.RepositoryServiceLocator.<init>(RepositoryServiceLocator.java:21)
   at gov.nih.niaid.eric.AlfrescoRepositoryHelper.getRepositoryWebService(AlfrescoRepositoryHelper.java:167)
   at gov.nih.niaid.eric.AlfrescoRepositoryHelper.getTicket(AlfrescoRepositoryHelper.java:92)
   at gov.nih.niaid.eric.AlfrescoRepositoryHelper.getContentLocation(AlfrescoRepositoryHelper.java:72)
   at system.gov.nih.niaid.eric.WSCallbackTest.testContentLocation(WSCallbackTest.java:16)
   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:585)
   at junit.framework.TestCase.runTest(TestCase.java:154)
   at junit.framework.TestCase.runBare(TestCase.java:127)
   at junit.framework.TestResult$1.protect(TestResult.java:106)
   at junit.framework.TestResult.runProtected(TestResult.java:124)
   at junit.framework.TestResult.run(TestResult.java:109)
   at junit.framework.TestCase.run(TestCase.java:118)
   at junit.framework.TestSuite.runTest(TestSuite.java:208)
   at junit.framework.TestSuite.run(TestSuite.java:203)
   at junit.textui.TestRunner.doRun(TestRunner.java:116)
   at com.intellij.rt.execution.junit2.IdeaJUnitAgent.doRun(IdeaJUnitAgent.java:58)
   at junit.textui.TestRunner.start(TestRunner.java:172)
   at com.intellij.rt.execution.junit.TextTestRunner2.startRunnerWithArgs(TextTestRunner2.java:23)
   at com.intellij.rt.execution.junit2.JUnitStarter.prepareStreamsAndStart(JUnitStarter.java:98)
   at com.intellij.rt.execution.junit2.JUnitStarter.main(JUnitStarter.java:32)


As usual your help is amazingly appreciated, and has been top notch all the way, I hope I don't wear out my welcome Smiley Happy

R
5 REPLIES 5

rwetherall
Confirmed Champ
Confirmed Champ
Hi,

I'm afraid I haven't seen this issue before.  Not sure what would have caused the issue since, as you correctly stated, this code hasn't changed.

Probably the best course of action will be to upgrade to 1.2RC which has just been released.

In 1.2 I have moved all the Java web service client code into a separate project and added some utility classes to help with some of the common operations. (one of which is a WebServiceFactory which encapsulates the code you highlighted)

If you are not is a position to move to 1.2 let me know and we'll see if we can figure out whats going wrong,

Cheers,
Roy

rsfeir
Champ in-the-making
Champ in-the-making
hi,

I can go to 1.2RC, the question though is when do you anticipate it to be released.  If it's soon, I would rather do the work once and for all and not have to change my code yet again.  If you think it will be more than a month before it goes final, then I need to use 1.1.2.

I was going to setup axis tcpmon today and see what the heck is being returned.  What other information do you need from me to duplicate this problem?

Thanks in advance.
R

rwetherall
Confirmed Champ
Confirmed Champ
Hi,

We're expecting to release 1.2 final in the next couple of weeks.

One thing to check is that the XML used for the WS security header is correct and that it contains the correct callback class.

Hope this helps,
Roy

rsfeir
Champ in-the-making
Champ in-the-making
Checked with leads here and 1.2 is not an option.  We need to deploy this this month, and knowing we have to go through our acceptance testing and then production, that's too short a time frame to get out with 1.2.

So we gotta make 1.1.2 work.  I will check the headers, though I am fairly sure I have them right, since I used yours and just changed the class name.

R

rsfeir
Champ in-the-making
Champ in-the-making
Fixed the issue.

The header, somehow during copy and paste, or perhaps somewhere in your samples that got carried over, had parameter value like this:

value=''gov.nih.niaid.eric.AlfrescoRepositoryHelper'/>

note the extra ', which was pretty hard to see.  So I am past the current error, I am getting and NPE, but that's my fault I'm sure, since I haven't finished rewriting the code for 1.1.2.

R