Search Results

Search found 15591 results on 624 pages for 'request pipeline'.

Page 36/624 | < Previous Page | 32 33 34 35 36 37 38 39 40 41 42 43  | Next Page >

  • How to implement RSA-CBC?(I have uploaded the request document)

    - by tq0fqeu
    I don't konw more about cipher, I just want to implement RSA-CBC which maybe mean that the result of RSA encrypt in CBC mode, and I have implemented RSA. any code languages will be ok, java will be appreciated thx I copy the request as follow(maybe has spelling wrong), but that's French I don't konw that: Pr´esentation du mini-projet Le but du mini-projet est d’impl´ementer une version ´el´ementaire du chi?rement d’un bloc par RSA et d’inclure cette primitive dans un systeme de chi?rement par bloc avec chaˆinage de blocs et IV (Initial Vector ) al´eatoire. Dans ce systeme, un texte clair (`a chi?rer) est d´ecompos´e en blocs de taille t (?x´ee par l’utilisa- teur), chaque bloc (clair) est chi?r´e par RSA en un bloc crypt´e de mˆeme taille, puis le cryptogramme associ´e au texte clair initial est obtenu en chaˆinant les blocs crypt´es par la m´ethode CBC (cipher- block chaining) d´ecrite dans le cours (voir poly “Block Ciphers”) Votre programme devra demander a l’utilisateur la taille t, puis, apres g´en´eration des cl´es publique et priv´ee, lui proposer de chi?rer ou d´echi?rer un (court) ?chier ASCII. Il est indispensable que votre programme soit au moins capable de traiter le cas (tres peu r´ealiste du point de vue de la s´ecurit´e) t = 32. Pour les traiter des blocs plus grands, il vous faudra impl´ementer des routines d’arithm´etique multi-pr´ecision ; pour cela, je vous conseille de faire appela des bibliotheques libres comme GMP (GNU Multiprecision Library). Pour la g´en´eration al´eatoire des nombres premiers p et q, vous pouvez ´egalement faire appela des bibliotheques sp´ecialis´ees,a condition de me donner toutes les pr´ecisions n´ecessaires. Vous devez m’envoyer (avant une date qui reste a ?xer)a mon adresse ´electronique ([email protected]) un courriel (sujet : [MI1-crypto] : devoir, corps du message : les noms des ´etudiants ayant travaill´e sur le mini-projet) auquel sera attach´e un dossier compress´e regroupant vos sources C ou Java comment´ees, votre programme ex´ecutable, et un ?chier texte ou PDF donnant toutes les pr´ecisions sur les biblioth`eques utilis´ees, vos choix algorithmiques et d’impl´ementation, et les raisons de ces choix (complexit´e algorithmique, robus- tesse, facilit´e d’impl´ementation, etc.). Vous pouvez travailler en binˆome ou en trinˆome, mais je serai nettement plus exigeant avec les trinˆomes I have uploaded the request at http://uploading.com/files/22emmm6b/enonce_projet.pdf/ thx

    Read the article

  • Java XMLRPC request-String

    - by Philip
    Hi, I'm using Apache XML-RPC 3.1.2 to talk to an online-service. They have something special, they need a hash over the whole XML with a secret key for some kind of security, like this: String hash = md5(xmlRequest + secretKey); String requestURL = "http://foo.bar/?authHash=" + hash; So I need the XML-request like this: <?xml version="1.0"?> <methodCall> <methodName>foo.bar</methodName> <params> <param> <value><struct> <member><name>bla</name> <value><int>1</int></value> </member> <member><name>blubb</name> <value><int>2</int></value> </member> </struct></value> </param> </params> </methodCall> But how do I get this String-representation of the XMLRPC-Request with the lib Apache XML-RPC?

    Read the article

  • Java : HTTP POST Request

    - by SpunkerBaba
    I have to do a http post request to a web-service for authenticating the user with username and password. The Web-service guy gave me following information to construct HTTP Post request. POST /login/dologin HTTP/1.1 Host: webservice.companyname.com Content-Type: application/x-www-form-urlencoded Content-Length: 48 id=username&num=password&remember=on&output=xml The XML Response that i will be getting is <?xml version="1.0" encoding="ISO-8859-1"?> <login> <message><![CDATA[]]></message> <status><![CDATA[true]]></status> <Rlo><![CDATA[Username]]></Rlo> <Rsc><![CDATA[9L99PK1KGKSkfMbcsxvkF0S0UoldJ0SU]]></Rsc> <Rm><![CDATA[b59031b85bb127661105765722cd3531==AO1YjN5QDM5ITM]]></Rm> <Rl><![CDATA[[email protected]]]></Rl> <uid><![CDATA[3539145]]></uid> <Rmu><![CDATA[f8e8917f7964d4cc7c4c4226f060e3ea]]></Rmu> </login> This is what i am doing HttpPost postRequest = new HttpPost(urlString); How do i construct the rest of the parameters?

    Read the article

  • Saving HttpResponse/Request to file system

    - by chrisjlong
    Here is my scenario. User fills out this large page which is dynamically created based off DB values. Those values can change. When the user fills out the page and hits submit we want to save a copy of the page as html on the server, this way if the text or wording changes, when they go back to view their posted information, it is historically accurate. So I basically need to do this protected void buttonSave_Click(object sender, EventArgs e) { //collect information into an object to save it in the db bool result = BusinessLogic.Save(myBusinessObject); if (result) //!!! Here is where I need to save this page as an html file on my servers IFS!!!! else //whatever Response.Redirect("~/SomeOtherPage.aspx"); } Any help is greatly apprciated. Also I CANNOT just request the data from the url because query string parameters are a big no no in this case. The key to pull the database info up (at its highest level) is all in session so I cant just request a url and save it. Thanks!

    Read the article

  • How to determine the source of a request in a distributed service system?

    - by Kabumbus
    Map/Reduce is a great concept for sorting large quantities of data at once. What to do if you have small parts of data and you need to reduce it all the time? Simple example - choosing a service for request. Imagine we have 10 services. Each provides services host with sets of request headers and post/get arguments. Each service declares it has 30 unique keys - 10 per set. service A: name id ... Now imagine we have a distributed services host. We have 200 machines with 10 services on each. Each service has 30 unique keys in there sets. but now to find to which service to map the incoming request we make our services post unique values that map to that sets. We can have up to or more than 10 000 such values sets on each machine per each service. service A machine 1 name = Sam id = 13245 ... service A machine 1 name = Ben id = 33232 ... ... service A machine 100 name = Ron id = 777888 ... So we get 200 * 10 * 30 * 30 * 10 000 == 18 000 000 000 and we get 500 requests per second on our gateway each containing 45 items 15 of which are just noise. And our task is to find a service for request (at least a machine it is running on). On all machines all over cluster for same services we have same rules. We can first select to which service came our request via rules filter 10 * 30. and we will have 200 * 30 * 10 000 == 60 000 000. So... 60 mil is definitely a problem... I hope to get on idea of mapping 30 * 10 000 onto some artificial neural network alike Perceptron that outputs 1 if 30 words (some hashes from words) from the request are correct or if less than Perceptron should return 0. And I’ll send each such Perceptron for each service from each machine to gateway. So I would have a map Perceptron <-> machine for each service. Can any one tall me if my Perceptron idea is at least “sane”? Or normal people do it some other way? Or if there are better ANNs for such purposes?

    Read the article

  • Ajax request using mootools not working

    - by benny
    Hi everyone, I try loading content into a div with this tutorial. Unfortunately, this simply loads the HTML file as a new page. This is the javascript that should do the job window.addEvent('domready', function() {      $('runAjax').addEvent('click', function(event) {          event.stop();          var req = new Request({              method: 'get',              url: $('runAjax').get('href'),              data: { 'do' : '1' },              onRequest: function() { alert('The request has been made, please wait until it has finished.'); },   onComplete: function(response) { alert('Response received.); $('container').set('html', response); }          }).send(); $('runAjax').removeEvent('click');      }); }); this is the link that should initiate the function <a href="about.html" id="runAjax" class="panel">Profil</a> and this is the div-structure of index.html. i want the content to be loaded into the "container"-div <div id="view"> <div id="sidebar"> mib </div> <div id="container"> <div id="logo"> <!--img src="img/logo.png"--> </div> <div align="center" id="tagline"> content </div> </div> </div> I dont really care what script i use as long as its compatible with MooTools 1.2, because i need it for a sliding top panel and it would be a lot more work to change it to a jquery panel for example.

    Read the article

  • Changing html content of a div before and after ajax request

    - by R27
    I am trying to change the button "ADD" (in a div) to some text/img as soon as it is clicked. And after the ajax request is processed, in the success block , I want the div to get the button back. I see the ajax request is itself not getting processed. Can someone explain whats my mistake. I just removed the jsfiddle link and pasting the script here to avoid confusion about the dependencies. JS script var ajax_load = "Please wait..."; jQuery(document).ready(function($) { $("#add_button").click(function(event){ var st = $("#add_div").html(); $("#add_div").html(ajax_load); $("#sform").validate({ errorClass: "error", submitHandler: function (form) { alert('inside submit'); $.ajax({ type: "GET", url: 'form.cgi', data: $("#sform").serialize(), success: function (msg) { alert('msg'); $("#add_div").html(st); $("#sform")[0].reset(); } }); } }); }); }); And the html piece is <form id=sform>LABEL <input id=field1 type=text> <div id="add_div"> <input type="button" value="ADD" id="add_button"> </div> </form> I have jquery.validate.min.js script included.

    Read the article

  • Ajax request not receiving xml from Django

    - by amougeot
    I have a Django server which handles requests to a URL which will return some HTML for use in an image gallery. I can navigate to the URL and the browser will display the HTML that is returned, but I can't get that same HTML by doing an AJAX call (using jQuery) to the same URL. This is the view that generates the response: def gallery_images(request, gallery_name): return render_to_response('galleryimages.html', {'images': get_images_of_gallery(gallery_name)}, mimetype='text/xml') This is the 'galleryimages.html' template: {% for image in images %} <div id="{{image.name}}big"> <div class="actualImage" style="background-image:url({{image.image.name}});"> <h1>{{image.caption|safe}}</h1> </div> </div> {% endfor %} This is the jQuery call I am making: $("#allImages").load("http://localhost:8000/galleryimages/Web"); However, this loads nothing into my #allImages div. I've used firebug and ran jQuery's Ajax method .get("http://localhost:8000/galleryimages/Web") and firebug says that the response text is completely empty. When I check my Django server log, this is the entry I see for when I navigate to the URL manually, through my browser: [16/Jan/2010 17:34:10] "GET /galleryimages/Web HTTP/1.1" 200 215 This is the entry in the server log for when I make the AJAX call: [16/Jan/2010 17:36:19] "OPTIONS /galleryimages/Web HTTP/1.1" 200 215 Why does the AJAX request not get the xml that my Django page is serving?

    Read the article

  • MVC2 Json request not actually hitting the controller

    - by SlackerCoder
    I have a JSON request, but it seems that it is not hitting the controller. Here's the jQuery code: $("#ddlAdminLogsSelectLog").change(function() { globalLogSelection = $("#ddlAdminLogsSelectLog").val(); alert(globalLogSelection); $.getJSON("/Administrative/AdminLogsChangeLogSelection", { NewSelection: globalLogSelection }, function(data) { if (data.Message == "Success") { globalCurrentPage = 1; } else if (data.Message == "Error") { //Do Something } }); }); The alert is there to show me if it actually fired the change event, which it does. Heres the method in the controller: public ActionResult AdminLogsChangeLogSelection(String NewSelection) { String sMessage = String.Empty; StringBuilder sbDataReturn = new StringBuilder(); try { if (NewSelection.Equals("Application Log")) { int i = 0; } else if (NewSelection.Equals("Email Log")) { int l = 0; } } catch (Exception e) { //Do Something sMessage = "Error"; } return Json(new { Message = sMessage, DataReturn = sbDataReturn.ToString() }, JsonRequestBehavior.AllowGet); } I have a bunch of Json requests in my application, and it seems to only happen in this area. This is a separate area (I have 6 "areas" in the app, 5 of which work fine with JSON requests). This controller is named "AdministrativeController", if that matters. Does anything jump out anyone as being incorrect or why the request would not pass to the server side?

    Read the article

  • Setting Session/Cookie via ajax request made on other website

    - by user596805
    Hi, That's my problem: I have an website, example.com, in which index.html file a introduced a <script src="website.net/js.js"></script> You can see, that this is on other web server. In the js.js I have some data that I want to send to php. For that, I am using Ajax. So, I made a request to "website.net/data.php" using method get. In data.php file everything is ok,I received the value, but I want to set a cookie which value is what I received through ajax. Here is the problem. The setcookie function says that the cookie was set, but when I check in the browser, there's no cookie! It works fine if the index.html file where I use <script src="website.net/js.js"></script> is hosted on the same domain where I am making the request. If it is on another domain, it doesn't work anymore. I have read something about Ajax cross site, but I don't want to send something back to example.com. All I want is to send some data from example.com to website.net and then setting a cookie based on that value. Thank you very much, and sorry for my English! Later edit: I am not used with this website. From the example.net I take a single value. On website.net I receive that value, I check if it's not already a cookie set, if it's not, I set it. On the same page, website.net, I use this cookie too.

    Read the article

  • Firefox not honoring must-revalidate cache headers returned by jQuery.ajax() request

    - by Oliver Weichhold
    UPDATE 1: Judging by this thread I am not the only one having this problem in FF 12 and only in 12. UPDATE 2: The problem does not seem to be limited to Ajax requests. From the looks of it everything that makes it into Firefox 12's cache will be fetched from there. No matter what. The server can specify cache control headers all day long. Bummer! What I'm trying to achieve is the following behavior: Browser may cache the response without revalidating for up to 5 minutes I don't care if the browser revalidates on every request (Both Chrome and IE9 do for example) When the expiration is up the browser MUST revalidate (which in my case will result in fresh data) Chrome and IE9 exhibit the desired behavior when issuing a jquery.ajax() request with ifModified: true and cache: true while Firefox 12 never revalidates, which poses a serious problem. These are the actual response headers: HTTP/1.1 200 OK Server: nginx Date: Sun, 03 Jun 2012 07:13:43 GMT Content-Type: text/javascript; charset=UTF-8 Transfer-Encoding: chunked Connection: keep-alive Vary: Accept-Encoding Cache-Control: private, must-revalidate, max-age=300 Last-Modified: Sun, 03 Jun 2012 07:07:13 GMT Content-Encoding: gzip Any suggestions?

    Read the article

  • Request header field x-user-session is not allowed by Access-Control-Allow-Headers

    - by Saurabh Bhandari
    I am trying to do a CORS call to a WCF service endpoint hosted on IIS7.5. I have configured custom headers in IIS. My configuration looks like below <customHeaders> <add name="Access-Control-Allow-Methods" value="GET,PUT,POST,DELETE,OPTIONS" /> <add name="Access-Control-Allow-Headers" value="x-user-session,origin, content-type, accept" /> <add name="Access-Control-Allow-Credentials" value="true" /> </customHeaders> When I do a POST request I get following error message "Request header field x-user-session is not allowed by Access-Control-Allow-Headers" If I remove my custom header from the call and run it, everything works fine. Also if I do a GET call with custom header then also API works correctly. $.ajax({ type:"POST", success: function(d) { console.log(d) }, timeout: 9000, url: "http://api.myserver.com/Services/v2/CreditCard.svc/update_cc_detail", data: JSON.stringify({"card_id": 1234,"expire_month":"11","expire_year":"2020","full_name":"Demo Account", "number":"4111111111111111","is_primary":true}), xhrFields: { withCredentials: true}, headers: { x-user-session': "B23680D0B8CB5AFED9F624271F1DFAE5052085755AEDDEFDA3834EF16115BCDDC6319BD79FDCCB1E199BB6CC4D0C6FBC9F30242A723BA9C0DFB8BCA3F31F4C7302B1A37EE0A20C42E8AFD45FAB85282FCB62C0B4EC62329BD8573FEBAEBC6E8269FFBF57C7D57E6EF880E396F266E7AD841797792619AD3F1C27A5AE" }, crossDomain: true, contentType: 'application/json' });

    Read the article

  • Mootools Form Post Problem, Abort increasingly+1 with each request

    - by Naresh
    Hi all, i'm using Mootools 1.2. Ihave 15 Forms with same name only change in their id's like form1, form2, form3, ... ,form15 same with their elements. i need to submit all forms by ajax. For that purpos i make a function and call them on each functions onClick event. function is function addStepConfiguration(id,mystrip,comment,error,submitid,i) { $(id).addEvent('submit', function(e) { e.stop(); $(submitid).setStyle('display','none'); loading_Img(i); this.set('send', { onComplete: function(responseText) { $('loading_img'+i).innerHTML = ''; SplittedResText = responseText.split("|"); if(SplittedResText[1]=='undefined') { $(error).innerHTML=SplittedResText[0]; } else { $(comment).innerHTML=SplittedResText[0]; $(mystrip).set('class',SplittedResText[1]); removeMsg.delay(20,'',error); removeMsg.delay(1500,'',comment); } $(submitid).setStyle('display','block'); } }); this.send(); }); } When i submit a form say first one then it submitted and give response normally, but in second time without page refresh, it abort the request one time. in third attempt it abort 2 times..then go on +1 each time. It gives no error, just abort and again request automatically. i can't understand what is the problem. please any one can help me.

    Read the article

  • Why my http POST request doesn't go well?

    - by 0x90
    I am trying to make this POST request in ruby. but get back #<Net::HTTPUnsupportedMediaType:0x007f94d396bb98> what I tried is: require 'rubygems' require 'net/http' require 'uri' require 'json' auto_index_nodes =URI('http://localhost:7474/db/data/index/node/') request_nodes = Net::HTTP::Post.new(auto_index_nodes.request_uri) http = Net::HTTP.new(auto_index_nodes.host, auto_index_nodes.port) request_nodes.add_field("Accept", "application/json") request_nodes.set_form_data({"name"=>"node_auto_index", "config" => { "type" => "fulltext", "provider" =>"lucene"} , "Content-Type" => "application/json" }) response = http.request(request_nodes) Tried to write this part: "config" => { "type" => "fulltext", provider" =>"lucene"} , "Content-Type" => "application/json" } like that: "config" => '{ "type" => "fulltext",\ "provider" =>"lucene"},\ "Content-Type" => "application/json"\ }' this try didn't help either: request_nodes.set_form_data({"name"=>"node_auto_index", "config" => '{ \ "type" : "fulltext",\ "provider" : "lucene"}' , "Content-Type" => "application/json" })

    Read the article

  • Spring Controller's URL request mapping not working as expected

    - by Atharva
    I have created a mapping in web.xml something like this: <servlet> <servlet-name>dispatcher</servlet-name> <servlet-class>org.springframework.web.servlet.DispatcherServlet</servlet-class> <load-on-startup>1</load-on-startup> </servlet> <servlet-mapping> <servlet-name>dispatcher</servlet-name> <url-pattern>/about/*</url-pattern> </servlet-mapping> In my controller I have something like this: import org.springframework.stereotype.Controller; @Controller public class MyController{ @RequestMapping(value="/about/us", method=RequestMethod.GET) public ModelAndView myMethod1(ModelMap model){ //some code return new ModelAndView("aboutus1.jsp",model); } @RequestMapping(value="/about", method=RequestMethod.GET) public ModelAndView myMethod2(ModelMap model){ //some code return new ModelAndView("aboutus2.jsp",model); } } And my dispatcher-servlet.xml has view resolver like: <mvc:annotation-driven/> <bean id="viewResolver" class="org.springframework.web.servlet.view.InternalResourceViewResolver" p:viewClass="org.springframework.web.servlet.view.JstlView" p:prefix="/WEB-INF/jsp/" p:suffix=".jsp"/> To my surprise: request .../about/us is not reaching to myMethod1 in the controller. The browser shows 404 error. I put a logger inside the method but it isn't printing anything, meaning, its not being executed. .../about works fine! What can be the done to make .../about/us request work? Any suggestions?

    Read the article

  • Always send certain values with an ajax request/post

    - by DZittersteyn
    I'm building a system that displays a list of user, and on selection of a user requests some form of password. These values are saved in a hidden field on the page, and need to be sent with every request as a form of authentication. (I'm aware of the MITM-vulnerability that lies herein, but it's a very low-key system, so security is not a large concern). Now I need to send these values with each and every request, to auth the currently 'logged in' user. I'd like to automate this, via ajaxSetup, however i'm running into some issues. My first try was: init_user_auth: function(){ $.ajaxSetup({ data: { 'user' : site_user.selected_user_id(), 'passcode': site_user.selected_user_pc(), 'barcode' : site_user.selected_user_bc() } }); }, However, as I should have known, this reads the values once, at the time of the call to ajaxSetup, and never rereads them. What I need is a way to actually call the functions every time an ajax-call is made. I'm currently trying to understand what is happening here: https://groups.google.com/forum/?fromgroups=#!topic/jquery-dev/OBcEfgvTJ9I, however through the flamewar and very low-level stuff going on there, I'm not exactly sure I get what is going on. Is this the way to proceed, or should I just face facts and manually add login-info to each ajax-call?

    Read the article

  • How to Check Authenticity of an AJAX Request

    - by Alex Reisner
    I am designing a web site in which users solve puzzles as quickly as they can. JavaScript is used to time each puzzle, and the number of milliseconds is sent to the server via AJAX when the puzzle is completed. How can I ensure that the time received by the server was not forged by the user? I don't think a session-based authenticity token (the kind used for forms in Rails) is sufficient because I need to authenticate the source of a value, not just the legitimacy of the request. Is there a way to cryptographically sign the request? I can't think of anything that couldn't be duplicated by a hacker. Is any JavaScript, by its exposed, client-side nature, subject to tampering? Am I going to have to use something that gets compiled, like Flash? (Yikes.) Or is there some way to hide a secret key? Or something else I haven't thought of? Update: To clarify, I don't want to penalize people with slow network connections (and network speed should be considered inconsistent), so the timing needs to be 100% client-side (the timer starts only when we know the user can see the puzzle). Also, there is money involved so no amount of "trusting the user" is acceptable.

    Read the article

  • Pitfalls of the Architecture - Database based HTTP Request/Response Parsing

    - by Sam
    We have a current eCommerce Site that runs on ASP.NET and we hired a consultant to develop an new site bases on SOA. The new site architecture is as follows Web Application : Single Page Web Application (built on javascript/jquery templates - do not use any MVVM frameworks) that uses some javascript thrown all over the place. Service Layer : Very very light Service Layer that does not do anything other than calling a single stored procedure and pass in the entire http request. Database : The entire site content is in the database. The database does the heavy lifting of parsing the request and based on the HTTP method and some input parameter calls the appropriate Store Procedures or views and renders the result in JSON/XML. We have been told by them that this is built on latest and greatest technologies. I have a lot of concerns and of them given are the few Load on the Database SEO concerns for single page application as this is a public facing website Scalablity? Is this SOA? Cross Browser compatability (Site does not work in < IE9) Realistic implementaion of Single page application I know something is not right but I just need to validate my concerns here. Please help me.

    Read the article

  • Sending an HTTP POST request through the android emulator doesn't work

    - by Sotirios Delimanolis
    I'm running a tomcat servlet on my local machine and an Android emulator with an app that makes a post request to the servlet. The code for the POST is below (without exceptions and the like): String strUrl = "http://10.0.2.2:8080/DeviceDiscoveryServer/server/devices/"; Device device = Device.getUniqueInstance(); urlParameters += URLEncoder.encode("user", "UTF-8") + "=" + URLEncoder.encode(device.getUser(), "UTF-8"); urlParameters += "&" + URLEncoder.encode("port", "UTF-8") + "=" + URLEncoder.encode(new Integer(Device.PORT).toString(), "UTF-8"); urlParameters += "&" + URLEncoder.encode("address", "UTF-8") + "=" + URLEncoder.encode(device.getAddress().getHostAddress(), "UTF-8"); URL url = new URL(strUrl); HttpURLConnection connection = (HttpURLConnection) url.openConnection(); connection.setDoOutput(true); connection.setRequestMethod("POST"); OutputStreamWriter wr = new OutputStreamWriter(connection.getOutputStream()); wr.write(urlParameters); wr.flush(); wr.close(); Whenever this code is executed, the servlet isn't called. However if I change the type of the request to 'GET' and don't write anything to the outputstream, the servlet gets called and everything works fine. Am I just not making the POST correctly or is there some other error?

    Read the article

  • Java servlet's request parameter's name set to entire json object

    - by Geren White
    I'm sending a json object through ajax to a java servlet. The json object is key-value type with three keys that point to arrays and a key that points to a single string. I build it in javascript like this: var jsonObject = {"arrayOne": arrayOne, "arrayTwo": arrayTwo, "arrayThree": arrThree, "string": stringVar}; I then send it to a java servlet using ajax as follows: httpRequest.open('POST', url, true); httpRequest.setRequestHeader("Content-type", "application/x-www-form-urlencoded"); httpRequest.setRequestHeader("Connection", "close"); var jsonString = jsonObject.toJSONString(); httpRequest.send(jsonString); This will send the string to my servlet, but It isn't showing as I expect it to. The whole json string gets set to the name of one of my request's parameters. So in my servlet if I do request.getParameterNames(); It will return an enumeration with one of the table entries' key's to be the entire object contents. I may be mistaken, but my thought was that it should set each key to a different parameter name. So I should have 4 parameters, arrayOne, arrayTwo, arrayThree, and string. Am I doing something wrong or is my thinking off here? Any help is appreciated. Thanks

    Read the article

  • Management API - The request body XML was invalid or not correctly specified

    - by maartenba
    Cross posting from http://social.msdn.microsoft.com/Forums/en-US/windowsazuretroubleshooting/thread/31b6aedc-c069-4e32-8e8f-2ff4b7c30793 I'm getting this error on changing configuration through the service management API: The request body XML was invalid or not correctly specified The request body payload: <?xml version="1.0" encoding="utf-8"?> <ChangeConfiguration xmlns="http://schemas.microsoft.com/windowsazu re"> <Configuration>PD94bWwgdmVyc2lvbj0iMS4wIj8+CjxTZXJ2aWNlQ29uZmlndX JhdGlvbiB4bWxuczp4c2k9Imh0dHA6Ly93d3cudzMub3JnLzIwMDEvWE1MU2NoZW1hLWluc3RhbmNlIi B4bWxuczp4c2Q9Imh0dHA6Ly93d3cudzMub3JnLzIwMDEvWE1MU2NoZW1hIiB4bWxucz0iaHR0cDovL3 NjaGVtYXMubWljcm9zb2Z0LmNvbS9TZXJ2aWNlSG9zdGluZy8yMDA4LzEwL1NlcnZpY2VDb25maWd1cm F0aW9uIiBzZXJ2aWNlTmFtZT0iIiBvc0ZhbWlseT0iMSIgb3NWZXJzaW9uPSIqIj4KICA8Um9sZSBuYW 1lPSJXZWJSb2xlMSI+CiAgICA8Q29uZmlndXJhdGlvblNldHRpbmdzPgogICAgICA8U2V0dGluZyBuYW 1lPSJNaWNyb3NvZnQuV2luZG93c0F6dXJlLlBsdWdpbnMuRGlhZ25vc3RpY3MuQ29ubmVjdGlvblN0cm luZyIgdmFsdWU9IlVzZURldmVsb3BtZW50U3RvcmFnZT10cnVlIi8+CiAgICA8L0NvbmZpZ3VyYXRpb2 5TZXR0aW5ncz4KICAgIDxJbnN0YW5jZXMgY291bnQ9IjIiLz4KICAgIDxDZXJ0aWZpY2F0ZXMvPgogID wvUm9sZT4KPC9TZXJ2aWNlQ29uZmlndXJhdGlvbj4K</Configuration> </ChangeConfiguration> I'm passing it the following configuration: $configuration = '<?xml version="1.0" encoding="utf-8"?> <ServiceConfiguration xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns="http://schemas.microsoft.com/ServiceHosting/2008/10/ServiceConfiguration" serviceName="" osFamily="1" osVersion="*"> <Role name="WebRole1"> <ConfigurationSettings> <Setting name="Microsoft.WindowsAzure.Plugins.Diagnostics.ConnectionString" value="UseDevelopmentStorage=true"/> </ConfigurationSettings> <Instances count="2"/> <Certificates/> </Role> </ServiceConfiguration>'; Does anyone know why this error occurs? I suspect it has something to do with encoding but not sure.

    Read the article

  • Configuring a WCF Client to Use UserName Credentials On the Request and Check Certificate Credential

    - by AlEl
    I'm trying to use WCF to consume a web service provided by a third-party's Oracle Application Server. I pass a username and password in a UsernameToken as part of the request and as part of the response the web service returns a standard security tag in the header which includes a digest and signature. With my current setup, I successfully send a request to the server and the web service sends the expected response data back. However, when parsing the response WCF throws a MessageSecurityException, with an InnerException.Message of "Supporting token signatures not expected." My guess is that WCF wants me to configure it to handle the signature and verify it. I have a certificate from the third party that hosts the web service that I should be able to use to verify the signature, although I'm not sure if I'll need it. Here's a sample header from a response that makes WCF throw the exception: <?xml version="1.0" encoding="UTF-8"?> <soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/"> <soap:Header> <wsse:Security soap:mustUnderstand="1" xmlns:wsse="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd" xmlns="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd"> <dsig:Signature xmlns="http://www.w3.org/2000/09/xmldsig#" xmlns:dsig="http://www.w3.org/2000/09/xmldsig#"> <dsig:SignedInfo> <dsig:CanonicalizationMethod Algorithm="http://www.w3.org/2001/10/xml-exc-c14n#"/> <dsig:SignatureMethod Algorithm="http://www.w3.org/2000/09/xmldsig#rsa-sha1"/> <dsig:Reference URI="#_51IUwNWRVvPOcz12pZHLNQ22"> <dsig:Transforms> <dsig:Transform Algorithm="http://www.w3.org/2001/10/xml-exc-c14n#"/> </dsig:Transforms> <dsig:DigestMethod Algorithm="http://www.w3.org/2000/09/xmldsig#sha1"/> <dsig:DigestValue> [DigestValue here] </dsig:DigestValue> </dsig:Reference> <dsig:Reference URI="#_dI5j0EqxrVsj0e62J6vd6w22"> <dsig:Transforms> <dsig:Transform Algorithm="http://www.w3.org/2001/10/xml-exc-c14n#"/> </dsig:Transforms> <dsig:DigestMethod Algorithm="http://www.w3.org/2000/09/xmldsig#sha1"/> <dsig:DigestValue> [DigestValue here] </dsig:DigestValue> </dsig:Reference> </dsig:SignedInfo> <dsig:SignatureValue> [Signature Value Here] </dsig:SignatureValue> <dsig:KeyInfo> <wsse:SecurityTokenReference xmlns="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd"> <wsse:Reference URI="#BST-9nKWbrE4LRv6maqstrGuUQ22" ValueType="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-x509-token-profile-1.0#X509v3"/> </wsse:SecurityTokenReference> </dsig:KeyInfo> </dsig:Signature> <wsse:BinarySecurityToken ValueType="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-x509-token-profile-1.0#X509v3" EncodingType="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-soap-message-security-1.0#Base64Binary" wsu:Id="BST-9nKWbrE4LRv6maqstrGuUQ22" xmlns:wsu="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd"> [Security Token Here] </wsse:BinarySecurityToken> <wsu:Timestamp wsu:Id="_dI5j0EqxrVsj0e62J6vd6w22" xmlns:wsu="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd" xmlns="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd"> <wsu:Created>2010-05-26T18:46:30Z</wsu:Created> </wsu:Timestamp> </wsse:Security> </soap:Header> <soap:Body wsu:Id="_51IUwNWRVvPOcz12pZHLNQ22" xmlns:wsu="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd"> [Body content here] </soap:Body> </soap:Envelope> My binding configuration looks like: <basicHttpBinding> <binding name="myBinding" closeTimeout="00:01:00" openTimeout="00:01:00" receiveTimeout="00:10:00" sendTimeout="00:01:00" allowCookies="false" bypassProxyOnLocal="false" hostNameComparisonMode="StrongWildcard" maxBufferSize="65536" maxBufferPoolSize="524288" maxReceivedMessageSize="65536" messageEncoding="Text" textEncoding="utf-8" transferMode="Buffered" useDefaultWebProxy="true"> <readerQuotas maxDepth="32" maxStringContentLength="8192" maxArrayLength="16384" maxBytesPerRead="4096" maxNameTableCharCount="16384" /> <security mode="TransportWithMessageCredential"> <transport clientCredentialType="None" proxyCredentialType="None" realm="" /> <message clientCredentialType="UserName" algorithmSuite="Default" /> </security> </binding> </basicHttpBinding> I think that basically what I have to do is configure WCF to use UserName client credentials in the request and Certificate client credentials in the response. I don't know how to do this though. I'm new at WCF, so I'm sorry if this is a bit of a dumb question. I've been trying to Google solutions, but there seem to be so many different ways to configure WCF that I'm getting overwhelmed. Thanks in advance!

    Read the article

  • How to create a SOAP REQUEST using ASP.NET (VB) without using Visual

    - by user311691
    Hi all , I urgently need your help . I am new to consuming a web service using SOAP protocol. I have been given a demo webservice URL which ends in .WSDL and NOT .asml?WSDL. The problem is I cannot add a web reference using Visual studio OR Disco.exe or Wsdl.exe - This webservice has been created on a java platform and for security reasons the only way to make a invoke the webservice is at runtime using SOAP protocol IN asp.net (VB). I I have created some code but cannot seem to send the soap object to the receiving web service. If I could get a solution with step by step instructions on how I can send a SOAP REQUEST. Below is my code and all am trying to do is send a SOAP REQUEST and receive a SOAP RESPONSE which I will display in my browser. <%@ page language="vb" %> <%@ Import Namespace="System.Data"%> <%@ Import Namespace="System.Xml"%> <%@ Import Namespace="System.Net"%> <%@ Import Namespace="System.IO"%> <%@ Import Namespace="System.Text"%> <script runat=server> Private Sub Page_Load() Dim objHTTPReq As HttpWebRequest Dim WebserviceUrl As String = "http://xx.xx.xx:8084/asy/wsdl/asy.wsdl" objHTTPReq = CType(WebRequest.Create(WebserviceUrl), HttpWebRequest) Dim soapXML As String soapXML = "<?xml version='1.0' encoding='utf-8'?>" & _ " <soap:Envelope xmlns:xsi='http://www.w3.org/2001/XMLSchema-instance'" & _ " xmlns:xsd='http://www.w3.org/2001/XMLSchema'"& _ " xmlns:soap='http://schemas.xmlsoap.org/soap/envelope/' >"& _ " <soap:Body> "& _ " <validatePaymentData xmlns='http://asybanks.webservices.asycuda.org'> " & _ " <bankCode>"& bankCode &"</bankCode> " & _ " <PaymentDataType>" & _ " <paymentType>"& payment_type &"</paymentType> " & _ " <amount>"& ass_amount &"</amount> " & _ " <ReferenceType>" & _ " <year>"& year &"</year> " & _ " <customsOfficeCode>"& station &"</customsOfficeCode> " & _ " </ReferenceType>" & _ " <accountNumber>"& zra_account &"</accountNumber> " & _ " </PaymentDataType> " & _ " </validatePaymentData> " & _ " </soap:Body> " & _ " </soap:Envelope> " objHTTPReq.Headers.Add("SOAPAction", "http://asybanks.webservices.asycuda.org") objHTTPReq.ContentType = "text/xml; charset=utf-8" objHTTPReq.ContentLength = soapXML.Length objHTTPReq.Accept = "text/xml" objHTTPReq.Method = "POST" Dim objHTTPRes As HttpWebResponse = CType(objHTTPReq.GetResponse(), HttpWebResponse) Dim dataStream As Stream = objHTTPRes.GetResponseStream() Dim reader As StreamReader = new StreamReader(dataStream) Dim responseFromServer As String = reader.ReadToEnd() OurXml.text = responseFromServer End Sub </script> <html xmlns="http://www.w3.org/1999/xhtml"> <head runat="server"> <title> XML TRANSACTION SIMULATION - N@W@ TJ </title> </head> <body> <form id="form1" runat="server"> <div> <p>ZRA test Feedback:</p> <asp:label id="OurXml" runat="server"/> </div> </form> </body> </html> the demo webservice looks like this: <?xml version="1.0" encoding="UTF-8" ?> - <!-- WEB SERVICE JAVA DEMO --> - <definitions targetNamespace="http://asybanks.webservices.asycuda.org" xmlns="http://schemas.xmlsoap.org/wsdl/" xmlns:apachesoap="http://xml.apache.org/xml-soap" xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/" xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:y="http://asybanks.webservices.asycuda.org"> - <types> - <xs:schema elementFormDefault="qualified" targetNamespace="http://asybanks.webservices.asycuda.org" xmlns="http://www.w3.org/2001/XMLSchema"> SOME OTHER INFORMATION AT THE BOTTOM <soap:address location="http://xx.xx.xx:8084/asy/services/asy" /> </port> </service> </definitions> From the above excerpt of the wsdl url webservice, I am not sure which namespace to use for soapACTION - please advise.... Please if you could comment every stage of a soap request and provide a working demo - I would be most grateful as I would be learning rather than just assuming stuff :)

    Read the article

  • ASP.NET - Telling the difference between localhost and 127.0.0.1

    - by tyndall
    How can you tell the difference between a request going to 127.0.0.1 and localhost. This line of code on Windows 7 and VS2010 built-in web server can not tell the difference. if (Request.ServerVariables["SERVER_NAME"].ToLower() == "localhost") { } try hitting your own built-in web server with: http://127.0.0.1/ and then http://localhost/

    Read the article

  • Handling Trailing Delimiters in HL7 Messages

    - by Thomas Canter
    Applies to: BizTalk Server 2006 with the HL7 1.3 Accelerator Outline of the problem Trailing Delimiters are empty values at the end of an object in a HL7 ER7 formatted message. Examples: Empty Field NTE|P| NTE|P|| Empty component ORC|1|725^ Empty Subcomponent ORC|1|||||27& Empty repeat OBR|1||||||||027~ Trailing delimiters indicate the following object exists and is empty, which is quite different from null, null is an explicit value indicated by a pair of double quotes -> "". The BizTalk HL7 Accelerator by default does not allow trailing delimiters. There are three methods to allow trailing delimiters. NOTE: All Schemas always allow trailing delimiters in the MSH Segment Using party identifiers MSH3.1 – Receive/inbound processing, using this value as a party allows you to configure the system to allow inbound trailing delimiters. MSH5.1 – Send/outbound processing, using this value as a party allows you to configure the system to allow outbound trailing delimiters. Generally, if you allow inbound trailing delimiters, unless you are willing to programmatically remove all trailing delimiters, then you need to configure the send to allow trailing delimiters. Add the appropriate parties to the BizTalk Parties list from these two fields in your message stream. Open the BizTalk HL7 Configuration tool and for each party check the "Allow trailing delimiters (separators)" check box on the Validation tab. Disadvantage – Each MSH3.1 and MSH5.1 value must be represented in the parties list and configured. Advantage – granular control over system behavior for each inbound/outbound system. Using instance properties of a pipeline used in a send port or receive location. Open the BizTalk Server Administration console locate the send port or receive location that contains the BTAHL72XReceivePipeline or BTAHL72XSendPipeline pipeline. Open the properties To the right of the pipeline selected locate the […] ellipses button In the property list, locate the "TrailingDelimiterAllowed" property and set it to True. Advantage – All messages through a particular Send Port or Receive Location will allow trailing delimiters. Disadvantage – Must configure each Send Port or Receive Location. No granular control over which remote parties will send or receive messages with trailing delimiters. Using a custom pipeline that uses a pre-configured BTA HL7 Pipeline component. Use Visual Studio to construct a custom receive and send pipeline using the appropriate assembler or dissasembler. Set the component property to "TrailingDelimitersAllowed" to True Compile and deploy the custom pipeline Use the custom pipeline instead of the standard pipeline for all HL7 message processing Advantage – All messages using the custom pipeline will automatically allow trailing delimiters. Disadvantage – Requires custom coding and development to create and deploy the custom pipeline. No granular control over which remote parties will send or receive messages with trailing delimiters. What does a Trailing Delimiter do to the XML Schema? Allowing trailing delimiters does not have the impact often expected in the actual XML Schema.The Schema reproduces the message with no data loss.Thus, the message when represented in XML must contain the extra fields, in order to reproduce the outbound message.Thus, a trialing delimiter results in an empty XML field.Trailing Delmiters are not stripped from the inbound message. Example:<PID_21>44172</PID_21><PID_21>9257</PID_21> -> the original maximum number of repeats<PID_21></PID_21> -> The empty repeated field Allowing trailing delimiters not remove the trailing delimiters from the message, it simply suppresses the check that will cause the message to fail parse with trailing delimiters. When can you not fix the problem by enabling trailing delimiters Each object in a message must have a location in the target BTAHL7 schema for its content to reside.If you have more objects in the message than are contained at that location, then enabling trailing delimiters will not resolve the problem. The schema must be extended to accommodate the empty message content.Examples: Extra Field NTE|P||||Only 4 fields in NTE Segment, the 4th field exists, but is empty. Extra component PID|1|1523|47^^^^^^^Only 5 components in a CX data type, the 5th component exists, but is empty Extra subcomponent ORC|1|||||27&&Only 2 subcomponents in a CQ data type, the 3rd subcomponent is empty, but exists. Extra Repeat PID|1||||||||||||||||||||4419~5217~Only 2 repeats allowed for the field "Mother's identifier", the repeat is empty, but exists. In each of these cases, you must locate the failing object and extend the type to allow an additional object of that type. FieldAdd a field of ST to the end of the segment with a suitable name in the segments_nnn.xsd Component Create a new Custom CX data type (i.e. CX_XtraComp) in the datatypes_nnn.xsd and add a new component to the custom CX data type. Update the field in the segments_nnn.xsd file to use the custom data type instead of the standard datatype. Subcomponent Create a new Custom CQ data type that accepts an additional TS value at the end of the data type. Create a custom TQ data type that uses the new custom CQ data type as the first subcomponent. Modify the ORC segment to use the new CQ data type at ORC.7 instead of the standard CQ data type. RepeatModify the Field definition for PID.21 in the segments_nnn.xsd to allow more repeats in the field.

    Read the article

< Previous Page | 32 33 34 35 36 37 38 39 40 41 42 43  | Next Page >