Win a copy of Mesos in Action this week in the Cloud/Virtualizaton forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Problem with Oracle Webservice based on SOAP

 
Brecht De Baets
Greenhorn
Posts: 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hello,

I have made some packages with Oracle Jdeveloper for some webservices.
Now I am trying the following code :

DECLARE
user_obj ora_java.jobject;
java_obj ora_java.jobject;

BEGIN

java_obj := XmlApiFrameworkServiceStub.New;

l_sessie := Xmlapiframeworkservicestub.Login(java_obj,'bdb','bdb');

user_obj := Xmlapiframeworkservicestub.Getuserinfo
(java_obj,l_sessie);

END;

The corresponding functions are the following :

FUNCTION login(
obj ORA_JAVA.JOBJECT,
a0 VARCHAR2,
a1 VARCHAR2) RETURN VARCHAR2 IS
BEGIN
args := JNI.CREATE_ARG_LIST(2);
JNI.ADD_STRING_ARG(args, a0);
JNI.ADD_STRING_ARG(args, a1);
RETURN JNI.CALL_STRING_METHOD(FALSE, obj, 'mypackage1/XmlApiFrameworkServiceStub', 'login', '(Ljava/lang/String;Ljava/lang/String Ljava/lang/String;', args);
END;

AND

FUNCTION getUserInfo(
obj ORA_JAVA.JOBJECT,
a0 VARCHAR2) RETURN ORA_JAVA.JOBJECT IS
BEGIN
args := JNI.CREATE_ARG_LIST(1);
JNI.ADD_STRING_ARG(args, a0);
RETURN JNI.CALL_OBJECT_METHOD(FALSE, obj, 'mypackage1/XmlApiFrameworkServiceStub', 'getUserInfo', '(Ljava/lang/String Lmypackage1/AlcUserInfo;', args);
END;

The Login function works. It gives back a string, but the other function (Getuserinfo) should give back a user defined type 'AlcUserInfo'.

When executing this function (Getuserinfo), I get the following exeption :

[SOAPException:
faultCode=SOAP-ENV:Client;
msg=No mapping found for 'http://schemas.xmlsoap.org/soap/encoding/:string'
using encoding style 'http://schemas.xmlsoap.org/soap/encoding/'.;
targetException=java.lang.IllegalArgumentException:
No mapping found for 'http://schemas.xmlsoap.org/soap/encoding/:string'
using encoding style 'http://schemas.xmlsoap.org/soap/encoding/'.]

How can I try to solve this error ?
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic