axis-java-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "James Bender (JIRA)" <j...@apache.org>
Subject [jira] Commented: (AXIS2-853) When invoking an operation on the stub, an java.lang.IllegalStateException is thrown
Date Tue, 27 Jun 2006 19:40:30 GMT
    [ http://issues.apache.org/jira/browse/AXIS2-853?page=comments#action_12418102 ] 

James Bender commented on AXIS2-853:
------------------------------------

The java.lang.IllegalStateException is thrown in the method getOMDocumentElement() on the
OMDocumentImpl class.

public OMElement getOMDocumentElement() {
        while (documentElement == null) {
            parserWrapper.next();
        }
        return documentElement;
    }

After several interations through the loop, invoking next() on the parserWrapper,
the exception is thrown. I am rather unclear why it is necessary to be parsing XML at this
point (if that is what is happening) I can understand generating XML, though.

> When invoking an operation on the stub, an java.lang.IllegalStateException is thrown
> ------------------------------------------------------------------------------------
>
>          Key: AXIS2-853
>          URL: http://issues.apache.org/jira/browse/AXIS2-853
>      Project: Apache Axis 2.0 (Axis2)
>         Type: Bug

>     Versions: 1.0
>  Environment: Windows 2000, Eclipse 3.1.2, and Tomcat 5.5, and Axis2 Std 1.0 daily build
for 23 June 2006
>     Reporter: James Bender
>     Assignee: Ajith Harshana Ranabahu
>  Attachments: CalculatePointsDocument.java, PointsCalculatorStub.java, WWPointsCalculator.wsdl
>
> Upon invoking an operation on the generated stub, and IllegalStateException is thrown:
> Points Calculation, firing...
> Caught Throwable exception in runPointsCalculator: org.apache.axiom.om.OMException: java.lang.Illega
> lStateExceptionorg.apache.axiom.om.OMException: java.lang.IllegalStateException
> 	at org.apache.axiom.om.impl.builder.StAXOMBuilder.next(StAXOMBuilder.java:206)
> 	at org.apache.axiom.om.impl.llom.OMDocumentImpl.getOMDocumentElement(OMDocumentImpl.java:144)
> 	at org.apache.axiom.om.impl.builder.StAXOMBuilder.getDocumentElement(StAXOMBuilder.java:322)
> 	at testexamples.types.PointsCalculatorStub.toOM(PointsCalculatorStub.java:213)
> 	at testexamples.types.PointsCalculatorStub.toEnvelope(PointsCalculatorStub.java:230)
> 	at testexamples.types.PointsCalculatorStub.calculatePoints(PointsCalculatorStub.java:105)
> 	at com.recursionsw.ve.tools.webservices.TestWebServicesEndToEndTestNG.runPointsCalculator(TestWebSe
> rvicesEndToEndTestNG.java:299)
> 	at com.recursionsw.ve.tools.webservices.TestWebServicesEndToEndTestNG.testGeneratorEndToEnd(TestWeb
> ServicesEndToEndTestNG.java:155)
> 	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
> 	at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
> 	at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
> 	at java.lang.reflect.Method.invoke(Unknown Source)
> 	at org.testng.internal.MethodHelper.invokeMethod(MethodHelper.java:536)
> 	at org.testng.internal.Invoker.invokeMethod(Invoker.java:395)
> 	at org.testng.internal.Invoker.invokeTestMethods(Invoker.java:672)
> 	at org.testng.internal.TestMethodWorker.run(TestMethodWorker.java:92)
> 	at org.testng.TestRunner.privateRun(TestRunner.java:624)
> 	at org.testng.TestRunner.run(TestRunner.java:515)
> 	at org.testng.SuiteRunner.privateRun(SuiteRunner.java:221)
> 	at org.testng.SuiteRunner.run(SuiteRunner.java:147)
> 	at org.testng.eclipse.runner.RemoteTestNG.run(RemoteTestNG.java:98)
> 	at org.testng.eclipse.runner.RemoteTestNG.main(RemoteTestNG.java:138)
> Caused by: java.lang.IllegalStateException
> 	at org.apache.xmlbeans.impl.store.Jsr173$XMLStreamReaderForString.next(Jsr173.java:1110)
> 	at org.apache.xmlbeans.impl.store.Jsr173$SyncedJsr173.next(Jsr173.java:1138)
> 	at org.apache.axis2.util.StreamWrapper.next(StreamWrapper.java:68)
> 	at org.apache.axiom.om.impl.builder.StAXOMBuilder.next(StAXOMBuilder.java:123)
> 	... 21 more
> This is the code where the operation is invoked:
> 			System.out.println("Points Calculation, firing...");
> 			PointsCalculatorStub stub = new PointsCalculatorStub(null,
> 					"http://localhost:8090/axis2/services/PointsCalculator");
>             CalculatePointsDocument calculatePointsDocument = CalculatePointsDocument.Factory
> 					.newInstance();
>             FoodDescription foodDescription = FoodDescription.Factory.newInstance();
>             foodDescription.setCalories(130);
>             foodDescription.setFatGrams(6);
>             foodDescription.setFiberGrams(1);
>  
> 	   CalculatePointsResponseDocument returnTranslationDocument = stub.calculatePoints(calculatePointsDocument);
> 	   CalculatePointsResponse responseString = returnTranslationDocument.getCalculatePointsResponse();
> 	   System.out.println("Client returned");
> 	   System.out.println("PointsCalculator: "+responseString);
> 	   System.out.println("PointsCalculation completed!!!");

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
   http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see:
   http://www.atlassian.com/software/jira


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


Mime
View raw message