Discussion:
[Axis2] error while running the axis2 WS client
shantanu chawla
2006-07-27 15:24:08 UTC
Permalink
I am trying to connect to a dot net webservice. I created my axis2
client but when I start running it, it throws this exception. I am new
to axis2 and dont know why it is happening. My client with Axis1.4 is
working very fine. Can anyone guide me to the solution.

Error message I received:

Starting application
org.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 org.shantanu.axis2test.ClientRegistrationStub.toOM(ClientRegistrationStub.java:498)
at org.shantanu.axis2test.ClientRegistrationStub.toEnvelope(ClientRegistrationStub.java:512)
at org.shantanu.axis2test.ClientRegistrationStub.AuthorizeClient(ClientRegistrationStub.java:102)
at org.shantanu.axis2test.TestingAxis2.main(TestingAxis2.java:15)
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)
... 6 more
Exception in thread "main"


thanks

Shantanu Chawla
--
Graduate Student
Department of Computer Science,
San Diego State University
Ajith Ranabahu
2006-07-28 05:27:51 UTC
Permalink
Hi,
The error seems to have popped up from the underlying stax parser.
Would you be able to let us in with some more information, perhpas the
actual messages ? This can be done using TCP mon [1]

Ajith
[1] http://ws.apache.org/commons/tcpmon/
Post by shantanu chawla
I am trying to connect to a dot net webservice. I created my axis2
client but when I start running it, it throws this exception. I am new
to axis2 and dont know why it is happening. My client with Axis1.4 is
working very fine. Can anyone guide me to the solution.
Starting application
org.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 org.shantanu.axis2test.ClientRegistrationStub.toOM(ClientRegistrationStub.java:498)
at org.shantanu.axis2test.ClientRegistrationStub.toEnvelope(ClientRegistrationStub.java:512)
at org.shantanu.axis2test.ClientRegistrationStub.AuthorizeClient(ClientRegistrationStub.java:102)
at org.shantanu.axis2test.TestingAxis2.main(TestingAxis2.java:15)
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)
... 6 more
Exception in thread "main"
thanks
Shantanu Chawla
--
Graduate Student
Department of Computer Science,
San Diego State University
---------------------------------------------------------------------
--
Ajith Ranabahu
shantanu chawla
2006-07-28 15:10:51 UTC
Permalink
Hi Ajith,

when I run the client I dont see any messages in the tcpmon may be coz
their is no message exchange yet between the client and server.

In my ClientRegistrationStub.java class I am getting exception at this point


private org.apache.axiom.soap.SOAPEnvelope toEnvelope(
org.apache.axiom.soap.SOAPFactory factory,
alarisgateway.gateway.alaris._04._2006.schemas_cardinal_com.AuthorizeClientDocument
param,
boolean optimizeContent) {
org.apache.axiom.soap.SOAPEnvelope envelope =
factory.getDefaultEnvelope();

if (param != null) {
----> envelope.getBody().addChild(toOM(param, optimizeContent));
}

return envelope;
}

let me know if this is helpful or I can send you the whole project code.

thanks

Shantanu
Post by Ajith Ranabahu
Hi,
The error seems to have popped up from the underlying stax parser.
Would you be able to let us in with some more information, perhpas the
actual messages ? This can be done using TCP mon [1]
Ajith
[1] http://ws.apache.org/commons/tcpmon/
Post by shantanu chawla
I am trying to connect to a dot net webservice. I created my axis2
client but when I start running it, it throws this exception. I am new
to axis2 and dont know why it is happening. My client with Axis1.4 is
working very fine. Can anyone guide me to the solution.
Starting application
org.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 org.shantanu.axis2test.ClientRegistrationStub.toOM(ClientRegistrationStub.java:498)
at org.shantanu.axis2test.ClientRegistrationStub.toEnvelope(ClientRegistrationStub.java:512)
at org.shantanu.axis2test.ClientRegistrationStub.AuthorizeClient(ClientRegistrationStub.java:102)
at org.shantanu.axis2test.TestingAxis2.main(TestingAxis2.java:15)
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)
... 6 more
Exception in thread "main"
thanks
Shantanu Chawla
--
Graduate Student
Department of Computer Science,
San Diego State University
---------------------------------------------------------------------
--
Ajith Ranabahu
---------------------------------------------------------------------
--
Graduate Student
Department of Computer Science,
San Diego State University
Ajith Ranabahu
2006-07-29 09:23:59 UTC
Permalink
Hi,
I have a hunch about the issue. can you post the client code (the part
where you make the Xmlbeans objects)

Ajith
Post by shantanu chawla
Hi Ajith,
when I run the client I dont see any messages in the tcpmon may be coz
their is no message exchange yet between the client and server.
In my ClientRegistrationStub.java class I am getting exception at this point
private org.apache.axiom.soap.SOAPEnvelope toEnvelope(
org.apache.axiom.soap.SOAPFactory factory,
alarisgateway.gateway.alaris._04._2006.schemas_cardinal_com.AuthorizeClientDocument
param,
boolean optimizeContent) {
org.apache.axiom.soap.SOAPEnvelope envelope =
factory.getDefaultEnvelope();
if (param != null) {
----> envelope.getBody().addChild(toOM(param, optimizeContent));
}
return envelope;
}
let me know if this is helpful or I can send you the whole project code.
thanks
Shantanu
Post by Ajith Ranabahu
Hi,
The error seems to have popped up from the underlying stax parser.
Would you be able to let us in with some more information, perhpas the
actual messages ? This can be done using TCP mon [1]
Ajith
[1] http://ws.apache.org/commons/tcpmon/
Post by shantanu chawla
I am trying to connect to a dot net webservice. I created my axis2
client but when I start running it, it throws this exception. I am new
to axis2 and dont know why it is happening. My client with Axis1.4 is
working very fine. Can anyone guide me to the solution.
Starting application
org.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 org.shantanu.axis2test.ClientRegistrationStub.toOM(ClientRegistrationStub.java:498)
at org.shantanu.axis2test.ClientRegistrationStub.toEnvelope(ClientRegistrationStub.java:512)
at org.shantanu.axis2test.ClientRegistrationStub.AuthorizeClient(ClientRegistrationStub.java:102)
at org.shantanu.axis2test.TestingAxis2.main(TestingAxis2.java:15)
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)
... 6 more
Exception in thread "main"
thanks
Shantanu Chawla
--
Graduate Student
Department of Computer Science,
San Diego State University
---------------------------------------------------------------------
--
Ajith Ranabahu
---------------------------------------------------------------------
--
Graduate Student
Department of Computer Science,
San Diego State University
---------------------------------------------------------------------
--
Ajith Ranabahu
Loading...