on 07-25-2014 1:03 PM
Hi All,
we have done the webservice coding in JAVA with SOAP UI. Now we are tried to invoke the service through PowerBuilder. While accesing the WSDL from Web Service Proxy , I am not able to invoke the service with Easy Soap. if i click the Radio Button ".Net Engine". i can able to invoke the service and get the all functions, while trying with soap i got invalid wsdl file error.
WSDL: https://dev.services.edpm.usb.metlife.com/dpm/services/PartyServices/PartyServices.wsdl
when i proceed with the .Net, I am getting error on the service
Long ll_ret
string ll_v1 = 'STRK', ll_v2 = "Test"
party ll_ReturnVal
String str_proxy_name = "partyservices"
//String ls_url = "https://dev.services.edpm.usb.metlife.com/dpm/services/PartyServices"
SoapConnection lsc_Conn
partyservices lproxy_obj
lsc_Conn = create SoapConnection
lsc_Conn.SetOptions("SoapLog=~"C:\\soaplog.txt~"")
ll_ret = lsc_Conn.CreateInstance(lproxy_obj, str_proxy_name)
IF ll_ret <> 0 THEN
MessageBox("Error","CreateInstance failed " + String(ll_ret))
return
END IF
Try
ll_ReturnVal = lproxy_obj.findpartybynaturalidv2(ll_v1, ll_v2) //Getting Error in this line
MessageBox("Message", String(ll_v1) + "+" + String(ll_v1) + "=" + String(ll_ReturnVal))
Catch ( SoapException e )
MessageBox("Error","Exception: " + e.getmessage())
end try
Destroy lsc_Conn
In the findpartybynaturalidv2 function we are getting the error as, Exception: The SoapClient doesn't Support .NET Proxy. I have attached the wsdl file in the txt format for your reference.
Please help me on this issue, I am using PowerBuilder12.5 Classic version
Thanks
Naresh
The SoapClient doesn't Support .NET Proxy.
There are 2 PBNI extensions used to support web service calls.
pbsoapclientXXX.pbx - The SoapClient engine
pbwsclientXXX.pbx - The .Net engine
(Where XXX is the version of PowerBuilder).
You need to include one, and only one, in your library path or import it into a PBL.
You've used the .Net engine, but you've included the SoapClient extension (pbsoapclientXXX.pbx). You need to make sure the extension you've added is the .Net engine one (pbwsclientXXX.pbx).
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Thanks a lot Bruce, Its nearly resolved my issue. But still i am not able to reach the service due to datapower. My webservice is under the datapower. Can you please explain how to pass the datapower values to the webservice? i.e below are my input for the datapower.
Thanks in advance.
<soapenv:Envelope
xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/"
xmlns:user="http://services.ead.metlife.com/User"
xmlns:par="http://services.edpm.usb.metlife.com/party">
<soapenv:Header>
<s:Security soapenv:mustUnderstand="1" xmlns:s="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd"
xmlns:u="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd">
<s:UsernameToken
u:Id="unt_20">
<s:Username>xxxx</s:Username>
<s:Password Type="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-username-token-profile-1.0#PasswordText">xxxx</s:Password>
<u:Created>2014-04-28T08:35:09.288Z</u:Created>
<s:Nonce>Cl0u0I0NncM/zaiM5hlzUMA6d/UlnE1EAvyXF1CWe6g5bEG/s1V2cL7PjFzWebrOc+58y0f8ZRLrbHHTmwK297U4uc7JdTmBBZmtQMkifKVdhn8TnwZoxvReJM33B1Q22NKg5S2MJPy/GUSs0hL8ksu5uKS1axje64Fnq/y92xE=
</s:Nonce>
</s:UsernameToken>
</s:Security>
</soapenv:Header>
<soapenv:Body>
<par:findPartyByNaturalIdV2>
<!--Optional: -->
<origin>SSO</origin>
<!--Optional: -->
<value>groupuser2</value>
</par:findPartyByNaturalIdV2>
</soapenv:Body>
</soapenv:Envelope>
If the information is in the body as you've indicated here, it should be represented in the WSDL.
The times I've been involved with a web service fronted by datapower we used WS-Security, which requires a number of parameters in the header. For that, you would need to look at using the WCF client in PowerBuilder.Net, as the .Net engine in PowerBuilder Classic isn't capable of support it.
Hi Bruce,
Thank you for you clarrification, But we were not able to go with PowerBuilder.Net now. So we are planning to consume an internal webservice from powerBuilder to resolve this issue.
My question now is, I have created a JAVA proxy and tried to invoke the webservice. but while assigning a value to the argument which is JAVA object, our application is crashing. I believe there is an issue while assigning the value to the applicationid. But while typing the code, function name and application ID is autopopulating through dot notation. Please find the below code
Long ll_ret
getapplicantinforesp ll_ReturnVal
getapplicantinforeq lnv_Request_data
String str_proxy_name = "sohformservice"
string str_request_data = "getapplicantinforeq"
Soapconnection lsc_Conn
sohformservice lproxy_obj
lsc_Conn = create Soapconnection
lsc_Conn.SetOptions("SoapLog=~"C:\\soaplog.txt~"")
ll_ret = lsc_Conn.CreateInstance(lproxy_obj, str_proxy_name)
IF ll_ret <> 0 THEN
MessageBox("Error","CreateInstance failed " + String(ll_ret))
return
END IF
Try
lnv_Request_data.ws_applicationbase.applicationid = "123456" //Application Crashing here
ll_ReturnVal = lproxy_obj.getapplicantinfo(lnv_Request_data)
Catch ( SoapException e )
MessageBox("Error","Exception: " + e.getmessage())
end try
Destroy lsc_Conn
Do we need to assign the value in any other different way?? i have attached the snapshot of the proxy object for your reference
Your attachment didn't come through.
Just a note that if you are using the .Net engine, then this statement has no effect.
lsc_Conn.SetOptions("SoapLog=~"C:\\soaplog.txt~"")
You need to use something like Fiddler or Charles to trap the messages sent to and from the web service.
Depending on the version of PowerBuilder you are using, PowerBuilder will have generated either structures or non-visual objects to represent the data classes being passed. More recent versions create non-visual objects, which is better for correctly handling null values However, the downside is that you need to explicitly created elements within nested non-visual objects if you need to pass them. If your data classes are non-visual objects, you'll need to do this:
lnv_Request_data.ws_applicationbase = create <whatever the class of that attribute is>
lnv_Request_data.ws_applicationbase.applicationid = "123456"
Did you put your URL in a Browser? I got a message that web page not available. It could be an authentication issue.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
93 | |
10 | |
10 | |
9 | |
9 | |
7 | |
6 | |
5 | |
5 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.