You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@servicemix.apache.org by jlo_gestalt <jl...@gestalt-llc.com> on 2006/08/18 18:18:04 UTC

Problem with JSR181 Component

What is the programatic significance of the soap="true" attribute when
creating a consumer endpoint in the xbean.xml file for the HTTP BC?

Here is some background. Right now we have the HTTP BC and JSR181 components
installed. This is based off the soap-binding example. We have a simple
webservice being invoked using the sample html file, who sends SOAP to the
HTTP BC, who then sends it to the JSR181 component, who then invokes our
simple web service.
When I take the soap="true" out of the consumer endpoint I get the following
error:


org.codehaus.xfire.fault.XFireFault: Invalid operation:
{http://schemas.xmlsoap.org/soap/envelope/}Envelope
        at
org.codehaus.xfire.service.binding.WrappedBinding.readMessage(WrappedBinding.java:41)
        at
org.codehaus.xfire.soap.handler.SoapBodyHandler.invoke(SoapBodyHandler.java:42)
        at
org.codehaus.xfire.handler.HandlerPipeline.invoke(HandlerPipeline.java:110)
        at
org.codehaus.xfire.transport.DefaultEndpoint.onReceive(DefaultEndpoint.java:61)
        at
org.codehaus.xfire.transport.AbstractChannel.receive(AbstractChannel.java:38)
        at
org.apache.servicemix.jsr181.Jsr181ExchangeProcessor.process(Jsr181ExchangeProcessor.java:79)
        at
org.apache.servicemix.common.AsyncBaseLifeCycle.processExchange(AsyncBaseLifeCycle.java:397)
        at
org.apache.servicemix.common.BaseLifeCycle.onMessageExchange(BaseLifeCycle.java:42)
        at
org.apache.servicemix.jbi.messaging.DeliveryChannelImpl.processInBound(DeliveryChannelImpl.java:622)
        at
org.apache.servicemix.jbi.nmr.flow.AbstractFlow.doRouting(AbstractFlow.java:168)
        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:226)
        at
org.apache.geronimo.connector.work.WorkerContext.run(WorkerContext.java:291)
        at
EDU.oswego.cs.dl.util.concurrent.PooledExecutor$Worker.run(Unknown Source)
        at java.lang.Thread.run(Thread.java:595)

One might then say, "leave the soap="true" idiot." And I would agree, but
unfortunately I can't. Right now we are invoking a JSR181 WebService between
two JBI containers. What we are trying to achieve is compressing the SOAP
being sent between JBI container 1 and JBI container 2. In order to do that
the consumer endpoint for JBI container 2 must not contain the soap="true"
attribute.
On JBI container 2 the workflow goes: HTTP BC --> Compression Component (to
decompress) --> JSR181. Our logs show that the content being set by the
Compression Component is the correct SOAP that is being sent to the JSR181
component. But the JSR181 component returns the exact stack trace above.
Here is the workflow that does work:
HTTP BC --> JSR181.
Here is our new workflow with compression in the middle that doesn't work:
HTTP BC --> Compression -- JSR181

Our assumption is that since the SOAP is correct, that the HTTP BC is
setting some property or doing something special that the JSR181 component
is requiring. And since we are injecting our Compression component in the
middle, we aren't setting that special something that the JSR181 component
needs.

Any ideas or suggestions?
-- 
View this message in context: http://www.nabble.com/Problem-with-JSR181-Component-tf2128179.html#a5872790
Sent from the ServiceMix - User forum at Nabble.com.

Re: Problem soap-binding examples

Posted by jlo_gestalt <jl...@gestalt-llc.com>.
Yeah,
Make sure you are using Microsoft Internet Explorer, and when you first open
the .html file, IE usually asks for you to Allow the Blocked Content. It
does this through the little yellow title bar right below the URL.

Hope that works.
-- 
View this message in context: http://www.nabble.com/Problem-with-JSR181-Component-tf2128179.html#a5877326
Sent from the ServiceMix - User forum at Nabble.com.


Problem soap-binding examples

Posted by "Zhao, Ying (IT)" <Y....@morganstanley.com>.
Hi,

I tried soap-binding examples in 3.0M2, not the nightly build.
Everything looked fine, http and jsr181 started and soap-demo started
ok, but then I clicked the "send" button in client.html, nothing
happened.

Any ideas?
Thanks,

Ying
--------------------------------------------------------

NOTICE: If received in error, please destroy and notify sender. Sender does not intend to waive confidentiality or privilege. Use of this email is prohibited when received in error.

Re: Problem with JSR181 Component

Posted by panderson <pa...@gestalt-llc.com>.
We have posted this as a bug including the code we are using to generate the
error (Bug-ID SM-548).


gnodet wrote:
> 
> Well, as soon as you write xml, there are qnames in it.
> And i did not said that *you* created a qname, but the
> jsr181 did (and failed).
> So if you paste your test, it may be able to fix it :)
> 
> On 8/18/06, jlo_gestalt <jl...@gestalt-llc.com> wrote:
>>
>> But I am not creating a QName anywhere. Just setting content and that is
>> it.
>> --
>> View this message in context:
>> http://www.nabble.com/Problem-with-JSR181-Component-tf2128179.html#a5874646
>> Sent from the ServiceMix - User forum at Nabble.com.
>>
>>
> 
> 
> -- 
> Cheers,
> Guillaume Nodet
> 
> 

-- 
View this message in context: http://www.nabble.com/Problem-with-JSR181-Component-tf2128179.html#a5876443
Sent from the ServiceMix - User forum at Nabble.com.


Re: Problem with JSR181 Component

Posted by jlo_gestalt <jl...@gestalt-llc.com>.
Here is the final result for those reading this thread.

Our problem was that our compression component was including the SOAP tags
with the xml it was sending to JSR181.
When the consumer endpoint includes soap="true", the HTTP BC strips off the
SOAP tags (Envelope and Body in our case). When we set soap="false" it
wasn't stripping those tags off.
So the JSR181 component doesn't take SOAP/XML, it takes just XML.
So by sending this it works:
    <ping>
      <pingRequest>
        <request xmlns="http://pingpongws.nettoolkit.gestalt.com">hel
lo</request>
      </pingRequest>
    </ping>
-- 
View this message in context: http://www.nabble.com/Problem-with-JSR181-Component-tf2128179.html#a5907089
Sent from the ServiceMix - User forum at Nabble.com.


Re: Problem with JSR181 Component

Posted by Guillaume Nodet <gn...@gmail.com>.
Thanks for the clarification.
For this issue, could you try with woodstox 3.0.0 jar ?
I experienced a different behavior when upgrading ...

On 8/18/06, jlo_gestalt <jl...@gestalt-llc.com> wrote:
>
> This is the content received by the jsr181 comp. It is not the content
> received by our component. The cool part is compressed soap/xml is what is
> received by our component, who then decompresses it and passes it along to
> the jsr181 component (using the static routing slip).
>
> We get the Invalid Operation when we set the content using a DOMSource.
> The invalid QName ERROR is received when we set the content using a
> StringSource.
> --
> View this message in context: http://www.nabble.com/Problem-with-JSR181-Component-tf2128179.html#a5877755
> Sent from the ServiceMix - User forum at Nabble.com.
>
>


-- 
Cheers,
Guillaume Nodet

Re: Problem with JSR181 Component

Posted by jlo_gestalt <jl...@gestalt-llc.com>.
This is the content received by the jsr181 comp. It is not the content
received by our component. The cool part is compressed soap/xml is what is
received by our component, who then decompresses it and passes it along to
the jsr181 component (using the static routing slip).

We get the Invalid Operation when we set the content using a DOMSource.
The invalid QName ERROR is received when we set the content using a
StringSource.
-- 
View this message in context: http://www.nabble.com/Problem-with-JSR181-Component-tf2128179.html#a5877755
Sent from the ServiceMix - User forum at Nabble.com.


Re: Problem with JSR181 Component

Posted by Guillaume Nodet <gn...@gmail.com>.
Is this the xml received by the jsr181 component, or the one
received by your component ?
I have tried to send this request to a jsr181 component
and i had no exceptions but the
   Invalid operation: {http://schemas.xmlsoap.org/soap/envelope/}Envelope
fault, which is the fault from the first message of this thread.

I'm a bit lost in what you are trying to do, and where the problems are...

On 8/18/06, jlo_gestalt <jl...@gestalt-llc.com> wrote:
>
> Here is the xml being used:
> <e:Envelope xmlns:e="http://schemas.xmlsoap.org/soap/envelope/">
>   <e:Body>
>     <ping>
>       <pingRequest>
>         <request xmlns="http://pingpongws.nettoolkit.gestalt.com">hel
> lo</request>
>       </pingRequest>
>     </ping>
>   </e:Body>
> </e:Envelope>
>
> I can paste this exact xml into the sample html file and send it through the
> HTTP BC and it works.
>
> The jsr181 uses operation name or it is required? Also I see the
> Jsr181ComponentTest typically sets the InterfaceName.
> --
> View this message in context: http://www.nabble.com/Problem-with-JSR181-Component-tf2128179.html#a5877470
> Sent from the ServiceMix - User forum at Nabble.com.
>
>


-- 
Cheers,
Guillaume Nodet

Re: Problem with JSR181 Component

Posted by jlo_gestalt <jl...@gestalt-llc.com>.
Here is the xml being used:
<e:Envelope xmlns:e="http://schemas.xmlsoap.org/soap/envelope/">
  <e:Body>
    <ping>
      <pingRequest>
        <request xmlns="http://pingpongws.nettoolkit.gestalt.com">hel
lo</request>
      </pingRequest>
    </ping>
  </e:Body>
</e:Envelope>

I can paste this exact xml into the sample html file and send it through the
HTTP BC and it works.

The jsr181 uses operation name or it is required? Also I see the
Jsr181ComponentTest typically sets the InterfaceName.
-- 
View this message in context: http://www.nabble.com/Problem-with-JSR181-Component-tf2128179.html#a5877470
Sent from the ServiceMix - User forum at Nabble.com.


Re: Problem with JSR181 Component

Posted by Guillaume Nodet <gn...@gmail.com>.
Is your problem still about IllegalArgument in qname ?
I have been able to reproduce it and it mainly happen when
an invalid xml is sent:
   <uri:test xmlns:uri="" />
for example is an invalid xml.

So first, upgrade to woodstox 3.0.0, and you should see a friendlier
exception.  Then fix your xml.

One thing that hte jsr181 component uses is the operation qname that
you should set when sending your jbi exchange.

On 8/18/06, jlo_gestalt <jl...@gestalt-llc.com> wrote:
>
> The thing that concerns me is this all works when the HTTP BC sends to
> JSR181. So it appears that we are not doing something that the HTTP BC is
> doing.
> I realize there might be a bug in JSR181, but that bug doesn't show up when
> HTTP BC calls it.
> --
> View this message in context: http://www.nabble.com/Problem-with-JSR181-Component-tf2128179.html#a5877294
> Sent from the ServiceMix - User forum at Nabble.com.
>
>


-- 
Cheers,
Guillaume Nodet

Re: Problem with JSR181 Component

Posted by jlo_gestalt <jl...@gestalt-llc.com>.
The thing that concerns me is this all works when the HTTP BC sends to
JSR181. So it appears that we are not doing something that the HTTP BC is
doing.
I realize there might be a bug in JSR181, but that bug doesn't show up when
HTTP BC calls it.
-- 
View this message in context: http://www.nabble.com/Problem-with-JSR181-Component-tf2128179.html#a5877294
Sent from the ServiceMix - User forum at Nabble.com.


Re: Problem with JSR181 Component

Posted by Guillaume Nodet <gn...@gmail.com>.
Well, as soon as you write xml, there are qnames in it.
And i did not said that *you* created a qname, but the
jsr181 did (and failed).
So if you paste your test, it may be able to fix it :)

On 8/18/06, jlo_gestalt <jl...@gestalt-llc.com> wrote:
>
> But I am not creating a QName anywhere. Just setting content and that is it.
> --
> View this message in context: http://www.nabble.com/Problem-with-JSR181-Component-tf2128179.html#a5874646
> Sent from the ServiceMix - User forum at Nabble.com.
>
>


-- 
Cheers,
Guillaume Nodet

Re: Problem with JSR181 Component

Posted by jlo_gestalt <jl...@gestalt-llc.com>.
But I am not creating a QName anywhere. Just setting content and that is it.
-- 
View this message in context: http://www.nabble.com/Problem-with-JSR181-Component-tf2128179.html#a5874646
Sent from the ServiceMix - User forum at Nabble.com.


Re: Problem with JSR181 Component

Posted by Guillaume Nodet <gn...@gmail.com>.
On 8/18/06, jlo_gestalt <jl...@gestalt-llc.com> wrote:
>
> OK, that is good to know.
>
> However, the jsr181 component does not work when another component, besides
> the HTTP BC, sends it xml content which is described by the exposed wsdl.
>
> I realize your point about the xml content not being a soap request, but it
> is still xml/soap.

What do you mean ? It is soap or it is not ;)

>
> In which case, is there anything else required by the jsr181 component to be
> set?

No

> Right now our compression component calls
> NormalizedMesssage.setContent() and gives it a DOMSource. This DOMSource
> contains the xml/soap. I would think this is all the jsr181 component would
> require, but that doesn't appear to be the case.

This is the exception you post earlier, right ?
local part cannot be "null" when creating a QName

Not sure what is the exact reason, but i will take a look.
If you could reproduce that, please raise a JIRA and attach a test case,
it will speed things.

> --
> View this message in context: http://www.nabble.com/Problem-with-JSR181-Component-tf2128179.html#a5874168
> Sent from the ServiceMix - User forum at Nabble.com.
>
>


-- 
Cheers,
Guillaume Nodet

Re: Problem with JSR181 Component

Posted by jlo_gestalt <jl...@gestalt-llc.com>.
OK, that is good to know.

However, the jsr181 component does not work when another component, besides
the HTTP BC, sends it xml content which is described by the exposed wsdl.

I realize your point about the xml content not being a soap request, but it
is still xml/soap.

In which case, is there anything else required by the jsr181 component to be
set? Right now our compression component calls
NormalizedMesssage.setContent() and gives it a DOMSource. This DOMSource
contains the xml/soap. I would think this is all the jsr181 component would
require, but that doesn't appear to be the case.
-- 
View this message in context: http://www.nabble.com/Problem-with-JSR181-Component-tf2128179.html#a5874168
Sent from the ServiceMix - User forum at Nabble.com.


Re: Problem with JSR181 Component

Posted by Guillaume Nodet <gn...@gmail.com>.
The jsr181 component should be able to accept any xml source in the exchange,
but it does expect it not to be a soap request.  SOAP is handled by BC.
The purpose of the soap="true" attribute on the BC is to unmarshall the soap
envelope, process any ws-addressing, ws-security headers and send the
content of the request to the target component.

So the jsr181 component acts as a good citizen in the jbi bus: it accepts
an xml content which is described by the exposed wsdl.  But this is not
a soap request.

On 8/18/06, jlo_gestalt <jl...@gestalt-llc.com> wrote:
>
> I could, but I don't think that is the cause of my problem.
>
> I think the fundamental question is, shouldn't the JSR181 component be able
> to accept just SOAP through the content method and it should work no matter
> who is sending the SOAP, whether it be the HTTP BC or another component such
> as our Compression Component?
> I guess I was assuming that was how the JSR181 component was built and how
> any JBI component should be built.
>
> Is this correct?
> --
> View this message in context: http://www.nabble.com/Problem-with-JSR181-Component-tf2128179.html#a5873437
> Sent from the ServiceMix - User forum at Nabble.com.
>
>


-- 
Cheers,
Guillaume Nodet

Re: Problem with JSR181 Component

Posted by jlo_gestalt <jl...@gestalt-llc.com>.
I could, but I don't think that is the cause of my problem.

I think the fundamental question is, shouldn't the JSR181 component be able
to accept just SOAP through the content method and it should work no matter
who is sending the SOAP, whether it be the HTTP BC or another component such
as our Compression Component?
I guess I was assuming that was how the JSR181 component was built and how
any JBI component should be built.

Is this correct?
-- 
View this message in context: http://www.nabble.com/Problem-with-JSR181-Component-tf2128179.html#a5873437
Sent from the ServiceMix - User forum at Nabble.com.


Re: Problem with JSR181 Component

Posted by Guillaume Nodet <gn...@gmail.com>.
I also had such an exception today. Could you raise a JIRA for that ?
And attach a simple test case if you have one, that would be helpful.

On 8/18/06, jlo_gestalt <jl...@gestalt-llc.com> wrote:
>
> Previously we were setting the content using BytesSource. When we set the
> content using a DOMSource we get a different error:
>
> java.lang.IllegalArgumentException: local part cannot be "null" when
> creating a QName
>         at javax.xml.namespace.QName.(QName.java:214)
>         at
> com.ctc.wstx.dom.DOMWrappingReader.constructQName(DOMWrappingReader.java:1284)
>         at
> com.ctc.wstx.dom.DOMWrappingReader.getName(DOMWrappingReader.java:460)
>         at
> org.codehaus.xfire.util.stax.DepthXMLStreamReader.getName(DepthXMLStreamReader.java:110)
>         at
> org.codehaus.xfire.service.binding.WrappedBinding.readMessage(WrappedBinding.java:41)
>         at
> org.codehaus.xfire.soap.handler.SoapBodyHandler.invoke(SoapBodyHandler.java:42)
>         at
> org.codehaus.xfire.handler.HandlerPipeline.invoke(HandlerPipeline.java:110)
>         at
> org.codehaus.xfire.transport.DefaultEndpoint.onReceive(DefaultEndpoint.java:61)
>
>
> --
> View this message in context: http://www.nabble.com/Problem-with-JSR181-Component-tf2128179.html#a5872907
> Sent from the ServiceMix - User forum at Nabble.com.
>
>


-- 
Cheers,
Guillaume Nodet

Re: Problem with JSR181 Component

Posted by jlo_gestalt <jl...@gestalt-llc.com>.
Previously we were setting the content using BytesSource. When we set the
content using a DOMSource we get a different error:

java.lang.IllegalArgumentException: local part cannot be "null" when
creating a QName
        at javax.xml.namespace.QName.(QName.java:214)
        at
com.ctc.wstx.dom.DOMWrappingReader.constructQName(DOMWrappingReader.java:1284)
        at
com.ctc.wstx.dom.DOMWrappingReader.getName(DOMWrappingReader.java:460)
        at
org.codehaus.xfire.util.stax.DepthXMLStreamReader.getName(DepthXMLStreamReader.java:110)
        at
org.codehaus.xfire.service.binding.WrappedBinding.readMessage(WrappedBinding.java:41)
        at
org.codehaus.xfire.soap.handler.SoapBodyHandler.invoke(SoapBodyHandler.java:42)
        at
org.codehaus.xfire.handler.HandlerPipeline.invoke(HandlerPipeline.java:110)
        at
org.codehaus.xfire.transport.DefaultEndpoint.onReceive(DefaultEndpoint.java:61)


-- 
View this message in context: http://www.nabble.com/Problem-with-JSR181-Component-tf2128179.html#a5872907
Sent from the ServiceMix - User forum at Nabble.com.