[
https://issues.apache.org/jira/browse/AXIS2-1914?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12463684
]
Mario Antollini commented on AXIS2-1914:
----------------------------------------
The problem might be that you are not adding a transport in the code. I had the
same problem than you and I solved it adding this:
EndpointReference targetEPR = new
EndpointReference("http://localhost:8080/axis2/services/HelloWorld");
ServiceClient client = new ServiceClient();
Options options = new Options();
TransportOutDescription tod = new TransportOutDescription(new
QName(Constants.TRANSPORT_HTTP));
tod.setSender(new CommonsHTTPTransportSender());
options.setTransportOut(tod);
options.setTo(targetEPR);
client.setOptions(options);
Hope it works.
Regards,
Mario
> Null Pointer Exception
> ----------------------
>
> Key: AXIS2-1914
> URL: https://issues.apache.org/jira/browse/AXIS2-1914
> Project: Apache Axis 2.0 (Axis2)
> Issue Type: Bug
> Affects Versions: nightly
> Environment: WIndows
> Reporter: new user
>
> Hi,
> I am trying to access a public webservice using client whose required APIs
> are generated using axis2 (2-1.1.1 nightly build)WSDL2java.
> NOTE: I know its a very common error that most of the people are
> experiencing, but I am not getting any concrete answer any were which says in
> simple language to follow some steps and the problem will be solved.
> Even the documentation provided is not very good.
> I need to get this resolved urgently otherwise I am thinking of usiing some
> other Open source webservice framework. Its very sad that lots of people are
> facing the same problem but nobody is answering properly.
> When I create the classes and access it in client and try to execute , I get
> the following error:
> java.lang.NullPointerException
> at
> org.apache.axis2.description.ClientUtils.inferInTransport(ClientUtils
> .java:85)
> at
> org.apache.axis2.description.OutInAxisOperationClient.execute(OutInAx
> isOperation.java:163)
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
https://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]