How to download VoiceXML Web Application from CUE?

Hi All
Our customer has already had CUE IVR working with VoiceXML function.
what we need to do is to study their existing IVR with VXML, make certain change base on
current requirement.
however after a couple days dig through their CUE system and googling, I didnt find a way to get the
original "war" file mentioned in link below.
http://www.cisco.com/en/US/partner/docs/voice_ip_comm/unity_exp/rel3_0/vxml/developer/guide/vxmljsp.html#wp1060138
I understand that after deploying the web application to CUE, it will create a folder under "IVR > VXML Applications"
my questions are
1. how can we download all deployed WAR files from CUE?
2. or how can we get the original VXML and JSP files?
3. any way to reverse engineering the deployed files back to WAR file?
thanks
Yuke

Hi Gergely
thanks for ur reply. I downloaded the 7.0.6 version of sdk due to my CUE is at version 7.0.
1. I tried to build it a few time with no success. is there any trick on building the war file?
C:\ant\bin>echo off
C:\ant\bin>C:\ant\bin\build.bat -v
C:\ant\bin>REM 56789012345678901234567890123456789012345678901234567890123456789
012345
C:\ant\bin>REM -----------------------------------------------------------------
C:\ant\bin>REM build.bat -- Build Script for WEBAPP
C:\ant\bin>setlocal EnableDelayedExpansion
C:\ant\bin>echo off
C:\ant\bin>REM Execute ANT to perform the requested build target
C:\ant\bin>"C:\Program Files (x86)\Java\j2re1.4.2"\bin\java -classpath c:\ant\li
b\ant.jar;c:\ant\lib\optional.jar;"C:\Program Files (x86)\Java\j2re1.4.2"\lib\to
ols.jar;c:\webapp\webserver\lib\commons-logging-api.jar;c:\webapp\webserver\lib\
container_util.jar;c:\webapp\webserver\lib\core_util.jar;c:\webapp\webserver\lib
\crimson.jar;c:\webapp\webserver\lib\etomcat.jar;c:\webapp\webserver\lib\facade2
2.jar;c:\webapp\webserver\lib\jakarta-regexp-1.3.jar;c:\webapp\webserver\lib\jas
per-runtime.jar;c:\webapp\webserver\lib\jasper.jar;c:\webapp\webserver\lib\mx4j-
jmx.jar;c:\webapp\webserver\lib\mx4j-tools.jar;c:\webapp\webserver\lib\servlet.j
ar;c:\webapp\webserver\lib\stop-tomcat.jar;c:\webapp\webserver\lib\tomcat-coyote
.jar;c:\webapp\webserver\lib\tomcat-http11.jar;c:\webapp\webserver\lib\tomcat-jk
2.jar;c:\webapp\webserver\lib\tomcat-util.jar;c:\webapp\webserver\lib\tomcat.jar
;c:\webapp\webserver\lib\tomcat33-coyote.jar;c:\webapp\webserver\lib\tomcat33-re
source.jar;c:\webapp\webserver\lib\tomcat_core.jar;c:\webapp\webserver\lib\tomca
t_modules.jar;c:\webapp\webserver\lib\xalan.jar;c:\webapp\lib\ivrjsp.jar -Dtomca
t.home=webserver org.apache.tools.ant.Main
Buildfile: build.xml
prepare:
compile:
     [jspc] Compiling 9 source filesC:\ant\bin\jsp-gen
     [java] java.lang.NoClassDefFoundError: org/apache/jasper/JspC
     [java] Exception in thread "main"
BUILD FAILED
file:C:/ant/bin/build.xml:50: Java returned: 1
Total time: 0 seconds
C:\ant\bin>echo off
C:\ant\bin>
it throws some error, but I have no idea where to start the troubleshooting
2. what do u mean by browse through the cue system? using gui? or cli?
from gui, I didnt find anywhere I can download the "extracted" war files.
under cli, I can use "ccn copy url", only if I know the directory and file name.
e.g.
ccn copy url "http://localhost/vbrowser/vxml/vxml.vxml" document generic test.vxml
do u happen to know that from cli, how do I list all files under localhost/vbrowser/vxml?
thanks
Yuke

Similar Messages

  • HT201303 how to downloading videos music applications in my iphone from itune ?

    how to downloading videos music applications from itune to my iphone

    How did you get it onto the phone in the first place? You had to have synced it from a computer if it wasn't purchased from the iTunes store. You should still have it in your iTunes library...
    Other than for items purchased from the iTunes store, media sync is one way, computer to iPhone. There is no supported method of getting other music off of the phone to a computer. If you google, you may find some useful utilities that will help.
    If the media resides on a different computer and you're changing the one you are going to sync with, just back up the iTunes library and transfer it to the new computer.

  • Terminate web application from servlet

    It will be very helpful to me if any one found me the solution for the following.
    How can i terminate web application from servlet and also i want to close the browser window immediately from servlets?

    How can i terminate web application from servletWhat do you mean by this?
    also i want to close the browser window immediately
    from servlets?The servlet can't close a browser window, but could send back client code that closes it (i.e. JavaScript as part of an HTML page).

  • How to migrate a web app from JDev 904 to JDev10132?

    Hi,
    I'm looking for any recommendation on how to migrate a web application from JDev 904 to JDev 10132? The application uses BC4J, Struts and DataTags.
    Is there tool support to migrate from DataTags to ADF DataBinding?
    Any hints are welcome.
    Thanks,
    Markus

    There is no automated migration of jbo data tags to the new binding architecture.
    see:
    http://www.oracle.com/technology/products/jdev/htdocs/10.1.3.0.3/desupport1013g.html

  • From a Technical Architect point of view, how to design a web application?

    Hi to all,
    I am writing this issue here because I this question is not related on how to program, but on how to design a web application. That is, this question is not related to how to program with the technologies in J2EE, but how to use them correctly to achieve a desired outcome.
    Basically I know how to develop a simple web application. I like to use SpringFramework with AcegiSecurity and Hibernate Framework to persist my data. I usually use JBoss to deploy my web applications, however I could easily use Tomcat or Jetty (Since I am not using EJB�s).
    However I have no idea on how to develop (or a better word would be �design�) a website which is divided into different modules.
    Usually when you develop a website, you have certain areas that are public, and other areas that are not. For example, a company would want anyone on the Internet to download information about the products they are selling, however they would only want their employees to download certain restricted information.
    Personally I try to categorise this scenario in to common words; Extranet and Intranet.
    But � (and here starts the confusion in my mind) should I treat these two as two projects, or as one project? The content to be displayed on the Extranet is much different then the content to be displayed on the Intranet and definitely clients should not be allowed to the Intranet.
    First approach would be to treat them as the same project. This would be perfect, since if the company (one day) decides to change the layout of the website, then the design would change for both the Intranet and the Extranet version. Also the system has a common login screen, that is I would only need to have employees to have a certain Role so that they have access to the intranet, while clients would not have a certain Role and thus they would not be allowed in. But what about performance and scalability? What if the Intranet and Extranet have to be deployed on the different Hardware!?
    The second approach is to threat them as two separate projects. To keep the same layout you just copy & paste the layout from one project to another. However we would not want to have two different databases to store our users, one for the employees and the other one for the clients. Therefore we would build a CAS server for authentication purposes. Both the Intranet and the Extranet would use the same CAS server to login however they could be deployed on different hardware. However what if we want to change the design. Do we really want to have to just copy and paste elements from one project to another? We all know how these things finish! �We do not have time for that � just change the Extranet and leave the Intranet as it is!�
    The third approach (and this is the one I like most) is to have a single project built into different WAR files. The common elements would be placed in all WAR files. However in development you would only need to change once and the effects would show in the different war files. The problem with this approach is that the project will be very big. Also, you will still need to define configuration files for each one of them (2 Web.config, 2 Spring-Servlet.config, 2 acegi-security.config, etc).
    Basically I would like something in the middle of approach 2 and approach 3! However I can identify what this approach is. Also I can not understand if there is even a better approach then these three! I always keep in mind that there can always be more then two modules (that is not only Intranet and Extranet).
    Anyways, it is already too long this post. Any comments are more then welcome and appreciated.
    Thanks & Regards,
    Sim085

    Hi to all,
    First of all thanks for the interest shown and for the replies. I do know what MVC or Multi-layered design is and I develop all my websites in that way.
    Basically I have read a lot of books about Domain-Driven Design. I divide my web applications into 4 layers. The first layer is the presentation layer. Then I have the Facade layer and after that I have a Service layer (Sometimes I join these two together if the web application is small enough). Finally I have the Data Access layer where lately I use Hibernate to persist my object in the database.
    I do not have problems to understand how layering a web application works and why it is required. My problem is how to design and develop web applications with different concerns that use same resources. Let me give an example:
    Imagine a Supermarket. The owner of the Supermarket want to sell products from the website, however he wants to also be able to insert new products from the website itself. This means that we have two different websites that make use of the same resources.
    The first website is for the Supermarket clients. The clients can create an account. Then they can view products and order them. From the above description we can see that in our domain model we will have definitely an object Account and an object Product (I am not mentioning all of them). In the Data Access layer we will have repository objects that will be used to persist the Account and Products.
    The second website is for the Supermarket employees. The employees still need to have an account. Also there is still a product object. This means that Account and Product objects are common to the two websites.
    Also important to mention is the style (CSS). The Supermarket owner would like to have the same style for both websites.
    Now I would not like to just copy & paste the objects and elements that are common to both websites into the two different projects since this would mean that I have to always repeat the changes I make in one website, inside the other one.
    Having a single WAR file with both websites is not an option either because I would not like to have to deploy both websites on the same server because of performance and scalability issues.
    Basically so far I have tought of putting the common elements in a Jar File which would be found on the two different servers. However I am not sure if this is the best approach.
    As you can see my problem is not about layering. I know what layering is and agree with both of you on its importance.
    My question is: What is the best approach to have the same resources available for different websites? This includes Class Files, CSS Files, JavaScript Files, etc.
    Thanks & Regards,
    Sim085

  • How to protect web application from piracy?

    I m looking for solution to protect Web application from piracy.
    I want my application run on web server for which it is built, &
    it musn't run on any other web server.
    how can i protect my web application from piracy?.
    Our .Net applications we protect using Hardware ID binding ,
    How can i protect J2EE applications?

    Run it on your own server is the simple and only secure solution.

  • 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 download data in excel from web report in sap ?

    how to download data in excel from web report made  in sap abap?
    through tcode smw0.

    for exemple using
    MS_EXCEL_OLE_STANDARD_DAT

  • HT201269 Hi :how can i transfer WatsApp Application from My lab top to my i phone as it is already downloaded in my lab top

    Hi :how can i transfer WatsApp Application from My lab top to my i phone as it is already downloaded in my lab top

    If this app is iPhone compatible and is now in your iTunes App section all you need to do is sync your iPhone to your computer and select that app to sync to your iPhone.

  • How To Download Free Games & Application For IPhone 4 From Itunes & Store !

    Hi guys iam amrit from Nepal I have IPhone 4, I want to download free games & application for iPhone 4 from itunes or application store.Guys please tell me how to download free games & application for iPhone 4 without credit card or debit card.

    Log out of any iTunes account on iPhone then go to the app store. Find a free app and purchase it. Create a new account and select none for payment. Pretty simple
    http://support.apple.com/kb/ht2534

  • How to download a file version from office 365 using csom

    I need to download an older file version from office 365 and get the data into a byte array. I have no trouble downloading the latest version with File.OpenBinaryStream() and I have no trouble loading the previous file versions with File.Versions. But now
    I need to actually download an older version of the file and it seems the only way is to use File.OpenBinaryDirect. So I am creating a client context using my oAuth access token and providing the correct path, but I am getting a (401) Unauthorized
    error. Looking with Fiddler I can see that the call to OpenBinaryDirect is somehow trying to post to my file URL and the server is responding with 401.
    context = TokenHelper.GetClientContextWithAccessToken(SPHostUrl, AccessToken);
    FileInformation info = File.OpenBinaryDirect(context, "/" + _fileVersion.Url);  //throws 401
    //leading slash required otherwise ArgumentOutOfRangeException
    I have to be able to access the older file versions with my c# code -- I don't have a viable app without that ability -- any help urgently needed and greatly appreciated!

    Thank you SO much (Can't wait for the next release)!
    For anyone else who lands here, here's the code I ended up using:
    // VersionAccessUser and VersionAccessPassword are stored in web.config
    // web.Url is loaded via the clientContext
    // myVersion is the FileVersion I got from the file's Versions.GetById() method
    // probably a lot of ways to get hostUrl, it just needs to be https://yourdomain.sharepoint.com/
    // - I'm running my app from a subweb
    // I had trouble following the links to get the full MsOnlineClaimsHelper code
    // (the one on msdn.com was missing RequestBodyWriter, WSTrustFeb2005ContractClient,
    // and IWSTrustFeb2005Contract
    // so I've included the code I used here.
    string myVersionFullUrl = string.Format("{0}/{1}", web.Url, myVersion.Url);
    string userName = WebConfigurationManager.AppSettings.Get("VersionAccessUser");
    string strPassword = WebConfigurationManager.AppSettings.Get("VersionAccessPassword");
    string hostUrl = Regex.Replace(web.Url, "([^/]+//[^/]+/).*", "$1");
    MsOnlineClaimsHelper claimsHelper = new MsOnlineClaimsHelper(hostUrl, userName, strPassword);
    var client = new WebClient();
    client.Headers["Accept"] = "/";
    client.Headers.Add(HttpRequestHeader.UserAgent, "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.2; .NET CLR 1.0.3705;)");
    client.Headers.Add(HttpRequestHeader.Cookie, claimsHelper.CookieContainer.GetCookieHeader(new Uri(hostUrl)));
    var document = client.DownloadString(myVersionFullUrl);
    // These classes are needed to download old versions of files (see: http://social.msdn.microsoft.com/Forums/en-US/7746d857-d351-49cc-b2f0-496663239e02/how-to-download-a-file-version-from-office-365-using-csom?forum=sharepointdevelopment)
    // I cobbled this file from http://social.technet.microsoft.com/Forums/msonline/en-US/4e304493-7ddd-4721-8f46-cb7875078f8b/problem-logging-in-to-office-365-sharepoint-online-from-webole-hosted-in-the-cloud?forum=onlineservicessharepoint
    // and http://fredericloud.com/2011/01/11/connecting-to-sharepoint-with-claims-authentication/
    using Microsoft.IdentityModel.Protocols.WSTrust;
    using Microsoft.SharePoint.Client;
    using System;
    using System.Collections.Generic;
    using System.IO;
    using System.Linq;
    using System.Net;
    using System.Net.Security;
    using System.ServiceModel;
    using System.ServiceModel.Channels;
    using System.Text;
    using System.Web;
    using System.Xml;
    using System.Xml.Linq;
    namespace DPSiDoxAppWeb.Helpers
    /// <summary>
    /// Create a new contract to use for issue claims for the SharePoint requests
    /// </summary>
    [ServiceContract]
    public interface IWSTrustFeb2005Contract
    [OperationContract(ProtectionLevel = ProtectionLevel.EncryptAndSign,
    Action = "http://schemas.xmlsoap.org/ws/2005/02/trust/RST/Issue",
    ReplyAction = "http://schemas.xmlsoap.org/ws/2005/02/trust/RSTR/Issue",
    AsyncPattern = true)]
    IAsyncResult BeginIssue(Message request, AsyncCallback callback, object state);
    Message EndIssue(IAsyncResult asyncResult);
    /// <summary>
    /// Implement the client contract for the new type
    /// </summary>
    public class WSTrustFeb2005ContractClient : ClientBase<IWSTrustFeb2005Contract>, IWSTrustFeb2005Contract
    public WSTrustFeb2005ContractClient(Binding binding, EndpointAddress remoteAddress)
    : base(binding, remoteAddress)
    public IAsyncResult BeginIssue(Message request, AsyncCallback callback, object state)
    return Channel.BeginIssue(request, callback, state);
    public Message EndIssue(IAsyncResult asyncResult)
    return Channel.EndIssue(asyncResult);
    /// <summary>
    /// Create a class that will serialize the token into the request
    /// </summary>
    class RequestBodyWriter : BodyWriter
    readonly WSTrustRequestSerializer _serializer;
    readonly RequestSecurityToken _rst;
    /// <summary>
    /// Constructs the Body Writer.
    /// </summary>
    /// <param name="serializer">Serializer to use for serializing the rst.</param>
    /// <param name="rst">The RequestSecurityToken object to be serialized to the outgoing Message.</param>
    public RequestBodyWriter(WSTrustRequestSerializer serializer, RequestSecurityToken rst)
    : base(false)
    if (serializer == null)
    throw new ArgumentNullException("serializer");
    _serializer = serializer;
    _rst = rst;
    /// <summary>
    /// Override of the base class method. Serializes the rst to the outgoing stream.
    /// </summary>
    /// <param name="writer">Writer to which the rst should be written.</param>
    protected override void OnWriteBodyContents(XmlDictionaryWriter writer)
    _serializer.WriteXml(_rst, writer, new WSTrustSerializationContext());
    public class MsOnlineClaimsHelper
    #region Properties
    readonly string _username;
    readonly string _password;
    readonly bool _useRtfa;
    readonly Uri _host;
    CookieContainer _cachedCookieContainer = null;
    DateTime _expires = DateTime.MinValue;
    #endregion
    #region Constructors
    public MsOnlineClaimsHelper(string host, string username, string password)
    : this(new Uri(host), username, password)
    public MsOnlineClaimsHelper(Uri host, string username, string password)
    _host = host;
    _username = username;
    _password = password;
    _useRtfa = true;
    public MsOnlineClaimsHelper(Uri host, string username, string password, bool useRtfa)
    _host = host;
    _username = username;
    _password = password;
    _useRtfa = useRtfa;
    #endregion
    #region Constants
    public const string office365STS = "https://login.microsoftonline.com/extSTS.srf";
    public const string office365Login = "https://login.microsoftonline.com/login.srf";
    public const string office365Metadata = "https://nexus.microsoftonline-p.com/federationmetadata/2007-06/federationmetadata.xml";
    public const string wsse = "http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd";
    public const string wsu = "http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd";
    private const string userAgent = "Mozilla/5.0 (compatible; MSIE 9.0; Windows NT 6.1; WOW64; Trident/5.0)";
    #endregion
    class MsoCookies
    public string FedAuth { get; set; }
    public string rtFa { get; set; }
    public DateTime Expires { get; set; }
    public Uri Host { get; set; }
    // Method used to add cookies to CSOM
    public void clientContext_ExecutingWebRequest(object sender, WebRequestEventArgs e)
    e.WebRequestExecutor.WebRequest.CookieContainer = getCookieContainer();
    //e.WebRequestExecutor.WebRequest.UserAgent = userAgent;
    // Creates or loads cached cookie container
    CookieContainer getCookieContainer()
    if (_cachedCookieContainer == null || DateTime.Now > _expires)
    // Get the SAML tokens from SPO STS (via MSO STS) using fed auth passive approach
    MsoCookies cookies = getSamlToken();
    if (cookies != null && !string.IsNullOrEmpty(cookies.FedAuth))
    // Create cookie collection with the SAML token
    _expires = cookies.Expires;
    CookieContainer cc = new CookieContainer();
    // Set the FedAuth cookie
    Cookie samlAuth = new Cookie("FedAuth", cookies.FedAuth)
    Expires = cookies.Expires,
    Path = "/",
    Secure = cookies.Host.Scheme == "https",
    HttpOnly = true,
    Domain = cookies.Host.Host
    cc.Add(samlAuth);
    if (_useRtfa)
    // Set the rtFA (sign-out) cookie, added march 2011
    Cookie rtFa = new Cookie("rtFA", cookies.rtFa)
    Expires = cookies.Expires,
    Path = "/",
    Secure = cookies.Host.Scheme == "https",
    HttpOnly = true,
    Domain = cookies.Host.Host
    cc.Add(rtFa);
    _cachedCookieContainer = cc;
    return cc;
    return null;
    return _cachedCookieContainer;
    public CookieContainer CookieContainer
    get
    if (_cachedCookieContainer == null || DateTime.Now > _expires)
    return getCookieContainer();
    return _cachedCookieContainer;
    private MsoCookies getSamlToken()
    MsoCookies ret = new MsoCookies();
    try
    var sharepointSite = new
    Wctx = office365Login,
    Wreply = _host.GetLeftPart(UriPartial.Authority) + "/_forms/default.aspx?wa=wsignin1.0"
    //get token from STS
    string stsResponse = getResponse(office365STS, sharepointSite.Wreply);
    // parse the token response
    XDocument doc = XDocument.Parse(stsResponse);
    // get the security token
    var crypt = from result in doc.Descendants()
    where result.Name == XName.Get("BinarySecurityToken", wsse)
    select result;
    // get the token expiration
    var expires = from result in doc.Descendants()
    where result.Name == XName.Get("Expires", wsu)
    select result;
    ret.Expires = Convert.ToDateTime(expires.First().Value);
    HttpWebRequest request = createRequest(sharepointSite.Wreply);
    byte[] data = Encoding.UTF8.GetBytes(crypt.FirstOrDefault().Value);
    using (Stream stream = request.GetRequestStream())
    stream.Write(data, 0, data.Length);
    stream.Close();
    using (HttpWebResponse webResponse = request.GetResponse() as HttpWebResponse)
    // Handle redirect, added may 2011 for P-subscriptions
    if (webResponse.StatusCode == HttpStatusCode.MovedPermanently)
    HttpWebRequest request2 = createRequest(webResponse.Headers["Location"]);
    using (Stream stream2 = request2.GetRequestStream())
    stream2.Write(data, 0, data.Length);
    stream2.Close();
    using (HttpWebResponse webResponse2 = request2.GetResponse() as HttpWebResponse)
    ret.FedAuth = webResponse2.Cookies["FedAuth"].Value;
    ret.rtFa = webResponse2.Cookies["rtFa"].Value;
    ret.Host = request2.RequestUri;
    else
    ret.FedAuth = webResponse.Cookies["FedAuth"].Value;
    ret.rtFa = webResponse.Cookies["rtFa"].Value;
    ret.Host = request.RequestUri;
    catch (Exception ex)
    return null;
    return ret;
    static HttpWebRequest createRequest(string url)
    HttpWebRequest request = HttpWebRequest.Create(url) as HttpWebRequest;
    request.Method = "POST";
    request.ContentType = "application/x-www-form-urlencoded";
    request.CookieContainer = new CookieContainer();
    request.AllowAutoRedirect = false; // Do NOT automatically redirect
    request.UserAgent = userAgent;
    return request;
    private string getResponse(string stsUrl, string realm)
    RequestSecurityToken rst = new RequestSecurityToken
    RequestType = WSTrustFeb2005Constants.RequestTypes.Issue,
    AppliesTo = new EndpointAddress(realm),
    KeyType = WSTrustFeb2005Constants.KeyTypes.Bearer,
    TokenType = Microsoft.IdentityModel.Tokens.SecurityTokenTypes.Saml11TokenProfile11
    WSTrustFeb2005RequestSerializer trustSerializer = new WSTrustFeb2005RequestSerializer();
    WSHttpBinding binding = new WSHttpBinding();
    binding.Security.Mode = SecurityMode.TransportWithMessageCredential;
    binding.Security.Message.ClientCredentialType = MessageCredentialType.UserName;
    binding.Security.Message.EstablishSecurityContext = false;
    binding.Security.Message.NegotiateServiceCredential = false;
    binding.Security.Transport.ClientCredentialType = HttpClientCredentialType.None;
    EndpointAddress address = new EndpointAddress(stsUrl);
    using (WSTrustFeb2005ContractClient trustClient = new WSTrustFeb2005ContractClient(binding, address))
    trustClient.ClientCredentials.UserName.UserName = _username;
    trustClient.ClientCredentials.UserName.Password = _password;
    Message response = trustClient.EndIssue(
    trustClient.BeginIssue(
    Message.CreateMessage(
    MessageVersion.Default,
    WSTrustFeb2005Constants.Actions.Issue,
    new RequestBodyWriter(trustSerializer, rst)
    null,
    null));
    trustClient.Close();
    using (XmlDictionaryReader reader = response.GetReaderAtBodyContents())
    return reader.ReadOuterXml();

  • How can i protect J2EE applications from piracy?

    I m looking for solution to protect Web application from piracy.
    I want my application run on web server for which it is built, &
    it musn't run on any other web server.
    how can i protect my web application from piracy?.
    Our .Net applications we protect using Hardware ID binding ,
    How can i protect J2EE applications?

    How is it going to get anywhere else? What's the threat model here? and what's the real, not imaginary, cost to you of the threat succeeding? and can you price your product such that it's cheaper to buy it than to pirate it?
    The answers to this question probably aren't in the field of tricky code or cryptography. They're more likely in marketing, time-to-market, pricing, and in physical security of the server, ...

  • How to call a Web Api from from a Visual webpart code behind?

    Hi,
    I am trying to create a visual web part in sharepoint 2013 with data received from another Web API.
    I followed the below steps.
    1. Created a Visual Web part.
    2. In the code behind(.cs) file I wrote the following code.
     async private void GetResult()
                using (var client = new HttpClient())
                    client.BaseAddress = new Uri("http://localhost:8080/");
                    client.DefaultRequestHeaders.Accept.Clear();
                    client.DefaultRequestHeaders.Accept.Add(new MediaTypeWithQualityHeaderValue("application/json"));
                    var response = await client.GetAsync("api/Tfs/OpenEnquiriesCount");
                    var content = response.Content;
    3. When I run the application, I get security exception in the line await
    client.GetAsync()
    What is the way to achieve this? How to call a web api from share point visual web part?
    Thank you in advance.

    Hi,
    Thanks for your sharing.
    Cheers,
    Jason
    Jason Guo
    TechNet Community Support

  • Moving web-application from WebLogic 10.0.0 to 10.3.3 - EJB Exception

    Hello all,
    I've moved my web-application from weblogic 10.0.0 to the new platform with Weblogic 10.3.3. After this I had some JMSEceptions (unable to run JMS methods inside of servlet or EJB) and they were fixed. For now I got new exception:
    ####<07.12.2012 16:03:06 FET> <Info> <EJB> <pc-XXXXXX> <AdminServer> <[ACTIVE] ExecuteThread: '4' for queue: 'weblogic.kernel.Default (self-tuning)'> <<anonymous>> <BEA1-00340877198035A73969> <1354885386932> <BEA-010227> <EJB Exception occurred during invocation from home or business: weblogic.ejb.container.internal.StatelessEJBHomeImpl@14df37f threw exception: javax.ejb.EJBTransactionRolledbackException: EJB Exception: : java.lang.ClassCastException: com.XXX.XXXX.XXXXXX.persistence.OperatorBean cannot be cast to com.XXX.XXXX.XXXXXX.persistence.SwitchboardBean
    at com.XXX.XXXX.XXXXXX.SwitchboardDataImpl.initialize(SwitchboardDataImpl.java:147) // itsSwitchboardBean = itsEntityManager.find(SwitchboardBean.class, switchboardNumber);
    at com.XXX.XXXX.XXXXXX.SwitchboardDataImpl.create(SwitchboardDataImpl.java:86)
    at com.XXX.XXXX.XXXXXX.SwitchboardDataEJB.create(SwitchboardDataEJB.java:64)
    persistence.xml:
    ... <persistence-unit name="xxxSwitchboard_PU" transaction-type="JTA">
    <provider>org.apache.openjpa.persistence.PersistenceProviderImpl</provider>
    <jta-data-source>jdbc/xxSwitchboard</jta-data-source>
    <non-jta-data-source>jdbc/xxSwitchboard</non-jta-data-source>
    <class>com.XXX.XXXX.XXXXXX.switchboard.persistence.OwnerBean</class>
    <class>com.XXX.XXXX.XXXXXX.switchboard.persistence.OperatorBean</class>
    <class>com.XXX.XXXX.XXXXXX.switchboard.persistence.SwitchboardBean</class>
    <class>com.XXX.XXXX.XXXXXX.switchboard.persistence.CallBean</class>
    <exclude-unlisted-classes>false</exclude-unlisted-classes>
    </persistence-unit>...
    @Entity
    public class OperatorBean extends OwnerBean
    @ManyToOne(optional = true, fetch = FetchType.EAGER)
    private SwitchboardBean switchboard;
    @Entity
    public class SwitchboardBean extends OwnerBean
    @OneToMany(mappedBy = "switchboard", cascade = CascadeType.PERSIST, fetch = FetchType.LAZY)
    private List<OperatorBean> itsOperators = new ArrayList<OperatorBean>();
    Seems that it happened due to updating weblogic version (changes in jee, jms, ejb, jpa versions?). Could you please advice me how to fix this issue?
    Thanks, Ilya

    I belive there is no problems for this change, because the versions are the same for java at least for OaS, for weblogic you should see documentation. I think you can try deploying you app to new environment if you get any noclassdeffound error or something like it then you could have problems for versions.
    Regards

  • Migration of web application from 8.1 to 9.2

    Can anybody tell me how to migrate a web application (ear, war archive) from version 8.1 to 9.2. I believe that the application can simply be transferred and deployed in 9.2 from 8.1 and it works well. But if it doesnt work, do i need to change anything in the desciptor files or anything.
    Thank you

    Well you could still use servicegen ... I'll try to look into this some more.
    -Jesus

Maybe you are looking for