You are viewing a plain text version of this content. The canonical link for it is here.
Posted to java-user@axis.apache.org by "Lee, Michael" <mi...@logicacmg.com> on 2006/11/09 14:54:23 UTC

Axis2 HTTPS client error: Parser already accessed!

Problem:
 
  I am trying to use HTTPS for the client side of an Axis2 web-service.

  Running the service over HTTP works fine. I am currently configuring
the client
  use http by setting the targetEndPoint as 
  "https://localhost:8443/axis2/services/billing" in my client Stub
(generated using
  WSDL2Java).
 
  But when I try to use HTTPS,  an exception is thrown by the client.

  The error seems to be very similar to the bug (AXIS2-1380) where the
error was caused by
  calling a service through a proxy.  However I am not using a proxy.
 
  I am trying to determine if this is a problem with my code, with
Tomcat or with Axis2.
 
  Has anyone else come across this problem?


Platform:
 
    Java JDK 1.5.0_09
    Tomcat 5.5.17 (non-native mode) (cannot use native DDL with HTTPS
due to Tomcat bug)
    Axis2.0 version 1.0
    Windows XP SP2
 
Keystore and Tomcat configuration:
 
  I generated the keystore using the instructions on the Tomcat website 
  (http://tomcat.apache.org/tomcat-5.0-doc/ssl-howto.html)
 
  The command issued was:
 
    %JAVA_HOME%\bin\keytool -genkey -alias tomcat -keyalg RSA
 
    The generated keystore file was then copied to the Tomcat conf
directory.

The Tomcat server.xml was configured as follows:
 
    <Connector
        allowTrace="true"
        port="8443"
        scheme="https"
        keystoreFile="conf/.keystore"
        sslProtocol="TLS"
        maxSpareThreads="75"
        maxThreads="150"
        uRIEncoding="null"
        minSpareThreads="25"
        secure="true"
        clientAuth="false">
    </Connector>
 

Exception thrown by Axis2 client:
 
Refund In Transaction ID: TRANS912397548D
Exception in thread "main" xxx.xxx.xxx.xxx.xxx.billing.BillingException:
Problem refunding transaction Id: TRANS912397548D to service:
https://localhost:8443/axis2/services/billing
    at
xxx.xxx.xxx.xxx.xxx.billing.axis.AxisBillingService.refund(AxisBillingSe
rvice.java:133)
    at
xxx.xxx.xxx.xxx.xxx.billing.axis.TestAxisBillingService.refund(TestAxisB
illingService.java:46)
    at
xxx.xxx.xxx.xxx.xxx.billing.axis.TestAxisBillingService.main(TestAxisBil
lingService.java:107)
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!; 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(Common
sHTTPTransportSender.java:223)
    at org.apache.axis2.engine.AxisEngine.send(AxisEngine.java:589)
    at
org.apache.axis2.description.OutOnlyAxisOperationClient.execute(OutOnlyA
xisOperation.java:352)
    at
xxx.xxx.xxx.xxx.xxx.billing.axis.generated.BillingStub.refund(BillingStu
b.java:156)
    at
xxx.xxx.xxx.xxx.xxx.billing.axis.AxisBillingService.refund(AxisBillingSe
rvice.java:130)
    ... 2 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!; 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.writeMessageW
ithCommons(CommonsHTTPTransportSender.java:305)
    at
org.apache.axis2.transport.http.CommonsHTTPTransportSender.invoke(Common
sHTTPTransportSender.java:207)
    ... 6 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:194)
    at
org.apache.commons.httpclient.methods.EntityEnclosingMethod.writeRequest
Body(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(HttpMe
thodDirector.java:397)
    at
org.apache.commons.httpclient.HttpMethodDirector.executeMethod(HttpMetho
dDirector.java:170)
    at
org.apache.commons.httpclient.HttpClient.executeMethod(HttpClient.java:3
96)
    at
org.apache.commons.httpclient.HttpClient.executeMethod(HttpClient.java:3
46)
    at
org.apache.axis2.transport.http.AbstractHTTPSender.executeMethod(Abstrac
tHTTPSender.java:530)
    at
org.apache.axis2.transport.http.SOAPOverHTTPSender.send(SOAPOverHTTPSend
er.java:92)
    at
org.apache.axis2.transport.http.CommonsHTTPTransportSender.writeMessageW
ithCommons(CommonsHTTPTransportSender.java:299)
    ... 7 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:858)
    at
org.apache.axiom.om.impl.serialize.StreamingOMSerializer.serializeNode(S
treamingOMSerializer.java:71)
    at
org.apache.axiom.om.impl.serialize.StreamingOMSerializer.serialize(Strea
mingOMSerializer.java:56)
    at
org.apache.axiom.om.impl.util.OMSerializerUtil.serializeByPullStream(OMS
erializerUtil.java:315)
    at
org.apache.axiom.om.impl.llom.OMElementImpl.internalSerialize(OMElementI
mpl.java:790)
    at
org.apache.axiom.soap.impl.llom.SOAPEnvelopeImpl.internalSerialize(SOAPE
nvelopeImpl.java:171)
    at
org.apache.axiom.om.impl.llom.OMElementImpl.internalSerializeAndConsume(
OMElementImpl.java:809)
    at
org.apache.axiom.om.impl.llom.OMNodeImpl.serializeAndConsume(OMNodeImpl.
java:381)
    at
org.apache.axis2.transport.http.SOAPOverHTTPSender$AxisSOAPRequestEntity
.handleOMOutput(SOAPOverHTTPSender.java:145)
    at
org.apache.axis2.transport.http.SOAPOverHTTPSender$AxisSOAPRequestEntity
.writeRequest(SOAPOverHTTPSender.java:180)
    ... 17 more

 
Thanks

Mike


This e-mail and any attachment is for authorised use by the intended recipient(s) only. It may contain proprietary material, confidential information and/or be subject to legal privilege. It should not be copied, disclosed to, retained or used by, any other party. If you are not an intended recipient then please promptly delete this e-mail and any attachment and all copies and inform the sender. Thank you.

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


RE: Axis2 HTTPS client error: Parser already accessed!

Posted by "Lee, Michael" <mi...@logicacmg.com>.
Davanum Srinivas wrote:

> Do you send any login information. Do you use the 
> HttpTransportProperties.Authenticator to set any user name password?
> If you do, HttpTransportProperties.Authenticator has a 
> setAllowedRetry flag, please try switching that on.

I do not send any login information. I just need to use HTTPS for
secure transport.

> thanks,
> dims

Thanks,

Mike


This e-mail and any attachment is for authorised use by the intended recipient(s) only. It may contain proprietary material, confidential information and/or be subject to legal privilege. It should not be copied, disclosed to, retained or used by, any other party. If you are not an intended recipient then please promptly delete this e-mail and any attachment and all copies and inform the sender. Thank you.

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


Re: Axis2 HTTPS client error: Parser already accessed!

Posted by Davanum Srinivas <da...@gmail.com>.
Do you send any login information. Do you use the
HttpTransportProperties.Authenticator to set any user name password?
If you do, HttpTransportProperties.Authenticator has a setAllowedRetry
flag, please try switching that on.

thanks,
dims

On 11/9/06, Lee, Michael <mi...@logicacmg.com> wrote:
>
> Problem:
>
>   I am trying to use HTTPS for the client side of an Axis2 web-service.
>
>   Running the service over HTTP works fine. I am currently configuring
> the client
>   use http by setting the targetEndPoint as
>   "https://localhost:8443/axis2/services/billing" in my client Stub
> (generated using
>   WSDL2Java).
>
>   But when I try to use HTTPS,  an exception is thrown by the client.
>
>   The error seems to be very similar to the bug (AXIS2-1380) where the
> error was caused by
>   calling a service through a proxy.  However I am not using a proxy.
>
>   I am trying to determine if this is a problem with my code, with
> Tomcat or with Axis2.
>
>   Has anyone else come across this problem?
>
>
> Platform:
>
>     Java JDK 1.5.0_09
>     Tomcat 5.5.17 (non-native mode) (cannot use native DDL with HTTPS
> due to Tomcat bug)
>     Axis2.0 version 1.0
>     Windows XP SP2
>
> Keystore and Tomcat configuration:
>
>   I generated the keystore using the instructions on the Tomcat website
>   (http://tomcat.apache.org/tomcat-5.0-doc/ssl-howto.html)
>
>   The command issued was:
>
>     %JAVA_HOME%\bin\keytool -genkey -alias tomcat -keyalg RSA
>
>     The generated keystore file was then copied to the Tomcat conf
> directory.
>
> The Tomcat server.xml was configured as follows:
>
>     <Connector
>         allowTrace="true"
>         port="8443"
>         scheme="https"
>         keystoreFile="conf/.keystore"
>         sslProtocol="TLS"
>         maxSpareThreads="75"
>         maxThreads="150"
>         uRIEncoding="null"
>         minSpareThreads="25"
>         secure="true"
>         clientAuth="false">
>     </Connector>
>
>
> Exception thrown by Axis2 client:
>
> Refund In Transaction ID: TRANS912397548D
> Exception in thread "main" xxx.xxx.xxx.xxx.xxx.billing.BillingException:
> Problem refunding transaction Id: TRANS912397548D to service:
> https://localhost:8443/axis2/services/billing
>     at
> xxx.xxx.xxx.xxx.xxx.billing.axis.AxisBillingService.refund(AxisBillingSe
> rvice.java:133)
>     at
> xxx.xxx.xxx.xxx.xxx.billing.axis.TestAxisBillingService.refund(TestAxisB
> illingService.java:46)
>     at
> xxx.xxx.xxx.xxx.xxx.billing.axis.TestAxisBillingService.main(TestAxisBil
> lingService.java:107)
> 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!; 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(Common
> sHTTPTransportSender.java:223)
>     at org.apache.axis2.engine.AxisEngine.send(AxisEngine.java:589)
>     at
> org.apache.axis2.description.OutOnlyAxisOperationClient.execute(OutOnlyA
> xisOperation.java:352)
>     at
> xxx.xxx.xxx.xxx.xxx.billing.axis.generated.BillingStub.refund(BillingStu
> b.java:156)
>     at
> xxx.xxx.xxx.xxx.xxx.billing.axis.AxisBillingService.refund(AxisBillingSe
> rvice.java:130)
>     ... 2 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!; 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.writeMessageW
> ithCommons(CommonsHTTPTransportSender.java:305)
>     at
> org.apache.axis2.transport.http.CommonsHTTPTransportSender.invoke(Common
> sHTTPTransportSender.java:207)
>     ... 6 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:194)
>     at
> org.apache.commons.httpclient.methods.EntityEnclosingMethod.writeRequest
> Body(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(HttpMe
> thodDirector.java:397)
>     at
> org.apache.commons.httpclient.HttpMethodDirector.executeMethod(HttpMetho
> dDirector.java:170)
>     at
> org.apache.commons.httpclient.HttpClient.executeMethod(HttpClient.java:3
> 96)
>     at
> org.apache.commons.httpclient.HttpClient.executeMethod(HttpClient.java:3
> 46)
>     at
> org.apache.axis2.transport.http.AbstractHTTPSender.executeMethod(Abstrac
> tHTTPSender.java:530)
>     at
> org.apache.axis2.transport.http.SOAPOverHTTPSender.send(SOAPOverHTTPSend
> er.java:92)
>     at
> org.apache.axis2.transport.http.CommonsHTTPTransportSender.writeMessageW
> ithCommons(CommonsHTTPTransportSender.java:299)
>     ... 7 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:858)
>     at
> org.apache.axiom.om.impl.serialize.StreamingOMSerializer.serializeNode(S
> treamingOMSerializer.java:71)
>     at
> org.apache.axiom.om.impl.serialize.StreamingOMSerializer.serialize(Strea
> mingOMSerializer.java:56)
>     at
> org.apache.axiom.om.impl.util.OMSerializerUtil.serializeByPullStream(OMS
> erializerUtil.java:315)
>     at
> org.apache.axiom.om.impl.llom.OMElementImpl.internalSerialize(OMElementI
> mpl.java:790)
>     at
> org.apache.axiom.soap.impl.llom.SOAPEnvelopeImpl.internalSerialize(SOAPE
> nvelopeImpl.java:171)
>     at
> org.apache.axiom.om.impl.llom.OMElementImpl.internalSerializeAndConsume(
> OMElementImpl.java:809)
>     at
> org.apache.axiom.om.impl.llom.OMNodeImpl.serializeAndConsume(OMNodeImpl.
> java:381)
>     at
> org.apache.axis2.transport.http.SOAPOverHTTPSender$AxisSOAPRequestEntity
> .handleOMOutput(SOAPOverHTTPSender.java:145)
>     at
> org.apache.axis2.transport.http.SOAPOverHTTPSender$AxisSOAPRequestEntity
> .writeRequest(SOAPOverHTTPSender.java:180)
>     ... 17 more
>
>
> Thanks
>
> Mike
>
>
> This e-mail and any attachment is for authorised use by the intended recipient(s) only. It may contain proprietary material, confidential information and/or be subject to legal privilege. It should not be copied, disclosed to, retained or used by, any other party. If you are not an intended recipient then please promptly delete this e-mail and any attachment and all copies and inform the sender. Thank you.
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: axis-user-unsubscribe@ws.apache.org
> For additional commands, e-mail: axis-user-help@ws.apache.org
>
>


-- 
Davanum Srinivas : http://www.wso2.net (Oxygen for Web Service Developers)

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


Re: Axis2 HTTPS client error: Parser already accessed!

Posted by Davanum Srinivas <da...@gmail.com>.
Martin,

please see my email on this thread :) No need to hack the code (hopefully!)

-- dims

On 11/9/06, Martin Gainty <mg...@hotmail.com> wrote:
> Mike-
>
> Most probably an unhandled exception when OMElement serializes..a solution is available at
> http://mail-archives.apache.org/mod_mbox/ws-axis-dev/200606.mbox/%3Cb8d11a3b0606012222y49cc495cv1a558b8f5cb550e@mail.google.com%3E
>
> Anyone else?
> M-
> This e-mail communication and any attachments may contain confidential and privileged information for the use of the
> designated recipients named above. If you are not the intended recipient, you are hereby notified that you have received
> this communication in error and that any review, disclosure, dissemination, distribution or copying of it or its
> contents
> ----- Original Message -----
> From: "Lee, Michael" <mi...@logicacmg.com>
> To: <ax...@ws.apache.org>
> Sent: Thursday, November 09, 2006 8:54 AM
> Subject: Axis2 HTTPS client error: Parser already accessed!
>
>
>
> Problem:
>
>   I am trying to use HTTPS for the client side of an Axis2 web-service.
>
>   Running the service over HTTP works fine. I am currently configuring
> the client
>   use http by setting the targetEndPoint as
>   "https://localhost:8443/axis2/services/billing" in my client Stub
> (generated using
>   WSDL2Java).
>
>   But when I try to use HTTPS,  an exception is thrown by the client.
>
>   The error seems to be very similar to the bug (AXIS2-1380) where the
> error was caused by
>   calling a service through a proxy.  However I am not using a proxy.
>
>   I am trying to determine if this is a problem with my code, with
> Tomcat or with Axis2.
>
>   Has anyone else come across this problem?
>
>
> Platform:
>
>     Java JDK 1.5.0_09
>     Tomcat 5.5.17 (non-native mode) (cannot use native DDL with HTTPS
> due to Tomcat bug)
>     Axis2.0 version 1.0
>     Windows XP SP2
>
> Keystore and Tomcat configuration:
>
>   I generated the keystore using the instructions on the Tomcat website
>   (http://tomcat.apache.org/tomcat-5.0-doc/ssl-howto.html)
>
>   The command issued was:
>
>     %JAVA_HOME%\bin\keytool -genkey -alias tomcat -keyalg RSA
>
>     The generated keystore file was then copied to the Tomcat conf
> directory.
>
> The Tomcat server.xml was configured as follows:
>
>     <Connector
>         allowTrace="true"
>         port="8443"
>         scheme="https"
>         keystoreFile="conf/.keystore"
>         sslProtocol="TLS"
>         maxSpareThreads="75"
>         maxThreads="150"
>         uRIEncoding="null"
>         minSpareThreads="25"
>         secure="true"
>         clientAuth="false">
>     </Connector>
>
>
> Exception thrown by Axis2 client:
>
> Refund In Transaction ID: TRANS912397548D
> Exception in thread "main" xxx.xxx.xxx.xxx.xxx.billing.BillingException:
> Problem refunding transaction Id: TRANS912397548D to service:
> https://localhost:8443/axis2/services/billing
>     at
> xxx.xxx.xxx.xxx.xxx.billing.axis.AxisBillingService.refund(AxisBillingSe
> rvice.java:133)
>     at
> xxx.xxx.xxx.xxx.xxx.billing.axis.TestAxisBillingService.refund(TestAxisB
> illingService.java:46)
>     at
> xxx.xxx.xxx.xxx.xxx.billing.axis.TestAxisBillingService.main(TestAxisBil
> lingService.java:107)
> 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!; 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(Common
> sHTTPTransportSender.java:223)
>     at org.apache.axis2.engine.AxisEngine.send(AxisEngine.java:589)
>     at
> org.apache.axis2.description.OutOnlyAxisOperationClient.execute(OutOnlyA
> xisOperation.java:352)
>     at
> xxx.xxx.xxx.xxx.xxx.billing.axis.generated.BillingStub.refund(BillingStu
> b.java:156)
>     at
> xxx.xxx.xxx.xxx.xxx.billing.axis.AxisBillingService.refund(AxisBillingSe
> rvice.java:130)
>     ... 2 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!; 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.writeMessageW
> ithCommons(CommonsHTTPTransportSender.java:305)
>     at
> org.apache.axis2.transport.http.CommonsHTTPTransportSender.invoke(Common
> sHTTPTransportSender.java:207)
>     ... 6 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:194)
>     at
> org.apache.commons.httpclient.methods.EntityEnclosingMethod.writeRequest
> Body(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(HttpMe
> thodDirector.java:397)
>     at
> org.apache.commons.httpclient.HttpMethodDirector.executeMethod(HttpMetho
> dDirector.java:170)
>     at
> org.apache.commons.httpclient.HttpClient.executeMethod(HttpClient.java:3
> 96)
>     at
> org.apache.commons.httpclient.HttpClient.executeMethod(HttpClient.java:3
> 46)
>     at
> org.apache.axis2.transport.http.AbstractHTTPSender.executeMethod(Abstrac
> tHTTPSender.java:530)
>     at
> org.apache.axis2.transport.http.SOAPOverHTTPSender.send(SOAPOverHTTPSend
> er.java:92)
>     at
> org.apache.axis2.transport.http.CommonsHTTPTransportSender.writeMessageW
> ithCommons(CommonsHTTPTransportSender.java:299)
>     ... 7 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:858)
>     at
> org.apache.axiom.om.impl.serialize.StreamingOMSerializer.serializeNode(S
> treamingOMSerializer.java:71)
>     at
> org.apache.axiom.om.impl.serialize.StreamingOMSerializer.serialize(Strea
> mingOMSerializer.java:56)
>     at
> org.apache.axiom.om.impl.util.OMSerializerUtil.serializeByPullStream(OMS
> erializerUtil.java:315)
>     at
> org.apache.axiom.om.impl.llom.OMElementImpl.internalSerialize(OMElementI
> mpl.java:790)
>     at
> org.apache.axiom.soap.impl.llom.SOAPEnvelopeImpl.internalSerialize(SOAPE
> nvelopeImpl.java:171)
>     at
> org.apache.axiom.om.impl.llom.OMElementImpl.internalSerializeAndConsume(
> OMElementImpl.java:809)
>     at
> org.apache.axiom.om.impl.llom.OMNodeImpl.serializeAndConsume(OMNodeImpl.
> java:381)
>     at
> org.apache.axis2.transport.http.SOAPOverHTTPSender$AxisSOAPRequestEntity
> .handleOMOutput(SOAPOverHTTPSender.java:145)
>     at
> org.apache.axis2.transport.http.SOAPOverHTTPSender$AxisSOAPRequestEntity
> .writeRequest(SOAPOverHTTPSender.java:180)
>     ... 17 more
>
>
> Thanks
>
> Mike
>
>
> This e-mail and any attachment is for authorised use by the intended recipient(s) only. It may contain proprietary material, confidential information and/or be subject to legal privilege. It should not be copied, disclosed to, retained or used by, any other party. If you are not an intended recipient then please promptly delete this e-mail and any attachment and all copies and inform the sender. Thank you.
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: axis-user-unsubscribe@ws.apache.org
> For additional commands, e-mail: axis-user-help@ws.apache.org
>
>


-- 
Davanum Srinivas : http://www.wso2.net (Oxygen for Web Service Developers)

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


Re: Axis2 HTTPS client error: Parser already accessed!

Posted by Martin Gainty <mg...@hotmail.com>.
Mike-

Most probably an unhandled exception when OMElement serializes..a solution is available at
http://mail-archives.apache.org/mod_mbox/ws-axis-dev/200606.mbox/%3Cb8d11a3b0606012222y49cc495cv1a558b8f5cb550e@mail.google.com%3E

Anyone else?
M-
This e-mail communication and any attachments may contain confidential and privileged information for the use of the 
designated recipients named above. If you are not the intended recipient, you are hereby notified that you have received
this communication in error and that any review, disclosure, dissemination, distribution or copying of it or its 
contents
----- Original Message ----- 
From: "Lee, Michael" <mi...@logicacmg.com>
To: <ax...@ws.apache.org>
Sent: Thursday, November 09, 2006 8:54 AM
Subject: Axis2 HTTPS client error: Parser already accessed!



Problem:
 
  I am trying to use HTTPS for the client side of an Axis2 web-service.

  Running the service over HTTP works fine. I am currently configuring
the client
  use http by setting the targetEndPoint as 
  "https://localhost:8443/axis2/services/billing" in my client Stub
(generated using
  WSDL2Java).
 
  But when I try to use HTTPS,  an exception is thrown by the client.

  The error seems to be very similar to the bug (AXIS2-1380) where the
error was caused by
  calling a service through a proxy.  However I am not using a proxy.
 
  I am trying to determine if this is a problem with my code, with
Tomcat or with Axis2.
 
  Has anyone else come across this problem?


Platform:
 
    Java JDK 1.5.0_09
    Tomcat 5.5.17 (non-native mode) (cannot use native DDL with HTTPS
due to Tomcat bug)
    Axis2.0 version 1.0
    Windows XP SP2
 
Keystore and Tomcat configuration:
 
  I generated the keystore using the instructions on the Tomcat website 
  (http://tomcat.apache.org/tomcat-5.0-doc/ssl-howto.html)
 
  The command issued was:
 
    %JAVA_HOME%\bin\keytool -genkey -alias tomcat -keyalg RSA
 
    The generated keystore file was then copied to the Tomcat conf
directory.

The Tomcat server.xml was configured as follows:
 
    <Connector
        allowTrace="true"
        port="8443"
        scheme="https"
        keystoreFile="conf/.keystore"
        sslProtocol="TLS"
        maxSpareThreads="75"
        maxThreads="150"
        uRIEncoding="null"
        minSpareThreads="25"
        secure="true"
        clientAuth="false">
    </Connector>
 

Exception thrown by Axis2 client:
 
Refund In Transaction ID: TRANS912397548D
Exception in thread "main" xxx.xxx.xxx.xxx.xxx.billing.BillingException:
Problem refunding transaction Id: TRANS912397548D to service:
https://localhost:8443/axis2/services/billing
    at
xxx.xxx.xxx.xxx.xxx.billing.axis.AxisBillingService.refund(AxisBillingSe
rvice.java:133)
    at
xxx.xxx.xxx.xxx.xxx.billing.axis.TestAxisBillingService.refund(TestAxisB
illingService.java:46)
    at
xxx.xxx.xxx.xxx.xxx.billing.axis.TestAxisBillingService.main(TestAxisBil
lingService.java:107)
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!; 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(Common
sHTTPTransportSender.java:223)
    at org.apache.axis2.engine.AxisEngine.send(AxisEngine.java:589)
    at
org.apache.axis2.description.OutOnlyAxisOperationClient.execute(OutOnlyA
xisOperation.java:352)
    at
xxx.xxx.xxx.xxx.xxx.billing.axis.generated.BillingStub.refund(BillingStu
b.java:156)
    at
xxx.xxx.xxx.xxx.xxx.billing.axis.AxisBillingService.refund(AxisBillingSe
rvice.java:130)
    ... 2 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!; 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.writeMessageW
ithCommons(CommonsHTTPTransportSender.java:305)
    at
org.apache.axis2.transport.http.CommonsHTTPTransportSender.invoke(Common
sHTTPTransportSender.java:207)
    ... 6 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:194)
    at
org.apache.commons.httpclient.methods.EntityEnclosingMethod.writeRequest
Body(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(HttpMe
thodDirector.java:397)
    at
org.apache.commons.httpclient.HttpMethodDirector.executeMethod(HttpMetho
dDirector.java:170)
    at
org.apache.commons.httpclient.HttpClient.executeMethod(HttpClient.java:3
96)
    at
org.apache.commons.httpclient.HttpClient.executeMethod(HttpClient.java:3
46)
    at
org.apache.axis2.transport.http.AbstractHTTPSender.executeMethod(Abstrac
tHTTPSender.java:530)
    at
org.apache.axis2.transport.http.SOAPOverHTTPSender.send(SOAPOverHTTPSend
er.java:92)
    at
org.apache.axis2.transport.http.CommonsHTTPTransportSender.writeMessageW
ithCommons(CommonsHTTPTransportSender.java:299)
    ... 7 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:858)
    at
org.apache.axiom.om.impl.serialize.StreamingOMSerializer.serializeNode(S
treamingOMSerializer.java:71)
    at
org.apache.axiom.om.impl.serialize.StreamingOMSerializer.serialize(Strea
mingOMSerializer.java:56)
    at
org.apache.axiom.om.impl.util.OMSerializerUtil.serializeByPullStream(OMS
erializerUtil.java:315)
    at
org.apache.axiom.om.impl.llom.OMElementImpl.internalSerialize(OMElementI
mpl.java:790)
    at
org.apache.axiom.soap.impl.llom.SOAPEnvelopeImpl.internalSerialize(SOAPE
nvelopeImpl.java:171)
    at
org.apache.axiom.om.impl.llom.OMElementImpl.internalSerializeAndConsume(
OMElementImpl.java:809)
    at
org.apache.axiom.om.impl.llom.OMNodeImpl.serializeAndConsume(OMNodeImpl.
java:381)
    at
org.apache.axis2.transport.http.SOAPOverHTTPSender$AxisSOAPRequestEntity
.handleOMOutput(SOAPOverHTTPSender.java:145)
    at
org.apache.axis2.transport.http.SOAPOverHTTPSender$AxisSOAPRequestEntity
.writeRequest(SOAPOverHTTPSender.java:180)
    ... 17 more

 
Thanks

Mike


This e-mail and any attachment is for authorised use by the intended recipient(s) only. It may contain proprietary material, confidential information and/or be subject to legal privilege. It should not be copied, disclosed to, retained or used by, any other party. If you are not an intended recipient then please promptly delete this e-mail and any attachment and all copies and inform the sender. Thank you.

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