Securing DSP calls via Web Services Mediator API

I have been implementing a client of DSP 3.0 services using the static Web Services Mediator API. I am successfully calling these through the AL Service Bus, where I have deployed the WSDL generated from the DSP. We are calling this from a rich client (i.e. the client is not running in any container). My company has chosen to use SAML-based security on all web services deployed in the service bus.
I know how to use general-purpose web service clients to pass SAML tokens to the web service. My question is, how do I do this when using the Web Services Mediator API. I have noticed the XMLHelper class and the RequestConfig class, but I have not seen much in the way of examples of using them.
Related question:
Is it possible to insert additional content into the SOAPHeader, or configure attributes on the Port?
Thanks,
Jeff
Edited by jhoffmanme at 02/13/2008 8:06 AM

I'm checking into the SAML question.
Regarding the soap header - whatever is in the contract defined in the WSDL.

Similar Messages

  • Executing a Job via Web Services using a Server Group?

    When executing a job from Designer or from the Management Console you have the option to select a specific job server or a server group.
    But when executing a job via Web Services it uses the first job server with which the repository was associated (i.e. the first job server listed in AL_MACHINE_INFO).
    Is there a way to get the job to execute using a server group instead simply choosing the first job server in the list?
    Note: We are using FIM to execute the jobs via web services and don't have access to additional parameters.

    Joe
    Here is the where you can change the server group/job server.
    - After you add the Batch/real Time job as a webservice.
    - Go to the Webservice Batch Job Attribute and from the drop down choose the "Enable job Attributes" and hit apply.
    - After this if you use the WSDL URL http://<Data Services Web Server>:<Web server Port>/DataServices/servlet/webservices?ver=2.0&wsdlxml
    - You will see the job attributes that you can change based on the allowed parameters mentioned in the documentation.
    The batch job or real time job is published without the job parameters by default. Once you enable the job attributes, remove and re publish the batch job as a web service. The application making the call to this webservice should be able to read the WSDL generated by Data services and pickup all the input and output parameters of the method.
    Refer to the Data Services Integrator guide (Chapter 3 : pages 25 - 33 ) to get the exact parameter values permitted via Data Services jobs called via web services.
    Hope this helps!
    Thanks & Regards
    Tiji

  • Calling a web service through SSL via a stand alone java class

    HI,
    I am trying to call a web service through SSL via a simple stand alone java client.
    I have imported the SSL certificate in my keystore by using the keytool -import command.
    Basically I want to add a user to a group on the server. Say I add a user user 1 to group group 1 using an admin userid and password. All these values are set in an xml file which I send to the server while calling the server. I pass the web service URL, the soap action name and the xml to post as the command line arguments to the java client.
    My xml file(Add.xml) that is posted looks like :
    <?xml version="1.0" encoding="UTF-8"?>
    <SOAP-ENV:Envelope
    xmlns:xsi = "http://www.w3.org/1999/XMLSchema-instance"
    xmlns:SOAP-ENC = "http://schemas.xmlsoap.org/soap/encoding/"
    xmlns:SOAP-ENV = "http://schemas.xmlsoap.org/soap/envelope/"
    xmlns:xsd = "http://www.w3.org/1999/XMLSchema"
    SOAP-ENV:encodingStyle = "http://schemas.xmlsoap.org/soap/encoding/">
    <SOAP-ENV:Body>
    <namesp1:modifyGroupOperation xmlns:namesp1 = "/services/modifyGroup/modifyGroupOp">
    <auth>
    <user>adminUser</user>
    <password>adminPassword</password>
    </auth>
    <operationType>ADD</operationType>
    <groupName>group1</groupName>
    <users>
    <userName>user1</userName>
    </users>
    </namesp1:modifyGroupOperation>
    </SOAP-ENV:Body>
    </SOAP-ENV:Envelope>
    I call the client as:
    java PostXML https://com.webservice.com/services/modifyGroup "/services/modifyGroup/modifyGroupOp" Add.xml
    I my client, I have set the following:
    System.setProperty("javax.net.ssl.keyStore", "C:\\Program Files\\Java\\jre1.5.0_12\\lib\\security\\cacerts");
    System.setProperty("javax.net.ssl.keyStorePassword", "password");
    System.setProperty("javax.net.ssl.trustStore", "C:\\Program Files\\Java\\jre1.5.0_12\\lib\\security\\cacerts");
    System.setProperty("javax.net.ssl.trustStorePassword", "password");
    But when I try to execute the java client, I get the following error:
    setting up default SSLSocketFactory
    use default SunJSSE impl class: com.sun.net.ssl.internal.ssl.SSLSocketFactoryImpl
    class com.sun.net.ssl.internal.ssl.SSLSocketFactoryImpl is loaded
    keyStore is : C:\Program Files\Java\jre1.5.0_12\lib\security\cacerts
    keyStore type is : jks
    keyStore provider is :
    init keystore
    init keymanager of type SunX509
    trustStore is: C:\Program Files\Java\jre1.5.0_12\lib\security\cacerts
    trustStore type is : jks
    trustStore provider is :
    init truststore
    adding as trusted cert:
    init context
    trigger seeding of SecureRandom
    done seeding SecureRandom
    instantiated an instance of class com.sun.net.ssl.internal.ssl.SSLSocketFactoryImpl
    main, setSoTimeout(0) called
    main, setSoTimeout(0) called
    %% No cached client session
    *** ClientHello, TLSv1
    RandomCookie: GMT: .....
    Compression Methods: { 0 }
    [write] MD5 and SHA1 hashes: len = 73
    main, WRITE: TLSv1 Handshake, length = 73
    [write] MD5 and SHA1 hashes: len = 98
    main, WRITE: SSLv2 client hello message, length = 98
    [Raw write]: length = 100
    [Raw read]: length = 5
    [Raw read]: length = 58
    main, READ: TLSv1 Handshake, length = 58
    *** ServerHello, TLSv1
    %% Created: [Session-1, SSL_RSA_WITH_RC4_128_MD5]
    ** SSL_RSA_WITH_RC4_128_MD5
    [read] MD5 and SHA1 hashes: len = 58
    [Raw read]: length = 5
    [Raw read]: length = 5530
    main, READ: TLSv1 Handshake, length = 5530
    *** Certificate chain
    chain [0] = ...
    chain [1] = ...
    chain [2] = ...
    chain [3] = ...
    main, SEND TLSv1 ALERT: fatal, description = certificate_unknown
    main, WRITE: TLSv1 Alert, length = 2
    [Raw write]: length = 7
    0000: 15 03 01 00 02 02 2E .......
    main, called closeSocket()
    main, handling exception: javax.net.ssl.SSLHandshakeException: sun.security.validator.ValidatorException: PKIX path building failed: sun.security.provider.certpath.SunCertPathBuilderException: unable to find valid certification path to requested target
    main, called close()
    main, called closeInternal(true)
    main, called close()
    main, called closeInternal(true)
    main, called close()
    main, called closeInternal(true)
    Exception in thread "main" javax.net.ssl.SSLHandshakeException: sun.security.validator.ValidatorException: PKIX path building failed: sun.security.provider.c
    ertpath.SunCertPathBuilderException: unable to find valid certification path to requested target
    at com.sun.net.ssl.internal.ssl.Alerts.getSSLException(Unknown Source)
    at com.sun.net.ssl.internal.ssl.SSLSocketImpl.fatal(Unknown Source)
    at com.sun.net.ssl.internal.ssl.Handshaker.fatalSE(Unknown Source)
    at com.sun.net.ssl.internal.ssl.Handshaker.fatalSE(Unknown Source)
    at com.sun.net.ssl.internal.ssl.ClientHandshaker.serverCertificate(Unknown Source)
    at com.sun.net.ssl.internal.ssl.ClientHandshaker.processMessage(Unknown Source)
    at com.sun.net.ssl.internal.ssl.Handshaker.processLoop(Unknown Source)
    at com.sun.net.ssl.internal.ssl.Handshaker.process_record(Unknown Source)
    at com.sun.net.ssl.internal.ssl.SSLSocketImpl.readRecord(Unknown Source)
    at com.sun.net.ssl.internal.ssl.SSLSocketImpl.performInitialHandshake(Unknown Source)
    at com.sun.net.ssl.internal.ssl.SSLSocketImpl.writeRecord(Unknown Source)
    at com.sun.net.ssl.internal.ssl.AppOutputStream.write(Unknown Source)
    at java.io.BufferedOutputStream.flushBuffer(Unknown Source)
    at java.io.BufferedOutputStream.flush(Unknown Source)
    at org.apache.commons.httpclient.methods.EntityEnclosingMethod.writeRequestBody(EntityEnclosingMethod.java:506)
    at org.apache.commons.httpclient.HttpMethodBase.writeRequest(HttpMethodBase.java:2110)
    at org.apache.commons.httpclient.HttpMethodBase.execute(HttpMethodBase.java:1088)
    at org.apache.commons.httpclient.HttpMethodDirector.executeWithRetry(HttpMethodDirector.java:398)
    at org.apache.commons.httpclient.HttpMethodDirector.executeMethod(HttpMethodDirector.java:171)
    at org.apache.commons.httpclient.HttpClient.executeMethod(HttpClient.java:397)
    at org.apache.commons.httpclient.HttpClient.executeMethod(HttpClient.java:323)
    at PostXML.main(PostXML.java:111)
    Caused by: sun.security.validator.ValidatorException: PKIX path building failed: sun.security.provider.certpath.SunCertPathBuilderException: unable to find v
    alid certification path to requested target
    at sun.security.validator.PKIXValidator.doBuild(Unknown Source)
    at sun.security.validator.PKIXValidator.engineValidate(Unknown Source)
    at sun.security.validator.Validator.validate(Unknown Source)
    at com.sun.net.ssl.internal.ssl.X509TrustManagerImpl.checkServerTrusted(Unknown Source)
    at com.sun.net.ssl.internal.ssl.JsseX509TrustManager.checkServerTrusted(Unknown Source)
    ... 18 more
    Caused by: sun.security.provider.certpath.SunCertPathBuilderException: unable to find valid certification path to requested target
    at sun.security.provider.certpath.SunCertPathBuilder.engineBuild(Unknown Source)
    at java.security.cert.CertPathBuilder.build(Unknown Source)
    ... 23 more
    I do not know where I have gone wrong. Could someone point out my mistake.
    Thanks In advance!

    Hi jazz123,
    There's an example in the [*Java Web Services Tutorial*|http://java.sun.com/webservices/docs/2.0/tutorial/doc/] : see Chapter 1: Building Web Services with JAX-WS - A Simple JAX-WS Client.

  • Is it possible to call a web service via UWL XML configuration?

    Hello
    Is it possible to call a web service via UWL XML configuration?
    If yes then an example would be great.
    Roy

    Hi Roy,
    Yes, yes it is possible.
    Yesterday only I came across the following document which will answer your questions:
    http://www.sdn.sap.com/irj/scn/go/portal/prtroot/docs/library/uuid/20f4843e-314f-2a10-2a88-8c4afa20dda6?overridelayout=t…
    ~Ashvin

  • Statemanagement Service API via web services

    All,
    I have been able to get the state property of a resource (i.e. "In Progress") via the KM web service, but have not been able to change the status to "Awaiting Approval" via a web service (SetProperty does not work as the "state" property is read-only).  There are several examples of Java code leveraging the State Management API either via a Repository Service, WD4J, etc., but non of them are via a web service (i.e. callable from ABAP).  Can someone please confirm whether or not the State Managment functionality is available via the KM Web Service API's and if so, which method?
    Just want to make sure I've exhausted this approach prior to having to embark on creating a Repository Servce.
    Thanks,
    Chad

    Hello,
    No idea of using a web service to get it done from ABAP.
    But you know any web service which changes the value of any KM Properties via Web Service.
    Regards
    BP

  • How can I call a web service via Adobe Reader XI?

    Hi all,
    I have created a document using LiveCycle (Trial) to get something from my custom web service, using Adobe Pro to open the file and its success to call the web service when clicking the call button, however, when I try to do the same thing using Adobe Reader XI, seems not work. Please help!
    Best Regards,
    Black Leong

    The only way it can work with Reader is if the document is Reader-enabled with LiveCycle Reader Extensions or the similar product from Datalogics. Acrobat is not able to add the corresponding usage right.

  • Calling a web service from a servlet via stub: java.lang.reflect.Invocation

    Hi all, I'm developping my first web application using Apache Tomcat and Axis, using servlets, jsp and web services.
    My problem is that I cannot make any call to my web service (a very simple one) because I get the following exception:
    <code>
    java.lang.reflect.InvocationTargetException CAUSA: null
    AxisFault
    faultCode: {http://schemas.xmlsoap.org/soap/envelope/}Server.userException
    faultSubcode:
    faultString: java.lang.reflect.InvocationTargetException
    faultActor:
    faultNode:
    faultDetail:
    {http://xml.apache.org/axis/}hostname:lexis02
    java.lang.reflect.InvocationTargetException
    at org.apache.axis.message.SOAPFaultBuilder.createFault(SOAPFaultBuilder.java:222)
    at org.apache.axis.message.SOAPFaultBuilder.endElement(SOAPFaultBuilder.java:129)
    at org.apache.axis.encoding.DeserializationContext.endElement(DeserializationContext.java:1087)
    </code>
    The stack trace is longer than that, but I didn't find any hints to solve the problem.
    The exception is thrown for every method of the web service:

    public java.lang.String[] getMessage(java.lang.String , int) throws java.rmi.RemoteException
    public boolean addMessage(java.lang.String, java.lang.String, int)
    throws java.rmi.RemoteException
    I'm using stub to call the web service, as generated by wsdl tool.
    Can someone help me?
    Thanx
    PS: sorry for the double message but I pressed the wronk key at the wrong time :)

  • Problem calling a web service via SOAP ad.

    Hi,
    I need to call a web service in an synchronous RFC to Web service scenario.The provider of service said me that they are going to accept production order with the service they provide. However, service semms to have only 2 request parameters one is a string enumeration ("online" or "offline") but the other has no type. In WSDL it is shown as the following -
    -<s:element minOccurs="0" maxOccurs="1" name="strFilenameOrXML">
    - <s:complexType mixed="true">
    - <s:sequence>
      <s:any />
      </s:sequence>
      </s:complexType>
      </s:element>
    When I try to test the web service with Altova XML Spy it gives me the error "Object reference not set to an instance of an object" .. at StokbarPlus.ProdService.WriteProdToSB(XmlNode strFilenameOrXML, IntegrationType EntegrasyonTip)..
    I guess the service is waiting for a xmlNode object...
    Is it possible to assign an XI message(coming from RFC) as an xmlNode object to an element of a webservice message and send it by using SOAP adapter?.
    I tried send the SOAP message by putting the whole xml(a sample order document) as a string constant in the strFilenameOrXML element and send but it did not work...
    How should I proceed?
    Thanks in advance for your help,
    -Tarik

    Hi,
    Problem is still unsolved.
    By the way I figured out that they are waiting the xml message inside strFilenameOrXML tag and tried to send it so. However it does not work. I have tried two different ways to send it.
    First one is by using messages in WSDL: did not work because special chars like <,> in the message that I am sending in the tag is escaped  .
    The Second way is using the data types that I developed, it did not work too since the receiver expects one of the inner node's namespace prefix to exist.
    I tried exporting the xsd of the message type, adding attributeFormDefault="qualified" to header, and reimporting it. It did not work, because it changes all nodes, but they want some specific node to be qualified.
    Any suggestions?

  • How to call a web Service from Oracle Applications?

    Hi friends,
    I've posted this question on OA Framework forum , but may be it's more appropiated put it here. Sorry for do it again:
    It's about how to call a web service from a Form or a .sql (via Request) in Oracle Applications:
    Could you please explain here the detailed steps (with code example if it's possible) to invoke a webservice from Oracle Applications?.. how did yo do it...?
    I've read differents posts here and the 33097.1 metalink note (by the way, the first recommended link in this note is broken...), but there are lots of theorical concepts and no real examples to see how/from where invoke the WS
    I'll have to call one webservice (I suppose the customer will give me the interface implementation)...but I've never did it with Applications so that's why I ask you for all the detailed steps...
    I work with Forms 6i, Apps 11.5.10.2 and DB 9.2.0.7.
    Thanks a lot.
    Jose.

    Hello Jose,
    I did using java program to call BPEL web services in 11.5.10.
    I pasted below the metalink note for your reference (Note:250964.1)
    The idea is first write a java program to call the webservice (in my case it is calling an BPEL web service, so this may not help directly), test it.
    Then port the java program as specified in the note, so that you could call your web service through concurrent manager scheduler.
    Is this ok?
    Thanks
    Arun.
    ======================================================
    Checked for relevance on 25-Apr-2007
    Application Install - Version: 11.5.8 to 11.5.10
    Goal
    ====
    How to register and create a Java concurrent program for Oracle Applications
    Release 11i
    Solution
    ========
    1. Create your Java Concurrent Program (JCP) , using a text editor.
    /*===========================================================================+
    | Concurrent Processing Sample Code |
    | |
    | FILENAME |
    | Hello.java |
    | |
    | DESCRIPTION |
    | Sample Java concurrent program |
    | About the simplest possible program, just writes a message to the |
    | logfile and output file. |
    | |
    | HISTORY |
    | $Log$ |
    | |
    +===========================================================================*/
    package oracle.apps.fnd.cp.sample;
    import oracle.apps.fnd.cp.request.*;
    public class Hello implements JavaConcurrentProgram {
    public static final String RCS_ID = "$Header$";
    public void runProgram(CpContext ctx) {
    ctx.getLogFile().writeln("-- Hello World! --", 0);
    ctx.getOutFile().writeln("-- Hello World! --");
    ctx.getReqCompletion().setCompletion(ReqCompletion.NORMAL, "");
    =======================================
    End Sample
    =======================================
    2. Create a sample directory under $JAVA_TOP:
    $ mkdir $JAVA_TOPoracle/apps/fnd/cp/sample
    3. Copy Hello.java into $JAVA_TOP/oracle/apps/fnd/cp/sample:
    $ cp $HOME/Hello.java $JAVA_TOP/oracle/apps/fnd/cp/sample
    4. Compile your java program:
    javac $JAVA_TOP/oracle/apps/fnd/cp/sample/Hello.java
    5. Test at the command line with following syntax:
    jre -Ddbcfile=$FND_TOP/secure/your_dbc_file.dbc \
    -Drequest.outfile=./outfile \
    oracle.apps.fnd.cp.request.Run \
    oracle.apps.fnd.cp.sample.Hello
    6. Register your custom java concurrent program with Oracle Applications.
    a. Navigate: Concurrent > Program > Executable
    b. Enter details into the form
    Executable: JCPHELLO
    Shortname: JCPHELLO
    Application: Application Object Library
    Execution Method: Java Concurrent Program
    Execution File Name: Hello (Insert a name that does not contain space or period)
    Execution File Path: oracle.apps.fnd.cp.sample
    c. Save the details
    d. Navigate: Concurrent > Program > Define
    e. Enter details into the form
    Program Name: JCPHELLO
    Program Shortname: JCPHELLO
    Application: Application Object Library
    Executable: Choose JCPHELLO from LOV
    Executable Options :
    f. Save the details
    7. Add this new concurrent request to your responsibility request group.
    a. Navigate > Security > Responsiblity > Request
    b. Query System Administrator
    c. Add new row and choose TestJava
    d. Save the changes.
    8. Run your new Hello Java Concurrent Program
    Navigate: Request > Run
    References
    ~~~~~~~~~~~
    Oracle Applications Developers Manual for Release 11i A75545-01
    ====================================================

  • How to call HTTP web services in an Interactive Form?

    Hi all,
    I am using Adobe Livecycle Designer currently in a trial 8.2 version.
    I need to invoke an HTTP Web Service (non-SOAP) in an Adobe Interactive Form. The Net.HTTP method does not work due to security reasons. The error message I get is:
    (german)
    " NotAllowedError: Sicherheitseinstellungen verhindern den Zugriff auf diese Eigenschaft oder Methode.
    Net.HTTP.request:28:XFA:form1[0]:mysubform[0]:Region[0]:change"
    In english this translates to: "Security settings prohibit the call of this property or method.
    And indeed the "Javascript for Acrobat API reference" includes the following note:
    "Note:This method can only be made outside the context of a document (for example, in a folder level JavaScript)."
    So this method seems to be excluded from use in an Adobe document, e. g. in an interactive form. But why is it then listed at all? Is there a way to call HTTP Web Services in an Adobe Interactive Form by somehow branching out the call outside the document itself? Of course I do not want to call a SOAP service which then calls the HTTP Web Service ;-)
    Is there any other way to invoke HTTP Web Services in an Adobe Interactive Form?
    Thanks a lot for your response!
    Regards
    Christoph

    Hello Kavita,
    patterns are not processed during editing. If you can't use the default behavior of the numeric field when a character is entered (handled when the user finished editing), you could use scripting to process input. Depending on what you want to do you could use the exit event or the change event.
    A change event has a property called "change" that caused the event. You could try "xfa.host.messageBox( upper(event.change) )" in FormCalc to show the characters in upper case.
    But, you should go this way only if the patterns for editing and for display and validation scripts can't be used in your case.
    Best regards
    Juergen

  • Call a Web Service from within an e-Sourcing script

    Hi Guys
    I would like to know wether anyone has successfully been able to call a Web Service from within an
    e-Sourcing script? If you have, can you please share your experience and code?
    Thank You

    Hi Faaiez -
    As with any use of Web Services, however, you should carefully consider the security issues that may come up. How, for example, will the Web Service server validate that the Web Service client (E-Sourcing) is properly authenticated? Will password information be included in the web service call? You will find that it is very easy to make a web service call, but I would encourage you to carefully consider security before implementing a productive solution.
    Web service calls can be made using raw Java web service APIs from the open source Axis library which is included with E-Sourcing; this approach is slightly more difficult to code, but very dynamic. Web service calls can also be made using proxies. In one solution that I worked on, we generated java proxies for the web service, compiled those proxies into a Jar file, and included that jar file as a custom jar in E-Sourcing. Let me provide a few more details on each of these approaches.
    Using raw java web service APIs that are part of the Service and Call classes, I prototyped a web service call to Googles sample spell checker web service. Here is the code:
    import org.apache.axis.client.Call;
    import org.apache.axis.client.Service;
    import org.apache.axis.encoding.XMLType;
    import javax.xml.rpc.ParameterMode;
    import javax.xml.namespace.QName;
    String endpoint = "http://api.google.com/search/beta2";
    Service  service = new Service();       
    Call call = (Call) service.createCall();       
    call.setTargetEndpointAddress( new java.net.URL(endpoint) );       
    call.setOperationName( "doSpellingSuggestion" );       
    call.setOperationName(new QName("urn:GoogleSearch", "doSpellingSuggestion"));       
    call.addParameter("key", XMLType.XSD_STRING, ParameterMode.IN);       
    call.addParameter("phrase", XMLType.XSD_STRING, ParameterMode.IN);       
    call.setReturnType( XMLType.XSD_STRING );       
    String ret = (String) call.invoke( new Object[] { "googlekey", doc.getDocumentDescription()} );       
    doc.setDocumentDescription(ret);
    This block of code does a very simple thing...it calls the Google "doSpellingSuggestions" web service with two parameters: a key provided by Google, and a string for which the spelling suggestions should be generated. I used the current document description as my sample string for the web service and I put the results back into the document description - remember, this is just showing how you can call the web service, not doing anything really intelligent or useful from a business perspective
    There is nothing special to E-Sourcing about the above code...this is really just using the Axis java classes to call a web service.
    The second approach that can be used is to generate Java proxies for the web service calls. The open source Axis library includes a tool called "wsdl2java". Using the WSDL for the web service, you can generate Java proxies. Java classes will be generated by the tool; these Java classes will then need to be compiled and included in E-Sourcing as a custom jar. Once they are part of the E-Sourcing deployment, they can be called like any Java API. If you were to examine the generated code, you would notice that it looks a lot like the raw web service code shown above...the generated classes really just provide a simpler interface to the same functionality.
    You can see this information and other E-Sourcing information at my blog at: http://www.sunshinesys.com/
    Rob

  • Exposing Portal's User Management functionality via Web Service issue

    Dear experts,
    I am trying to create and deploy a web service that will tap into User Management functionality (UMFactory) of the Portal. I created a Java project with a Java class with one of the methods exposed via Web Service. Since this is a Java project and not a Web Dynpro project, a number of external jars and libraries, but I don't know how to add WD_RUNTIME and I am guessing that my problem is related to that.
    When trying to run the application, I receive the following error message when trying to envoke UMFactory:
    java.lang.NoClassDefFoundError: com/sap/tc/logging/Location
         at com.sap.security.api.UMFactory.<clinit>(UMFactory.java:166)
         at com.hollister.getusers.GetPortalUsers.getPortalUsers(GetPortalUsers.java:75)
         at com.hollister.getusers.GetPortalUsers.main(GetPortalUsers.java:39)
    Please, help.
    Thanks,
    Alex

    Container Managed Authentication. Does everything you need.

  • 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 PM

    Are you calling invoke()?
    Do you have the port type in the servlet context?

  • Error while calling a Web Service from a Session Bean

    I am trying to call a Web Service from a Session Bean using an Axis client, but I am getting the next exception:
    java.rmi.ServerException: RemoteException occurred in server thread; nested exception is:
         java.rmi.RemoteException: org/apache/axis/client/Service
         at com.sun.corba.ee.internal.javax.rmi.CORBA.Util.wrapException(Util.java:364)
         at javax.rmi.CORBA.Util.wrapException(Util.java:277)
         at com.ing.mx.seguros.siniestros.litigios.ejb._SisaServiceRemote_Stub.invocarWebSericeProveedorLegal(Unknown Source)
         at com.ing.mx.seguros.siniestros.litigios.proxy.SisaWsProxy.solicitarApoyoLegal(SisaWsProxy.java:132)
         at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
         at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
         at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
         at java.lang.reflect.Method.invoke(Method.java:324)
         at org.apache.axis.providers.java.RPCProvider.invokeMethod(RPCProvider.java:402)
         at org.apache.axis.providers.java.RPCProvider.processMessage(RPCProvider.java:309)
         at org.apache.axis.providers.java.JavaProvider.invoke(JavaProvider.java:333)
         at org.apache.axis.strategies.InvocationStrategy.visit(InvocationStrategy.java:71)
         at org.apache.axis.SimpleChain.doVisiting(SimpleChain.java:150)
         at org.apache.axis.SimpleChain.invoke(SimpleChain.java:120)
         at org.apache.axis.handlers.soap.SOAPService.invoke(SOAPService.java:481)
         at org.apache.axis.server.AxisServer.invoke(AxisServer.java:323)
         at org.apache.axis.transport.http.AxisServlet.doPost(AxisServlet.java:854)
         at javax.servlet.http.HttpServlet.service(HttpServlet.java:760)
         at org.apache.axis.transport.http.AxisServletBase.service(AxisServletBase.java:339)
         at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
         at org.apache.catalina.core.StandardWrapperValve.invokeServletService(StandardWrapperValve.java:720)
         at org.apache.catalina.core.StandardWrapperValve.access$000(StandardWrapperValve.java:118)
         at org.apache.catalina.core.StandardWrapperValve$1.run(StandardWrapperValve.java:278)
         at java.security.AccessController.doPrivileged(Native Method)
         at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:274)
         at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:505)
         at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:212)
         at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:505)
         at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:203)
         at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:505)
         at com.iplanet.ias.web.connector.nsapi.NSAPIProcessor.process(NSAPIProcessor.java:158)
         at com.iplanet.ias.web.WebContainer.service(WebContainer.java:850)Thanks for any help provided.
    Does any one have insights about it?

    Hi 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.

  • Issue in calling a web service from Apps instance

    Hi ,
    I have created a procedure to call a function which gives response by calling a web service URL.
    Requirement is,
    While calling this procedure , the response data has been stored in the table. This is working fine in the back end.
    Now , i call the same through concurrenet program . It is also getting stored but partially.. The exact data is missing ..other default tags are displayed in the column.
    PROCEUDRE:
    create or replace procedure cv_test_GetCityWeather_PROC(cityName in varchar2, country in varchar2 ,errbuf OUT nocopy VARCHAR2,retcode OUT nocopy VARCHAR2) is
    xmlResponse XmlType;
    begin
    xmlResponse := CV_Test_GetCityWeather(cityName,country);
    insert into xx_cv_test values(xmlResponse);
    fnd_file.put_line(fnd_file.log, 'hghghgh');
    EXCEPTION
    WHEN OTHERS THEN
    retcode := 'insert failed';
    fnd_file.put_line(fnd_file.log, 'response of the request is ' );
    --dbms_output.put_line('xmlResponse ' ||xmlResponse);
    end cv_test_getCityweather_proc;
    FUNCTION
    /*<TOAD_FILE_CHUNK>*/
    CREATE OR REPLACE function APPS.CV_Test_GetCityWeather( cityName varchar2, country varchar2 ) return XmlType is
    --// URL to call
    SOAP_URL constant varchar2(1000) := 'http://www.webservicex.net/globalweather.asmx';
    --// SOAP envelope template, containing $ substitution variables
    SOAP_ENVELOPE constant varchar2(32767) :=
    '<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:web="http://www.webserviceX.NET">
    <soapenv:Header/>
    <soapenv:Body>
    <web:GetWeather>
    <web:CityName>$CITY</web:CityName>
    <web:CountryName>$COUNTRY</web:CountryName>
    </web:GetWeather>
    </soapenv:Body>
    </soapenv:Envelope>';
    --// we'll identify ourselves using an IE9/Windows7 generic browser signature
    C_USER_AGENT constant varchar2(4000) := 'Mozilla/5.0 (compatible; MSIE 9.0; Windows NT 6.1; Trident/5.0)';
    --// these variables need to be set if web access
    --// is via a proxy server
    proxyServer varchar2(20) default null;
    proxyUser varchar2(20) default null;
    proxyPass varchar2(20) default null;
    --// our local variables
    soapEnvelope varchar2(32767);
    proxyURL varchar2(4000);
    request utl_http.req;
    response utl_http.resp;
    buffer varchar2(32767);
    soapResponse clob;
    xmlResponse XmlType;
    eof boolean;
    begin
    --// create the SOAP envelope
    soapEnvelope := replace( SOAP_ENVELOPE, '$CITY', cityName );
    soapEnvelope := replace( soapEnvelope, '$COUNTRY', country );
    --// our "browser" settings
    utl_http.set_response_error_check( true );
    utl_http.set_detailed_excp_support( true );
    utl_http.set_cookie_support( true );
    utl_http.set_transfer_timeout( 10 );
    utl_http.set_follow_redirect( 3 );
    utl_http.set_persistent_conn_support( true );
    --// configure for web proxy access if applicable
    if proxyServer is not null then
    proxyURL := 'http://'||proxyServer;
    if (proxyUser is not null) and (proxyPass is not null) then
    proxyURL := Replace( proxyURL, 'http://', 'http://'||proxyUser||':'||proxyPass||'@' );
    end if;
    utl_http.set_proxy( proxyURL, null );
    end if;
    --// make the POST call to the web service
    request := utl_http.begin_request( SOAP_URL, 'POST', utl_http.HTTP_VERSION_1_1 );
    utl_http.set_header( request, 'User-Agent', C_USER_AGENT );
    utl_http.set_header( request, 'Content-Type', 'text/xml; charset=utf-8' );
    utl_http.set_header( request, 'Content-Length', length(soapEnvelope) );
    utl_http.set_header( request, 'SoapAction', 'http://www.webserviceX.NET/GetWeather' );
    utl_http.write_text( request, soapEnvelope );
    --// read the web service HTTP response
    response := utl_http.get_response( request );
    dbms_lob.CreateTemporary( soapResponse, true );
    eof := false;
    loop
    exit when eof;
    begin
    utl_http.read_line( response, buffer, true );
    if length(buffer) > 0 then
    dbms_lob.WriteAppend(
    soapResponse,
    length(buffer),
    buffer
    end if;
    exception when utl_http.END_OF_BODY then
    eof := true;
    end;
    end loop;
    utl_http.end_response( response );
    --// as the SOAP responds with XML, we convert
    --// the response to XML
    xmlResponse := XmlType( soapResponse );
    --dbms_lob.FreeTemporary( soapResponse );
    --insert into xx_cv_test values(xmlResponse);
    return( xmlResponse );
    exception when OTHERS then
    if soapResponse is not null then
    dbms_lob.FreeTemporary( soapResponse );
    end if;
    raise;
    end;
    EXECUTION:
    select cv_test_GetCityWeather( 'Cape Town', 'South Africa' ) from dual
    Result is,
    <?xml version="1.0" encoding="UTF-8"?>
    <soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
    <soap:Body>
    <GetWeatherResponse xmlns="http://www.webserviceX.NET">
    <GetWeatherResult><?xml version="1.0" encoding="utf-16"?><CurrentWeather> <Location>Cape Town, Cape Town International Airport, South Africa (FACT) 33-59S 018-36E 0M</Location> <Time>May 28, 2013 - 03:00 AM EDT / 2013.05.28 0700 UTC</Time> <Wind> from the NNW (330 degrees) at 7 MPH (6 KT) (direction variable):0</Wind> <Visibility> 4 mile(s):0</Visibility> <SkyConditions> mostly cloudy</SkyConditions> <Temperature> 57 F (14 C)</Temperature> <DewPoint> 53 F (12 C)</DewPoint> <RelativeHumidity> 87%</RelativeHumidity> <Pressure> 30.03 in. Hg (1017 hPa)</Pressure> <Status>Success</Status></CurrentWeather></GetWeatherResult>
    </GetWeatherResponse>
    </soap:Body>
    </soap:Envelope>
    While running Concurrent Program, by providing PARAMETERS : Cape Town, South Africa,
    the result is ,
    <?xml version="1.0" encoding="UTF-8"?>
    <soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
    <soap:Body>
    <GetWeatherResponse xmlns="http://www.webserviceX.NET">
    <GetWeatherResult>Data Not Found</GetWeatherResult>
    </GetWeatherResponse>
    </soap:Body>
    </soap:Envelope>
    Why the outputs are different for the same procedure..
    Anybody , Please help me to fix this issue.
    Thanks
    Winsky

    duplicate post
    Please see
    Calling webservice from PLSQL
    Please confirm are you the one who post the above thread
    ;) AppsMAsti :)
    sharing is Caring

Maybe you are looking for

  • Permanently save line spacing in a multi-line text field

    Me: Adobe Acrobat 8 Pro, Windows Vista (I think the people who will be using the form have Reader 7 on Windows) I work in a doctors' clinic, and we use phone message sheets to document conversations between the patients/us/nurses/doctors, and I scann

  • HDMI cable hook up to laptop

    Does it matter what thickness or type of HDMI cable I use to connect my Mac Pro laptop to a TV Monitor?  I'm using one that is thicker than what I usually use and when I hooked it up (I have a Belkin HDMI adapter), my computer would no longer go into

  • How can i edit a PDF document?

    would like to edit a pdf doc. how can i do that?

  • White Wall - Photoshop CS6 corrupted files won't zoom

    So my Photoshop CS6 is slowly corrupting files. I open psds to find nothing but a giant whit wall. I zoom out and the white disappears but then I can't zoom in any further than 50%. My rulers however, show that I'm zooming in. Then when I select anot

  • JFileChooser SetSelectedFile() bug

    Hi, I am having problems using a JFileChooser to save a file in JDK1.3. The problem is that selecting a directory overwrites the filename in the file chooser, i.e. if a user types in a filename, then decides to change directories, their filename will