Hey guys/gals...
I have a java program that I call as a COM object from an ASP page. What it does is takes a request, does an MQSeries transaction, and the result is a 1000 byte string, which I pass back to the ASP for parsing (using Mid function which is similar to substring) and then, I paint the page with the results.
What I want to do is parse the message in java, and return the variables. This has me a little confused.
One way that I see to do it is to set up public strings for each of the vars
public String partNumber (String part)
{
part = msgTxt.substring(1,30)
return part;
}
public String vendorCode (String vendor)
{
vendor = msgTxt.substring(1,30)
return vendor;
}
Then, call them from the ASP page like:
set javaObject = GetObject("java:COMStocReqReply"
PartNumber = javaObject.partNumber(PartNumber)
VendorCode = javaObject.vendorCode(VendorCode)
This doesn't seem like the best way to do this. I am looking for a fundamentally better approach. Who knows, maybe this is the best way, but any input/help would be appreciated.
Thanks!
gordon
I have a java program that I call as a COM object from an ASP page. What it does is takes a request, does an MQSeries transaction, and the result is a 1000 byte string, which I pass back to the ASP for parsing (using Mid function which is similar to substring) and then, I paint the page with the results.
What I want to do is parse the message in java, and return the variables. This has me a little confused.
One way that I see to do it is to set up public strings for each of the vars
public String partNumber (String part)
{
part = msgTxt.substring(1,30)
return part;
}
public String vendorCode (String vendor)
{
vendor = msgTxt.substring(1,30)
return vendor;
}
Then, call them from the ASP page like:
set javaObject = GetObject("java:COMStocReqReply"
PartNumber = javaObject.partNumber(PartNumber)
VendorCode = javaObject.vendorCode(VendorCode)
This doesn't seem like the best way to do this. I am looking for a fundamentally better approach. Who knows, maybe this is the best way, but any input/help would be appreciated.
Thanks!
gordon