You are viewing a plain text version of this content. The canonical link for it is here.
Posted to java-user@axis.apache.org by aashish <aa...@yahoo.com> on 2011/02/02 14:44:46 UTC

[AXIS2] : Null Pointer Exception in Stub

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 <aa...@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


RE: AW: [AXIS2] : SSL implementaion not available

Posted by Martin Gainty <mg...@hotmail.com>.
your axis service needs to engage Rampart module
full implementation details  for securing axis services and generating secure client stubs available at

http://axis.apache.org/axis2/java/rampart/


Martin Gainty 
______________________________________________ 
Verzicht und Vertraulichkeitanmerkung/Note de déni et de confidentialité

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: Sun, 13 Feb 2011 12:40:28 +0530
From: aashishn86@yahoo.com
Subject: Re: AW: [AXIS2] : SSL implementaion not available
To: java-user@axis.apache.org






The call doesnt' leave the stub. The exception is at the stub end.




From: aashish <aa...@yahoo.com>
To: java-user@axis.apache.org
Sent: Fri, 11 February, 2011 12:12:31 AM
Subject: Re: AW: [AXIS2] : SSL implementaion not available



Hi Josef
How do i check if my server can accept those requests. I have tried to enable it to do so.
The endpoint is calling the https port of the server. I'll see if the call leaves the client using tcpmon.
Thanks




From: Stadelmann Josef <jo...@axa-winterthur.ch>
To: java-user@axis.apache.org
Sent: Thu, 10 February, 2011 2:11:12 PM
Subject: AW: [AXIS2] : SSL implementaion not available





Can your server really accept HTTPS requests? How is your End Point defined? Which port is your endpoint calling? 8080 or … the one where SSL requests are expected? If your server is not configured to understand SSL, but your client sends an encrypted request to the SSL port at the server, the server may very likely react as you describe it. So what about monitoring the traffic using TCPMON or WIRESHARK, (never used TCPMON it with SSL).
Josef
 


Von: aashish [mailto:aashishn86@yahoo.com] 
Gesendet: Mittwoch, 9. Februar 2011 18:23
An: java-user@axis.apache.org
Betreff: [AXIS2] : SSL implementaion not available
 


While trying to enable SSL at http level , from client to server i get the following error:

 

org.apache.axis2.AxisFault: SSL implementation not available 
        at org.apache.axis2.AxisFault.makeFault(AxisFault.java:430) 
        at org.apache.axis2.transport.http.HTTPSender.sendViaPost(HTTPSender.java:193) 
        at org.apache.axis2.transport.http.HTTPSender.send(HTTPSender.java:75) 
        at org.apache.axis2.transport.http.CommonsHTTPTransportSender.writeMessageWithCommons(CommonsHTTPTransportSender.java 
:389) 
        at org.apache.axis2.transport.http.CommonsHTTPTransportSender.invoke(CommonsHTTPTransportSender.java:222) 
        at org.apache.axis2.engine.AxisEngine.send(AxisEngine.java:435) 
        at org.apache.axis2.description.OutInAxisOperationClient.send(OutInAxisOperation.java:402) 
        at org.apache.axis2.description.OutInAxisOperationClient.executeImpl(OutInAxisOperation.java:229) 
        at org.apache.axis2.client.OperationClient.execute(OperationClient.java:165) 





 
any clues ? 
 



 		 	   		  

Re: AW: [AXIS2] : SSL implementaion not available

Posted by aashish <aa...@yahoo.com>.
The call doesnt' leave the stub. The exception is at the stub end.



________________________________
From: aashish <aa...@yahoo.com>
To: java-user@axis.apache.org
Sent: Fri, 11 February, 2011 12:12:31 AM
Subject: Re: AW: [AXIS2] : SSL implementaion not available


Hi Josef
How do i check if my server can accept those requests. I have tried to enable it 
to do so.
The endpoint is calling the https port of the server. I'll see if the call 
leaves the client using tcpmon.
Thanks



________________________________
From: Stadelmann Josef <jo...@axa-winterthur.ch>
To: java-user@axis.apache.org
Sent: Thu, 10 February, 2011 2:11:12 PM
Subject: AW: [AXIS2] : SSL implementaion not available


Can your server really accept HTTPS requests? How is your End Point defined? 
Which port is your endpoint calling? 8080 or … the one where SSL requests are 
expected? If your server is not configured to understand SSL, but your client 
sends an encrypted request to the SSL port at the server, the server may very 
likely react as you describe it. So what about monitoring the traffic using 
TCPMON or WIRESHARK, (never used TCPMON it with SSL).
Josef
 
Von:aashish [mailto:aashishn86@yahoo.com] 
Gesendet: Mittwoch, 9. Februar 2011 18:23
An: java-user@axis.apache.org
Betreff: [AXIS2] : SSL implementaion not available
 
While trying to enable SSL at http level , from client to server i get the 
following error:
 
org.apache.axis2.AxisFault: SSL implementation not available 
        at org.apache.axis2.AxisFault.makeFault(AxisFault.java:430) 
        at 
org.apache.axis2.transport.http.HTTPSender.sendViaPost(HTTPSender.java:193) 
        at org.apache.axis2.transport.http.HTTPSender.send(HTTPSender.java:75) 
        at 
org.apache.axis2.transport.http.CommonsHTTPTransportSender.writeMessageWithCommons(CommonsHTTPTransportSender.java 

:389) 
        at 
org.apache.axis2.transport.http.CommonsHTTPTransportSender.invoke(CommonsHTTPTransportSender.java:222) 

        at org.apache.axis2.engine.AxisEngine.send(AxisEngine.java:435) 
        at 
org.apache.axis2.description.OutInAxisOperationClient.send(OutInAxisOperation.java:402) 

        at  
org.apache.axis2.description.OutInAxisOperationClient.executeImpl(OutInAxisOperation.java:229) 

        at 
org.apache.axis2.client.OperationClient.execute(OperationClient.java:165) 
 
any clues ? 


Re: AW: [AXIS2] : SSL implementaion not available

Posted by aashish <aa...@yahoo.com>.
Hi Josef
How do i check if my server can accept those requests. I have tried to enable it 
to do so.
The endpoint is calling the https port of the server. I'll see if the call 
leaves the client using tcpmon.
Thanks



________________________________
From: Stadelmann Josef <jo...@axa-winterthur.ch>
To: java-user@axis.apache.org
Sent: Thu, 10 February, 2011 2:11:12 PM
Subject: AW: [AXIS2] : SSL implementaion not available


Can your server really accept HTTPS requests? How is your End Point defined? 
Which port is your endpoint calling? 8080 or … the one where SSL requests are 
expected? If your server is not configured to understand SSL, but your client 
sends an encrypted request to the SSL port at the server, the server may very 
likely react as you describe it. So what about monitoring the traffic using 
TCPMON or WIRESHARK, (never used TCPMON it with SSL).
Josef
 
Von:aashish [mailto:aashishn86@yahoo.com] 
Gesendet: Mittwoch, 9. Februar 2011 18:23
An: java-user@axis.apache.org
Betreff: [AXIS2] : SSL implementaion not available
 
While trying to enable SSL at http level , from client to server i get the 
following error:
 
org.apache.axis2.AxisFault: SSL implementation not available 
        at org.apache.axis2.AxisFault.makeFault(AxisFault.java:430) 
        at 
org.apache.axis2.transport.http.HTTPSender.sendViaPost(HTTPSender.java:193) 
        at org.apache.axis2.transport.http.HTTPSender.send(HTTPSender.java:75) 
        at 
org.apache.axis2.transport.http.CommonsHTTPTransportSender.writeMessageWithCommons(CommonsHTTPTransportSender.java 

:389) 
        at 
org.apache.axis2.transport.http.CommonsHTTPTransportSender.invoke(CommonsHTTPTransportSender.java:222) 

        at org.apache.axis2.engine.AxisEngine.send(AxisEngine.java:435) 
        at 
org.apache.axis2.description.OutInAxisOperationClient.send(OutInAxisOperation.java:402) 

        at 
org.apache.axis2.description.OutInAxisOperationClient.executeImpl(OutInAxisOperation.java:229) 

        at 
org.apache.axis2.client.OperationClient.execute(OperationClient.java:165) 
 
any clues ? 


AW: [AXIS2] : SSL implementaion not available

Posted by Stadelmann Josef <jo...@axa-winterthur.ch>.
Can your server really accept HTTPS requests? How is your End Point defined? Which port is your endpoint calling? 8080 or … the one where SSL requests are expected? If your server is not configured to understand SSL, but your client sends an encrypted request to the SSL port at the server, the server may very likely react as you describe it. So what about monitoring the traffic using TCPMON or WIRESHARK, (never used TCPMON it with SSL).

Josef

 

Von: aashish [mailto:aashishn86@yahoo.com] 
Gesendet: Mittwoch, 9. Februar 2011 18:23
An: java-user@axis.apache.org
Betreff: [AXIS2] : SSL implementaion not available

 

While trying to enable SSL at http level , from client to server i get the following error:

 

org.apache.axis2.AxisFault: SSL implementation not available 
        at org.apache.axis2.AxisFault.makeFault(AxisFault.java:430) 
        at org.apache.axis2.transport.http.HTTPSender.sendViaPost(HTTPSender.java:193) 
        at org.apache.axis2.transport.http.HTTPSender.send(HTTPSender.java:75) 
        at org.apache.axis2.transport.http.CommonsHTTPTransportSender.writeMessageWithCommons(CommonsHTTPTransportSender.java 
:389) 
        at org.apache.axis2.transport.http.CommonsHTTPTransportSender.invoke(CommonsHTTPTransportSender.java:222) 
        at org.apache.axis2.engine.AxisEngine.send(AxisEngine.java:435) 
        at org.apache.axis2.description.OutInAxisOperationClient.send(OutInAxisOperation.java:402) 
        at org.apache.axis2.description.OutInAxisOperationClient.executeImpl(OutInAxisOperation.java:229) 
        at org.apache.axis2.client.OperationClient.execute(OperationClient.java:165) 

 

any clues ? 

 


[AXIS2] : SSL implementaion not available

Posted by aashish <aa...@yahoo.com>.
While trying to enable SSL at http level , from client to server i get the 
following error:

org.apache.axis2.AxisFault: SSL implementation not available 
        at org.apache.axis2.AxisFault.makeFault(AxisFault.java:430) 
        at 
org.apache.axis2.transport.http.HTTPSender.sendViaPost(HTTPSender.java:193) 
        at org.apache.axis2.transport.http.HTTPSender.send(HTTPSender.java:75) 
        at 
org.apache.axis2.transport.http.CommonsHTTPTransportSender.writeMessageWithCommons(CommonsHTTPTransportSender.java 

:389) 
        at 
org.apache.axis2.transport.http.CommonsHTTPTransportSender.invoke(CommonsHTTPTransportSender.java:222) 

        at org.apache.axis2.engine.AxisEngine.send(AxisEngine.java:435) 
        at 
org.apache.axis2.description.OutInAxisOperationClient.send(OutInAxisOperation.java:402) 

        at 
org.apache.axis2.description.OutInAxisOperationClient.executeImpl(OutInAxisOperation.java:229) 

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

any clues ?


Re: [AXIS2] Redirecting a response from axis2 handler to client

Posted by Deepal jayasinghe <de...@gmail.com>.
If you throw an exception with the reason from your handler, then client
should get a SOAP fault with that fault message. Or else you can create
a Faulty message and send it to the client, I cloud not find a specific
document to explain it, but if you have access to code most
MessageReceivers do this.

Deepal
> Thank you Deepal, but how can I access that at the client side? I did
> this earlier but I could not get meaningful data from that. Like I
> want to abort and also deliver some specific integer value like 5 in
> response to the client.As I want to add something extra as well like
> my custom message in response too. I don't know how to get a specific
> value for example some string or integer value.
> When I use the following code I can't get that specific values.
>
> ServiceClient sc = new ServiceClient();
>  
>         OperationClient opClient = sc.createClient(
>                 ServiceClient.ANON_OUT_IN_OP);
>         //creating message context
>         MessageContext outMsgCtx = new MessageContext();
>         //assigning message context's option object into instance
> variable
>         Options opts = outMsgCtx.getOptions();
>         //setting properties into option
>         opts.setTo(new EndpointReference(
>                 "http://127.0.0.1:8000/axis2/services/MyService"));
>         opts.setAction("urn:echo");
>         outMsgCtx.setEnvelope(creatSOAPEnvelop());
>  
>         opClient.addMessageContext(outMsgCtx);
>  
>         //pass message label as method argument
>         MessageContext inMsgtCtx = opClient.getMessageContext("In");
>         SOAPEnvelope response = inMsgtCtx.getEnvelope();
>
> Regards,
>
> sardar hussain
>
> --- On *Fri, 4/2/11, Deepal Jayasinghe /<de...@opensource.lk>/* wrote:
>
>
>     From: Deepal Jayasinghe <de...@opensource.lk>
>     Subject: Re: [AXIS2] Redirecting a response from axis2 handler to
>     client
>     To: java-user@axis.apache.org
>     Date: Friday, 4 February, 2011, 18:53
>
>     You can simply throw an exception inside your handler, or you can
>     return Invocation.ABORT as the return value
>
>     Deepal
>
>>     Hi,
>>
>>     I have a custom module deployed on *axis2* server side. While the
>>     client  request goes to that *handler* in an inflow, i want it
>>     should create one error response in that *handler* and send back
>>     to client without doing any further processing or forwarding the
>>     client request to the Web Service. How can I achieve this, any
>>     clue or tutorial please?
>>
>>     Regards,
>>
>>     Sardar Hussain
>>
>>
>


Re: [AXIS2] Redirecting a response from axis2 handler to client

Posted by Sardar Hussain <sa...@yahoo.com>.
Thank you Deepal, but how can I access that at the client side? I did this earlier but I could not get meaningful data from that. Like I want to abort and also deliver some specific integer value like 5 in response to the client.As I want to add something extra as well like my custom message in response too. I don't know how to get a specific value for example some string or integer value. 
When I use the following code I can't get that specific values.

ServiceClient sc = new ServiceClient();
 
        OperationClient opClient = sc.createClient(
                ServiceClient.ANON_OUT_IN_OP);
        //creating message context
        MessageContext outMsgCtx = new MessageContext();
        //assigning message context's option object into instance variable
        Options opts = outMsgCtx.getOptions();
        //setting properties into option
        opts.setTo(new EndpointReference(
                "http://127.0.0.1:8000/axis2/services/MyService"));
        opts.setAction("urn:echo");
        outMsgCtx.setEnvelope(creatSOAPEnvelop());
 
        opClient.addMessageContext(outMsgCtx);
 
        //pass message label as method argument
        MessageContext inMsgtCtx = opClient.getMessageContext("In");
        SOAPEnvelope response = inMsgtCtx.getEnvelope();

Regards,

sardar hussain

--- On Fri, 4/2/11, Deepal Jayasinghe <de...@opensource.lk> wrote:

From: Deepal Jayasinghe <de...@opensource.lk>
Subject: Re: [AXIS2] Redirecting a response from axis2 handler to client
To: java-user@axis.apache.org
Date: Friday, 4 February, 2011, 18:53



  

    
  You can simply throw an exception inside your handler, or you can
    return Invocation.ABORT as the return value

    

    Deepal

    

    
      
        
          
            Hi,

              

              I have a custom module deployed on axis2
              server side. While the client  request goes to that handler in an inflow, i want it should create
              one error response in that handler and
              send back to client without doing any further processing
              or forwarding the client request to the Web Service. How
              can I achieve this, any clue or tutorial please?

              

              Regards,

              

              Sardar Hussain

            
          
        
      
      

    
  



      

Re: [AXIS2] Redirecting a response from axis2 handler to client

Posted by Deepal Jayasinghe <de...@opensource.lk>.
You can simply throw an exception inside your handler, or you can return
Invocation.ABORT as the return value

Deepal

> Hi,
>
> I have a custom module deployed on *axis2* server side. While the
> client  request goes to that *handler* in an inflow, i want it should
> create one error response in that *handler* and send back to client
> without doing any further processing or forwarding the client request
> to the Web Service. How can I achieve this, any clue or tutorial please?
>
> Regards,
>
> Sardar Hussain
>
>

[AXIS2] Redirecting a response from axis2 handler to client

Posted by Sardar Hussain <sa...@yahoo.com>.
Hi,

I have a custom module deployed on axis2 server side. While the client  request goes to that handler in an inflow, i want it should create one error response in that handler
 and send back to client without doing any further processing or forwarding the client request to the Web Service. How can I achieve this, any clue or tutorial please?



  Regards,

Sardar Hussain



      

[AXIS2] Redirecting a response from axis2 handler to client

Posted by Sardar Hussain <sa...@yahoo.com>.
Hi,

I have a custom module deployed on axis2 server side. While the client  request goes to that handler in an inflow, i want it should create one error response in that handler
 and send back to client without doing any further processing or forwarding the client request to the Web Service. How can I achieve this, any clue or tutorial please?



  Regards,

Sardar Hussain



      

Re: [AXIS2] : Null Pointer Exception in Stub

Posted by aashish <aa...@yahoo.com>.
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 <mg...@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 <aa...@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


RE: [AXIS2] : Null Pointer Exception in Stub

Posted by Martin Gainty <mg...@hotmail.com>.
 <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");
     * </pre><p>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.</p>
     * </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 <aa...@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 a null 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












 		 	   		  

RE: [AXIS2] : Null Pointer Exception in Stub

Posted by Martin Gainty <mg...@hotmail.com>.
 <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");
     * </pre><p>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.</p>
     * </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 <aa...@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 a null 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