You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@servicemix.apache.org by Bruce Snyder <br...@gmail.com> on 2007/06/02 05:52:08 UTC
Re: question about http provider
On 5/31/07, Benamin <be...@bisonline.com> wrote:
>
> If an http provider is supposed to automatically transform a request into
> SOAP based on its xbean, then what should a message be formatted as when
> sent to the http provider?
>
> For example, suppose the http provider is supposed to request some web
> service that provides an operation that accepts an SSN and returns a
> person's information. Would you just send the http provider a normalized
> message that contains the name with no SOAP headers?
Yes, I believe you would send XML that the servicemix-http provider
will wrap in a SOAP format so that it is formatted correctly when the
proxied web service receives it.
Bruce
--
perl -e 'print unpack("u30","D0G)U8V4\@4VYY9&5R\"F)R=6-E+G-N>61E<D\!G;6%I;\"YC;VT*"
);'
Apache Geronimo - http://geronimo.apache.org/
Apache ActiveMQ - http://activemq.org/
Apache ServiceMix - http://servicemix.org/
Castor - http://castor.org/
Re: question about http provider
Posted by Bruce Snyder <br...@gmail.com>.
On 6/7/07, Benamin <be...@bisonline.com> wrote:
>
> Well, I finally was able to send a message from an http provider to my web
> service inside of service mix. Oddly enough, the only way it seemed to work
> is if I set soap="false" in my provider and just sent the exact SOAP request
> with all the headers and formatting already finished.
>
> I get the correct response from the web service, but the http provider does
> not parse the SOAP response. It leaves the message with all the SOAP
> headers. I guess this is b/c I set soap="false" in the provider. Ideally,
> I'd like it to be already parsed, but no matter what I try, I can't get the
> http provider to format a SOAP request.
This is because SOAP is intended to be used when communicating with
services outside the NMR. This is why SOAP is only supported by
servicemix-http and servicemix-jms - because they're binding
components. Binding components are only used to communicate with
services external to the JBI container.
Bruce
--
perl -e 'print unpack("u30","D0G)U8V4\@4VYY9&5R\"F)R=6-E+G-N>61E<D\!G;6%I;\"YC;VT*"
);'
Apache Geronimo - http://geronimo.apache.org/
Apache ActiveMQ - http://activemq.org/
Apache ServiceMix - http://servicemix.org/
Castor - http://castor.org/
Re: question about http provider
Posted by Benamin <be...@bisonline.com>.
Well, I finally was able to send a message from an http provider to my web
service inside of service mix. Oddly enough, the only way it seemed to work
is if I set soap="false" in my provider and just sent the exact SOAP request
with all the headers and formatting already finished.
I get the correct response from the web service, but the http provider does
not parse the SOAP response. It leaves the message with all the SOAP
headers. I guess this is b/c I set soap="false" in the provider. Ideally,
I'd like it to be already parsed, but no matter what I try, I can't get the
http provider to format a SOAP request.
Benamin wrote:
>
>
>
> bsnyder wrote:
>>
>>
>>>>
>>>> ERROR - HttpComponent - Error processing exchange
>>>> InOut[
>>>> id: ID:massive-47158-1180962021093-11:0
>>>> status: Active
>>>> role: provider
>>>> service: {http://tapestry.cgi.com/smix}NSRService
>>>> endpoint: myProvider
>>>> in: <?xml version="1.0" encoding="UTF-8"?><hello>Testing</hello>
>>>> ]
>>>> com.ctc.wstx.exc.WstxEOFException: Unexpected EOF in prolog
>>>> at [row,col {unknown-source}]: [1,0]
>>
>>> This error usually means that you have extraneous characters in the
>>> prolog - notice it says row 1, column 0. In my experience, this can
>>> be, and oftentimes is, invisible characters in the prolog.
>>
>>
>
> The prolog in this case is being added by ServiceMix when I make a call to
> sendSync, such as
>
> in.setContent(new StringSource("<hello>Testing</hello>"));
> exchange.setInMessage(in);
> sendSync(exchange);
>
> So I am not seeing how extraneous characters are getting added in.
>
>
--
View this message in context: http://www.nabble.com/question-about-http-provider-tf3846635s12049.html#a11010767
Sent from the ServiceMix - User mailing list archive at Nabble.com.
Re: question about http provider
Posted by Benamin <be...@bisonline.com>.
bsnyder wrote:
>
>
>>>
>>> ERROR - HttpComponent - Error processing exchange
>>> InOut[
>>> id: ID:massive-47158-1180962021093-11:0
>>> status: Active
>>> role: provider
>>> service: {http://tapestry.cgi.com/smix}NSRService
>>> endpoint: myProvider
>>> in: <?xml version="1.0" encoding="UTF-8"?><hello>Testing</hello>
>>> ]
>>> com.ctc.wstx.exc.WstxEOFException: Unexpected EOF in prolog
>>> at [row,col {unknown-source}]: [1,0]
>
>> This error usually means that you have extraneous characters in the
>> prolog - notice it says row 1, column 0. In my experience, this can
>> be, and oftentimes is, invisible characters in the prolog.
>
>
The prolog in this case is being added by ServiceMix when I make a call to
sendSync, such as
in.setContent(new StringSource("<hello>Testing</hello>"));
exchange.setInMessage(in);
sendSync(exchange);
So I am not seeing how extraneous characters are getting added in.
--
View this message in context: http://www.nabble.com/question-about-http-provider-tf3846635s12049.html#a10955976
Sent from the ServiceMix - User mailing list archive at Nabble.com.
Re: question about http provider
Posted by Bruce Snyder <br...@gmail.com>.
On 6/4/07, Benamin <be...@bisonline.com> wrote:
>
>
>
> bsnyder wrote:
> >
> > On 5/31/07, Benamin <be...@bisonline.com> wrote:
> >>
> >> If an http provider is supposed to automatically transform a request into
> >>> SOAP based on its xbean, then what should a message be formatted as when
> >>> sent to the http provider?
> >>>
> >>> For example, suppose the http provider is supposed to request some web
> >>> service that provides an operation that accepts an SSN and returns a
> >>> person's information. Would you just send the http provider a
> >>> normalized
> >>> message that contains the name with no SOAP headers?
> >
> >>Yes, I believe you would send XML that the servicemix-http provider
> >>will wrap in a SOAP format so that it is formatted correctly when the
> >>proxied web service receives it.
> >
> > Bruce
> >
> >
>
> Yes, I would have thought that. I have tried to send some test xml
> (<hello>Testing</hello>) to an http provider, but the http provider gives me
> an exception. Any ideas?
>
> ERROR - HttpComponent - Error processing exchange InOut[
> id: ID:massive-47158-1180962021093-11:0
> status: Active
> role: provider
> service: {http://tapestry.cgi.com/smix}NSRService
> endpoint: myProvider
> in: <?xml version="1.0" encoding="UTF-8"?><hello>Testing</hello>
> ]
> com.ctc.wstx.exc.WstxEOFException: Unexpected EOF in prolog
> at [row,col {unknown-source}]: [1,0]
This error usually means that you have extraneous characters in the
prolog - notice it says row 1, column 0. In my experience, this can
be, and oftentimes is, invisible characters in the prolog.
Bruce
--
perl -e 'print unpack("u30","D0G)U8V4\@4VYY9&5R\"F)R=6-E+G-N>61E<D\!G;6%I;\"YC;VT*"
);'
Apache Geronimo - http://geronimo.apache.org/
Apache ActiveMQ - http://activemq.org/
Apache ServiceMix - http://servicemix.org/
Castor - http://castor.org/
Re: question about http provider
Posted by Benamin <be...@bisonline.com>.
bsnyder wrote:
>
> On 5/31/07, Benamin <be...@bisonline.com> wrote:
>>
>> If an http provider is supposed to automatically transform a request into
>>> SOAP based on its xbean, then what should a message be formatted as when
>>> sent to the http provider?
>>>
>>> For example, suppose the http provider is supposed to request some web
>>> service that provides an operation that accepts an SSN and returns a
>>> person's information. Would you just send the http provider a
>>> normalized
>>> message that contains the name with no SOAP headers?
>
>>Yes, I believe you would send XML that the servicemix-http provider
>>will wrap in a SOAP format so that it is formatted correctly when the
>>proxied web service receives it.
>
> Bruce
>
>
Yes, I would have thought that. I have tried to send some test xml
(<hello>Testing</hello>) to an http provider, but the http provider gives me
an exception. Any ideas?
ERROR - HttpComponent - Error processing exchange InOut[
id: ID:massive-47158-1180962021093-11:0
status: Active
role: provider
service: {http://tapestry.cgi.com/smix}NSRService
endpoint: myProvider
in: <?xml version="1.0" encoding="UTF-8"?><hello>Testing</hello>
]
com.ctc.wstx.exc.WstxEOFException: Unexpected EOF in prolog
at [row,col {unknown-source}]: [1,0]
at
com.ctc.wstx.sr.StreamScanner.throwUnexpectedEOF(StreamScanner.java:628)
at
com.ctc.wstx.sr.BasicStreamReader.handleEOF(BasicStreamReader.java:2021)
at
com.ctc.wstx.sr.BasicStreamReader.nextFromProlog(BasicStreamReader.java:1927)
at
com.ctc.wstx.sr.BasicStreamReader.next(BasicStreamReader.java:1054)
at
javax.xml.stream.util.StreamReaderDelegate.next(StreamReaderDelegate.java:59)
at
org.apache.servicemix.jbi.jaxp.ExtendedXMLStreamReader.next(ExtendedXMLStreamReader.java:60)
at
org.apache.servicemix.jbi.jaxp.ExtendedXMLStreamReader.nextTag(ExtendedXMLStreamReader.java:43)
at
org.apache.servicemix.soap.marshalers.SoapReader.readSoapUsingStax(SoapReader.java:154)
at
org.apache.servicemix.soap.marshalers.SoapReader.read(SoapReader.java:82)
at
org.apache.servicemix.soap.marshalers.SoapReader.read(SoapReader.java:73)
at
org.apache.servicemix.http.processors.ProviderProcessor.process(ProviderProcessor.java:173)
at
org.apache.servicemix.common.AsyncBaseLifeCycle.doProcess(AsyncBaseLifeCycle.java:489)
at
org.apache.servicemix.common.AsyncBaseLifeCycle.processExchange(AsyncBaseLifeCycle.java:441)
at
org.apache.servicemix.common.BaseLifeCycle.onMessageExchange(BaseLifeCycle.java:46)
at
org.apache.servicemix.jbi.messaging.DeliveryChannelImpl.processInBound(DeliveryChannelImpl.java:593)
at
org.apache.servicemix.jbi.nmr.flow.AbstractFlow.doRouting(AbstractFlow.java:174)
at
org.apache.servicemix.jbi.nmr.flow.seda.SedaFlow.doRouting(SedaFlow.java:176)
at
org.apache.servicemix.jbi.nmr.flow.seda.SedaQueue$1.run(SedaQueue.java:134)
--
View this message in context: http://www.nabble.com/question-about-http-provider-tf3846635s12049.html#a10949784
Sent from the ServiceMix - User mailing list archive at Nabble.com.