|
From: Arjen P. <ar...@in...> - 2006-02-23 20:41:08
|
Thanks Fran=E7ois. I've created a JIRA issue for this at http://opensource2.atlassian.com/projects/spring/browse/SWS-10 You can track the progress on this bug there. Cheers, Arjen On 23-feb-2006, at 17:02, fran=E7ois fran=E7ois wrote: > 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 =20 > airline but with xmlbeans mapper unfortunately it failed > > look my request : > > <?xml version=3D"1.0" encoding=3D"UTF-8"?> > <soapenv:Envelope xmlns:soapenv=3D"http://schemas.xmlsoap.org/soap/=20= > envelope/" xmlns:xsd=3D"http://www.w3.org/2001/XMLSchema" =20 > xmlns:xsi=3D"http://www.w3.org/2001/XMLSchema-instance" =20 > xmlns:env=3D"http://schemas.xmlsoap.org/soap/envelop/"> > <soapenv:Body> > <air:GetFlightsRequest xmlns:air=3D"http://=20 > 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=3D"1.0" encoding=3D"UTF-8"?> > <soapenv:Envelope xmlns:soapenv=3D"http://schemas.xmlsoap.org/soap/=20= > envelope/" xmlns:xsd=3D"http://www.w3.org/2001/XMLSchema" =20 > xmlns:xsi=3D"http://www.w3.org/2001/XMLSchema-instance" =20 > xmlns:env=3D"http://schemas.xmlsoap.org/soap/envelop/"> > <soapenv:Body><air:GetFlightsRequest xmlns:air=3D"http://=20 > 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 =20 > <soapenv:Body> and the body message. If you don't do that you will =20 > have the error: > > java.lang.ClassCastException: =20 > com.sun.xml.messaging.saaj.soap.impl.TextImpl > at =20 > 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 =3D message.getSOAPBody(); > return (Element) body.getFirstChild(); > } > > The cast Element is not good.I think it needs to be modify > > Thanks > > > > > > Nouveau : t=E9l=E9phonez moins cher avec Yahoo! Messenger ! D=E9couvez = =20 > les tarifs exceptionnels pour appeler la France et l'international. =20= > T=E9l=E9chargez la version beta. --- Interface21 NL B.V. E: ar...@in... T: +31(0)20 486 20 36 M: +31(0)6 15 00 7997 F: +31(0)8 48 370 000 W: www.interface21.com B: blog.interface21.com/arjen |