Hi,

 

I have created a Stubs using ADB binding from .NET webservice wsdl.When
running the  client to access the webservice 

I got the error on "Unknown host exception".It looked like the client was
unable to go through the proxy to the webservice.The web service is outside
my client's network,hence using the proxy.

To resolve this problem I assumed that the stubs would be using the
axis2.xml file ,so I set the configurations in transport sender there. But
still the problem persisted as my java client is a standalone and not in a
J2EE app server. So I am trying to set the transport sender properties
dynamically in code. But now I get the following error:

 

og4j:WARN No appenders could be found for logger
(org.apache.axis2.description.AxisService).

log4j:WARN Please initialize the log4j system properly.

org.apache.axis2.AxisFault: Transport out has not been set

      at org.apache.axis2.engine.AxisEngine.send(AxisEngine.java:383)

      at
org.apache.axis2.description.OutInAxisOperationClient.send(OutInAxisOperatio
n.java:374)

      at
org.apache.axis2.description.OutInAxisOperationClient.executeImpl(OutInAxisO
peration.java:211)

      at
org.apache.axis2.client.OperationClient.execute(OperationClient.java:163)

      at
com.choicepoint.bixg.axis2.webservice.SearchAPI1Stub.CustomSearch(SearchAPI1
Stub.java:764)

      at com.choicepoint.bixg.axis2.client.Client.doInOnly(Client.java:64)

      at com.choicepoint.bixg.axis2.client.Client.main(Client.java:20)

 

 

Following is the  piece of code in stub which I am trying to set the
properties

 

public SearchAPI1Stub(org.apache.axis2.context.ConfigurationContext
configurationContext,

        java.lang.String targetEndpoint, boolean useSeparateListener)

        throws org.apache.axis2.AxisFault {

         //To populate AxisService

         populateAxisService();

         populateFaults();

 

        _serviceClient = new
org.apache.axis2.client.ServiceClient(configurationContext,_service);

        

            

        configurationContext =
_serviceClient.getServiceContext().getConfigurationContext();

 

        _serviceClient.getOptions().setTo(new
org.apache.axis2.addressing.EndpointReference(

                targetEndpoint));

 
_serviceClient.getOptions().setUseSeparateListener(useSeparateListener);

        

            //Set the soap version

 
_serviceClient.getOptions().setSoapVersionURI(org.apache.axiom.soap.SOAP12Co
nstants.SOAP_ENVELOPE_NAMESPACE_URI);

            

            //_serviceClient.getOptions().setSenderTransport(new
TransportOutDescription(new QName(Constants.TRANSPORT_HTTP)));

 
_serviceClient.getOptions().setProperty(HTTPConstants.HTTP_PROTOCOL_VERSION,
HTTPConstants.HEADER_PROTOCOL_11);

 

            HttpTransportProperties.ProxyProperties proxyProperties = new
HttpTransportProperties.ProxyProperties();

            proxyProperties.setProxyName("proxyname");

            proxyProperties.setProxyPort(proxyport);

            proxyProperties.setDomain("domain name");

            HttpTransportProperties.Authenticator

            auth = new HttpTransportProperties.Authenticator();

            auth.setUsername("username");

            auth.setPassword("password"); 

//          set if realm or domain is known

 
_serviceClient.getOptions().setProperty(org.apache.axis2.transport.http.HTTP
Constants.AUTHENTICATE, auth);

 
_serviceClient.getOptions().setProperty(HTTPConstants.PROXY,proxyProperties)
;

                

    }

Request help in figuring out this issue.

 

Thanks & Regards,

Ajeet Phansalkar


http://www.patni.com
World-Wide Partnerships. World-Class Solutions.
_____________________________________________________________________

This e-mail message may contain proprietary, confidential or legally
privileged information for the sole use of the person or entity to
whom this message was originally addressed. Any review, e-transmission
dissemination or other use of or taking of any action in reliance upon
this information by persons or entities other than the intended
recipient is prohibited. If you have received this e-mail in error
kindly delete  this e-mail from your records. If it appears that this
mail has been forwarded to you without proper authority, please notify
us immediately at [EMAIL PROTECTED] and delete this mail. 
_____________________________________________________________________

Reply via email to