cancel
Showing results for 
Search instead for 
Did you mean: 

Consuming Java Doc base Web Service in Powerbuilder

Former Member
0 Kudos

soapconnection conn
faf_financeto_dcssoap lnv_hello_svc
conn = create soapconnection
conn.SetProxyServer ( "wsdl path","","")
conn.createinstance( lnv_hello_svc, 'faf_financeto_dcssoap')

String XMLstr, result

XMLstr =" <?xml version ='1.0' encoding ='UTF-8' standalone='no'?>"
XMLstr +=" <DEALERS> "
XMLstr +=" <DEALER ID ='J17002 ' NAME ='江西圆瑞实业有限公司'>"
XMLstr +=" <DEALER_CODE>J7910400 </DEALER_CODE>"
XMLstr +=" <CREDIT_MONEY>408255.49</CREDIT_MONEY>"
XMLstr +=" <IS_CLEAN>10011001</IS_CLEAN>"
XMLstr +=" </DEALER>"
XMLstr +=" <DEALER ID+='J23030 ' NAME+='枣庄鑫诚汽车销售服务有限公司'>"
XMLstr +=" <DEALER_CODE>N6320100 </DEALER_CODE>"
XMLstr +=" <CREDIT_MONEY>0</CREDIT_MONEY>"
XMLstr +=" <IS_CLEAN>10011001</IS_CLEAN>"
XMLstr +=" </DEALER>"
XMLstr +=" </DEALERS>"

result = lnv_hello_svc.newoperation( XMLstr)
MessageBox("Result", result)

When i call newoperation method it gives java.lan.nullpointer exception...
I consumed same service in .net console and it works perfectly.
After that i found some detail about JVM and EJB and write the program as

JavaVM i_jvm
EJBConnection lEJBCon
integer val

long ll_return
string properties[], classpath
i_jvm = create JavaVM


ll_return = i_jvm.createjavavm("C:\Program Files (x86)\Sybase\PB12.0\Shared\PowerBuilder\jdk1.6.0_02\jre\bin\client", false)

// Here it connectivity is fine return 1
lEJBCon = CREATE EJBConnection
ll_return = lEJBCon.createjavainstance( lnv_hello_svc, 'faf_financeto_dcssoap')

/* Here it returns -1, connectivity failed, used same parameter in connections that works perfect conn.createinstance( lnv_hello_svc, 'faf_financeto_dcssoap')*/

So two problem, calling function without using JVM and EJb returns Null pointer exception but work same thing from .net

In second case EJBCon.Createjavainstance retuns -1 connectivity failed.

Any suggestion or topic how to consume Doc base Java web service in PB12.0 classing please.

Accepted Solutions (0)

Answers (0)