axis-java-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From aashish <aashish...@yahoo.com>
Subject Re: [AXIS2] : Null Pointer Exception in Stub
Date Fri, 04 Feb 2011 18:39:28 GMT
hi Martin,
thanks..tried that, but this didn't work for me. :(
what is WS-Addressing and how do i enable/disable it ?



________________________________
From: Martin Gainty <mgainty@hotmail.com>
To: java-user@axis.apache.org
Cc: java-dev@axis.apache.org
Sent: Wed, 2 February, 2011 7:38:56 PM
Subject: RE: [AXIS2] : Null Pointer Exception in Stub

  <a name="TRANSPORT_URL"></a></p>
     * <p/>
     * 
<li><strong>org.apache.axis2.Constants.Configuration.TRANSPORT_URL</strong>
     * <p>Sometimes you want to send your SOAP message through a node, before it 
reaches to its destination. This means you want to give transport URL different 
from the URL of the ultimate destination. A typical example would be wanting to 
send this SOAP (or REST)message through a transparent proxy or through a message 
monitoring applet. How can that be done using the ServiceClient API?</p>
     * <pre>
     * options.setTo("http://destination.org");
     * options.setProperty(MessageContextConstants.TRANSPORT_URL, 
"http://myProxy.org");
     * 
This will send your SOAP message to "http://myProxy.org", but if WS-Addressing 
is enabled, wsa:To will contain "http://destination.org" as To address.
     * </li>

populate options.setTo and options.setProperty before referencing 
Martin Gainty 
______________________________________________ 
Jogi és Bizalmassági kinyilatkoztatás/Verzicht und Vertraulichkeitanmerkung/Note 
de déni et de confidentialité

 
Ez az üzenet bizalmas.  Ha nem ön az akinek szánva volt, akkor kérjük, hogy 
jelentse azt nekünk vissza. Semmiféle továbbítása vagy másolatának készítése nem

megengedett.  Ez az üzenet csak ismeret cserét szolgál és semmiféle jogi 
alkalmazhatósága sincs.  Mivel az electronikus üzenetek könnyen 
megváltoztathatóak, ezért minket semmi felelöség nem terhelhet ezen üzenet 
tartalma miatt.

Diese Nachricht ist vertraulich. Sollten Sie nicht der vorgesehene Empfaenger 
sein, so bitten wir hoeflich um eine Mitteilung. Jede unbefugte Weiterleitung 
oder Fertigung einer Kopie ist unzulaessig. Diese Nachricht dient lediglich dem 
Austausch von Informationen und entfaltet keine rechtliche Bindungswirkung. 
Aufgrund der leichten Manipulierbarkeit von E-Mails koennen wir keine Haftung 
fuer den Inhalt uebernehmen.

Ce message est confidentiel et peut être privilégié. Si vous n'êtes pas le 
destinataire prévu, nous te demandons avec bonté que pour satisfaire informez 
l'expéditeur. N'importe quelle diffusion non autorisée ou la copie de ceci est 
interdite. Ce message sert à l'information seulement et n'aura pas n'importe 
quel effet légalement obligatoire. Étant donné que les email peuvent facilement 
être sujets à la manipulation, nous ne pouvons accepter aucune responsabilité 
pour le contenu fourni.




________________________________
Date: Wed, 2 Feb 2011 19:14:46 +0530
From: aashishn86@yahoo.com
Subject: [AXIS2] : Null Pointer Exception in Stub
To: java-user@axis.apache.org
CC: java-dev@axis.apache.org


the TransportURI in the file ClientUtils.java in axis-kernel-1.5 is 
null ie:String transportURI = (String) msgctx.getProperty(Constants.Configuration.TRANSPORT_URL);
   



________________________________
From: aashish <aashishn86@yahoo.com>
To: java-user@axis.apache.org
Sent: Fri, 28 January, 2011 11:50:02 PM
Subject: [AXIS2] : Null Pointer Exception in Stub




hi all,
i get anull pointer exception at 
System.out.println("transport is 
"+_messageContext.getTransportOut().getSender().toString());
in my stub. (stub generated using Axis2  Code Generator plugin, by passing the 
WSDL)
and the error in System.Err is 
org.apache.axis2.AxisFault: The system cannot infer the transport

  
information from the 
 http://212.34.1.123:13000/Directory/services/ABCService URL.
[1/28/11 20:43:56:368 GMT+05:30] 00000021 SystemErr     R       at 
org.apache.axis2.description.ClientUtils.inferOutTransport 
(ClientUtils.java:82) 
[1/28/11 20:43:56:369 GMT+05:30] 00000021 SystemErr     R       at  
org.apache.axis2.client.OperationClient.prepareMessageCont 
ext(OperationClient.java:304) 
[1/28/11 20:43:56:369 GMT+05:30] 00000021 SystemErr     R       at 
org.apache.axis2.description.OutInAxisOperationClient.exec 
uteImpl(OutInAxisOperation.java:180) 
[1/28/11 20:43:56:369 GMT+05:30] 00000021 SystemErr     R       at 
org.apache.axis2.client.OperationClient.execute(OperationC 
lient.java:165) 


The transportOut is somehow being set to null.

However i can use the  same stub to call the same service from another 
application.
Some related threads :
http://old.nabble.com/-jira--Created:-(AXIS2-4244)-NullPointerException-in-generated-Stub.-td22119479.html



Any ideas ?
Thanks in advance


Mime
View raw message