Hi Chawla; Can you please try with Axis2 nighlty build , As I know this issues is fixed now.
Thanks Deepal shantanu chawla wrote: > I am trying to connect to a dot net webservice. I created my axis2 > client using axis2 code generator for eclipse 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. > > Attached is the code of my axis2 client. > > WSDL for my very simple webservice is > > <?xml version="1.0" encoding="utf-8" ?> > - <wsdl:definitions xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/" > xmlns:tm="http://microsoft.com/wsdl/mime/textMatching/" > xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/" > xmlns:mime="http://schemas.xmlsoap.org/wsdl/mime/" > xmlns:tns="http://shantanu.org/" > xmlns:s="http://www.w3.org/2001/XMLSchema" > xmlns:soap12="http://schemas.xmlsoap.org/wsdl/soap12/" > xmlns:http="http://schemas.xmlsoap.org/wsdl/http/" > targetNamespace="http://shantanu.org/" > xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/"> > - <wsdl:types> > - <s:schema elementFormDefault="qualified" > targetNamespace="http://shantanu.org/"> > - <s:element name="HelloWorld"> > <s:complexType /> > </s:element> > - <s:element name="HelloWorldResponse"> > - <s:complexType> > - <s:sequence> > <s:element minOccurs="0" maxOccurs="1" name="HelloWorldResult" > type="s:string" /> > </s:sequence> > </s:complexType> > </s:element> > </s:schema> > </wsdl:types> > - <wsdl:message name="HelloWorldSoapIn"> > <wsdl:part name="parameters" element="tns:HelloWorld" /> > </wsdl:message> > - <wsdl:message name="HelloWorldSoapOut"> > <wsdl:part name="parameters" element="tns:HelloWorldResponse" /> > </wsdl:message> > - <wsdl:portType name="HelloWorldServiceSoap"> > - <wsdl:operation name="HelloWorld"> > <wsdl:input message="tns:HelloWorldSoapIn" /> > <wsdl:output message="tns:HelloWorldSoapOut" /> > </wsdl:operation> > </wsdl:portType> > - <wsdl:binding name="HelloWorldServiceSoap" > type="tns:HelloWorldServiceSoap"> > <soap:binding transport="http://schemas.xmlsoap.org/soap/http" /> > - <wsdl:operation name="HelloWorld"> > <soap:operation soapAction="http://shantanu.org/HelloWorld" > style="document" /> > - <wsdl:input> > <soap:body use="literal" /> > </wsdl:input> > - <wsdl:output> > <soap:body use="literal" /> > </wsdl:output> > </wsdl:operation> > </wsdl:binding> > - <wsdl:binding name="HelloWorldServiceSoap12" > type="tns:HelloWorldServiceSoap"> > <soap12:binding transport="http://schemas.xmlsoap.org/soap/http" /> > - <wsdl:operation name="HelloWorld"> > <soap12:operation soapAction="http://shantanu.org/HelloWorld" > style="document" /> > - <wsdl:input> > <soap12:body use="literal" /> > </wsdl:input> > - <wsdl:output> > <soap12:body use="literal" /> > </wsdl:output> > </wsdl:operation> > </wsdl:binding> > - <wsdl:service name="HelloWorldService"> > - <wsdl:port name="HelloWorldServiceSoap" > binding="tns:HelloWorldServiceSoap"> > <soap:address > location="http://localhost/HelloTestForAxis/HelloWorldService.asmx" /> > </wsdl:port> > - <wsdl:port name="HelloWorldServiceSoap12" > binding="tns:HelloWorldServiceSoap12"> > <soap12:address > location="http://localhost/HelloTestForAxis/HelloWorldService.asmx" /> > </wsdl:port> > </wsdl:service> > </wsdl:definitions> > > I tried hard to crack the error but i cant. I am new to axis 2 > > I cant figure out what the error can be > > After some debugging I am seeing that in the error is in this function > call > > private org.apache.axiom.om.OMElement toOM( > org.shantanu.HelloWorldDocument param, boolean optimizeContent) { > > org.apache.axiom.om.impl.builder.StAXOMBuilder builder = new > org.apache.axiom.om.impl.builder.StAXOMBuilder(org.apache.axiom.om.OMAbstractFactory.getOMFactory(), > > new > org.apache.axis2.util.StreamWrapper(param.newXMLStreamReader())); > org.apache.axiom.om.OMElement documentElement = > builder.getDocumentElement(); > > ((org.apache.axiom.om.impl.OMNodeEx) documentElement).setParent(null); > > return documentElement; > } > > error message is > > 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.HelloWorldServiceStub.toOM(HelloWorldServiceStub.java:229) > at > org.shantanu.HelloWorldServiceStub.toEnvelope(HelloWorldServiceStub.java:245) > > at > org.shantanu.HelloWorldServiceStub.HelloWorld(HelloWorldServiceStub.java:91) > > at org.shantanu.test.Axis2Test.main(Axis2Test.java:14) > 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 > > > > Thanks > > Shantanu Chawla > > > > -- > Graduate Student > Department of Computer Science, > San Diego State University > > > > -- Thanks, Deepal ................................................................ ~Future is Open~ --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]