Identifiant trop long: BasicHttpBinding
Bonjour,
J'ai ce code Java Web Service Client qui fonctionne depuis Eclipse Indigo:
Code:
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53
|
import java.net.MalformedURLException;
import java.rmi.RemoteException;
import org.apache.axis.AxisFault;
import org.tempuri.*;
public class essai_libelle {
/**
* @param args
* @throws RemoteException
*/
public static void main(String[] args) {
BasicHttpBinding_IProduitsStub wc = null;
try {
ProduitsLocator locator = new ProduitsLocator();
java.net.URL url =
new java.net.URL(locator.getBasicHttpBinding_IProduitsAddress());
wc = new BasicHttpBinding_IProduitsStub(url, locator);
//String sforceURI = locator.getBasicHttpBinding_IProduitsAddress();
//wc.setHeader(sforceURI, "SessionHeader", sh);
} catch (AxisFault e1) {
// TODO Auto-generated catch block
e1.printStackTrace();
} catch (MalformedURLException e) {
// TODO Auto-generated catch block
e.printStackTrace();
}
ParamProduit p = new ParamProduit();
p.setCode("SM24");
p.setAskerCode("SV");
p.setBLibelles(true);
ElemContrat e = null;
try {
e = wc.getProductPrice(p);
} catch (RemoteException e1) {
// TODO Auto-generated catch block
e1.printStackTrace();
}
System.out.println
( "LBP = " + e.getLibelles()[0].getLbl_libelle() );
}
} |
Mais ce serait trop simple, je dois importer tout le package dans Oracle Forms 11 pour consommer le Web Service.
Tout va bien lors de l'import des classes Java, mais quand j'essaie de coder dans une procédure PL/SQL:
Code:
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24
| declare
lv_var varchar2(5) := '---';
jo ora_java.jobject;
xo ora_java.jobject;
ex ora_java.jobject;
wc ora_java.jobject;
locatore ora_java.jobject;
url ora_java.jobject;
p ora_java.jobject;
e ora_java.jobject;
rv varchar2(1000);
begin
lib_alert( 'Début de appel Java' );
wc := BasicHttpBinding_IProduitsStub.new;
p := ParamProduit.new;
e := essai_libelle.new;
locatore := ProduitsLocator.new;
rv := ProduitsLocator.getBasicHttpBinding_IProduitsAddress( locatore );
exception
when others then
lib_alert( 'Exc en PB JAVA: ' || sqlerrm );
end; |
,
Oracle Forms refuse de compiler car l'identifiant "getBasicHttpBinding_IProduitsAddress" est trop long.
Je ne sais pas si c'est une méthode native de la classe Java qui appelle le Web Service ou bien si c'est codé par un développeur, auquel cas je pourrais lui demander de limiter la longueur de ses identifiants à 25 lettres.
Je suis bien perplexe..
Merci d'avance si vous pouvez m'apporter votre aide.