Hi, I have test the same code on my machine, and it works good. I used the aar downloaded from the webpage (ftp://www6.software.ibm.com/software/developer/library/ws-webaxis1.zip). The messages to and from the service are POST /axis2/services/StockQuoteService HTTP/1.1 User-Agent: Axis/2.0 SOAPAction: Connection: Keep-Alive Host: 127.0.0.1:1234 Content-Length: 704 Content-Type: text/xml;charset=UTF-8
<?xml version='1.0' encoding='UTF-8'?> <soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/"> <soapenv:Header> <wsa:To xmlns:wsa="http://schemas.xmlsoap.org/ws/2004/08/addressing">http://localhost:1234/axis2/services/StockQuoteService</wsa:To> <wsa:ReplyTo xmlns:wsa="http://schemas.xmlsoap.org/ws/2004/08/addressing"> <wsa:Address>http://schemas.xmlsoap.org/ws/2004/08/addressing/role/anonymous</wsa:Address> </wsa:ReplyTo> <wsa:MessageID xmlns:wsa="http://schemas.xmlsoap.org/ws/2004/08/addressing">1133331746703</wsa:MessageID> </soapenv:Header> <soapenv:Body> <example:getQuote xmlns:example="http://www.developerworks.com/example">IBM</example:getQuote> </soapenv:Body> </soapenv:Envelope> HTTP/1.1 200 OK Server: Apache-Coyote/1.1 Set-Cookie: JSESSIONID=34C4EDF612C8EE463119243001072D2F; Path=/axis2 Content-Type: text/xml;charset=UTF-8 Transfer-Encoding: chunked Date: Wed, 30 Nov 2005 06:22:26 GMT 4b1 <?xml version='1.0' encoding='UTF-8'?> <soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/"> <soapenv:Header> <wsa:To xmlns:wsa="http://schemas.xmlsoap.org/ws/2004/08/addressing">http://schemas.xmlsoap.org/ws/2004/08/addressing/role/anonymous</wsa:To> <wsa:ReplyTo xmlns:wsa="http://schemas.xmlsoap.org/ws/2004/08/addressing"> <wsa:Address>http://schemas.xmlsoap.org/ws/2004/08/addressing/role/anonymous</wsa:Address> <wsa:ReferenceParameters> <axis2:ServiceGroupId xmlns:axis2="http://ws.apache.org/namespaces/axis2">CA2CDFB3109177C04E</axis2:ServiceGroupId> </wsa:ReferenceParameters> </wsa:ReplyTo> <wsa:From xmlns:wsa="http://schemas.xmlsoap.org/ws/2004/08/addressing"> <wsa:Address>http://localhost:1234/axis2/services/StockQuoteService</wsa:Address> </wsa:From> <wsa:MessageID xmlns:wsa="http://schemas.xmlsoap.org/ws/2004/08/addressing">B49393C6DB9638CA18</wsa:MessageID> <wsa:RelatesTo xmlns:wsa="http://schemas.xmlsoap.org/ws/2004/08/addressing" wsa:RelationshipType="wsa:Reply">1133331746703</wsa:RelatesTo> </soapenv:Header> <soapenv:Body> <example:getQuoteResponse xmlns:example="http://www.developerworks.com/example">100</example:getQuoteResponse> </soapenv:Body> </soapenv:Envelope> 0 On 11/29/05, Deepal Jayasinghe <[EMAIL PROTECTED]> wrote: > > forward with correct subject prefix > > Thanks, > Deepal > ................................................................ > ~Future is Open~ > > ----- Original Message ----- > From: "Jean-Claude Moissinac" <[EMAIL PROTECTED]> > To: <[email protected]> > Sent: Monday, November 28, 2005 10:03 PM > Subject: Problem invoking web service > > > >I always get the following AxisFault when I use > > OMElement result = call.invokeBlocking("getQuote", payload); > > and I doesn't find where is the error. > > > > org.apache.axis2.AxisFault: Input stream is null while reading for > > incomming message > > at > > org.apache.axis2.transport.TransportUtils.createSOAPMessage(TransportUtils.java:45) > > at > > org.apache.axis2.clientapi.TwoWayTransportBasedSender.send(TwoWayTransportBasedSender.java:53) > > at > > org.apache.axis2.clientapi.InOutMEPClient.invokeBlocking(InOutMEPClient.java:177) > > at org.apache.axis2.clientapi.Call.invokeBlocking(Call.java:89) > > at StockQuote.stock.StockQuoteService.main(StockQuoteService.java:101) > > > > For example, I'm testing the code in the good article at > > http://www-128.ibm.com/developerworks/webservices/library/ws-webaxis1/ > > and the code form listing 4 > > > > try { > > > > EndpointReference targetEPR = new EndpointReference( > > "http://localhost:8080/axis2/services/StockQuoteService"); > > > > // Create request message > > OMFactory fac = OMAbstractFactory.getOMFactory(); > > OMNamespace omNs = fac.createOMNamespace( > > "http://www.developerworks.com/example", "example"); > > OMElement payload = fac.createOMElement("getQuote",omNs); > > payload.setText("IBM"); > > > > // Create the call > > Call call = new Call(); > > call.setTo(targetEPR); > > > > call.setTransportInfo(Constants.TRANSPORT_HTTP, > > Constants.TRANSPORT_HTTP, false); > > // Invoke blocking > > OMElement result = call.invokeBlocking("getQuote", payload); > > > > System.out.println("Quote ="+result.getText()); > > }catch (AxisFault axisFault) { > > axisFault.printStackTrace(); > > } > > > > Can someone help me. > > > > Thank you in adavance > > -- > > Jean-Claude Moissinac > > Department of Computer Science and Networks > > ENST Paris > > FRANCE > > > > E-mail: [EMAIL PROTECTED] > > Tel: (+33) 1.45.81.80.88 > > Fax: (+33) 1.45.81.71.58 > > > > http://shadok.enst.fr/jcm > > > > >
