SMPP component and problem with valid period (relative) and data message

2014-10-28 Thread hanusto
Hello,

I have two questions for SMPP camel component:

1) how to set valid period as relative ? It can be defined in absolute time
format or relative time format if you provide it as String as specified in
chapter 7.1.1 in the smpp specification v3.4. in format "010R"
as one day: 

exchange.getIn().setHeader(SmppConstants.VALIDITY_PERIOD,
constant("010R"));

but in packet trace I see deafult value because this format is incorrect,
probably, but exactly based upon specification. Maybe bug?

2) I would like to send push sms (m-notification-ind PDU type). As content
of message (exchange.getIn().setBody()) I am sending byte array as whole
message with UDHI segment. Data coding schema is "Octet unspecified (8-bit
binary) (0x04)". Problem is that SMPP component calculates length of message
and EsmClass is configured in right way only if length is greater than 140
number of bytes.

In SmppSubmitSmCommand:
template.setEsmClass(new ESMClass(MessageMode.DEFAULT,
MessageType.DEFAULT,
GSMSpecificFeature.UDHI).value());

I think that message size is not related to UDHI and therefore why is
splitted and after that if segments is more than one, EmsClass with UDHI is
configured properly?

Please, is here any solution how to send m-notification-ind PDU type? As hot
fix I checkout SMPP camel component and use custom modification of this
behaviour.

Thanks,
Tomas



--
View this message in context: 
http://camel.465427.n5.nabble.com/SMPP-component-and-problem-with-valid-period-relative-and-data-message-tp5758217.html
Sent from the Camel - Users mailing list archive at Nabble.com.


Re: SMPP component and problem with valid period (relative) and data message

2014-11-02 Thread hanusto
Hi Christian,

I know how this camel component uses jsmpp library, but in fact it looks
like bug in jsmpp library because the only way to set the date is as
absolute. Or have you tried it? e.g.: 010R - it is right value.

Tomas



--
View this message in context: 
http://camel.465427.n5.nabble.com/SMPP-component-and-problem-with-valid-period-relative-and-data-message-tp5758217p5758440.html
Sent from the Camel - Users mailing list archive at Nabble.com.


Re: SMPP component and problem with valid period (relative) and data message

2014-11-02 Thread hanusto
Hi Willem,

I hope I sets message header correctly, same way as DataConfig and so on and
data config is ok. I know this link, but problem is that smpp component adds
ESM message class with GSMSpecificFeature.UDHI only and only if content of
message data will be splitted into more messages (Concatenated short
messages), please check [1]. But my message is M-Notification-Ind (MMS -
push SMS), so this is EMS message, no text and therefore I need to configure
EMS class properly without depending on the size of the message.

Quick fix is add custom ESM class with UDHI flag and this override default
esm class.

protected SubmitSm[] createSubmitSm(Exchange exchange) {
byte[] shortMessage = getShortMessage(exchange.getIn());
SubmitSm template = createSubmitSmTemplate(exchange);
SmppSplitter splitter = createSplitter(exchange.getIn());
byte[][] segments = splitter.split(shortMessage);
// multipart message
//TODO (thanus, 28.10.14, TASK: DT-23) custom fix for UDHI (ESM
class)
final ESMClass esmClass =
exchange.getIn().getHeader(SmppConstants.ESM_CLASS, ESMClass.class);
if (esmClass != null) {
template.setEsmClass(esmClass.value());
} else {
if (segments.length > 1) {
template.setEsmClass(new ESMClass(MessageMode.DEFAULT,
MessageType.DEFAULT,
GSMSpecificFeature.UDHI).value());
}
}
SubmitSm[] submitSms = new SubmitSm[segments.length];
for (int i = 0; i < segments.length; i++) {
SubmitSm submitSm = SmppUtils.copySubmitSm(template);
submitSm.setShortMessage(segments[i]);
submitSms[i] = submitSm;
}
return submitSms;
}

[1] http://en.wikipedia.org/wiki/User_Data_Header



--
View this message in context: 
http://camel.465427.n5.nabble.com/SMPP-component-and-problem-with-valid-period-relative-and-data-message-tp5758217p5758441.html
Sent from the Camel - Users mailing list archive at Nabble.com.


Problem with getting SOAP Header from response for spring-ws

2014-12-02 Thread hanusto
Hello,

we have problem with getting SOAP Header
(SpringWebserviceConstants.SPRING_WS_SOAP_HEADER) from response. For
communication we use spring-ws.

Response looks like:

http://schemas.xmlsoap.org/soap/envelope/";
xmlns:test="http://www.test.com";>
   
  asdasdasd
   
   
  
   


when we call
exchange.getIn().getHeader(SpringWebserviceConstants.SPRING_WS_SOAP_HEADER),
we retrieve SOAP Header for request, no for response. In source code of
spring-ws component I see that this is not at all solved. Please is there
any solution how to get SOAP Header from response?

Tomas





--
View this message in context: 
http://camel.465427.n5.nabble.com/Problem-with-getting-SOAP-Header-from-response-for-spring-ws-tp5759949.html
Sent from the Camel - Users mailing list archive at Nabble.com.


Re: Problem with getting SOAP Header from response for spring-ws

2014-12-04 Thread hanusto
Hi,
whole spring-ws component is cumbersome for processing of SOAP Header -
outgoing with configuration that and parsing from response. For example
check it:
http://leakfromjavaheap.blogspot.cz/2014/05/multiple-soap-headers-in-apache-camels.html.
On project I need send multiple soap header element without root element and
also parse retrieved SOAP Header from response. I use as on the link
ClintInterceptor maybe we can add possibility how to solve better without
implement everything around.

Tomas



--
View this message in context: 
http://camel.465427.n5.nabble.com/Problem-with-getting-SOAP-Header-from-response-for-spring-ws-tp5759949p5760183.html
Sent from the Camel - Users mailing list archive at Nabble.com.


Possibility to track (monitor) inbound/outbound messages (request/response)

2015-01-12 Thread hanusto
Hello everybody,

I am looking for the best way how to track or monitor (for example persist
info into database) inbound message (we are a server) such as request (for
example for WS) and our response (or fail).

For example, for the same functionality for outbound messages (where we are
client) we use custom implementation of
EventNotifierBase for sending and ExchangeSentEvent
for info about received response.

I found JPA implementation for tracing messages
(http://camel.apache.org/tracer-example.html) using tracer. But for now I
don't know what can I expect from it.

Requirements are:
- trace inbound requests (messages) and responses for there (without
complete flow of route - no tracing the route)
- if some error occurs we need trace errors
- it could be based upon "FromEndpoint" - trace message only if
"FromEndpoint" is registered, otherwise no

Camel provides TraceEventHandler, maybe it is one way how to resolve it? For
implementation I would create custom Camel endpoint (as Tracer endpoint)
which encapsulates of persisting JpaTraceEventMessage entity. This component
will route JpaTraceEventMessage  to JPA endpoint only if "FromEndpoint" will
be configured as accepted, otherwise no. For pairing requests and responses
I can use "ExchangeId". But how to resolve last node in route, "ToNode" will
be blank? In Out.Body there will be response, right? 

Or Camel provides some types of events such as
ExchangeSendingEvent/ExchangeSentEvent?

Thank you very much in advice

Tomas



--
View this message in context: 
http://camel.465427.n5.nabble.com/Possibility-to-track-monitor-inbound-outbound-messages-request-response-tp5761583.html
Sent from the Camel - Users mailing list archive at Nabble.com.


Re: Possibility to track (monitor) inbound/outbound messages (request/response)

2015-01-29 Thread hanusto
Thanks Willem, I did it via onComplete and onFailure as implementation of
Processor, Synchronization.

Tomas



--
View this message in context: 
http://camel.465427.n5.nabble.com/Possibility-to-track-monitor-inbound-outbound-messages-request-response-tp5761583p5762237.html
Sent from the Camel - Users mailing list archive at Nabble.com.