Fabio

Please can you raise a JIRA about allowing the addition of custom JMS headers.

Thanks

Paul

On 2/8/07, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote:



Hi all,
I am new to Axis2 and to axis in general.

I need to create an Axis2 client starting from the WSDL provided by the
server.
I have gone through changing the axis2.xml file with the filowing
information:

<transportReceiver name="jms"
class="org.apache.axis2.transport.jms.JMSListener">
    <parameter name="TibcoQueueConnectionFactory"
locked="false">
            <parameter name="java.naming.factory.initial"
locked="false">com.tibco.tibjms.naming.TibjmsInitialContextFactory</parameter>

            <parameter name="java.naming.provider.url"
locked="false">tibjmsnaming://localhost:7222</parameter>
            <parameter
name="transport.jms.ConnectionFactoryJNDIName"
locked="false">QueueConnectionFactory</parameter>
    </parameter>
</transportReceiver>

<transportSender name="jms"
class="org.apache.axis2.transport.jms.JMSSender"/>

and after that I have used the wsdl2java tool to generate the java stub. I
have then created a simple client that was using this stub:

public class testAxis2JMS {
        /**
         * @param args
         */
        public static void main(String[] args) {
                // TODO Auto-generated method stub
        try{
                String endpointURL = "jms:/TCM.INTEGRAT.REQ.ADDRESS?"
                +
"transport.jms.ConnectionFactoryJNDIName=QueueConnectionFactory"
                + "&java.naming.factory.initial="
                  +
"com.tibco.tibjms.naming.TibjmsInitialContextFactory"
                +
"&java.naming.provider.url=tibjmsnaming://localhost:7222"
                + "&java.naming.security.principal=user"
                +
"&java.naming.security.credentials=password";

                IntfTestWSfromXSDProcessServiceStub stub =
                        new
IntfTestWSfromXSDProcessServiceStub(endpointURL);
                Indirizzo ind = new Indirizzo();
                ind.setCitta("Rome");
                ind.setNumero(2);
                ind.setVia("blabla");

                Output out = stub.TestWSfromXSDProcessOp(ind);
                System.out.println("Code : " + out.getCode());
                System.out.println("Me : " + out.getMsg());
        } catch(Exception e){
            e.printStackTrace();
            System.out.println("\n\n\n");
        }

        }
}

Now when I send the request to the jms server the message is successfully
sent. The problem is that the web service that I am calling needs to have
some more information on the JMS header sent from my client to the jms
server.

 The jms message sent look like this:
 $Header:
JMSMessageID=ID:EMS-SERVER.8A445C9FBB14:3
JMSTimestamp=Wed Feb 07 17:18:09 CET 2007
JMSDestination=Queue[TCM.INTEGRAT.REQ.ADDRESS]
JMSDeliveryMode=PERSISTENT
JMSCorrelationID=null
JMSType=null
JMSReplyTo=Queue[$TMP$.EMS-SERVER.8A445C9FBB14.3]
JMSPriority=4
$Properties:
SOAPAction="test/Axis2"
$Body:
<?xml version='1.0' encoding='utf-8'?><soapenv:Envelope
xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/";><soapenv:Header
/><soapenv:Body><ns1:Indirizzo
xmlns:ns1="http://www.tibco.com/schemas/eChannel/Schema.xsd";><ns1:citta>Rome</ns1:citta><ns1:via>blabla</ns1:via><ns1:numero>2</ns1:numero></ns1:Indirizzo></soapenv:Body></soapenv:Envelope>

The problem is that it should look like this:

$Header:
JMSMessageID=ID:EMS-SERVER.8A445C9FBB184:8
JMSTimestamp=Thu Feb 08 10:09:16 CET 2007
JMSDestination=Queue[TCM.INTEGRAT.REQ.ADDRESS]
JMSDeliveryMode=PERSISTENT
JMSCorrelationID=null
JMSType=null
JMSReplyTo=Queue[$TMP$.EMS-SERVER.8A445C9FBB185.7]
JMSPriority=4
$Properties:
Content_Type=application/xml; charset="utf-8"
Mime_Version=1.0
SoapAction="test/Axis2"
$Body:
<?xml version='1.0' encoding='utf-8'?><soapenv:Envelope
xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/";><soapenv:Header
/><soapenv:Body><ns1:Indirizzo
xmlns:ns1="http://www.tibco.com/schemas/eChannel/Schema.xsd";><ns1:citta>Rome</ns1:citta><ns1:via>blabla</ns1:via><ns1:numero>2</ns1:numero></ns1:Indirizzo></soapenv:Body></soapenv:Envelope>

There are this two properties in the jms message header (Content_Type and
Mime_Version) that I need to add in order to make the Web Servixce server
work.

Is it possible to do anything like this form the client side?
I have tried to check withtin the Axis2 Api but i did not successfully find
a way to add this information.

Is there anyone that can help me?

Thanks a lot in advance.

Cheers,
 Fabio


--
Paul Fremantle
VP/Technology, WSO2 and OASIS WS-RX TC Co-chair

http://bloglines.com/blog/paulfremantle
[EMAIL PROTECTED]

"Oxygenating the Web Service Platform", www.wso2.com

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to