Error message in wso2 dss - wso2

I'm using wso2 esb4.7.0 and wso2 dss 3.1.0.I have created a dataservice in dss and tested using try this service tool.It's working fine but when same dataservice is being fetch in esb using it's adress endpoint it showing following error -
ERROR {org.wso2.carbon.statistics.internal.ResponseTimeCalculator} - wso2statistics.request.received.time is null in the IN MessageContext
why so?is their any problem with esb?or it's internal problem?please let me know..

You have to set message headers using Header mediator. At least you have to set "To" and "Action" headers before you send payload to the data service. To get the write value of To and Action headers you can use Soap Tracer tool in monitor tab of WSO2-DSS management console. Run the tool, try the data service and refresh the tool to see the results of your trying. In the left side of the page of Soap Tracer tool you will see the To and Action, copy values from there and put them in header mediators you are using.

Related

Custom message builder to handle binary data - wso2 EI

1) I have an incoming message from IBM Legacy system, i need to convert it into XML/text and send it back to a client using WSO2 EI 6.1.1.
2) I am using apache kafka as a messaging queue here, hence i have created an inbound endpoint in wso2 EI.
3) I believe WSO2 EI by default doesn't have a binary builder, so i have written a custom message builder and added that JAR in EI_HOME/lib and added the message builder class in axis2.xml
4) I posted the binary message in to kafka topic, but still wso2 EI is not able to convert into desired format.
5) The message builder (logic) is working as a standalone java function and i can get expected response.
Any help to solve this issue would be appreciated.
Thanks
The content-type given in axis2.xml should match the content type given in kafka inbound endpoint.
the class path should be added in axis2.xml

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)

WSO2 - ESB server 4.7 Hangs- when an invalid json format is given as input for rest API

A REST API has been defined ESB. What we have observed is if the json format (invalid json),
the request is hanging and the server doesn't give any response. Ideally it should throw some
error at least and it should not hang.
I had the same situation in WSO2 4.8.1. Try to change JsonStreamBuilder in your axis2.xml to JsonBuilder from (org.apache.synapse.commons.json) or use your own implementation.

Request Structure in WSO2 DSS

I m working on WSO2 DSS 3.0.0. I m sending request structure via SOAP UI to DSS. I m not getting the expected output.
I want to check what is the request structure query that is hitting DSS.
In short I want to see what Query DSS is forming at runtime.
Any help would be appreciated.
Thanks and Regards.
The request format depends on the data service opertions you have created. Each of these opertion invokes an query. And these queries have input parameters and output parameters. The opertion name + input parameters will determine the format of the request message and the output parameters determine the result format of the message.
You can use the WSDL of the relevant data service for creating the SOAP UI project. Then the request message for each Data Service opertion will be there. Or you can simple try-it the dataservice using available Try-it[1] option for the service. There also you can see the request format for each operation.
[1]http://docs.wso2.org/wiki/display/DSS300/Testing+WSDLs

wso2 carbon - how to log the soap messages to the console with log4j

I would like to dump the soap requests and responses to the console.
I have tried setting up log4:
log4j.logger.httpclient.wire=DEBUG, CARBON_CONSOLE
log4j.logger.org.apache.commons.httpclient=DEBUG, CARBON_CONSOLE
However, this isn't logging any soap requests/responses.
I don't think you can do this with Log4J properties. I enabled TRACE for like following,
log4j.logger.org.apache.axis2.builder=TRACE
log4j.logger.org.apache.axis2.transport.http.ApplicationXMLFormatter=TRACE
log4j.logger.org.apache.axis2.transport.http.SOAPMessageFormatter=TRACE
Still you can't get the SOAP messages going in and out. If you're playing around with ESB then of course you can use the Log mediator in inSequence and outSequence to get the SOAP request/response
Easiest way would be to use a tool like TCPMon (shipped with all the WSO2 products and can be found in the bin folder) or SOAP UI.
Changing the logging in wso2 might help.
Go to Configure->Logging, and set the org.apache.axis2.transport.local.LocalTransportReceiver, org.apache.axis2.transport.local.LocalTransportSender, org.apache.axis2.transport.local.LocalResponder to the DEBUG level.
It will end up in the in the repository/logs/wso2carbon.log