Invalid message property name "Content-Type" in JMSSender
---------------------------------------------------------

                 Key: WSCOMMONS-499
                 URL: https://issues.apache.org/jira/browse/WSCOMMONS-499
             Project: WS-Commons
          Issue Type: Bug
          Components: Transport
    Affects Versions: Transports 1.0
         Environment: J2RE 1.5.0 IBM J9 2.3 - Maven 2.2.1 - WebSphere 
Application Server 6.1 - Axis2 1.5 - WebSphereMQ-6.0.2.0
            Reporter: Florian Minjat


Hi,
When trying to call a WebService through JMS transport I get this error:
org.apache.axis2.AxisFault: Error creating a JMS message from the message 
context
        at 
org.apache.axis2.transport.base.AbstractTransportSender.handleException(AbstractTransportSender.java:227)
        at 
org.apache.axis2.transport.jms.JMSSender.sendOverJMS(JMSSender.java:161)
        at 
org.apache.axis2.transport.jms.JMSSender.sendMessage(JMSSender.java:141)
        at 
org.apache.axis2.transport.base.AbstractTransportSender.invoke(AbstractTransportSender.java:112)
        at org.apache.axis2.engine.AxisEngine.send(AxisEngine.java:435)
        at 
org.apache.axis2.description.OutInAxisOperationClient.send(OutInAxisOperation.java:402)
        at 
org.apache.axis2.description.OutInAxisOperationClient.executeImpl(OutInAxisOperation.java:229)
        at 
org.apache.axis2.client.OperationClient.execute(OperationClient.java:165)
        [...]
Caused by: javax.jms.MessageFormatException: MQJMS1058: Invalid message 
property name: Content-Type
        at 
com.ibm.jms.JMSMessage.newMessageFormatException(JMSMessage.java:5001)
        at com.ibm.jms.JMSMessage.setStringProperty(JMSMessage.java:6149)
        at 
org.apache.axis2.transport.jms.JMSSender.createJMSMessage(JMSSender.java:365)
        at 
org.apache.axis2.transport.jms.JMSSender.sendOverJMS(JMSSender.java:159)
        ... 56 more

I found this forum thread about the same error from the Synapse/WSO2 ESB JMS 
code using WebSphereMQ: http://wso2.org/forum/thread/3805

And in this JIRA in Fuse: Change "Content-Type" String property in 
DefaultProviderMarshaler: http://fusesource.com/issues/browse/ESB-580
-> "The string "Content-Type" is not a valid Java identifier and therefore not 
allowed according to the JMS spec which states that property names must obey 
rules defined for an identifier. Other message brokers such as WebSphere MQ 
raise errors if "Content-Type" is used. [...] We need to change the string 
value "Content-Type" to a valid Java identifier, such as "ContentType" or 
"Content_Type"."

And in this mail about servicemix-jms: Exceptions in servicemix-jms with 
WebSphereMQ: 
http://mail-archives.apache.org/mod_mbox/geronimo-servicemix-dev/200608.mbox/%[email protected]%3e

The Content-Type shouldn't already be defined by the type of the JMSMessage 
(TextMessage / BytesMessage)?

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.

Reply via email to