Calling KM Web-Service with SSO from EJB
Hello Community-Folks,
i have developed an EJB which already uses KM-Webservices to interact from my NW 7.1 CE App-Server (SP5) with out KM on an NW 7.0 (where our Portal also runs on).
For using the KM-WebService i have to authenticate to the KM. At the moment i use the following code to connect and authenticate
rf = new RepositoryFrameworkWS(wsdlUrl, new QName(this.Default_QNSUri,this.Default_QNSLPart));
vi = rf.getConfig1Port_Document();
((BindingProvider)vi).getRequestContext().put(BindingProvider.USERNAME_PROPERTY , username);
((BindingProvider)vi).getRequestContext().put(BindingProvider.PASSWORD_PROPERTY , password);
But this EJB itself is called from another bean of my application and from Java Web-Dynpro Apps on my NW 7.1 CE-Server. The user normally authenticate to my applcation and i now want to use that logged in user to authenticate to the KM also. In my example above i have to know user and password for HTTP-Basic-Authentication.
But what do i have to do using a logon-Ticket instead?
Ironically my Web-Dynpros are called from a Portal, and the user is athenticated to my Web-Dynpro-App using sso from the portal. In this WD-App i know want to authenticate against the KM (which resides on the portal where the user came from).
Any hints are warmly welcome,
regards
Matthias
Hi,
And Could we know how you manage this?
I'm also interested in resolving this kind of issue.
Edited by: Xavier Tendron on Oct 19, 2009 3:23 PM
Similar Messages
-
Issue with calling external web service with authentication details ...
Hi,
I am facing a deployment issue with Oracle ESB. I am trying to call an external Web Service with authentication from ESB SOAP Service. It is working fine with my local ESB version 10.1.3.3.0 Build PCBPEL_10.1.3.3.0_GENERIC_070615.0525; however it is getting an error at our development ESB version 10.1.3.3.1 Build PCBPEL_10.1.3.3.1_GENERIC_RELEASE.
I am getting following error.
An unhandled exception has been thrown in the ESB system. The exception reported is: "org.collaxa.thirdparty.apache.wsif.WSIFException: exception during SOAP invoke: Server was unable to process request. ---> Object reference not set to an instance of an object.; nested exception is: javax.xml.rpc.soap.SOAPFaultException: Server was unable to process request. ---> Object reference not set to an instance of an object. at com.collaxa.cube.ws.wsif.providers.oc4j.jaxrpc.WSIFOperation_JaxRpc.populateFaultMessage(WSIFOperation_JaxRpc.java:3086) at com.collaxa.cube.ws.wsif.providers.oc4j.jaxrpc.WSIFOperation_JaxRpc.invokeOperation(WSIFOperation_JaxRpc.java:1728) at com.collaxa.cube.ws.wsif.providers.oc4j.jaxrpc.WSIFOperation_JaxRpc.invokeRequestResponseOperation(WSIFOperation_JaxRpc.java:1473) at com.collaxa.cube.ws.wsif.providers.oc4j.jaxrpc.WSIFOperation_JaxRpc.executeRequestResponseOperation(WSIFOperation_JaxRpc.java:1196) at oracle.tip.esb.server.common.wsif.WSIFInvoker.executeOperation(WSIFInvoker.java:867) at oracle.tip.esb.server.common.wsif.WSIFInvoker.nextService(WSIFInvoker.java:770) at oracle.tip.esb.server.common.wsif.WSIFInvoker.nextService(WSIFInvoker.java:790) at oracle.tip.esb.server.service.impl.outadapter.OutboundAdapterService.nextService(OutboundAdapterService.java:208) at oracle.tip.esb.server.service.impl.outadapter.OutboundAdapterService.processBusinessEvent(OutboundAdapterService.java:127) at oracle.tip.esb.server.dispatch.InitialEventDispatcher.dispatchNonRoutingService(InitialEventDispatcher.java:118) at oracle.tip.esb.server.dispatch.InitialEventDispatcher.dispatch(InitialEventDispatcher.java:95) at oracle.tip.esb.server.dispatch.BusinessEvent.raise(BusinessEvent.java:1424) at oracle.tip.esb.utils.EventUtils.raiseBusinessEvent(EventUtils.java:112) at oracle.tip.esb.server.service.EsbRouterSubscription.onBusinessEvent(EsbRouterSubscription.java:307) at oracle.tip.esb.server.dispatch.EventDispatcher.executeSubscription(EventDispat
Could one of you please help me out to understand why it is happining.
Thanks in advance.
Jyotirmoy.Hi Mahesh,
One you are missing is authentication token or credentials.
Please refer to the following articles.
http://www.cleverworkarounds.com/2014/02/05/tips-for-using-spd-workflows-to-talk-to-3rd-party-web-services/
A Series of articles related to Web Service in SPD Workflow
Trials or tribulation?
Inside SharePoint 2013 workflows–Part 1
Trials or tribulation?
Inside SharePoint 2013 workflows–Part 2
Trials or tribulation?
Inside SharePoint 2013 workflows–Part 3
Trials or tribulation?
Inside SharePoint 2013 workflows–Part 4
Trials or tribulation?
Inside SharePoint 2013 workflows–Part 5
Trials or tribulation?
Inside SharePoint 2013 workflows–Part 6
Trials or tribulation?
Inside SharePoint 2013 workflows–Part 7
Trials or tribulation?
Inside SharePoint 2013 workflows–Part 8
Trials or tribulation?
Inside SharePoint 2013 workflows–Part 9
Trials or tribulation?
Inside SharePoint 2013 workflows–Part 10
Trials or tribulation?
Inside SharePoint 2013 workflows–Part 11
Trials or tribulation?
Inside SharePoint 2013 workflows–Part 12
Please don't forget to mark it answered, if your problem resolved or helpful -
Calling a Web Service with a File Binding Component
Is it possible to call a web service (inside a bpel process) using a File Binding Component?
It seems that the File Binding Component should read an XML representing the input - is this possible? I found something about an "input-file-type" for the message, is this the way?
Thank you,
Marcos AckelHi
" have done one small application with Bpel which read messages from port and write to file in xml format using file binding........"
By your description of this application, I'm sure it is using the HTTP BC to read incomming messages, and then the File BC to write them to a file. I think the original question is whether the File BC can call a web service which is very different.
Either way, when calling Web services, the recommended BC is the HTTP BC.
Cheers
Paul -
Calling a web service with URL to Insert into DB Web service
Does any one have an idea how I can call a web service using a URL to insert records into an Oracle DB table.
Something like this :
http://apex.oracle.com/pls/apex/SCHEMA/URI/HANDLER/PARAMETERS
I need to call it outside of Oracle Apex.
Regards,
OLUHi Swapna,
from your screenshot it seems that you actually try to call the service in your Data Source Expression field. You should set path to the WSDL file here actually - this could be either URL to SAP or to filesystem, as Anton suggested (this could be faster). Have you created endpoint binding for your service in transaction SOAMANAGER? If yes, then simply download the corresponding WSDL with binding or copy the URL which leads to it. But also test whether you are able to retrieve the WSDL without logging into SAP (close all browser windows and then open a new one otherwise session ID from other browser windows can be reused).
If you have to give username and password, then setup anonymous alias in transaction SICF, for example.
Pleas, check my previous post on the same subject here: Re: BCM7 IVR : SOAP request for client identification in CRM .
Maybe it could help.
Regards,
Dawood. -
UWL connector: problems with calling a web service with a SAPLOGONTICKET
Hi,
I want to implement a uwl connector that calls a web service to retrieve the uwl items data with a SAPLOGONTICKET. If I refresh the UWL I get the following error.
An error occured while reading data from the destination sap.com/com.xxxx.connector.RequestLeaveDP/com.xxxx.connector.RequestLeave/Config1Port_Document. The error was: com.sap.security.core.client.ws.SSO2Exception No SAP Logon Ticket was found for the user. Please ensure the user authenticated using HTTP/HTTPS and the JAAS login stack has been configured correctly. As an alternative, consider changing the authentication type to Assertion Ticket. .
If I call the Web Service in an iView I don't get this error. Maybe the UWL calls the web service not with the current authenticated user.
I tried the following code, to get the current SSO2 Ticket from the current user. It looks like, that is the current user, but the web service will not accept this. (testing purpose)
com.sap.security.api.IUser currentUser = com.sap.security.api.UMFactory.getAuthenticator().getLoggedInUser();
String logonTicketUwlUser = (String) context.getUser().getTransientAttribute("com.sap.security.core.usermanagement", "MYSAPSSO2_STRING");
String logonTicketCurrentUser = (String) currentUser.getTransientAttribute("com.sap.security.core.usermanagement", "MYSAPSSO2_STRING");
InitialContext contextWebService = new InitialContext();
RequestLeaveWebService requestLeaveWebService = (RequestLeaveWebService) contextWebService.lookup(wsClient);
RequestLeaveWebServiceViDocument webServiceEndPoint = requestLeaveWebService.getLogicalPort("Config1Port_Document");
UWLHolidayItem holidayItem = webServiceEndPoint.getHolidayItem("");
Any ideas?
Regards
Markus
Edited by: Markus Karsch on Oct 18, 2008 11:15 PMAre you calling invoke()?
Do you have the port type in the servlet context? -
Connect to Secure web service with certificate from SAP EP
Hi Experts,
Here is the current situation:
1. Our business requirement is to connect 3rd party RESTful web service which requires secure connection with private client certificate attached
2. I've tested in my Java test application and successfully attached private certificate to HttpsURLConection request to the web service and made a connection. No problem at all.
KeyStore keyStore = KeyStore.getInstance("PKCS12");
InputStream inputStream = new FileInputStream("privateKeyCert.p12");
keyStore.load(inputStream, "myPassword".toCharArray());
KeyManagerFactory keyManagerFactory = KeyManagerFactory.getInstance(KeyManagerFactory.getDefaultAlgorithm());
keyManagerFactory.init(keyStore, "myPassword".toCharArray());
KeyManager[] kms = keyManagerFactory.getKeyManagers();
SSLContext sslContext = SSLContext.getInstance("SSL");
sslContext.init(kms, null, new SecureRandom());
SSLSocketFactory sockFact = sslContext.getSocketFactory();
URL url = new URL("https://www.thirdpartywebservice.com/testroot/");
HttpsURLConnection conn = (HttpsURLConnection) url.openConnection();
conn.setSSLSocketFactory(sockFact);
conn.setRequestMethod("POST");
conn.setDoOutput(true);
conn.setDoInput(true);
conn.setUseCaches(false);
conn.setDefaultUseCaches (false);
conn.setRequestProperty("Content-Type", "text/xml");
3. Next, I tried to apply my Java application to SAP EP NetWeaver, and found that I have to use SecureConnectionFactory:
https://help.sap.com/saphelp_nw70ehp1/helpdata/en/e2/71c83edf72e16be10000000a114084/content.htm
4. So, I modified my Java code for SAP EP:
KeyStore keyStore = KeyStore.getInstance("PKCS12");
InputStream inputStream = this.getClass().getClassLoader().getResourceAsStream("privateKeyCert.p12");
keyStore.load(inputStream, "myPassword".toCharArray());
SecureConnectionFactory scFactory = new SecureConnectionFactory(keyStore);
HttpURLConnection conn = scFactory.createURLConnection("https://www.thirdpartywebservice.com/testroot/");
conn.setRequestMethod("POST");
conn.setDoOutput(true);
conn.setDoInput(true);
conn.setUseCaches(false);
conn.setDefaultUseCaches (false);
conn.setRequestProperty("Content-Type", "text/xml");
And I'm facing the following error message:
Exception: java.security.UnrecoverableKeyException: ja
va.security.GeneralSecurityException: Unable to decrypt private key: javax.crypto.BadPaddingException: Invalid PKCS#5 padding length: 253
Could you please help me what this error message means?
Do you think do I need to to do some other configuration to make connection to web service with client certificate?
This is our first approach. Please help...
Thank you in advance.SunJSSE implement SSL server CertificateRequest in a strict mode, if client failed to find a proper certificate corresponding the server request, it does not guess what's the proper certificate and send to the server. In your case, because there is no intermediate certificate in the client context, so there is no way to make the decision which certificate would be acceptable by server, so client does not send any cert to server. That's why you got a handshaking error.
I guess your client key store does not contains a full certificate path from the client end-entity certificate to the root CA. Please import the full certificate path into the key store.
BTW, these approaches should work, but I found no reason why one does not adopt #1:
1. import the full certification path of client certificate into client key store.
2. as a workaround, configure the server to send a list including the intermediate certificates;
3. as a workaround, you will have to customize the client KeyManager if you don't want to or are not able to configure the server to send a list including the intermediate certificates. -
Call ABAP Web Service with Java code only
Hi all,
First of all, I am writing script in Adobe form but am not using the one in SAP.
I am trying to call the web service and process the result with script open (i.e. no dataconnection created), because I am trying to do that in a dialog.
I can call a non-SAP web service without problem, but I am not able to call a simple web service with only a single string input, anyone have any example?
Here is the SOAP for input:
<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:urn="urn:sap-com:document:sap:rfc:functions">
<soapenv:Header/>
<soapenv:Body>
<urn:Z_RFC_GET_STAFF_BANK_INFO>
<A_STAFF_ID>0123456</A_STAFF_ID>
</urn:Z_RFC_GET_STAFF_BANK_INFO>
</soapenv:Body>
</soapenv:Envelope>
Here is my code to call:
var cURL = "http://some-host-name:port/sap/bc/srt/wsdl/bndg_DEDB492BB032E7F1B09F001CC4FBCEC9/wsdl11/allinone/ws_policy/document?sap-client=300";
var response = SOAP.request(
cURL: cURL,
oRequest: {
"urn:sap-com:document:sap:rfc:functions:Z_RFC_GET_STAFF_BANK_INFO": {
A_STAFF_ID: "0123456"
Regards
BillHello I have the same problem, were you able to execute the WS through the JS code now?
I would like to call an ABAP WS using JavaScript to return complex structures that I would like to manage directly with JS.
I tried with this code and I get the error "RaiseError: Acrobat Raise." when the request is executed:
var WSUrl = "http://<server>:<port>/sap/bc/srt/wsdl/bndg_4D15C75529330AF1E10000000A150429/wsdl11/allinone/ws_policy/document?sap-client=500";
var VendorNumber = xfa.form.DATA.DATAFLOW.SF_HEADER.VENDOR_NUMBER.rawValue;
try {
// Create request structure, read Input out of text field
var request = {
"urn:sap-com:document:sap:soap:functions:mc-style:ZWsTest" : {ILifnr: VendorNumber}
SOAP.wireDump = true;
// Call web service using SOAP object
var response = SOAP.request ({
cURL: WSUrl,
oRequest: request
// cAction: "urn:sap-com:document:sap:soap:functions:mc-style"
} catch (e) {
xfa.host.messageBox(e.toString()); //pop-up "TypeError:service.CelsiusToFahrenheit is not a funciton"
with this other code I get the error "SOAPError: CX_ST_MATCH_ELEMENT:XSLT exception.System expected element 'ILifnr'":
try {
var myProxy = SOAP.connect(WSUrl);
var result = myProxy.ZWsTest( { ILifnr: VendorNumber } );
xfa.form.DATA.DATAFLOW.SF_HEADER.E_DESCRIPTION.rawValue = result;
// Display the response in the console:
console.println("Result is " + result);
} catch (e) {
xfa.host.messageBox(e.toString()); //pop-up "TypeError:service.CelsiusToFahrenheit is not a funciton"
in the second option, if I make the field ILifnr optional the call is succesfully performed but the parameter is not passed to the WS. So the call is working.
Using stand-alone LiveCycle designer 8.1 and Adobe Reader 8
Any suggestions?
Many thanks,
G.
Edited by: Guillem Mateu Navalón on Jan 13, 2011 1:13 PM -
Calling a web service with two tables
Hello all,
I am having a problem calling a web service in VC which has data of the format order and orderitems.
that is I have a record of information a recordset is part of that information. Please point to any blogs or any info available on SDN.
I appreciate all your help
Thank You
ShekarHi,
Please check the below links.
https://www.sdn.sap.com/irj/scn/wiki?path=/display/vc71/webServiceDestination.
https://www.sdn.sap.com/irj/scn/weblogs?blog=/pub/wlg/4679. [original link is broken] [original link is broken] [original link is broken]
Govindu -
Calling UCM 11g web services with SSO
Hello, I have read the documentation about Single Sign-On in UCM 11G but I haven't understood how I could use SSO on UCM 11g web services calls.
The document I have read is
[http://docs.oracle.com/cd/E15586_01/doc.1111/e10792/c03_security.htm]
and I only see info about SSO when using "Windows Native Authentication" (WNA).
I have to send soap calls from applications deployed in other application servers and use the SSO mechanism.
Does anyone knows how can I configure UCM and weblogic?
Thank you very much in advance!
Regards.Hi ,
If you are looking to use the WSDL to execute ucm services then use SoapUI IDE on development , there it requires only the http authentication method .
Let me know if this is the actual requirement which you were looking for or if I have missed the point .
I use this to quickly test WSDL and verify if the service being invoked is actually correct or not .
Thanks,
Srinath
Edited by: Srinath Menon on Apr 26, 2013 11:32 AM -
Calling https web service POST method from ABAP
Hi all,
I'm having some problems trying to call a credit card https web service from ABAP on 2004s SP11. I'm not using a proxy server and a call from a test https page on my local machine works fine. The page does not require a certificate.
Do I need to do anything in particular to make https work ? I've done calls to http services without any problems. The only difference from a programming perspective as far as I know is the scheme 2 instead of 1, and the server protocol changed to HTTPS.
All is fine until I call method http_client->receive, at that point I get a return code of 1, http_communication_failure.
Your suggestions & contributions will be greatly appreciated.
Cheers,
Wouter.
report zcreditcardtest .
data: wf_user type string .
data: wf_password type string .
data: rlength type i,
txlen type string .
data: http_client type ref to if_http_client .
data: wf_string type string .
data: wf_string1 type string .
data: wf_proxy type string ,
wf_port type string .
selection-screen: begin of block a with frame .
parameters: crcard(16) type c lower case default '4242424242424242',
cvn(4) type c lower case default '564',
year(2) type c lower case default '07',
month(2) type c lower case default '11',
amount(10) type c lower case default '100.00',
cukey(4) type c lower case default 'AUD',
order(10) type c lower case default 'AB1322-refund'.
selection-screen skip 1.
parameters: user(50) lower case,
password(50) lower case ,
p_proxy(100) lower case default '' ,
p_port(4) default ''.
selection-screen: end of block a .
at selection-screen output.
loop at screen.
if screen-name = 'PASSWORD'.
screen-invisible = '1'.
modify screen.
endif.
endloop.
start-of-selection .
clear wf_string .
concatenate
'order.type=capture&customer.username=SOMEUSER'
'&customer.password=SOMEPASSWORD'
'&customer.merchant=SOMEMERCHANT'
'&card.PAN=' crcard
'&card.CVN=' cvn
'&card.expiryYear=' year
'&card.expiryMonth=' month
'&order.amount=' amount
'&customer.orderNumber=' order
'&card.currency=' cukey
'&order.ECI=IVR'
'&customer.captureOrderNumber=' order
'&order.priority=1'
'&message.end=null'
into wf_string .
break-point.
clear :rlength , txlen .
rlength = strlen( wf_string ) .
move: rlength to txlen .
clear: wf_proxy, wf_port .
move: p_proxy to wf_proxy ,
p_port to wf_port .
call method cl_http_client=>create
exporting
host = 'api.somewhere.com'
service = '80'
scheme = '2' "https
proxy_host = wf_proxy
proxy_service = wf_port
importing
client = http_client.
http_client->propertytype_logon_popup = http_client->co_disabled.
wf_user = user .
wf_password = password .
* proxy server authentication
call method http_client->authenticate
exporting
proxy_authentication = 'X'
username = wf_user
password = wf_password.
call method http_client->request->set_header_field
exporting
name = '~request_method'
value = 'POST'.
call method http_client->request->set_header_field
exporting
name = '~server_protocol'
value = 'HTTPS/1.0'.
call method http_client->request->set_header_field
exporting
name = '~request_uri'
value = '/post/CreditCardAPIReceiver'.
call method http_client->request->set_header_field
exporting
name = 'Content-Type'
value = 'application/x-www-form-urlencoded; charset=UTF-8'.
call method http_client->request->set_header_field
exporting
name = 'Content-Length'
value = txlen.
call method http_client->request->set_header_field
exporting
name = 'HOST'
value = 'api.somewhere.com:80'.
call method http_client->request->set_cdata
exporting
data = wf_string
offset = 0
length = rlength.
call method http_client->send
exceptions
http_communication_failure = 1
http_invalid_state = 2.
call method http_client->receive
exceptions
http_communication_failure = 1
http_invalid_state = 2
http_processing_failed = 3.
if sy-subrc <> 0.
message e000(oo) with 'Processing failed !'.
endif.
clear wf_string1 .
wf_string1 = http_client->response->get_cdata( ).
* Further Processing of returned values would go here.Well, finally got this running !
First of all I needed to download SAP Cryptographic Software and install it on the Web Application Server. Added some parameters to the profile, then set up some nodes in strust. Note 510007 describes the full process.
I then installed the certifcate I needed by opening the website in internet explorer and exporting it to a CER file and then importing it into the SSL client (Anonymous). The blog from Thomas Yung, "BSP a Developer's Journal Part XIV - Consuming WebServices with ABAP" describes the process of exporting and importing certificates.
I then had to start the HTTPS service on my NW 2004s ABAP preview edition SP11. I set this up for port 443.
/osmicm --> GOTO --> SERVICES --> SERVICE --> CREATE
Then finally, the program needed a few changes :
call method cl_http_client=>create
exporting
host = 'api.somewhere.com'
service = '443' " <<----- 443 NOT 80
scheme = '2' "https
ssl_id = 'ANONYM' " <<----- SSL_ID Added
proxy_host = wf_proxy
proxy_service = wf_port
importing
client = http_client.
and further in the program (thanks Andrew !) :
call method http_client->request->set_header_field
exporting
* name = '~server_protocol' " <<<--- DELETE
name = '~request_protocol' " <<<-- INSERT must be request
value = 'HTTPS/1.0'.
and presto, we can now consume a https webservice via a POST method from within an ABAP program ! Nice.... Can I give myself 10 points ? -
Error in calling a web service of primavera from sap MII
Hi All,
I am trying to consume a web service of primavera p6 from SAP XMII 12.1
I tested the web service from SOAP UI ,its working fine for me,but when I tested with MII ,connection is unsuccessful
I have used the HTTP_Post Action block and entered the required information as specified correctly
Error is:
[ERROR] Post Action: error occured while trying to connect to the server Exception: [Connect timed out]
I tested with web service action block of MII also but no luck now.
Please explain me reason for hte error and how to get rid of it,
Its very urgent,please helpHey,
I think this is an authentication issue. Are you passing the user credentials in Web Service action block.
Regards,
Gita -
Calling j2ee web service with portal user
Hello,
I created web service using Nwds Ejb.
I want to run this web service from sap portal iview and to receive the same user Id that logon to the portal , on the web service side.
In the j2ee Ejb code I am using :
try{
String username = myContext.getCallerPrincipal().getName();
IUser user =
UMFactory.getUserFactory().getUserByUniqueName(username);
return user.getUniqueName;
} catch(UMException e) {
return e.getMessage();
But the result is always Guest ?
even if I selected use sap authentication on the wsdl descriptor.
Need some help solving this issue?
Thanks in advance
NirHi,
And Could we know how you manage this?
I'm also interested in resolving this kind of issue.
Edited by: Xavier Tendron on Oct 19, 2009 3:23 PM -
Calling Web Service with SOAP header from BPEL
Hi,
I am calling a web service (with header information) from BPEL. In the Invoke activity, i created a header variable to pass the header information.
But, when i test the BPEL service, invoke activity fails because the header information is not being passed.
Below is the error message (copied from clipboard).
+<messages><input><Invoke_1_getsubinfo_InputVariable><part xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" name="parameters"><getsubinfoElement xmlns="http://ws/its/tabs/webservices/SingleRowWS/SingleRowWS.wsdl">+
+<pSubnoin>+
+<insubno>12345678</insubno>+
+</pSubnoin>+
+</getsubinfoElement>+
+</part></Invoke_1_getsubinfo_InputVariable></input><fault><bindingFault xmlns="http://schemas.oracle.com/bpel/extension"><part name="summary"><summary>exception on JaxRpc invoke:+
start fault message:+
Internal Server Error (Caught exception while handling request: javax.xml.rpc.JAXRPCException: Not authenticated user)+
*:end fault message*</summary>
+</part></bindingFault></fault></messages>+
As said, no header information is visible in the Invoke activity.
Please provide help for the above issue.
-MJHello Patrick,
Thanks for the response. I am using normal assign activity to assign values to the header variable as shown below. HeadMT is the header variable which is passed in the invoke activity.
+<assign name="Assign_Header">+
+<copy>+
+<from expression="'tkl12'"/>+
+<to query="/ns1:LOGIN_INFO/ns1:USER_NAME" variable="*HeadMT*"+
part="payload"/>
+</copy>+
+<copy>+
+<from expression="'tkl123'"/>+
+<to query="/ns1:LOGIN_INFO/ns1:PASSWORD" variable="*HeadMT*"+
part="payload"/>
+</copy>+
+<copy>+
+<from expression="'TKL'"/>+
+<to query="/ns1:LOGIN_INFO/ns1:CHANNEL_ID" variable="*HeadMT*"+
part="payload"/>
+</copy>+
+</assign>+
The expected input by the web service is as below with the header information highlighted.
+<soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/" xmlns:ns1="http://ws/webservices/RowWS/RowWS.wsdl">+
+*<soap:Header>*+
+*<ns1:LOGIN_INFO>*+
+*<ns1:USERNAME>tkl12</ns1:USERNAME>*+
+*<ns1:PASSWORD>tkl123</ns1:PASSWORD>*+
+*<ns1:CHANNEL_ID>TKL</ns1:CHANNEL_ID>*+
+*</ns1:LOGIN_INFO>*+
+*</soap:Header>*+
+<soap:Body>+
+<ns1:substatusElement>+
+<ns1:pInparam>+
+<ns1:insubno>7674988</ns1:insubno>+
+</ns1:pInparam>+
+</ns1:substatusElement>+
+</soap:Body>+
+</soap:Envelope>+ -
Urgent - How to call a Web Services from PLSQL - Please help
Hello,
I am very much new to WebServices, need to call web services through PLSQL. I have a urgent requirement, where i need to call the web services by passing from some paramters to it and the web services will return a varchar values as 'PASSED' or 'FAILED'.
Can you please approch me the best way to start with.
Thanks,
Srikanth.Hi,
I need to do it from PLSQL API's not from JAVA.
I have started developing the code through UTIL_HTTP. Getting lots of error.
Can you please guide me through these error.
Below is the wsdl and a blcok where i am trying to retrive the value from webservice.
Hope this will help you.
Code:
declare
soap_request varchar2(30000);
soap_respond varchar2(30000);
http_req utl_http.req;
http_resp utl_http.resp;
resp XMLType;
i integer;
begin
soap_request:= '<?xml version = "1.0" encoding = "UTF-8"?>
<SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
<SOAP-ENV:Body>
<ns1:soapCheckRequest1 wsdl:ns1="https://isportal-qa.iss.net/exportcompliancemanager/services/ExportCheckService" SOAP-ENV:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/">
<FirstName xsi:type="xsd:string">saddam</FirstName>
<LastName xsi:type="xsd:string">hussein</LastName>
<companyName xsi:type="xsd:string">samueladams</companyName>
<address1 xsi:type="xsd:string">123 APT</address1>
<address3 xsi:type="xsd:string">Atlanta</address3>
<city xsi:type="xsd:string">uk</city>
<stateOrRegion xsi:type="xsd:string">GA</stateOrRegion>
<postalCode xsi:type="xsd:string">30338</postalCode>
<email xsi:type="xsd:string">sj@samueladams</email>
<isoCountryCode xsi:type="xsd:string">US</isoCountryCode>
<endUserIP xsi:type="xsd:string">209.134.168.203</endUserIP>
</ns1:soapCheckRequest1>
</SOAP-ENV:Body>
</SOAP-ENV:Envelope>
http_req:= utl_http.begin_request
( 'http://isportal-qa.iss.net/exportcompliancemanager/services/ExportCheckService'
, 'POST'
, 'HTTP/1.1'
utl_http.set_header(http_req, 'Content-Type', 'text/xml'); -- since we are dealing with plain text in XML documents
utl_http.set_header(http_req, 'Content-Length', length(soap_request));
utl_http.set_header(http_req, 'SOAPAction', ''); -- required to specify this is a SOAP communication
utl_http.write_text(http_req, soap_request);
http_resp:= utl_http.get_response(http_req);
DBMS_OUTPUT.PUT_LINE('-------utl_http.get_response---------------------');
DBMS_OUTPUT.PUT_LINE('http_resp.status_code is :'||http_resp.status_code );
DBMS_OUTPUT.PUT_LINE('http_resp.reason_phrase is :'||http_resp.reason_phrase);
DBMS_OUTPUT.PUT_LINE('http_resp.http_version is :'||http_resp.http_version);
DBMS_OUTPUT.PUT_LINE('http_resp.private_hndl is :'||http_resp.private_hndl);
DBMS_OUTPUT.PUT_LINE('-------utl_http.get_response----------------------');
utl_http.read_text(http_resp, soap_respond);
utl_http.end_response(http_resp);
resp:= XMLType.createXML(soap_respond);
resp:= resp.extract('/soap:Envelop/soap:Body/child::node()'
, 'xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/"'
i:=0;
loop
dbms_output.put_line(substr(soap_respond,1+ i*255,250));
i:= i+1;
if i*250> length(soap_respond)
then
exit;
end if;
end loop;
end;
Error Message
http_resp.reason_phrase is :Internal Server Error
http_resp.http_version is :HTTP/1.1
http_resp.private_hndl is :0
-------utl_http.get_response----------------------
<?xml version="1.0" encoding="UTF-8"?><soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"><soapenv:Body><soapenv:Fault><faultco
apenv:Server.userException</faultcode><faultstring>org.xml.sax.SAXParseException: The prefix "ns1" for element "ns1:soapCheckRequest1" is not bound.</faultstring><detail><ns1:hostname xmlns:ns1="http://xml.apache.org/axis/">atlcms
2.iss.net</ns1:hostname></detail></soapenv:Fault></soapenv:Body></soapenv:Envelope>
<?xml version="1.0" encoding="UTF-8" ?>
- <wsdl:definitions targetNamespace="https://isportal-qa.iss.net/exportcompliancemanager/services/ExportCheckService" xmlns:apachesoap="http://xml.apache.org/xml-soap" xmlns:impl="https://isportal-qa.iss.net/exportcompliancemanager/services/ExportCheckService" xmlns:intf="https://isportal-qa.iss.net/exportcompliancemanager/services/ExportCheckService" xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/" xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/" xmlns:wsdlsoap="http://schemas.xmlsoap.org/wsdl/soap/" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
- <!--
WSDL created by Apache Axis version: 1.3
Built on Oct 05, 2005 (05:23:37 EDT)
-->
- <wsdl:message name="soapCheckResponse1">
<wsdl:part name="soapCheckReturn" type="soapenc:string" />
</wsdl:message>
- <wsdl:message name="soapCheckRequest1">
<wsdl:part name="firstName" type="soapenc:string" />
<wsdl:part name="lastName" type="soapenc:string" />
<wsdl:part name="companyName" type="soapenc:string" />
<wsdl:part name="address1" type="soapenc:string" />
<wsdl:part name="address2" type="soapenc:string" />
<wsdl:part name="address3" type="soapenc:string" />
<wsdl:part name="city" type="soapenc:string" />
<wsdl:part name="stateOrRegion" type="soapenc:string" />
<wsdl:part name="postalCode" type="soapenc:string" />
<wsdl:part name="email" type="soapenc:string" />
<wsdl:part name="phone" type="soapenc:string" />
<wsdl:part name="isoCountryCode" type="soapenc:string" />
<wsdl:part name="endUserId" type="soapenc:string" />
<wsdl:part name="endUserIP" type="soapenc:string" />
<wsdl:part name="endUserSession" type="soapenc:string" />
<wsdl:part name="performGovCheck" type="xsd:boolean" />
<wsdl:part name="sendEmailNotification" type="xsd:boolean" />
<wsdl:part name="screeningLevelBasedOnSuppliedCountryCode" type="xsd:boolean" />
<wsdl:part name="screeningLevelBasedOnEndUserIP" type="xsd:boolean" />
<wsdl:part name="soundexMatch" type="xsd:boolean" />
</wsdl:message>
- <wsdl:message name="soapCheckRequest">
<wsdl:part name="firstName" type="soapenc:string" />
<wsdl:part name="lastName" type="soapenc:string" />
<wsdl:part name="companyName" type="soapenc:string" />
<wsdl:part name="address1" type="soapenc:string" />
<wsdl:part name="address2" type="soapenc:string" />
<wsdl:part name="address3" type="soapenc:string" />
<wsdl:part name="city" type="soapenc:string" />
<wsdl:part name="stateOrRegion" type="soapenc:string" />
<wsdl:part name="postalCode" type="soapenc:string" />
<wsdl:part name="email" type="soapenc:string" />
<wsdl:part name="phone" type="soapenc:string" />
<wsdl:part name="isoCountryCode" type="soapenc:string" />
<wsdl:part name="endUserId" type="soapenc:string" />
<wsdl:part name="endUserIP" type="soapenc:string" />
<wsdl:part name="endUserSession" type="soapenc:string" />
<wsdl:part name="performGovCheck" type="xsd:boolean" />
<wsdl:part name="sendEmailNotification" type="xsd:boolean" />
<wsdl:part name="screeningLevelBasedOnEndUserIP" type="xsd:boolean" />
<wsdl:part name="soundexMatch" type="xsd:boolean" />
</wsdl:message>
- <wsdl:message name="soapCheckResponse">
Thanks and Regard,
Srikanth -
Calling SharePoint Web Services from PL/SQL
We are trying to call SharePoint Web Services with UTL_DBWS or UTL_HTTP. We are able to call some test web services, but when it comes to using SharePoint services, we keep getting 401 errors..even when we use set_authorization.
Has anyone been able to use UTL_DBWS or UTL_HTTP to call SharePoint web services? If so, can you point us in the right direction?
ThanksAB,
I didn't realize you cannot attach documents to your post. You will have to provide me with an email address that I can send the documents to. They are a little rough (ie not commented etc) but they do illustrate the point. The basic idea is to build up the payload of the soap envelope using pl/sql. Meaning as I loop through the cursor I use each record in the cursor to build an xml string. This string of xml becomes the payload of the soap message. This could also be done using xml functionality provided by the db meaning xmlelement, xmlforest etc. The issue I ran into was the size of the message. That is why I elected to build the xml message by string concatenation as I moved through the cursor.
Ryan
Maybe you are looking for
-
I used to sync my iphone to a laptop which is no longer in my posession. I am now looking to start over and have a new itunes on my pc with no music on it. When i connect my iphone up to the new itunes it doesn't recognise it or sync - can anyone hel
-
Free Sample items to be captured in separate G/L Account
Hi all, I gone through the thread before posting this because of some confustion still i had in my mind. My cleint requirement is Finished products which normally processed in the sales order as TAN, some times given to customer as a "FREE SAMPLE" fo
-
I just bought a US imac 2010 on ebay, i live in ireland so what do i need to convert the power supply? i have no idea what type of plugs america use so as much detail needed as possible please? thanks!
-
Hi All, How to create delete confirm message in Webdynpro ABAP. Regards, Arun
-
How do I get a list of the most recent upgraded packages?
Hi there, I want to get a list of the last upgrades using pacman. I´ve been looking for a way to do it in the man page, but either I´m blind or there is not such an option. I know that I can just do: ls --sort time /var/cache/pacman/pkg/|head But wha