Send custom JMS Header with axis2 - web-services

We have a webservice that is used to send messages over JMS between two installations of the same application.
We generate axis2 webservice client with axis2-wsdl2code-maven-plugin from our wsdl file. We are using Tibco and messages are sent through a topic.
We need to send a JMS header like bellow
SoapAction "Custom value"
Is there any solution for this?
I updated with the value needed on Tibco side but it was sended as a property and not as a header. See bellow a fragment from the message:
Header={ JMSDestination={TOPIC:'topic'} ...}
Properties={"SOAPAction"={string:'our value'}}
Body={string:'message'}
I found also http://eai.ittoolbox.com/groups/technical-functional/tibco-l/axis2-with-jms-java-client-and-bw-server-soap-over-jms-1331763 that looked promissing but didn't worked either.
Thank you,
Boris

There was a miscommunication between our team and tibco team and we used the wrong wsdl to send messages. After we changed the wsdl everything went well.

Related

Error sending MTOM request to WSO2 ESB

I'm using wso2 ESB in order to mediate request from a client to a web service, but I can't send MTOM attachments. ESB replies with error "Mime parts not found".
The sample MTOMSwASampleService give me same error too.
Can anyone help me? How can I send MTOM attachments through ESB?
Try preserving Content-type header and see.
Add the following property to repository/conf/passthru-http.properties file.
http.headers.preserve=Content-Type

How can I realize "protocol mediation" in a WSO2 ESB project?

I am studying how to realize a real "protocol mediation" using a WSO2 ESB used for collecting several messages in different protocols (http, amqp, mqtt...) and data format.
How can I use ESB features (mediators, for example) in order to realize a real synergy among several different protocols? Do I need some other modules of WSO2 or the ESB can make it on his own?
I hope my first question is clear.
Edit: i would need to treat XML files, exactly SDMX files. Can I transport them mediating an SDMX message in a simple XML message? Thx.
For the protocol mediation,(ie: protocol switching) you can try out Proxy services, which receive message from one protocol and sending to another service endpoint which runs on another protocol. When the message pass through the system, you can use mediators to modify the messages.
You can follow the documentation for further information

How to turn off Envelope and Body in SOAP request

This is critical to my current project. I have written a client in C++ using Windows web services. This client talks to the Clickatell SMS SOAP web service. I have tested the request using the SOAPUI tool and get correct response. I also receive the SMS message. Now, when I do this programmatically it fails because the WsCall() [in the code generated from WSDL via wsutil.exe) inserts even though the SOAP request I have already includes Envelope and Body. I cannot take out my Envelope since I have namespace specified in it like this:
http://schemas.xmlsoap.org/soap/encoding/\" xmlns:s=\"http://schemas.xmlsoap.org/soap/envelope/\" xmlns:xsd=\"http://www.w3.org/2001/XMLSchema\" xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\" xmlns:SOAP-ENC=\"http://schemas.xmlsoap.org/soap/encoding/\" xmlns:tns=\"soap.clickatell.com\">
I know that the additional Envelope and Body are inserted since I see it in the Fiddler tool.
Any help I can get is highly appreciated!
Looks like you are using the older type rpc/encoded soap api.
Have you tried using the document/literal service?
(http://api.clickatell.com/soap/document_literal/webservice.php?wsdl)

Send/Receive a SOAP request using SPRING JAVA

I am new to Spring web services. I am going to create an xml request, and send it as a SOAP request to a web service and receive the response.I read different documents but still confused as I could not find a working sample yet.
I know that I should use WebServiceTemplate and WebServiceMessageSender, SaajSoapmessageFactory (please let me know if I am wrong) but not sure how to use them.
Do I need WSDL? if yes why?
If you have any sample code please send me to get clear on it.
Thanks
If you want to send SOAP requests, you would like to be a SOAP client. Seems like you want to use spring-ws project. Check out their great documentation on the client side. The same documentation will guide you through the process of creating a server. There are plenty of examples and ready-made configuration snippets waiting for you.
Spring-WS is built on top of XML Schema description of your message, so you will need WSDL to generate e.g. JAXB models of your requests and responses.
AFAIK, for "web services" , the WSDL file is the machine blueprint of the "ports" as they are called However! ports in WSDL "means" java language(or any other programming language used with a routine or sub or procedure or function) method and has a specific naming scheme associate the .wsdl xml file(template of the service). Each WSDL port(language method) has specifications of return value and data specifications for how to feed it arguments and their type values.

SOAP over JMS for starters

We have a web service which has been running on SOAP over HTTP using Apache CXF, and needs to be switched to SOAP over JMS. This is relatively new grounds for me and the internet didn't seem to give all the answers for me, or i couldn't understand much of it.
It would be really helpful if anyone of the experienced veterans explain the steps to get this conversion from HTTP ot JMS (in simple english which you guys do best) so that i could understand and implement it.
Also would like to get any info on checking if the SOAP over JMS is transparent (whether we could monitor the request & response).
Thanks in advance and cheers!!
The Internet can provide plenty of examples. Here is something to start:
SOAP over JMS by CXF and Advanced CXF configuration for JMS
The move from WS inbound call to JMS inbound message is quite transparent.
Simple high-level steps (in simple English to start with):
(a) Setup your JMS server
make sure it works by testing it - send messages to it using OpenJMS, Hermes, or some other client.
(b) In the CXF setup the connection to the JMS server and specific Queue
(c) Inbound messages: in your code, create an MDB (MessageDrivenBean) class, which is linked to the CXF connection setup
(d) Outboud messages: in your code, define a controller which uses the Context of CXF to get the connection and session to the JMS - and can send a message using them.
I'll be happy to hear how it goes.