[ 
https://issues.apache.org/jira/browse/AXIS2-2264?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Brian DePradine updated AXIS2-2264:
-----------------------------------

    Component/s:     (was: Addressing)
                 kernel

Assigning to a more appropriate component.

> "org.apache.axis2.AxisFault: Incoming message input stream is null" while 
> engaging addressing module on client side
> -------------------------------------------------------------------------------------------------------------------
>
>                 Key: AXIS2-2264
>                 URL: https://issues.apache.org/jira/browse/AXIS2-2264
>             Project: Axis 2.0 (Axis2)
>          Issue Type: Bug
>          Components: kernel
>    Affects Versions: 1.1.1
>         Environment: Linux Fedora fc5, tomcat 6.0.7, java1.5.0_11, Axis2 1.1.1
>            Reporter: Federica Ciotti
>         Attachments: AddService.java, Constants.java, MultiplyService.java, 
> newCalc.aar
>
>
> My client class needs to engage addressing module.
> This is my client
> package calc1;
> public class RPC_MyCalcClient {
>       public static void main(String[] args){
>               try{
>                       EndpointReference targetEPR = new 
> EndpointReference("http://localhost:8080/axis2/services/AddService/";);
>                       EndpointReference myEPR = new 
> EndpointReference("http://localhost:8080/axis2/services/clientService/";);
>                       Options options = new Options();
>                       options.setTo(targetEPR);
>                       options.setReplyTo(myEPR);
>                       options.setFrom(myEPR);
>                       //options.setAction("addPrevious");
>                       options.setAction("add");
>                       options.setFrom(myEPR);
>                       options.setMessageId("Msg123");
>                        
>                       RPCServiceClient sender = new RPCServiceClient();
>                       sender.setOptions(options);
>                       sender.engageModule(new 
> QName(Constants.MODULE_ADDRESSING));
>                       //add
>                       QName opAdd = new QName("http://calc/xsd";, "add");
>                       Integer a = new Integer(1);
>                       Integer b = new Integer(2);
>                       Object[] params = new Object[] { a, b };
>                       Class[] returnTypes = new Class[] { Integer.class };
>                       Object[] response = sender.invokeBlocking(opAdd, 
> params, returnTypes);
>                       Integer result = (Integer) response[0];
>                       if (result == null) {System.out.println("Null");}
>                       else System.out.println("Result "+ result.toString());
>                       
>                       //addPrev
>                       /*QName opAdd = new QName("http://calc/xsd";, 
> "addPrevious");
>                       Integer a = new Integer(1);
>                       Object[] params = new Object[] { a};
>                       Class[] returnTypes = new Class[] { Integer.class };
>                       Object[] response = sender.invokeBlocking(opAdd, 
> params, returnTypes);
>                       Integer result = (Integer) response[0];
>                       if (result == null) {System.out.println("Null");}
>                       else System.out.println("Result "+ result.toString());*/
>               }catch(AxisFault a){a.printStackTrace();}
>       }
> }
> Even if the addressing module is in the classpath I get AxisFault. 
> This is the exception i get trying to engage addressing module on client side
> org.apache.axis2.AxisFault: Incoming message input stream is null
>       at 
> org.apache.axis2.transport.TransportUtils.createSOAPMessage(TransportUtils.java:64)
>       at 
> org.apache.axis2.description.OutInAxisOperationClient.send(OutInAxisOperation.java:252)
>       at 
> org.apache.axis2.description.OutInAxisOperationClient.execute(OutInAxisOperation.java:202)
>       at 
> org.apache.axis2.client.ServiceClient.sendReceive(ServiceClient.java:579)
>       at 
> org.apache.axis2.client.ServiceClient.sendReceive(ServiceClient.java:508)
>       at 
> org.apache.axis2.rpc.client.RPCServiceClient.invokeBlocking(RPCServiceClient.java:95)
>       at calc1.RPC_MyCalcClient.main(RPC_MyCalcClient.java:52)
> I noticed from SOAPMonitor that apart the AxisFault the request and response 
> messages are correct but only the request one has the wsa header fields:
> SOAPRequest
> <?xml version='1.0' encoding='utf-8'?>
> <soapenv:Envelope xmlns:wsa="http://www.w3.org/2005/08/addressing"; 
> xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/";>
>   <soapenv:Header>
>     <wsa:To>http://localhost:8080/axis2/services/AddService/</wsa:To>
>     <wsa:ReplyTo>
>       
> <wsa:Address>http://localhost:8080/axis2/services/clientService/</wsa:Address>
>     </wsa:ReplyTo>
>     <wsa:From>
>       
> <wsa:Address>http://localhost:8080/axis2/services/clientService/</wsa:Address>
>     </wsa:From>
>     <wsa:MessageID>Msg123</wsa:MessageID>
>     <wsa:Action>add</wsa:Action>
>   </soapenv:Header>
>   <soapenv:Body>
>     <add xmlns="http://calc/xsd";>
>       <arg0 xmlns="">1</arg0>
>       <arg1 xmlns="">2</arg1>
>     </add>
>   </soapenv:Body>
> </soapenv:Envelope>
> SOAPResponse
> <?xml version='1.0' encoding='utf-8'?>
> <soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/";>
>   <soapenv:Header />
>   <soapenv:Body>
>     <ns:addResponse xmlns:ns="http://calc/xsd";>
>       <ns:return>3</ns:return>
>     </ns:addResponse>
>   </soapenv:Body>
> </soapenv:Envelope>
> How can I get wsa fields in the SOAPResponse (addressing module is already 
> engaged on service side and is the classpath) ? 
> Dropping the engage instruction from the client code causes the exception to 
> disappear but I have a wsaddressing=required  in the services.xml.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to