You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@servicemix.apache.org by "Phillip Anderson (JIRA)" <ji...@apache.org> on 2006/08/18 21:42:23 UTC

[jira] Created: (SM-548) QName not being created

QName not being created
-----------------------

                 Key: SM-548
                 URL: https://issues.apache.org/activemq/browse/SM-548
             Project: ServiceMix
          Issue Type: Bug
          Components: servicemix-jsr181
    Affects Versions: 3.0-M2
            Reporter: Phillip Anderson
            Priority: Blocker


We are trying to invoke a Web Service through the JSR-181 component  and when we do so using the code below we receive the error shown after the code.  This is related to the discussion http://www.nabble.com/Problem-with-JSR181-Component-tf2128179.html

Code:
                NormalizedMessage onm = me.getMessage("in");
                onm.setProperty("com.gestalt.nettoolkit.encoding.style",
                    encodingStyle);
                onm.setContent(getDomSource(dataOut));
                me.setMessage(onm, "out");

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)

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: https://issues.apache.org/activemq/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] Commented: (SM-548) QName not being created

Posted by "James Lorenzen (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/activemq/browse/SM-548?page=comments#action_36810 ] 
            
James Lorenzen commented on SM-548:
-----------------------------------

OK, I got a little farther and have at least identified the problem.

It seems that when the HTTP consumer endpoint indicates soap="true", the HTTP BC strips off the SOAP Envelope and Body tags.
When the HTTP consumer endpoint does not include the soap attribute (or soap="false"), the HTTP BC does not strip it off and consequently sends the original SOAP/XML to our Compression Component, who in turn gives it to JSR181 with SOAP Envelope and Body tags, and apparently JSR181 doesn't know how to handle those SOAP tags.

I am unsure if this is still an issue or not, or whether these components are acting as expected. I think we could get by passing around non-SOAP XML and setting soap="false".

> QName not being created
> -----------------------
>
>                 Key: SM-548
>                 URL: https://issues.apache.org/activemq/browse/SM-548
>             Project: ServiceMix
>          Issue Type: Bug
>          Components: servicemix-jsr181
>    Affects Versions: 3.0-M2
>            Reporter: Phillip Anderson
>            Priority: Blocker
>
> We are trying to invoke a Web Service through the JSR-181 component  and when we do so using the code below we receive the error shown after the code.  This is related to the discussion http://www.nabble.com/Problem-with-JSR181-Component-tf2128179.html
> Code:
>                 NormalizedMessage onm = me.getMessage("in");
>                 onm.setProperty("com.gestalt.nettoolkit.encoding.style",
>                     encodingStyle);
>                 onm.setContent(getDomSource(dataOut));
>                 me.setMessage(onm, "out");
> 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)

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: https://issues.apache.org/activemq/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] Closed: (SM-548) QName not being created

Posted by "Guillaume Nodet (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/activemq/browse/SM-548?page=all ]

Guillaume Nodet closed SM-548.
------------------------------

    Resolution: Won't Fix

You' re right.  I thought I have said that in the mail thread, but ...
The jsr181 component is not soap enabled.  SOAP is a protocol
and is thus handled by BC.  The http BC can do much more on a 
soap enabled endoint: it handles ws-addressing, ws-security, etc...

They behave as expected, so I'm closing this issue.

> QName not being created
> -----------------------
>
>                 Key: SM-548
>                 URL: https://issues.apache.org/activemq/browse/SM-548
>             Project: ServiceMix
>          Issue Type: Bug
>          Components: servicemix-jsr181
>    Affects Versions: 3.0-M2
>            Reporter: Phillip Anderson
>            Priority: Blocker
>
> We are trying to invoke a Web Service through the JSR-181 component  and when we do so using the code below we receive the error shown after the code.  This is related to the discussion http://www.nabble.com/Problem-with-JSR181-Component-tf2128179.html
> Code:
>                 NormalizedMessage onm = me.getMessage("in");
>                 onm.setProperty("com.gestalt.nettoolkit.encoding.style",
>                     encodingStyle);
>                 onm.setContent(getDomSource(dataOut));
>                 me.setMessage(onm, "out");
> 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)

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: https://issues.apache.org/activemq/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] Commented: (SM-548) QName not being created

Posted by "James Lorenzen (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/activemq/browse/SM-548?page=comments#action_36809 ] 
            
James Lorenzen commented on SM-548:
-----------------------------------

I have since created a simple Consumer who creates an InOut MessageExchange, sets the Content, and sends to the JSR181 component. Here is the code and my detailed findings.

I expect the following code to work when I set the content and operation name, but it doesn't.

InOut inout = context.getDeliveryChannel().createExchangeFactory().createInOutExchange();
NormalizedMessage message = inout.createMessage();
message.setContent(new StringSource(
                "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n" +
                "<e:Envelope xmlns:e=\"http://schemas.xmlsoap.org/soap/envelope/\">\n" +
                "  <e:Body>\n" + "    " +
                        "<ping>\n" + "      " +
                        "<pingRequest>\n" +
                "        <request xmlns=\"http://pingpongws.nettoolkit.gestalt.com\">hel lo</request>\n" +
                "         </pingRequest>\n" + "    " +
                        "</ping>\n" + 
                        "</e:Body>\n" +
                "</e:Envelope>"));
inout.setOperation(new QName("ping"));
inout.setInMessage(message);
context.getDeliveryChannel().sendSync(inout);

When the above code runs I get this error: org.codehaus.xfire.fault.XFireFault: Invalid operation: {http://schemasa.xmlsoap.org/soap/envelope/}Envelope

I believe I am getting this error because it is not seeing the Operation Name being set and consequently looks at the root namepace of the xml, which happens to be the soap namespace, which for obvious reasons won't work.

So I noticed in your tests for the JSR181 component, that none of the test Source contained a soap Envelope or Body tags. So I commented out those two tags and commented out the line where I set the Operation Name and it worked! Here is the code that works:

InOut inout = context.getDeliveryChannel().createExchangeFactory().createInOutExchange();
NormalizedMessage message = inout.createMessage();
message.setContent(new StringSource(
//                "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n" +
//                "<e:Envelope xmlns:e=\"http://schemas.xmlsoap.org/soap/envelope/\">\n" +
//                "  <e:Body>\n" + "    " +
                        "<ping>\n" + "      " +
                        "<pingRequest>\n" +
                "        <request xmlns=\"http://pingpongws.nettoolkit.gestalt.com\">hel lo</request>\n" +
                "      </pingRequest>\n" + "    " +
                        "</ping>\n"));
//                        "</e:Body>\n" +
//                "</e:Envelope>"));
//        inout.setOperation(new QName("ping"));
inout.setInMessage(message);
context.getDeliveryChannel().sendSync(inout);

So it would almost appear that the JSR181 component (XFire) can not handle SOAP properly in all instances. Because the soap-binding example uses SOAP and it works just fine.

> QName not being created
> -----------------------
>
>                 Key: SM-548
>                 URL: https://issues.apache.org/activemq/browse/SM-548
>             Project: ServiceMix
>          Issue Type: Bug
>          Components: servicemix-jsr181
>    Affects Versions: 3.0-M2
>            Reporter: Phillip Anderson
>            Priority: Blocker
>
> We are trying to invoke a Web Service through the JSR-181 component  and when we do so using the code below we receive the error shown after the code.  This is related to the discussion http://www.nabble.com/Problem-with-JSR181-Component-tf2128179.html
> Code:
>                 NormalizedMessage onm = me.getMessage("in");
>                 onm.setProperty("com.gestalt.nettoolkit.encoding.style",
>                     encodingStyle);
>                 onm.setContent(getDomSource(dataOut));
>                 me.setMessage(onm, "out");
> 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)

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: https://issues.apache.org/activemq/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] Commented: (SM-548) QName not being created

Posted by "Guillaume Nodet (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/activemq/browse/SM-548?page=comments#action_36807 ] 
            
Guillaume Nodet commented on SM-548:
------------------------------------

Could you paste the exact content of the in message ?
Also you may want to try replacing the wstx-asl-2.9.3.jar in the servicemix distribution by this one:
   http://woodstox.codehaus.org/3.0.0/wstx-asl-3.0.0.jar

> QName not being created
> -----------------------
>
>                 Key: SM-548
>                 URL: https://issues.apache.org/activemq/browse/SM-548
>             Project: ServiceMix
>          Issue Type: Bug
>          Components: servicemix-jsr181
>    Affects Versions: 3.0-M2
>            Reporter: Phillip Anderson
>            Priority: Blocker
>
> We are trying to invoke a Web Service through the JSR-181 component  and when we do so using the code below we receive the error shown after the code.  This is related to the discussion http://www.nabble.com/Problem-with-JSR181-Component-tf2128179.html
> Code:
>                 NormalizedMessage onm = me.getMessage("in");
>                 onm.setProperty("com.gestalt.nettoolkit.encoding.style",
>                     encodingStyle);
>                 onm.setContent(getDomSource(dataOut));
>                 me.setMessage(onm, "out");
> 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)

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: https://issues.apache.org/activemq/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] Commented: (SM-548) QName not being created

Posted by "Phillip Anderson (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/activemq/browse/SM-548?page=comments#action_36808 ] 
            
Phillip Anderson commented on SM-548:
-------------------------------------

Here is the Message Exchange being sent out from our component.


Sending MessageExchange over DeliveryChannel, me = MessageExchange[
  id: ID:jopdev01.int.gestalt-llc.com-58960-1155931679511-7:0
  status: Active
  role: provider
  service: {http://nettoolkit.gestalt.com/encoding}encoding
  endpoint: encoding
  in: <?xml version="1.0" encoding="UTF-8"?><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>
  out: <?xml version="1.0" encoding="UTF-8"?><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>
]

> QName not being created
> -----------------------
>
>                 Key: SM-548
>                 URL: https://issues.apache.org/activemq/browse/SM-548
>             Project: ServiceMix
>          Issue Type: Bug
>          Components: servicemix-jsr181
>    Affects Versions: 3.0-M2
>            Reporter: Phillip Anderson
>            Priority: Blocker
>
> We are trying to invoke a Web Service through the JSR-181 component  and when we do so using the code below we receive the error shown after the code.  This is related to the discussion http://www.nabble.com/Problem-with-JSR181-Component-tf2128179.html
> Code:
>                 NormalizedMessage onm = me.getMessage("in");
>                 onm.setProperty("com.gestalt.nettoolkit.encoding.style",
>                     encodingStyle);
>                 onm.setContent(getDomSource(dataOut));
>                 me.setMessage(onm, "out");
> 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)

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: https://issues.apache.org/activemq/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira