I need to create custom mapping to parse the T24 transaction response.
The default mapping is working perfectly with the T24 inquiry response but not with the transaction response.
Examples for such inquiry are as follows:
*BI1427400008//1,TRANSACTION.TYPE=CD.NEW:1:1,DESCRIPTION=New Certificate ofDeposit:1:1,CUSTOMER.ID=1000304:1:1,DR.ACCOUNT=0220100030410500:1:1,DR.CCY=EGP:1:1,DR.AMOUNT=1500:1:1,VALUE.DATE=20141001:1:1,TXN.REFERENCE=LD1427400035:1:1,CR.CCY=EGP:1:1,CR.AMOUNT=1500:1:1,CD.TYPE=EGP10.500.6M.36M:1:1,MATURITY.DATE=20171001:1:1,PRIN.LIQ.ACCOUNT=0220100030410500:1:1,INTR.LIQ.ACCOUNT=0220100030410500:1:1,INTREST.RATE=12.0625:1:1,INTREST.AMOUNT=90.22:1:1,BRANCH=2:1:1,PROCESS.DATE=20141001:1:1,OFS.REQUEST.ID=ACCDI142740000832197.00:1:1,CURR.NO=1:1:1,INPUTTER=8_VERIPARK___OFS_TCS:1:1,DATE.TIME=1410300856:1:1,AUTHORISER=8_VERIPARK_OFS_TCS:1:1,CO.CODE=EG0010001:1:1,DEPT.CODE=17:1:1*
I need help to parse the above response, or create a custom mapping, please support.
This is comma separate string of OFS message, default Syntax of OFS Message is
APPLICATION,VERSION/COMMAND/SUBCOMMAND,USER/PASSWORD,ID,DATA
It should work with default parsing otherwise you can write your own parser in your preferred language.
Related
I have a problem with the response I get from the soap service.
I set the "SetSslClientCertPfx" with invoke method:
certificate name
password
I set the "SetRequestHeader" with invoke method:
Content-Type
text/xml; charset=UTF-8
I set the "SetRequestHeader" with invoke method:
SOAPAction
urloftheaction
Invoke method "PostXml":
Server link
blob with file content
utf-8
I check for errors with "get.LastErrorText"
I get the response with "get.bodyStr"
For the result, I have a char(32000) field. I tried increasing this to 64000 characters but that way I get an empty result. I also tried to replace the char field with the blob. That also didn't work. It's like the method itself is limited to 32000 chars.
I read that for large results I should use "LastStringResult" but it only works for MySQL. Is there a solution to my problem?
I'm assuming the content returned in the body of the HTTP response is XML? (or perhaps JSON?) In either case, the best thing to do is to avoid getting the returned content as a string. Let me explain...
For example, instead of calling response.GetBodyStr(), call response.GetBodyXml(xmlObj) (see https://www.chilkatsoft.com/refdoc/xChilkatHttpResponseRef.html#method4 )
The GetBodyXml method loads the response body into the XML object passed in the argument. Then your application can work with the contents of the XML via the Chilkat XML API, i.e parsing out the various parts as needed.
In JAX-WS usually the response object will be a string or an XML format.
Can we have 2 kinds of response objects.
I mean, based on flag, XML or JSON as response output?
Is there any Objectwrapper kind of solution?
Am new to JAX-WS ,So am totally clueless. Thanks
According to Wikipedia here, you don't need XML to represent the SOAP message. But it looks like you will need SOAP bindings that support JSON. Reading the description in that article makes it sound like you can't just set a flag and have the response format change based on that.
If you want something where you set a flag to generate a different response format, consider a REST architecture instead. In REST, you would send a different Accept header to specify the format of the response you want. There wouldn't need to be a flag in your application specific data to handle the data format since that's more of metadata concern anyways.
what is the most practical way to access form values within a request-level IIS7 http module?
From the HttpContext.Request object. For example:
HttpRequest request = HttpContext.Current.Request;
String myFormValue = request.Form["myFormName"];
it looks like the most practical way is to intercept onbeginrequest and parse all the input manually if the input is either marked as urlencoded or multipart.
I am using KSoap2 for consume web service in my application. I need to send date as parameter in the request.
Can anybody know how to send date as a parameter and send the request and please give the sample code for it.
Does Ksoap2 support date format?
Thanks
It has worked best for me to format the date into a string and pass it through the webservice as a string. When receiving a string you just parse the string for a date. Keep in mind that you will have to know what format the date should be formatted as.
For automatic marshalling you can also get date to work, although you might have to implement a marshaller that support the format you need for your webservice. See the Float example in the ksoap2-android code base.
I am using the KSOAP2-android library. It already has a MarshalDate class that you just need to register to your SoapSerializationEnvelope.
SoapSerializationEnvelope soapEnvelope = new SoapSerializationEnvelope(SoapEnvelope.VER11);
soapEnvelope.setOutputSoapObject(soapRequest);
soapEnvelope.dotNet = true;
new MarshalDate().register(soapEnvelope); //This will enable you to pass a Date object as a parameter to your web service
You need to tell KSOAP how to serialize and deserialize the date - for that you need to write a class that implements the Marshal interface and register the envelope for that Marshal. This also holds for other data types, such as double.
Here is a tutorial on how to do it:
Implementing KSOAP Marshal Interface
Simplified code example: http://pastebin.com/9ZQxSXi9
Hi
I wanted to experiment with the restlet 2.0 library and the gpodder webservice but somehow i reached a point where I can't see the wood for the trees.
The service in the example requires HTTP authentication and to post some JSON content to a URL.
Nothing that complicated but somehow even though the debug view claims the request object to contain the necessary content the RESTful webservice's response leads me to believe the HTTP header of the request was missing the content.
Any ideas on what's the reason? Thanks in advance.
The problem is that that none of the implementation of WriterRepresentation I've seen (JsonRepresentation, JacksonRepresentation, XStreamRepresentation) set the size of the representation when an object is passed. So if you create a new JacksonRepresentation(map) the size is not calculated.
You have to compute manually the length of the map content and calling Representation.setSize().
Or, as I did, use a
new JsonRepresentation(" a json string... ");
This constructor is able to compute the size, of course, that's the string length, so the proper content-length header is set and everything works smooth.