[JBossWS] - Passing objects to JBoss Webservices
by paparaoa
Hello,
I have got a web method in my webservice as follows:
| @WebMethod
| public Hashtable<String,String> getPointValues(@WebParam(name="pointList") List<String> pointList)
| {
| Hashtable<String, String> pointValueList = new Hashtable<String, String>();
| for(int i=0;i<pointList.size();i++)
| {
| pointValueList.put(pointList.get(i),getValueForPoint(pointList.get(i)));
| }
| return pointValueList;
| }
|
I am making use of jboss remoting client to invoke the above method.
In the above method it takes argument as a list of string. I am forming a soap message and invoking the above method from my client as follows
Object response = remotingClient.invoke(soapmessage);
where the soap message is as follows:
| <soapenv:Envelope xmlns:obix="http://obixservice/obix" xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/">
| <soapenv:Header/>
| <soapenv:Body>
| <obix:getPointValues>
| <pointList>P003</pointList>
| <pointList>P002</pointList>
| <pointList>P004</pointList>
| <pointList>P001</pointList>
| <pointList>P005</pointList>
| <pointList>P007</pointList>
| <pointList>P006</pointList>
| <pointList>P010</pointList>
| <pointList>P009</pointList>
| <pointList>P011</pointList>
| <pointList>P008</pointList>
| <pointList>P012</pointList>
| </obix:getPointValues>
| </soapenv:Body>
| </soapenv:Envelope>
|
the getPointValues method mentioned above is expected to return hashtable.
But its returning a string containing soap message.
How do i make this method return a hashtable ?
Thanks
R.Naik
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4137263#4137263
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4137263
18 years, 1 month
[JBoss Cache: Core Edition] - FileCacheLoader failing with EOFException with fix
by e2open
File cache loader in a cluster was failing with EOF exception while restoring an object, under load. It looks like the original hash map was not getting written properly. The original code is given below:
protected void storeAttributes(Fqn fqn, Map attrs) throws Exception
{
File f = getDirectory(fqn, true);
File child = new File(f, DATA);
if (!child.exists())
if (!child.createNewFile())
throw new IOException("Unable to create file: " + child);
FileOutputStream out = new FileOutputStream(child);
ObjectOutputStream output = new ObjectOutputStream(out);
output.writeObject(attrs);
out.close();
}
Changing the code as given below seems to fix the issue.
protected void storeAttributes(Fqn fqn, Map attrs) throws Exception
{
File f = getDirectory(fqn, true);
File child = new File(f, DATA);
if (!child.exists())
if (!child.createNewFile())
throw new IOException("Unable to create file: " + child);
FileOutputStream out = new FileOutputStream(child);
try
{
MarshalledValueOutputStream output =
new MarshalledValueOutputStream(out);
output.writeObject(attrs);
output.close();
out = null;
}
finally
{
if(out != null)
out.close();
}
}
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4137259#4137259
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4137259
18 years, 1 month
[Installation, Configuration & DEPLOYMENT] - "Incomplete Deployment listing" after redeploying EJB jar
by ejain
I have a bunch of war/jar etc files in deploy/. Normal start-up works fine and when I replace one of the (EJB) jar files it is picked up and redeployed as expected, but right after that I get a long list with all the other files that weren't redeployed (why should they?):
2008-03-17 16:57:37 -0700 org.jboss.deployment.scanner.URLDeploymentScanner
| ERROR: Incomplete Deployment listing:
|
| --- Packages waiting for a deployer ---
| org.jboss.deployment.DeploymentInfo@d375da82 { url=file:/home/jboss/server/default/deploy/0020xyz-ejb.jar }
| deployer: null
| status: null
| state: INIT_WAITING_DEPLOYER
| watch: file:/home/jboss/server/default/deploy/0020xyz-ejb.jar
| altDD: null
| lastDeployed: 1205777355391
| lastModified: 1205777355000
| mbeans:
| ...
Despite the logged error, all seems to be working fine (and no other errors are logged). I'm using the PrefixDeploymentSorter, don't know if that makes a difference. This is on JBoss 4.0.2.
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4137252#4137252
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4137252
18 years, 1 month