ABAP code and konfiguration for consuming secure web services
I need some help/links on how to create an abap program (on 4.6 or WAS 620, or 640 if not possible in older releases) to consume a web service with authentication using certificates based on WS security (<a href="http://www.oasis-open.org/committees/wss">http://www.oasis-open.org/committees/wss</a>) or client certificates. The request must include attachment in DIME or base64 format (preferably DIME).
On 4.6 I have used the FM HTTP_POST with the if_ixml interface to consume web services, but I don't know if it can handle https authentication and attachements.
Message was edited by: Robert
check out this weblog.
<a href="/people/thomas.jung3/blog/2005/05/13/calling-webservices-from-abap-via-https">Calling WebServices from ABAP via HTTPS</a>
Regards
Raja
Similar Messages
-
Create a Secure Client for a Secure Web Service- is failing
Hi,
This is actually with reference to the webservice tutorial.I am trying the example on Create a Secure Client for a Secure Web Service and have followed all the steps mentioned,however I am getting the following error:
D:\JDev11gTp\jdk\bin\javaw.exe -client -classpath D:\Jdev11gTpInstance\mywork\WebServiceApplications\.adf;D:\Jdev11gTpInstance\mywork\WebServiceApplications\WebServiceProjects\classes;D:\JDev11gTp\webservices\lib\jaxws-api.jar;D:\JDev11gTp\webservices\lib\jws-api.jar;D:\JDev11gTp\webservices\lib\orawsmetadata.jar;D:\JDev11gTp\webservices\lib\wsclient.jar;D:\JDev11gTp\j2ee\home\lib\activation.jar;D:\JDev11gTp\j2ee\home\lib\ejb.jar;D:\JDev11gTp\j2ee\home\lib\jms.jar;D:\JDev11gTp\j2ee\home\lib\jta.jar;D:\JDev11gTp\j2ee\home\lib\mail.jar;D:\JDev11gTp\j2ee\home\lib\servlet.jar;D:\JDev11gTp\webservices\lib\jaxrpc-api.jar;D:\JDev11gTp\webservices\lib\wsserver.jar;D:\JDev11gTp\webservices\lib\wssecurity.jar;D:\JDev11gTp\webservices\lib\wsdl.jar;D:\JDev11gTp\webservices\lib\orasaaj.jar;D:\JDev11gTp\webservices\lib\saaj-api.jar;D:\JDev11gTp\webservices\lib\orawsdl.jar;D:\JDev11gTp\webservices\lib\orawsrm.jar;D:\JDev11gTp\webservices\lib\orawsrel.jar;D:\JDev11gTp\webservices\lib\jaxr-api.jar;D:\JDev11gTp\webservices\lib\orajaxr.jar;D:\JDev11gTp\webservices\lib\relaxngDatatype.jar;D:\JDev11gTp\webservices\lib\xsdlib.jar;D:\JDev11gTp\webservices\lib\mdds.jar;D:\JDev11gTp\webservices\lib\wsif.jar;D:\JDev11gTp\webservices\lib\fabric-common.jar;D:\JDev11gTp\webservices\lib\fabric-interceptors.jar;D:\JDev11gTp\jlib\jaxen.jar;D:\JDev11gTp\jlib\oraclepki.jar;D:\JDev11gTp\jlib\ojpse.jar;D:\JDev11gTp\jlib\jsr106.jar;D:\JDev11gTp\jlib\jsr105.jar;D:\JDev11gTp\jlib\osdt_xmlsec_jce.jar;D:\JDev11gTp\jlib\osdt_wss_jce.jar;D:\JDev11gTp\jlib\osdt_saml_jce.jar;D:\JDev11gTp\jlib\osdt_saml2_jce.jar;D:\JDev11gTp\jlib\osdt_core.jar;D:\JDev11gTp\jlib\osdt_cert.jar;D:\JDev11gTp\jlib\osdt_xmlsec.jar;D:\JDev11gTp\jlib\osdt_wss.jar;D:\JDev11gTp\jlib\osdt_saml.jar;D:\JDev11gTp\jlib\osdt_saml2.jar;D:\JDev11gTp\jlib\ojmisc.jar;D:\JDev11gTp\j2ee\home\lib\http_client.jar;D:\JDev11gTp\j2ee\home\jazncore.jar;D:\JDev11gTp\j2ee\home\oc4jclient.jar;D:\JDev11gTp\rdbms\jlib\xdb.jar;D:\JDev11gTp\j2ee\home\lib\javax77.jar;D:\JDev11gTp\lib\java\api\jsr173_api.jar;D:\JDev11gTp\lib\java\shared\sun.jaxb\2.0\jaxb-impl.jar;D:\JDev11gTp\lib\java\shared\sun.jaxb\2.0\jaxb-xjc.jar;D:\JDev11gTp\lib\java\shared\sun.jaxb\2.0\jaxb1-impl.jar;D:\JDev11gTp\j2ee\home\lib\oc4j-schemas.jar;D:\JDev11gTp\jlib\ojdl.jar;D:\JDev11gTp\jlib\ojdl2.jar;D:\JDev11gTp\jlib\fmw_audit.jar;D:\JDev11gTp\j2ee\home\lib\jmxri.jar;D:\JDev11gTp\j2ee\home\lib\jmx_remote_api.jar;D:\JDev11gTp\j2ee\home\lib\adminclient.jar;D:\JDev11gTp\j2ee\home\lib\jmxframework.jar;D:\JDev11gTp\j2ee\home\lib\jmxspi.jar;D:\JDev11gTp\j2ee\home\lib\xmlcfg.jar;D:\JDev11gTp\jlib\dms.jar;D:\JDev11gTp\jlib\orai18n.jar;D:\JDev11gTp\j2ee\home\lib\commons-digester.jar;D:\JDev11gTp\j2ee\home\lib\spring.jar;D:\JDev11gTp\lib\java\shared\oracle.wsm\11.1.1.0\wsm-policy-core.jar;D:\JDev11gTp\lib\java\shared\oracle.wsm\11.1.1.0\wsm-pmclient.jar;D:\JDev11gTp\lib\java\shared\oracle.wsm\11.1.1.0\wsm-pap.jar;D:\JDev11gTp\lib\java\shared\oracle.wsm\11.1.1.0\wsm-agent.jar;D:\JDev11gTp\lib\java\shared\oracle.wsm\11.1.1.0\wsm-secpol.jar;D:\JDev11gTp\lib\java\shared\oracle.javatools\11.1.1.0.0\javamodel-rt.jar;D:\JDev11gTp\lib\java\shared\oracle.javatools\11.1.1.0.0\javatools-nodeps.jar;D:\JDev11gTp\lib\java\shared\oracle.toplink\11.1.1.0.0\toplink-sdo.jar;D:\JDev11gTp\lib\java\api\jaxb-api.jar;D:\JDev11gTp\lib\xmlparserv2.jar;D:\JDev11gTp\lib\xml.jar;D:\JDev11gTp\jakarta-taglibs\commons-logging-1.0.3\commons-logging.jar -Dhttp.proxyHost=localhost -Dhttp.proxyPort=8099 -Dhttp.nonProxyHosts= -Dhttps.proxyHost=localhost -Dhttps.proxyPort=8099 -Dhttps.nonProxyHosts= HelloPolicyPortClient
Feb 1, 2008 5:13:43 PM oracle.j2ee.ws.common.context.ContextInterceptor init
INFO: Context provider properties file not found
Feb 1, 2008 5:13:44 PM oracle.wsm.audit.Auditor <init>
INFO: Created J2SE auditor for componentType=OWSM-AGENT busstop=D:\oracle\product\10.2.0\client_1\auditlogs\OWSM-AGENT filter=false auditor=oracle.security.audit.Auditor@143a083
Feb 1, 2008 5:13:44 PM oracle.wsm.audit.Auditor <init>
INFO: Created J2SE auditor for componentType=OWSM-PM-LIB busstop=D:\oracle\product\10.2.0\client_1\auditlogs\OWSM-PM-LIB filter=false auditor=oracle.security.audit.Auditor@15af049
SEVERE: WSM-04514 An MDS error occurred.
SEVERE: WSM-09012 No key, WSM-06002, was found in the resource bundle oracle.wsm.resources.policyvalidation.PolicyValidationMessageBundle.
javax.xml.ws.WebServiceException: oracle.fabric.common.PolicyEnforcementException: PolicySet Invalid: WSM-06002 PolicyReference Invalid policy reference
at oracle.j2ee.ws.client.jaxws.DispatchImpl.invoke(DispatchImpl.java:466)
at oracle.j2ee.ws.client.jaxws.WsClientProxyInvocationHandler.invoke(WsClientProxyInvocationHandler.java:204)
at $Proxy28.sayHello(Unknown Source)
at HelloPolicyPortClient.main(HelloPolicyPortClient.java:35)
Caused by: oracle.fabric.common.PolicyEnforcementException: PolicySet Invalid: WSM-06002 PolicyReference Invalid policy reference
at oracle.integration.platform.common.InterceptorChainImpl.createPolicyEnforcementException(InterceptorChainImpl.java:217)
at oracle.integration.platform.common.InterceptorChainImpl.processRequest(InterceptorChainImpl.java:104)
at oracle.j2ee.ws.client.mgmt.runtime.SuperClientInterceptorPipeline.handleRequest(SuperClientInterceptorPipeline.java:91)
at oracle.j2ee.ws.client.jaxws.DispatchImpl.handleRequest(DispatchImpl.java:309)
at oracle.j2ee.ws.client.jaxws.DispatchImpl.handleRequest(DispatchImpl.java:290)
at oracle.j2ee.ws.client.jaxws.DispatchImpl.invoke(DispatchImpl.java:444)
... 3 more
Process exited with exit code 0.
Can anyone please give any clue as to why this error is coming?
Thanks.Hi
Please refer to this thread
Re: Can I create a login/password protection in Muse for a HTML5 page or two? -
Security exception while running the java client for a secured web service.
hi,
I created a proxy for a secured web service.
When I run the client java program I am getting the following exception :
java.io.IOException: could not load the default-keystore.jks file because The keystore file is tampered or password is incorrect.
Its saying that password is invalid.
Can you please help me on this thanks in advance.
Regards,
Chandrahi,
I created a proxy for a secured web service.
When I run the client java program I am getting the following exception :
java.io.IOException: could not load the default-keystore.jks file because The keystore file is tampered or password is incorrect.
Its saying that password is invalid.
Can you please help me on this thanks in advance.
Regards,
Chandra -
Unable to consume secured Web service from a Dynpro application
Hello,
I have followed <a href="http://help.sap.com/saphelp_nw04/helpdata/en/c3/bac36a469e4c75aba646077e71516d/frameset.htm">this tutorial</a>
in order to protect and consume a secured Web service from a Dynpro application using SAP logon ticket.
The problem is that after implementing everything needed I receive 401 Unauthorized when I am trying to consume it from the web dynpro side.
If I manually transfer the request the credentials, before the execute i.e:
modObj._setUser
modObj._setPassword
modObj.execute();
I am able to call it, meaning the dynpro application doesn't transfer these credentials to the Webservice even though it's authentication property is set to true.
Any idea how to solve it?
Roy
Message was edited by:
Roy CohenTry below steps
Add jars
o security.class
o tc/sec/destinations/interface
Setting WebDynpro project property
o Project>Properties>Web Dynpro References-->Interface references
 Name=tcsecdestinations~interface
o Project>Properties>Web Dynpro References-->Service reference
 Name=webservices
 Name=tcsecdestinations~service
Dynamically Set httpdestination and Call web service
final InitialContext ctx = new InitialContext();
final DestinationService dstService = (DestinationService)ctx.lookup(DestinationService.JNDI_KEY);
if (dstService== null)
throw new NamingException ("Destination service not available");
final Destination destination = dstService.getDestination("HTTP"," DestinationName");
// getting user name
Properties destprop = destination.getDestinationProperties();
String username = destprop.getProperty("USERNAME");
String password = destprop.getProperty("PASSWORD");
final HTTPDestination httpDestination = (HTTPDestination) destination;
HttpURLConnection httpConnection = httpDestination.getURLConnection();
String httpURL = String.valueOf(httpConnection.getURL());
Request_AdvLocationVer1ViDocument_getLocation obj=wdContext.currentRequest_AdvLocationVer1ViDocument_getLocationElement().modelObject();
obj._setUser( user );
obj._setPassword(pass);
obj._setEndPoint(httpURL);
obj.execute();
Rahul -
How to code Java client for a Java Web Service
Hi,
I have a modest knowledge on Java and new to Web Services. I have create a web service using JDeveloper as detailed at the URL http://www.oracle.com/webfolder/technetwork/tutorials/obe/jdev/obe1013jdev/10131/devdepandmanagingws/devdepandmanagingws.htm
In my Web Service, I have one GetSum java class, which has a method addSum(int x, int y) and this method returns the sum of x and y. I am able to successfully test the addSum method in the web service via the end point. However, I would want to use the addSum() method of the web service in a stand alone java class. For this I have used the wsimport utility and the WSDL of the webservice, from which I have got the following java classes.
AddSum.class
AddSumResponse.class
GetSumWS.class
GetSumWS_Service.class
ObjectFactory.class
package-info.class
I have packed all the above class into a jar file.
I have tried many options provided in various websites, but am not able to get this resolved. I am pasting the WSDL for any reference
<?xml version="1.0" encoding="UTF-8" ?>
- <definitions xmlns="http://schemas.xmlsoap.org/wsdl/" xmlns:soap12="http://schemas.xmlsoap.org/wsdl/soap12/" xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:mime="http://schemas.xmlsoap.org/wsdl/mime/" xmlns:tns="http://FirstWS.com/" name="GetSumWS" targetNamespace="http://FirstWS.com/">
- <types>
- <schema xmlns="http://www.w3.org/2001/XMLSchema" xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:soap11-enc="http://schemas.xmlsoap.org/soap/encoding/" targetNamespace="http://FirstWS.com/" elementFormDefault="qualified">
<element name="addSum" type="tns:addSum" />
- <complexType name="addSum">
- <sequence>
<element name="x" type="int" />
<element name="y" type="int" />
</sequence>
</complexType>
<element name="addSumResponse" type="tns:addSumResponse" />
- <complexType name="addSumResponse">
- <sequence>
<element name="return" type="int" />
</sequence>
</complexType>
</schema>
</types>
- <message name="GetSumWS_addSum">
<part name="parameters" element="tns:addSum" />
</message>
- <message name="GetSumWS_addSumResponse">
<part name="parameters" element="tns:addSumResponse" />
</message>
- <portType name="GetSumWS">
- <operation name="addSum">
<input message="tns:GetSumWS_addSum" />
<output message="tns:GetSumWS_addSumResponse" />
</operation>
</portType>
- <binding name="GetSumWSSoapHttp" type="tns:GetSumWS">
<soap:binding style="document" transport="http://schemas.xmlsoap.org/soap/http" />
- <operation name="addSum">
<soap:operation soapAction="" />
- <input>
<soap:body use="literal" />
</input>
- <output>
<soap:body use="literal" />
</output>
</operation>
</binding>
- <service name="GetSumWS">
- <port name="GetSumWSSoapHttpPort" binding="tns:GetSumWSSoapHttp">
<soap:address location="http://akartha.in.ibm.com:8888/suresh/GetSumWSSoapHttpPort" />
</port>
</service>
</definitions>
Can someone please provide me the code to invoke the addSum() method in a stand alone java class. I would really appreciate the help
Thanks,
SureshHi,
The following is my code to invoke the addSum() web service method.
package com.FirstWS;
import com.firstws.*;
import com.firstws.GetSumWS_Service;
import com.firstws.GetSumWS;
import java.rmi.RemoteException;
public class useWS {
public static void main (String[] args) {
GetSumWS port = null;
try {
int number1 = 10;
int number2 = 20;
port = new GetSumWS_Service().getGetSumWSSoapHttpPort();
System.out.println ("Invoking addNumbers(%d, %d)\n"+ number1 + number2);
int result;
result = port.addSum(number1,number2);
System.out.printf (
"The result of adding %d and %d is %d.\n\n",
number1, number2, result);
} catch (Exception ex) {
System.out.println ("Caught Exception: %s\n"+ex);
But when I compile, I get the following error: "Error(14,20): Service not found in class com.firstws.GetSumWS_Service in class com.FirstWS.useWS"
Please let me know where I have wrong, and would appreciate if you could correct it.
Thanks,
Suresh -
Hi,
We have a Web Service URL on PI. Run time of this Web Service in a Portal Server.
We need to access the Same URL from ECC using ABAP Programming?
Can any one tell me how we can call the same Web Service?
I need to pass few values to the web service using ABAP Code and I need to get back the result into some variables.
any code available for verify?
Thanks,
Sekhar.JHi,
Steps involved in Consuming a Web Service in ABAP.
1. You will need to create a Service Consumer Proxy in the ECC system.
The procedure for this is available in the documentation link [http://help.sap.com/saphelp_erp60_sp/helpdata/en/46/9743916d1115ece10000000a114a6b/frameset.htm] in the section Consuming a Web Service.. The URL access path of the WSDL can be used to generate the Service Consumer Proxy in ABAP.
2. Using transaction SOAMANAGER create the Logical Port for the Consumer Proxy created in Step 1.
3. Code the Consumer Proxy call in the ABAP program. Check section Consuming a Web Service --> Programming with Client and Server Proxies --> Sending a Message in the link specified above.
The Video link [Consuming Services in ABAP |https://www.sdn.sap.com/irj/scn/go/portal/prtroot/docs/media/uuid/20eb3174-41ab-2a10-a383-907faf60eed3] will provide good conceptual knowledge, steps involved and Logical port maintenance..
In case you face any problems, shoot your queries.
regards
Nitesh -
How to consume/access web services in forefront identity manager 2010 r2
Hi,
I have one web service in c# for authentication so i want to integrate this web service in my FIM 2010 R2.I want to ask one more question how to consume/access web service of FIM 2010 R2,so please tell me how is it possible in FIM 2010 R2 and
anybody have any example for consuming/accessing web service step by step in FIM 2010 R2.
Regards
Anil KumarHere is some C# code that accesses FIM resource attributes from the web services via the FIM 2010 Resource Management Client which I mentioned in an earlier post:
using System;
using System.Collections.Generic;
using Microsoft.ResourceManagement.Client;
using Microsoft.ResourceManagement.ObjectModel;
namespace MyTest
public partial class ResourceAttribute
public ResourceAttribute()
public string GetTypeAndDisplayName(string objectID)
String ReturnValue = String.Empty;
using (Microsoft.ResourceManagement.Client.DefaultClient client = new DefaultClient())
client.ClientCredential = CredentialCache.DefaultNetworkCredentials;
client.RefreshSchema();
string query = String.Format("/*[ObjectId={0}]", objectID);
foreach (RmResource res in client.Enumerate(query))
String displayName = res.DisplayName;
String objectType = res.ObjectType;
ReturnValue = displayName + " (" + objectType + ")";
break;
return ReturnValue;
You would just need to define your bindings and endpoints in your web.config. This method will return the DisplayName and ObjectType for the resource with the ObjectId matching the objectID argument. If you need more information, please provide more specifics
for what you are trying to accomplish.
There are many code examples for this library on its CodePlex home:
http://fim2010client.codeplex.com/ -
How to consume a web service provided by third party system from SAP system
Hi Friends,
Could any of you provide me a clear picture on how to consume a web service from SAP system and is provided by a third party system?
Do we get an URL to create a client proxy for consuming the web service?
Thanx in advance,
RamHi Ram,
of course you cannot supply the WSDL URL. Inside the WSDL (just view it in your browser) you find (usually but not necessary) towards the end something like
<soap:address location="http://www.weather.gov/forecasts/xml/SOAP_server/ndfdXMLserver.php"/>
which is the actual adress of the service.
An example service can be found here:
<a href="http://www.weather.gov/xml/">National Digital Forecast Database</a>
containing the WSDL URL at
<a href="http://www.weather.gov/forecasts/xml/DWMLgen/wsdl/ndfdXML.wsdl">this address</a>.
You might also want to browse for the amazon webservices which allow you to embed queries against amazon into your application.
have fun,
anton -
Consuming a Web Service with PasswordDigest Authentication in ABAP
Hello,
I need to consume a web service in ABAP from a non-SAP application. The web service uses wsse:UsernameToken with PasswordDigest in the SOAP Header for authentication. However, I havent seen any documentation for using Password Digest in ABAP.
Is it possible to use Password Digest in ABAP?
Thanks
AjayHi Marc,
Here is the ABAP Code to build the SOAP header.
FUNCTION Z_GET_SOAP_REQUEST_HEADER.
*"*"Local Interface:
*" EXPORTING
*" VALUE(ER_SECURITY_ELEMENT) TYPE REF TO IF_IXML_ELEMENT
*date and time data
data: lv_sys_date like sy-datum,
lv_sys_time like sy-uzeit,
lv_year(4) type c,
lv_month(2) type c,
lv_date(2) type c,
lv_hour(2) type c,
lv_min(2) type c,
lv_sec(2) type c.
data : lv_created type string,
lv_snonce type string,
lv_b64nonce type string,
lv_webservice_password type string,
lv_webservice_userid type string,
lv_spassword type string,
lv_xpassword type xstring,
lv_hpassword type hash160x,
lv_b64password(255) type c,
lv_xpasslen type i,
lv_hpasslen type i.
*xml declartions
data : lv_sheader type string,
lv_xheader type xstring,
xml_document TYPE REF TO if_ixml_document,
xml_root TYPE REF TO if_ixml_element,
xml_element TYPE REF TO if_ixml_element,
xml_node TYPE REF TO if_ixml_node.
*get the c-link password.
CALL METHOD ZCL_CDB_SYNC_CFG_READER=>GET_USERID_PASSWORD
IMPORTING
EV_USER_ID = lv_webservice_userid
EV_PASSWORD = lv_webservice_password
*Evaluate created date time
lv_sys_date = sy-datum.
lv_sys_time = sy-uzeit.
lv_year = lv_sys_date(4).
lv_month = lv_sys_date+4(2).
lv_date = lv_sys_date+6(2).
lv_hour = lv_sys_time(2).
lv_min = lv_sys_time+2(2).
lv_sec = lv_sys_time+4(2).
CONCATENATE lv_year '-' lv_month '-' lv_date 'T' lv_hour ':' lv_min ':' lv_sec '.000Z' into lv_created.
*Create and encode the nonce
CALL FUNCTION 'GENERAL_GET_RANDOM_STRING'
EXPORTING
NUMBER_CHARS = 24
IMPORTING
RANDOM_STRING = lv_snonce.
CALL METHOD cl_http_utility=>ENCODE_BASE64
EXPORTING
UNENCODED = lv_snonce
RECEIVING
ENCODED = lv_b64nonce.
*create the password to be sent to web service
CONCATENATE lv_snonce lv_created lv_webservice_password into lv_spassword.
*encode password to xstring
CALL FUNCTION 'SCMS_STRING_TO_XSTRING'
EXPORTING
TEXT = lv_spassword
IMPORTING
BUFFER = lv_xpassword.
lv_xpasslen = xstrlen( lv_xpassword ).
CALL FUNCTION 'CALCULATE_HASH_FOR_RAW'
EXPORTING
ALG = 'SHA1'
DATA = lv_xpassword
LENGTH = lv_xpasslen
IMPORTING
HASHX = lv_hpassword
HASHXLEN = lv_hpasslen.
CALL FUNCTION 'SCMS_BASE64_ENCODE'
EXPORTING
INPUT = lv_hpassword
INPUT_LENGTH = lv_hpasslen
IMPORTING
OUTPUT = lv_b64password
EXCEPTIONS
OUTPUT_TOO_SMALL = 1
OTHERS = 2.
IF SY-SUBRC <> 0.
* MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
* WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
ENDIF.
* build the header
CONCATENATE
'<soap-env:Header xmlns:soap-env="http://schemas.xmlsoap.org/soap/envelope/">'
'<wsse:Security xmlns:wsse="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd">'
'<wsse:UsernameToken wsu:Id="########" xmlns:wsu="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd">'
'<wsse:Username>'
lv_webservice_userid
'</wsse:Username>'
'<wsse:Password Type="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-username-token-profile-1.0#PasswordDigest">'
lv_b64password
'</wsse:Password>'
'<wsse:Nonce>'
lv_b64nonce
'</wsse:Nonce>'
'<wsu:Created>'
lv_created
'</wsu:Created>'
'</wsse:UsernameToken>'
'</wsse:Security>'
'</soap-env:Header>'
INTO lv_sheader.
*Build the xml header element
lv_xheader = cl_proxy_service=>cstring2xstring( lv_sheader ).
TRY.
CALL FUNCTION 'SDIXML_XML_TO_DOM'
EXPORTING
xml = lv_xheader
IMPORTING
document = xml_document
EXCEPTIONS
invalid_input = 1
OTHERS = 2.
IF sy-subrc = 0 AND NOT xml_document IS INITIAL.
xml_root = xml_document->get_root_element( ).
er_security_element ?= xml_root->get_first_child( ).
gr_soap_security_header = er_security_element.
ENDIF.
CATCH cx_ai_system_fault .
ENDTRY.
ENDFUNCTION. -
SOAPFaultException with wsse:Security Tag consuming a Web-Service
hello,
i'm trying to consume a Web-Service of a Document-Server implementing the new CMIS-Interface.
When i call the Service i get the exception:
javax.xml.ws.soap.SOAPFaultException: An error was discovered processing the <wsse:Security> header
my code (in an EJB 3.0 of NWCE 7.1 CE Server) is as follows:
@Stateless(name="DocRepBean")
public class AlfRepBean implements DocRepLocal {
@WebServiceRef(name="RepositoryService")
private RepositoryService rService;
public String repServiceList ()
String result = "";
RepositoryServicePort rPort = rService.getRepositoryServicePort();
try
String rList = "";
for (CmisRepositoryEntryType rEntry : rPort.getRepositories())
rList = rList + "REntry:ID="+rEntry.getRepositoryID()+";Name="+rEntry.getRepositoryName()+";URI="+rEntry.getRepositoryURI()+":";
result = rList;
catch (Exception ex)
result = "!Exeption:" + ex.toString();
ex.printStackTrace();
// here the exception is thrown
return result;
Is there maybee a problem with authentification? but how can i set user and password calling that service then?
Sorry for this maybe easy questions but i'm new in consuming other webservices.
regards
matthias haykFound solution for this particular problem myself but ran into an follow-up error
-
How to install and consume GroupWise Web Service (SOAP)
Hello! I'm Razvan, programmer from Romnia, and I am new to GroupWise development.
I am asking if anyone could help me with a C# Visual Studio 2010 example of how to install and consume GroupWise Web Service (SOAP).
The documentation from novell site didn't help me, i didn't understant much of it.
All I need is either a link to a documented GroupWise C# developer step-by-step tutorial, or some code examples.
Can you please show me some code examples in C# with:
1)loging in using a username and a password,
2)retrieving contact list,
3)retrieving appointment list,
4)sending a mail,
5)setting an appointment
I don't know how to use "groupwise.wsdl" and customise it so that it points to our GroupWise server.
Please, I really need this because I am working at a project right now which involves GroupWise integration.
I hope I haven't disturbed anyone with my simple question.
I know this might be a very simple question given the complexity of the other posts here, but that's why I really hope I will get an answer soon.
Thank you very much!
Signature:
How old is the Orthodox faith?
How old is the orthodox faith?Just a comment.
The value for the version element should be "1.02"
not "1.2".
Preston
>>> On Tuesday, March 01, 2011 at 8:06 AM,
TheRomanian<[email protected]> wrote:
> I have great news! After strong documentation yesterday and today, I've
> just made a successfull example that actually connects to our GroupWise
> server.
>
> I made it in PHP.
>
> I need an ASP.NET + C# application, but now is very simple to convert
> it. I post the PHP code here for other people who in future might be
> interested in finding out.
>
> So a simple PHP GroupWise Login code using "groupwise.wsdl" web
> service:
>
>
> require_once('./GWService/GroupwiseService.php');
> require_once('FB.class.php');
>
> $classmap = array(
> 'Authenication' => 'Authenication',
> 'PlainText' => 'PlainText',
> 'loginRequest' => 'loginRequest',
> 'loginResponse' => 'loginResponse',
> 'logoutRequest' => 'logoutRequest',
> 'logoutResponse' => 'logoutResponse',
> 'UserInfo' => 'UserInfo',
> );
>
> $gwservice = new GroupwiseService(
> "./WSDL/groupwise.wsdl",
> array(
> "location" => "http://11.150.40.78:8756/soap",
> *Your GroupWise server IP:
> and PORT*
> "classmap" => $classmap,
> "trace" => true)
> );
>
> // do login
> $pt = new PlainText();
> $pt‑>username = *"YOUR GROUPWISE USERNAME"*;
> $pt‑>password = *"YOUR GROUPWISE PASSWORD"*;
>
> $lr = new loginRequest();
> $lr‑>auth = $pt;
> $lr‑>language = "en";
> $lr‑>version = "1.2";
> $lr‑>application = "phpClient";
>
> $lres = $gwservice‑>loginRequest($lr);
> //print_r($lres);
>
>
> I Hope this will help others.
>
> ‑‑
> Signature:
>
> How old is the Orthodox Faith?
> 'How old is the orthodox faith?'
> (http://www.orthodoxphotos.com/history.shtml) -
Consume External Web Service (WSDL) in ABAP (Release 700) - Proxy Error
Hi All,
Have a requirement to Consume an External Web Service in ABAP. We have the WSDL for Ext. Web Service.
Did some research and came across the link:
http://help.sap.com/saphelp_nw2004s/helpdata/en/69/8a1e9553dc4baba6026a3db510cadb/content.htm
First tried to generate a 'Consumer Proxy'. Since external WSDL, used SE80 to generate the Consumer Proxy.
But finally got Error Msg 'Incorrect value: XSD name space not available'! Could you please let me know:
1) What is causing this error and how to rectify it?
2) Is it possible to view the Proxy that I had created (which is in error)? is there a Proxy Editor?Hy Brad, I got the same error by trying to generate a 'Consumer Proxy' from a external WSDL. u2019Incorrect value: XSD name space not available'. I have solved it in this way: The report RSSIDL_DESERIALIZE_DEMO has the same check routines as the R3-Proxy Generator. I debugged this report using a saved external WSDL and compared it with using a saved WSDL (Server) generated under /nse80.
-> In the WSDL, in part message the "type" isnu2019t allowed, because the dezerialization is done already.
Coding, not working:
<xsd:complexType name="OrderRequestMsg">
<xsd:sequence>
<xsd:element name="shop" type="xsd:string"/>
u2026
</xsd:sequence>
</xsd:complexType>
<message name=" OrderRequest">
<part name="input" type=" tns:OrderRequestMsg"/>
</message>
Coding, working::
<xsd:element name="OrderRequestMsg">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="shop" type="xsd:string"/>
</xsd:sequence>
</xsd:complexType>
</xsd:element>
<message name="OrderRequest">
<part name="input" element="tns:OrderRequestMsg"/>
</message> -
Consuming EJB Web Service in WD ABAP component
Hi,
I have a scenario where I have Portal KM access methods exposed as EJB Web Service. This web service is deployed on J2EE engine.
And I have to consume this web service from my WD ABAP component controller.
Any idea how this can be achieved?
Thanks and regards,
AmeyThis doesn't really have anything to do with Web Dynpro. Normal ABAP functionality is used for the consumption of a web service. In ABAP we create a proxy class based off the WSDL of the web service. This proxy class can then be called from within Web Dynpro like any other ABAP class. You can read about consuming a web service in the online help:
http://help.sap.com/saphelp_nw70ehp1/helpdata/en/9e/c7a3591dc74a679bbc9716354e42af/frameset.htm -
Best Practice for Securing Web Services in the BPEL Workflow
What is the best practice for securing web services which are part of a larger service (a business process) and are defined through BPEL?
They are all deployed on the same oracle application server.
Defining agent for each?
Gateway for all?
BPEL security extension?
The top level service that is defined as business process is secure itself through OWSM and username and passwords, but what is the best practice for security establishment for each low level services?
Regards
FarbodIt doesnt matter whether the service is invoked as part of your larger process or not, if it is performing any business critical operation then it should be secured.
The idea of SOA / designing services is to have the services available so that it can be orchestrated as part of any other business process.
Today you may have secured your parent services and tomorrow you could come up with a new service which may use one of the existing lower level services.
If all the services are in one Application server you can make the configuration/development environment lot easier by securing them using the Gateway.
Typical probelm with any gateway architecture is that the service is available without any security enforcement when accessed directly.
You can enforce rules at your network layer to allow access to the App server only from Gateway.
When you have the liberty to use OWSM or any other WS-Security products, i would stay away from any extensions. Two things to consider
The next BPEL developer in your project may not be aware of Security extensions
Centralizing Security enforcement will make your development and security operations as loosely coupled and addresses scalability.
Thanks
Ram -
How to consume a secure web service?
Could someone post me an sample to invoke the certificate based secure web service?
All I have is wsdl, certificate (.pfx file) and password and client jar file. Searching for the sample program to access the secure web service.
I work on weblogic workshop.Unfortunately, I have just been provided with the endpoint and the SOAP action. Don't have any other details :(
Maybe you are looking for
-
Hey, i can't import vids from computer to itunes library
touch 4th gen, can't get vids to import to itunes libary,after up dating
-
Hi Forum, can someone tell me what could cause this error while installing GW 2014.1 (not HP1) on WIN 8: "Failed extract file "DLL.ini" from the binary table" Thanks, Pascal
-
Can one use expanded text or stock paragraphs in Firefox?
There are certain owrds, phrases and email addresses I constantly have to type in. I do you the forms for google, but I need more. Have you come across anything that allows one to store something, and have it expand. For instance, after setting it up
-
SP 2013 replace specific icon color
I have a custom Css applied to the whole sharePoint sites, but what I want is that the sharePoint Icons was highlighted should come in white. I have not used themes in SharePoint and have applied custom CSS using custom master page. I have explored o
-
Hi Exters I am getting error like this System error: NO posted data for 8_CPR_EXTID 8 (Include LCATS_ITSF10) .Can anyone help me. Thanks & Regards Sandya