What is the actual difference between the <http consumer> & the <http soap-consumer>? Does the second one support REST services as well?
And, do i need to keep a match between the consumer type to the provider type? It seems like a logical thing to do... Thanks. On Mon, Feb 2, 2009 at 9:35 AM, Guillaume Nodet <[email protected]> wrote: > Have you tried using the soap provider endpoint ? It will > automatically set the right value for the soap action based on the > wsdl. > > <http:soap-provider ... /> > > On Sat, Jan 31, 2009 at 20:11, Liav Ezer <[email protected]> wrote: > > > > Hi, > > > > Thanks for your reply. I use an old http provider & i guess it was the > > origin for those methods. Therefore, i replaced it now with a new http > > provider as follows: > > > > <beans xmlns:http="http://servicemix.apache.org/http/1.0" > > xmlns:prd="http://prd"> > > <http:provider service="prd:ForecastWeatherImpService" > > endpoint="prd:ForecastWeatherImpService" > > > > locationURI=" > http://localhost:8080/ForecasterService/services/ForecastWeatherImp" > > /> > > </beans> > > > > & i get the following error in the SMX log: > > > > fault: <?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"> > > <soapenv:Body> > > <soapenv:Fault> > > <faultcode > > xmlns:ns1="http://xml.apache.org/axis/ > ">ns1:Client.NoSOAPAction</faultcode> > > <faultstring>no SOAPAction header!</faultstring> > > <detail> > > <ns2:hostname > > xmlns:ns2="http://xml.apache.org/axis/">LIAVE02</ns2:hostname> > > </detail> > > </soapenv:Fault> > > </soapenv:Body> > > </soapenv:Envelope> > > > > I also valued the soapAction attribute in the wsdl to be: > > soapAction="no_params" with no change. > > > > Can you suggest on a solution? Can you also advise if i can use an old > > provider & a new consumer? > > > > Thanks. > > > > gnodet wrote: > >> > >> Not sure to understand. > >> SoapMarshaler and SoapWriter and not used with the new endpoints, they > >> are only used with the old <http:endpoint/> one. > >> > >> On Fri, Jan 30, 2009 at 14:53, Liav Ezer <[email protected]> wrote: > >>> > >>> Hi, > >>> > >>> I want to use the NEW http consumer endpoint (<http:consumer../>) in > >>> order > >>> to attach a marshaller. > >>> > >>> My problem is that i see that the exchange is identified as a soap > >>> request, > >>> hence it is wraped in "<env:" envelope & body tags in addition to it's > >>> actual wrapper which is via soapenv: tags. > >>> > >>> This causes an exception. > >>> > >>> I debugged it & found out that if i convert the following boolean to > >>> false > >>> everything is working without this <env> wrapper. > >>> > >>> public class SoapMarshaler { > >>> ... > >>> protected boolean soap = true; > >>> ... > >>> public boolean isSoap() { > >>> return soap; > >>> } > >>> } > >>> > >>> This is called from SoapWriter class: > >>> > >>> if (marshaler.isSoap()) { > >>> writeSoapEnvelope(writer); > >>> } > >>> > >>> & indeed writeSoapEnvelope does the following wrapper: > >>> > >>> public void writeSoapEnvelope(XMLStreamWriter writer) throws Exception > { > >>> QName envelope = getEnvelopeName(); > >>> String soapUri = envelope.getNamespaceURI(); > >>> String soapPrefix = envelope.getPrefix(); > >>> writer.setPrefix(soapPrefix, soapUri); > >>> writer.writeStartElement(soapPrefix, SoapMarshaler.ENVELOPE, > >>> soapUri); > >>> > >>> My question is: > >>> > >>> How do i control the exchange from the new http consumer so it won't be > >>> recognized as soap or will not be wrapped as described? I know the http > >>> soap-consumer endpoint wrapps the exchange with jbi & you can control > it > >>> via > >>> the useJbiWrapper attribute in the xbean. Is there a solotion for this > >>> also? > >>> > >>> Here is my xbean: > >>> <?xml version="1.0" encoding="UTF-8"?> > >>> <beans xmlns:http="http://servicemix.apache.org/http/1.0" > >>> xmlns:con="http://service.app.esb.abc.liav.com" > >>> xmlns:abc="http://abc"> > >>> <http:consumer service="con:PublicForecastWeatherService" > >>> endpoint="PublicForecastWeather" > >>> > >>> locationURI=" > http://localhost:8192/abc/services/internal/forecastWeather?in-out" > >>> defaultMep="http://www.w3.org/2004/08/wsdl/in-out" > >>> targetService="abc:abcInternalService" > >>> marshaler="#marshaler" /> > >>> <bean id="marshaler" > class="org.apache.servicemix.jbi.HTTPMarshaler" > >>> /> > >>> </beans> > >>> > >>> Thanks in advance, > >>> > >>> Liav. > >>> -- > >>> View this message in context: > >>> > http://www.nabble.com/Http-consumer-end-point-question-tp21747567p21747567.html > >>> Sent from the ServiceMix - User mailing list archive at Nabble.com. > >>> > >>> > >> > >> > >> > >> -- > >> Cheers, > >> Guillaume Nodet > >> ------------------------ > >> Blog: http://gnodet.blogspot.com/ > >> ------------------------ > >> Open Source SOA > >> http://fusesource.com > >> > >> > > > > -- > > View this message in context: > http://www.nabble.com/Http-consumer-end-point-question-tp21747567p21767145.html > > Sent from the ServiceMix - User mailing list archive at Nabble.com. > > > > > > > > -- > Cheers, > Guillaume Nodet > ------------------------ > Blog: http://gnodet.blogspot.com/ > ------------------------ > Open Source SOA > http://fusesource.com >
