You are viewing a plain text version of this content. The canonical link for it is here.
Posted to java-dev@axis.apache.org by David Bueche <db...@yahoo.com> on 2007/05/15 20:56:39 UTC

JIRA Issue AXIS2-2593

Dims,

The class "org.apache.axis2.integration.UtilServer" is
not in the build, but you are using it to create the
ConfigurationContext in the following line:

ConfigurationContext configcontext =
UtilServer.createClientConfigurationContext();

Could you send or post a copy of this class so I can
see what I need to do to create the
ConfigurationContext correctly?

Also, is this the code you used to verify the fix? 
The variable "operationName" is used in various
places, but appears to be undefined.

Finally, I tried migrating the majority of your code
into mine (which instantiates the Stub created by
WSDL2Java), but I am running into the following
AxisFault:

	org.apache.axis2.AxisFault: To use two transport
channels you must use the WS-Addressing module.

The consolidated is shown below.  Please let me know
if you see anything I am doing wrong.

Thanks,
-David

=====================================================

MultiThreadedHttpConnectionManager connectionManager =
new MultiThreadedHttpConnectionManager();
HttpConnectionManagerParams connectionManagerParams =
new HttpConnectionManagerParams();

connectionManagerParams.setDefaultMaxConnectionsPerHost(1);
connectionManagerParams.setTcpNoDelay(true);
connectionManagerParams.setStaleCheckingEnabled(true);
connectionManagerParams.setLinger(0);
connectionManager.setParams(connectionManagerParams);

HttpClient httpClient = new
HttpClient(connectionManager);

configurationContext =
ConfigurationContextFactory.createConfigurationContextFromFileSystem(null,
null); configurationContext.setThreadPool(new
ThreadPool(1, 3));
configurationContext.setProperty(HTTPConstants.REUSE_HTTP_CLIENT,
Boolean.TRUE);
configurationContext.setProperty(HTTPConstants.CACHED_HTTP_CLIENT,
httpClient);

this.stub = new MyConsumerStub(configurationContext,
this.consumerUrl);

Options options =
this.stub._getServiceClient().getOptions();
// setting the endpoint appears unnecessary, since it
is already set EndpointReference targetEPR = new
EndpointReference(this.consumerUrl);
options.setTo(targetEPR);
options.setTransportInProtocol(Constants.TRANSPORT_HTTP);
options.setUseSeparateListener(true);
options.setAction("publishTargetDefinitions");
options.setTimeOutInMilliSeconds(TIMEOUT);
options.setProperty(HTTPConstants.CHUNKED,
Boolean.TRUE);
options.setProperty(HTTPConstants.SO_TIMEOUT,
TIMEOUT);
options.setProperty(HTTPConstants.CONNECTION_TIMEOUT,
TIMEOUT);
options.setProperty(HTTPConstants.REUSE_HTTP_CLIENT,
Boolean.TRUE);
options.setProperty(HTTPConstants.AUTO_RELEASE_CONNECTION,
Boolean.TRUE);

this.stub.performMyService(recordArray);




      ____________________________________________________________________________________
Park yourself in front of a world of choices in alternative vehicles. Visit the Yahoo! Auto Green Center.
http://autos.yahoo.com/green_center/ 

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


Re: JIRA Issue AXIS2-2593

Posted by Davanum Srinivas <da...@gmail.com>.
You can find them here -
https://svn.apache.org/repos/asf/webservices/axis2/trunk/java/modules/integration/test/org/apache/axis2/integration

I think you have to enable addressing module on your client.

thanks,
dims

On 5/15/07, David Bueche <db...@yahoo.com> wrote:
> Dims,
>
> The class "org.apache.axis2.integration.UtilServer" is
> not in the build, but you are using it to create the
> ConfigurationContext in the following line:
>
> ConfigurationContext configcontext =
> UtilServer.createClientConfigurationContext();
>
> Could you send or post a copy of this class so I can
> see what I need to do to create the
> ConfigurationContext correctly?
>
> Also, is this the code you used to verify the fix?
> The variable "operationName" is used in various
> places, but appears to be undefined.
>
> Finally, I tried migrating the majority of your code
> into mine (which instantiates the Stub created by
> WSDL2Java), but I am running into the following
> AxisFault:
>
>         org.apache.axis2.AxisFault: To use two transport
> channels you must use the WS-Addressing module.
>
> The consolidated is shown below.  Please let me know
> if you see anything I am doing wrong.
>
> Thanks,
> -David
>
> =====================================================
>
> MultiThreadedHttpConnectionManager connectionManager =
> new MultiThreadedHttpConnectionManager();
> HttpConnectionManagerParams connectionManagerParams =
> new HttpConnectionManagerParams();
>
> connectionManagerParams.setDefaultMaxConnectionsPerHost(1);
> connectionManagerParams.setTcpNoDelay(true);
> connectionManagerParams.setStaleCheckingEnabled(true);
> connectionManagerParams.setLinger(0);
> connectionManager.setParams(connectionManagerParams);
>
> HttpClient httpClient = new
> HttpClient(connectionManager);
>
> configurationContext =
> ConfigurationContextFactory.createConfigurationContextFromFileSystem(null,
> null); configurationContext.setThreadPool(new
> ThreadPool(1, 3));
> configurationContext.setProperty(HTTPConstants.REUSE_HTTP_CLIENT,
> Boolean.TRUE);
> configurationContext.setProperty(HTTPConstants.CACHED_HTTP_CLIENT,
> httpClient);
>
> this.stub = new MyConsumerStub(configurationContext,
> this.consumerUrl);
>
> Options options =
> this.stub._getServiceClient().getOptions();
> // setting the endpoint appears unnecessary, since it
> is already set EndpointReference targetEPR = new
> EndpointReference(this.consumerUrl);
> options.setTo(targetEPR);
> options.setTransportInProtocol(Constants.TRANSPORT_HTTP);
> options.setUseSeparateListener(true);
> options.setAction("publishTargetDefinitions");
> options.setTimeOutInMilliSeconds(TIMEOUT);
> options.setProperty(HTTPConstants.CHUNKED,
> Boolean.TRUE);
> options.setProperty(HTTPConstants.SO_TIMEOUT,
> TIMEOUT);
> options.setProperty(HTTPConstants.CONNECTION_TIMEOUT,
> TIMEOUT);
> options.setProperty(HTTPConstants.REUSE_HTTP_CLIENT,
> Boolean.TRUE);
> options.setProperty(HTTPConstants.AUTO_RELEASE_CONNECTION,
> Boolean.TRUE);
>
> this.stub.performMyService(recordArray);
>
>
>
>
>       ____________________________________________________________________________________
> Park yourself in front of a world of choices in alternative vehicles. Visit the Yahoo! Auto Green Center.
> http://autos.yahoo.com/green_center/
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: axis-dev-unsubscribe@ws.apache.org
> For additional commands, e-mail: axis-dev-help@ws.apache.org
>
>


-- 
Davanum Srinivas :: http://davanum.wordpress.com

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