|
From: <fv...@ya...> - 2006-02-23 16:02:20
|
Hi ! i ve seen spring-ws 0.9 is now downloadable I try to do a client in axis java and use your simple example airline but with xmlbeans mapper unfortunately it failed look my request : <?xml version="1.0" encoding="UTF-8"?> <soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:env="http://schemas.xmlsoap.org/soap/envelop/"> <soapenv:Body> <air:GetFlightsRequest xmlns:air="http://www.springframework.org/spring-ws/samples/airline"> <air:flightNumber>KL1653</air:flightNumber> <air:startOfPeriod>2006-02-02</air:startOfPeriod> <air:endOfPeriod>2006-01-31</air:endOfPeriod> </air:GetFlightsRequest> </soapenv:Body> </soapenv:Envelope> if i make a new request like this : <?xml version="1.0" encoding="UTF-8"?> <soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:env="http://schemas.xmlsoap.org/soap/envelop/"> <soapenv:Body><air:GetFlightsRequest xmlns:air="http://www.springframework.org/spring-ws/samples/airline"> <air:flightNumber>KL1653</air:flightNumber> <air:startOfPeriod>2006-02-02</air:startOfPeriod> <air:endOfPeriod>2006-01-31</air:endOfPeriod> </air:GetFlightsRequest> </soapenv:Body> </soapenv:Envelope> it works, so you need to remove the white space between <soapenv:Body> and the body message. If you don't do that you will have the error: java.lang.ClassCastException: com.sun.xml.messaging.saaj.soap.impl.TextImpl at org.springframework.ws.soap.saaj.SaajMessageHelper.getPayloadElement( SaajMessageHelper.java:81) so look at the code source where is the problem: package org.springframework.ws.soap.saaj; public Element getPayloadElement() throws SOAPException { SOAPBody body = message.getSOAPBody(); return (Element) body.getFirstChild(); } The cast Element is not good.I think it needs to be modify Thanks --------------------------------- Nouveau : téléphonez moins cher avec Yahoo! Messenger ! Découvez les tarifs exceptionnels pour appeler la France et l'international.Téléchargez la version beta. |