I am trying to create a java call out function in OSB(version 11.1.3) to decode the URL. I can use java.net.URLDecoder.decode(data, "UTF-8"); in the program, but OSB function gives below error(When input and return type are String)
<Jun 11, 2014 7:43:30 AM UTC> <Error> <OSB Transform> <BEA-382516> <Failed to evaluate expression for callout to java method "public static java.lang.String com.help.sachinProject.ttttt.test(java.lang.String)". Argument index: 1, exception: Value of type 'org.apache.xmlbeans.impl.values.XmlAnyTypeImpl' cannot be type-cast to 'java.lang.String'>
<Jun 11, 2014 7:43:35 AM UTC> <Warning> <Socket> <BEA-000449> <Closing socket as no data read from it on 10.232.24.59:49,359 during the configured idle timeout of 5 secs>
So I should both input and return type as XmlAnyTypeImpl . How do I convert String to XmlAnyTypeImpl (XmlAnyTypeImpl available in xmlbeans.jar) ?
Here is my new program
import org.apache.xmlbeans.impl.values.XmlAnyTypeImpl;
public class XMLFormatDecode {
XMLFormatDecode(){
super();
}
public static String getValue(XmlAnyTypeImpl data)
{
String decoded = java.net.URLDecoder.decode(data.toString(), "UTF-8");
return decoded;
}
public static void main(String[] args) throws UnsupportedEncodingException {
new XMLFormatDecode();
System.out.println("Result main - "+XMLFormatDecode.getValue(null));
}
}
will XmlAnyTypeImpl.toString() works ?
Can someone help me to convert String to XmlAnyTypeImpl ?

