axis-java-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Kevin Jin (JIRA)" <j...@apache.org>
Subject [jira] Commented: (AXIS2-1820) javax.xml.stream.XMLStreamException: problem accessing the parser when using NTLM and stubs generated by xmlbeans
Date Fri, 11 May 2007 19:02:15 GMT

    [ https://issues.apache.org/jira/browse/AXIS2-1820?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12495133
] 

Kevin Jin commented on AXIS2-1820:
----------------------------------

I have a silmilar situation using AXIS1.2, the client is generated using xmlbeans, I use Basic
Authentication. I had the same error. (Attached is my client code)

2007/05/11 14:57:21:806 EDT [DEBUG] HttpMethodDirector - Authorization required
2007/05/11 14:57:21:822 EDT [DEBUG] AuthChallengeProcessor - Supported authentication schemes
in the order of preference: [ntlm, digest, basic]
2007/05/11 14:57:21:822 EDT [DEBUG] AuthChallengeProcessor - Challenge for ntlm authentication
scheme not available
2007/05/11 14:57:21:822 EDT [DEBUG] AuthChallengeProcessor - Challenge for digest authentication
scheme not available
2007/05/11 14:57:21:822 EDT [INFO] AuthChallengeProcessor - basic authentication scheme selected
2007/05/11 14:57:21:822 EDT [DEBUG] AuthChallengeProcessor - Using authentication scheme:
basic
2007/05/11 14:57:21:822 EDT [DEBUG] AuthChallengeProcessor - Authorization challenge processed
2007/05/11 14:57:21:822 EDT [DEBUG] HttpMethodDirector - Authentication scope: BASIC 'Tomcat
Container Management'@pvtwxpg36487.tch.harvard.edu:7777
2007/05/11 14:57:21:822 EDT [DEBUG] HttpMethodDirector - Retry authentication
2007/05/11 14:57:21:822 EDT [DEBUG] content - << "<html><head><title>Apache
Tomcat/6.0.10 - Error report</title><style><!--H1 {font-family:Tahoma,Arial,sans-serif;color:white;background-color:#525D76;font-size:22px;}
H2 {font-family:Tahoma,Arial,sans-serif;color:white;background-color:#525D76;font-size:16px;}
H3 {font-family:Tahoma,Arial,sans-serif;color:white;background-color:#525D76;font-size:14px;}
BODY {font-family:Tahoma,Arial,sans-serif;color:black;background-color:white;} B {font-family:Tahoma,Arial,sans-serif;color:white;background-color:#525D76;}
P {font-family:Tahoma,Arial,sans-serif;background:white;color:black;font-size:12px;}A {color
: black;}A.name {color : black;}HR {color : #525D76;}--></style> </head><body><h1>HTTP
Status 401 - </h1><HR size="1" noshade="noshade"><p><b>type</b>
Status report</p><p><b>message</b> <u></u></p><p><b>description</b>
<u>This request requires HTTP authentication ().</u></p><HR size="1"
noshade="noshade"><h3>Apache Tomcat/6.0.10</h3></body></html>"
2007/05/11 14:57:21:822 EDT [DEBUG] HttpMethodBase - Resorting to protocol version default
close connection policy
2007/05/11 14:57:21:822 EDT [DEBUG] HttpMethodBase - Should NOT close connection, using HTTP/1.1
2007/05/11 14:57:21:822 EDT [DEBUG] HttpConnection - Connection is locked.  Call to releaseConnection()
ignored.
2007/05/11 14:57:21:822 EDT [DEBUG] HttpMethodDirector - Authenticating with BASIC 'Tomcat
Container Management'@pvtwxpg36487.tch.harvard.edu:7777
2007/05/11 14:57:21:822 EDT [DEBUG] HttpMethodParams - Credential charset not configured,
using HTTP element charset
2007/05/11 14:57:21:822 EDT [DEBUG] header - >> "POST /axis2/services/PagerService HTTP/1.1[\r][\n]"
2007/05/11 14:57:21:822 EDT [DEBUG] HttpMethodBase - Adding Host request header
2007/05/11 14:57:21:822 EDT [DEBUG] header - >> "Content-Type: text/xml; charset=UTF-8[\r][\n]"
2007/05/11 14:57:21:822 EDT [DEBUG] header - >> "SOAPAction: "urn:sendPage"[\r][\n]"
2007/05/11 14:57:21:822 EDT [DEBUG] header - >> "User-Agent: Axis2[\r][\n]"
2007/05/11 14:57:21:838 EDT [DEBUG] header - >> "Transfer-Encoding: chunked[\r][\n]"
2007/05/11 14:57:21:838 EDT [DEBUG] header - >> "Authorization: Basic dHlsZXI6YXhpczI=[\r][\n]"
2007/05/11 14:57:21:838 EDT [DEBUG] header - >> "Host: pvtwxpg36487.tch.harvard.edu:7777[\r][\n]"
2007/05/11 14:57:21:838 EDT [DEBUG] header - >> "[\r][\n]"
2007/05/11 14:57:21:838 EDT [DEBUG] StAXUtils - XMLStreamWriter is com.ctc.wstx.sw.SimpleNsStreamWriter
2007/05/11 14:57:21:838 EDT [DEBUG] HttpMethodDirector - Closing the connection.
2007/05/11 14:57:21:838 EDT [DEBUG] HttpMethodDirector - Method retry handler returned false.
Automatic recovery will not be attempted
2007/05/11 14:57:21:838 EDT [DEBUG] HttpConnection - Releasing connection back to connection
manager.
2007/05/11 14:57:21:838 EDT [DEBUG] CommonsHTTPTransportSender - org.apache.axis2.AxisFault:
problem accessing the parser. Parser already accessed!
2007/05/11 14:57:21:838 EDT [DEBUG] CommonsHTTPTransportSender - org.apache.axis2.AxisFault:
problem accessing the parser. Parser already accessed!
2007/05/11 14:57:21:838 EDT [DEBUG] Phase - [MessageContext: logID=urn:uuid:16627E6921A4F68EE11178909841423]
Invoking flowComplete() in Phase "Security"
2007/05/11 14:57:21:838 EDT [DEBUG] Phase - [MessageContext: logID=urn:uuid:16627E6921A4F68EE11178909841423]
Invoking flowComplete() in Phase "MessageOut"
2007/05/11 14:57:21:838 EDT [DEBUG] Phase - [MessageContext: logID=urn:uuid:16627E6921A4F68EE11178909841423]
Invoking flowComplete() in Phase "PolicyDetermination"
2007/05/11 14:57:21:838 EDT [DEBUG] Phase - [MessageContext: logID=urn:uuid:16627E6921A4F68EE11178909841423]
Invoking flowComplete() in Phase "OperationOutPhase"
org.apache.axis2.AxisFault: problem accessing the parser. Parser already accessed!
	at org.apache.axis2.transport.http.CommonsHTTPTransportSender.invoke(CommonsHTTPTransportSender.java:221)
	at org.apache.axis2.engine.AxisEngine.send(AxisEngine.java:452)
	at org.apache.axis2.description.OutInAxisOperationClient.send(OutInAxisOperation.java:330)
	at org.apache.axis2.description.OutInAxisOperationClient.execute(OutInAxisOperation.java:294)
	at org.chboston.ws.pager.client.PagerServiceStub.sendPage(PagerServiceStub.java:117)
	at org.chboston.ws.pager.client.SendPageClient.sendPage(SendPageClient.java:67)
	at org.chboston.ws.pager.client.SendPageClient.main(SendPageClient.java:85)
Caused by: org.apache.axis2.AxisFault: problem accessing the parser. Parser already accessed!
	at org.apache.axis2.transport.http.CommonsHTTPTransportSender.writeMessageWithCommons(CommonsHTTPTransportSender.java:314)
	at org.apache.axis2.transport.http.CommonsHTTPTransportSender.invoke(CommonsHTTPTransportSender.java:201)
	... 6 more
Caused by: org.apache.axis2.AxisFault: problem accessing the parser. Parser already accessed!
	at org.apache.axis2.transport.http.HTTPSender.sendViaPost(HTTPSender.java:179)
	at org.apache.axis2.transport.http.HTTPSender.send(HTTPSender.java:73)
	at org.apache.axis2.transport.http.CommonsHTTPTransportSender.writeMessageWithCommons(CommonsHTTPTransportSender.java:305)
	... 7 more
Caused by: org.apache.axis2.AxisFault: problem accessing the parser. Parser already accessed!
	at org.apache.axis2.transport.http.AxisRequestEntity.writeRequest(AxisRequestEntity.java:98)
	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:558)
	at org.apache.axis2.transport.http.HTTPSender.sendViaPost(HTTPSender.java:176)
	... 9 more
Caused by: org.apache.axis2.AxisFault: problem accessing the parser. Parser already accessed!
	at org.apache.axis2.transport.http.SOAPMessageFormatter.writeTo(SOAPMessageFormatter.java:59)
	at org.apache.axis2.transport.http.AxisRequestEntity.writeRequest(AxisRequestEntity.java:84)
	... 18 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:883)
	at org.apache.axiom.om.impl.serialize.StreamingOMSerializer.serializeNode(StreamingOMSerializer.java:69)
	at org.apache.axiom.om.impl.serialize.StreamingOMSerializer.serialize(StreamingOMSerializer.java:54)
	at org.apache.axiom.om.impl.util.OMSerializerUtil.serializeByPullStream(OMSerializerUtil.java:490)
	at org.apache.axiom.om.impl.llom.OMElementImpl.internalSerialize(OMElementImpl.java:783)
	at org.apache.axiom.om.impl.llom.OMElementImpl.internalSerializeAndConsume(OMElementImpl.java:808)
	at org.apache.axiom.soap.impl.llom.SOAPEnvelopeImpl.serializeInternally(SOAPEnvelopeImpl.java:234)
	at org.apache.axiom.soap.impl.llom.SOAPEnvelopeImpl.internalSerialize(SOAPEnvelopeImpl.java:222)
	at org.apache.axiom.om.impl.llom.OMElementImpl.internalSerializeAndConsume(OMElementImpl.java:808)
	at org.apache.axiom.om.impl.llom.OMNodeImpl.serializeAndConsume(OMNodeImpl.java:418)
	at org.apache.axis2.transport.http.SOAPMessageFormatter.writeTo(SOAPMessageFormatter.java:55)
	... 19 more


> javax.xml.stream.XMLStreamException: problem accessing the parser when using NTLM and
stubs generated by xmlbeans
> -----------------------------------------------------------------------------------------------------------------
>
>                 Key: AXIS2-1820
>                 URL: https://issues.apache.org/jira/browse/AXIS2-1820
>             Project: Axis 2.0 (Axis2)
>          Issue Type: Bug
>    Affects Versions: 1.1
>         Environment: jdk 1.5.0_8. Windows xp servicepack 2
>            Reporter: Tor Jonsson
>         Assigned To: Deepal Jayasinghe
>            Priority: Critical
>         Attachments: SendPageClient.java
>
>
> When generating a java client with xmlbeans NTLM authentication breaks:
> WSDL (Test.wsdl):
> <?xml version="1.0" encoding="UTF-8"?>
> <wsdl:definitions xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/" xmlns:tns="http://www.example.org/Test/"
xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/" xmlns:xsd="http://www.w3.org/2001/XMLSchema"
name="Test" targetNamespace="http://www.example.org/Test/">
> <wsdl:types>
> <xsd:schema targetNamespace="http://www.example.org/Test/">
> <xsd:element name="NewOperation">
> <xsd:complexType>
> <xsd:sequence>
> <xsd:element name="in" type="xsd:string"/>
> </xsd:sequence>
> </xsd:complexType>
> </xsd:element>
> <xsd:element name="NewOperationResponse">
> <xsd:complexType>
> <xsd:sequence>
> <xsd:element name="out" type="xsd:string"/>
> </xsd:sequence>
> </xsd:complexType>
> </xsd:element>
> </xsd:schema>
> </wsdl:types>
> <wsdl:message name="NewOperationRequest">
> <wsdl:part element="tns:NewOperation" name="parameters"/>
> </wsdl:message>
> <wsdl:message name="NewOperationResponse">
> <wsdl:part element="tns:NewOperationResponse" name="parameters"/>
> </wsdl:message>
> <wsdl:portType name="Test">
> <wsdl:operation name="NewOperation">
> <wsdl:input message="tns:NewOperationRequest"/>
> <wsdl:output message="tns:NewOperationResponse"/>
> </wsdl:operation>
> </wsdl:portType>
> <wsdl:binding name="TestSOAP" type="tns:Test">
> <soap:binding style="document" transport="http://schemas.xmlsoap.org/soap/http"/>
> <wsdl:operation name="NewOperation">
> <soap:operation soapAction="http://www.example.org/Test/NewOperation"/>
> <wsdl:input>
> <soap:body use="literal"/>
> </wsdl:input>
> <wsdl:output>
> <soap:body use="literal"/>
> </wsdl:output>
> </wsdl:operation>
> </wsdl:binding>
> <wsdl:service name="Test">
> <wsdl:port binding="tns:TestSOAP" name="TestSOAP">
> <soap:address location="http://www.host.com/Services.asmx"/>
> </wsdl:port>
> </wsdl:service>
> </wsdl:definitions>
> Command to generate Java cllient stubs:
> wsdl2java -uri Test.wsdl -d xmlbeans
> ClientTest.java
> package com.volvo.ums.test;
> import java.rmi.RemoteException;
> import java.util.ArrayList;
> import java.util.List;
> import org.apache.axis2.client.Options;
> import org.apache.axis2.transport.http.HTTPConstants;
> import org.apache.axis2.transport.http.HttpTransportProperties;
> import org.example.www.test.NewOperationDocument;
> import org.example.www.test.NewOperationResponseDocument;
> import org.example.www.test.TestStub;
> import org.example.www.test.NewOperationDocument.NewOperation;
> public class ClientTest {
> 	public static void main(String[] args) {
> 		ClientTest cli = new ClientTest();
> 		
> 		try {
> 			cli.doTest();
> 		} catch (RemoteException e) {
> 			e.printStackTrace();
> 		}
> 	}
> 	public void doTest( )throws RemoteException
> 	{
> 		TestStub stub = new TestStub( "http://www.host.com/Services.asmx" );
> 		Options opts = stub._getServiceClient().getOptions();
> 		HttpTransportProperties.Authenticator auth = getAuthProperties();
> 		opts.setProperty(HTTPConstants.AUTHENTICATE, auth );
> 		NewOperationDocument doc = NewOperationDocument.Factory.newInstance();
> 		NewOperation operation = doc.addNewNewOperation();
> 		operation.setIn( "Hello" );
> 		NewOperationResponseDocument resp = stub.NewOperation( doc );
> 	}
> 	/**
> 	 * generates the properties needed for NTLM authentication 
> 	 * 
> 	 */
> 	public HttpTransportProperties.Authenticator getAuthProperties()
> 	{
> 		HttpTransportProperties.Authenticator auth = new HttpTransportProperties.Authenticator();
> 		List<String> l = new ArrayList<String>();
> 		l.add( HttpTransportProperties.Authenticator.NTLM );
> 		auth.setAuthSchemes(l);
> 		auth.setUsername( "username" );
> 		auth.setPassword("password");
> 		auth.setDomain( "domain" );
> 		auth.setHost( "www.host.com" );
> 		auth.setPort( 80 );
> 		return auth;
> 	}
> }
> StackTrace:
> 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:225)
> 	at org.apache.axis2.engine.AxisEngine.send(AxisEngine.java:670)
> 	at org.apache.axis2.description.OutInAxisOperationClient.send(OutInAxisOperation.java:365)
> 	at org.apache.axis2.description.OutInAxisOperationClient.execute(OutInAxisOperation.java:295)
> 	at org.example.www.test.TestStub.NewOperation(TestStub.java:141)
> 	at com.volvo.ums.test.ClientTest.doTest(ClientTest.java:86)
> 	at com.volvo.ums.test.ClientTest.main(ClientTest.java:28)
> 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:340)
> 	at org.apache.axis2.transport.http.CommonsHTTPTransportSender.invoke(CommonsHTTPTransportSender.java:205)
> 	... 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:246)
> 	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:534)
> 	at org.apache.axis2.transport.http.SOAPOverHTTPSender.send(SOAPOverHTTPSender.java:119)
> 	at org.apache.axis2.transport.http.CommonsHTTPTransportSender.writeMessageWithCommons(CommonsHTTPTransportSender.java:334)
> 	... 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: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:812)
> 	at org.apache.axiom.om.impl.llom.OMElementImpl.internalSerializeAndConsume(OMElementImpl.java:837)
> 	at org.apache.axiom.om.impl.llom.OMElementImpl.internalSerialize(OMElementImpl.java:808)
> 	at org.apache.axiom.soap.impl.llom.SOAPEnvelopeImpl.internalSerialize(SOAPEnvelopeImpl.java:177)
> 	at org.apache.axiom.om.impl.llom.OMElementImpl.internalSerializeAndConsume(OMElementImpl.java:837)
> 	at org.apache.axiom.om.impl.llom.OMNodeImpl.serializeAndConsume(OMNodeImpl.java:411)
> 	at org.apache.axis2.transport.http.SOAPOverHTTPSender$AxisSOAPRequestEntity.handleOMOutput(SOAPOverHTTPSender.java:190)
> 	at org.apache.axis2.transport.http.SOAPOverHTTPSender$AxisSOAPRequestEntity.writeRequest(SOAPOverHTTPSender.java:232)
> 	... 17 more

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


---------------------------------------------------------------------
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