Return-Path: Delivered-To: apmail-ws-axis-dev-archive@www.apache.org Received: (qmail 24125 invoked from network); 12 Sep 2006 17:20:09 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (209.237.227.199) by minotaur.apache.org with SMTP; 12 Sep 2006 17:20:09 -0000 Received: (qmail 36805 invoked by uid 500); 12 Sep 2006 17:20:00 -0000 Delivered-To: apmail-ws-axis-dev-archive@ws.apache.org Received: (qmail 36736 invoked by uid 500); 12 Sep 2006 17:20:00 -0000 Mailing-List: contact axis-dev-help@ws.apache.org; run by ezmlm Precedence: bulk Reply-To: axis-dev@ws.apache.org list-help: list-unsubscribe: List-Post: List-Id: Delivered-To: mailing list axis-dev@ws.apache.org Received: (qmail 36725 invoked by uid 99); 12 Sep 2006 17:20:00 -0000 Received: from idunn.apache.osuosl.org (HELO idunn.apache.osuosl.org) (140.211.166.84) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 12 Sep 2006 10:20:00 -0700 X-ASF-Spam-Status: No, hits=0.5 required=5.0 tests=WEIRD_PORT Received: from ([209.237.227.198:38635] helo=brutus.apache.org) by idunn.apache.osuosl.org (ecelerity 2.1 r(10620)) with ESMTP id 7A/90-03642-B4CE6054 for ; Tue, 12 Sep 2006 10:20:11 -0700 Received: from brutus (localhost [127.0.0.1]) by brutus.apache.org (Postfix) with ESMTP id F21FD41000E for ; Tue, 12 Sep 2006 17:16:33 +0000 (GMT) Message-ID: <20332297.1158081393980.JavaMail.jira@brutus> Date: Tue, 12 Sep 2006 10:16:33 -0700 (PDT) From: "christopher dang (JIRA)" To: axis-dev@ws.apache.org Subject: [jira] Created: (AXIS2-1143) Basic Authentication with client stub MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-Spam-Rating: minotaur.apache.org 1.6.2 0/1000/N Basic Authentication with client stub ------------------------------------- Key: AXIS2-1143 URL: http://issues.apache.org/jira/browse/AXIS2-1143 Project: Apache Axis 2.0 (Axis2) Issue Type: Bug Affects Versions: 1.0 Environment: Windows XP Reporter: christopher dang Used WSDL2Java to generate client stub from the following wsdl: Tried to access the web service with the following code: public class ws { public static void main( String[] args ) { try { org.apache.axis2.transport.http.HttpTransportProperties.BasicAuthentication ba = new org.apache.axis2.transport.http.HttpTransportProperties.BasicAuthentication(); ba.setPassword( "password" ); ba.setUsername( "username" ); com.trafficaccident.exampleapp.www.TrafficAccidentServiceStub stub = new com.trafficaccident.exampleapp.www.TrafficAccidentServiceStub(); org.apache.axis2.client.Options op = stub._getServiceClient().getOptions(); op.setProperty( org.apache.axis2.transport.http.HTTPConstants.BASIC_AUTHENTICATION, ba ); op.setProperty( org.apache.axis2.Constants.Configuration.TRANSPORT_URL ,"http://citsf.state.co.us:25007/cics/cwba/cwshttpx"); com.request.trafficaccident.exampleapp.www.TrafficAccidentRequestDocument doc = com.request.trafficaccident.exampleapp.www.TrafficAccidentRequestDocument.Factory.newInstance(); com.request.trafficaccident.exampleapp.www.TrafficAccidentRequestDocument.TrafficAccidentRequest req = doc.addNewTrafficAccidentRequest(); req.setACCKEY( "ACCKEY" ); req.setAGENCYID( "AGENCYID" ); stub._getServiceClient().getAxisService().addMessageReceiver( "test", new org.apache.axis2.engine.MessageReceiver() { public void receive(org.apache.axis2.context.MessageContext mctx ) { System.out.println( mctx ); } } ); doc.setTrafficAccidentRequest( req ); com.response.trafficaccident.exampleapp.www.TrafficAccidentResponseDocument res = stub.TrafficAccident( doc ); System.out.println( res ); } catch( Exception e ) { e.printStackTrace(); } } } Received this error: org.apache.axis2.AxisFault: problem accessing the parser. Parser already accessed!; nested exception is: javax.xml.stream.XMLStreamException: problem accessing the parser. Parser already accessed!; nested exception is: org.apache.axis2.AxisFault: problem accessing the parser. Parser already accessed!; nested exception is: javax.xml.stream.XMLStreamException: problem accessing the parser. Parser already accessed!; nested exception is: org.apache.axis2.AxisFault: problem accessing the parser. Parser already accessed!; nested exception is: javax.xml.stream.XMLStreamException: problem accessing the parser. Parser already accessed!; nested exception is: org.apache.axis2.AxisFault: problem accessing the parser. Parser already accessed!; nested exception is: javax.xml.stream.XMLStreamException: problem accessing the parser. Parser already accessed! at org.apache.axis2.transport.http.CommonsHTTPTransportSender.invoke(CommonsHTTPTransportSender.java:231) at org.apache.axis2.engine.AxisEngine.send(AxisEngine.java:643) at org.apache.axis2.description.OutInAxisOperationClient.send(OutInAxisOperation.java:355) at org.apache.axis2.description.OutInAxisOperationClient.execute(OutInAxisOperation.java:285) at com.trafficaccident.exampleapp.www.TrafficAccidentServiceStub.TrafficAccident(TrafficAccidentServiceStub.java:139) at ws.main(ws.java:30) Caused by: org.apache.axis2.AxisFault: problem accessing the parser. Parser already accessed!; nested exception is: javax.xml.stream.XMLStreamException: problem accessing the parser. Parser already accessed!; nested exception is: org.apache.axis2.AxisFault: problem accessing the parser. Parser already accessed!; nested exception is: javax.xml.stream.XMLStreamException: problem accessing the parser. Parser already accessed! at org.apache.axis2.transport.http.CommonsHTTPTransportSender.writeMessageWithCommons(CommonsHTTPTransportSender.java:335) at org.apache.axis2.transport.http.CommonsHTTPTransportSender.invoke(CommonsHTTPTransportSender.java:210) ... 5 more Caused by: org.apache.axis2.AxisFault: problem accessing the parser. Parser already accessed!; nested exception is: javax.xml.stream.XMLStreamException: problem accessing the parser. Parser already accessed! at org.apache.axis2.transport.http.SOAPOverHTTPSender$AxisSOAPRequestEntity.writeRequest(SOAPOverHTTPSender.java:244) at org.apache.commons.httpclient.methods.EntityEnclosingMethod.writeRequestBody(EntityEnclosingMethod.java:495) at org.apache.commons.httpclient.HttpMethodBase.writeRequest(HttpMethodBase.java:1973) at org.apache.commons.httpclient.HttpMethodBase.execute(HttpMethodBase.java:993) at org.apache.commons.httpclient.HttpMethodDirector.executeWithRetry(HttpMethodDirector.java:397) at org.apache.commons.httpclient.HttpMethodDirector.executeMethod(HttpMethodDirector.java:170) at org.apache.commons.httpclient.HttpClient.executeMethod(HttpClient.java:396) at org.apache.commons.httpclient.HttpClient.executeMethod(HttpClient.java:346) at org.apache.axis2.transport.http.AbstractHTTPSender.executeMethod(AbstractHTTPSender.java:676) at org.apache.axis2.transport.http.SOAPOverHTTPSender.send(SOAPOverHTTPSender.java:113) at org.apache.axis2.transport.http.CommonsHTTPTransportSender.writeMessageWithCommons(CommonsHTTPTransportSender.java:329) ... 6 more Caused by: javax.xml.stream.XMLStreamException: problem accessing the parser. Parser already accessed! at org.apache.axiom.om.impl.llom.OMStAXWrapper.next(OMStAXWrapper.java:897) at org.apache.axiom.om.impl.serialize.StreamingOMSerializer.serializeNode(StreamingOMSerializer.java:74) at org.apache.axiom.om.impl.serialize.StreamingOMSerializer.serialize(StreamingOMSerializer.java:59) at org.apache.axiom.om.impl.util.OMSerializerUtil.serializeByPullStream(OMSerializerUtil.java:469) at org.apache.axiom.om.impl.llom.OMElementImpl.internalSerialize(OMElementImpl.java:780) at org.apache.axiom.om.impl.llom.OMElementImpl.internalSerializeAndConsume(OMElementImpl.java:803) at org.apache.axiom.om.impl.llom.OMElementImpl.internalSerialize(OMElementImpl.java:774) at org.apache.axiom.soap.impl.llom.SOAPEnvelopeImpl.internalSerialize(SOAPEnvelopeImpl.java:177) at org.apache.axiom.om.impl.llom.OMElementImpl.internalSerializeAndConsume(OMElementImpl.java:803) at org.apache.axiom.om.impl.llom.OMNodeImpl.serializeAndConsume(OMNodeImpl.java:392) at org.apache.axis2.transport.http.SOAPOverHTTPSender$AxisSOAPRequestEntity.handleOMOutput(SOAPOverHTTPSender.java:188) at org.apache.axis2.transport.http.SOAPOverHTTPSender$AxisSOAPRequestEntity.writeRequest(SOAPOverHTTPSender.java:230) ... 16 more -- 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