Search Results

Search found 21480 results on 860 pages for 'soap client'.

Page 5/860 | < Previous Page | 1 2 3 4 5 6 7 8 9 10 11 12  | Next Page >

  • Oracle Enterprise Server SOAP/Servlet/SoapRouter

    - by JACK
    Does anyone know any sample Oracle SOAP XML requests that that queries the database? For example, the url: http://myoracle:7778/oracle/soap/soaprouter/ I'd like to program xml requests and get return xml database. But I have no idea on the Oracle SOAP format. Please provide an example.

    Read the article

  • Header Setup in SOAP with ASP.NET 3.5 WCF

    - by Adam
    I'm pretty new to SOAP so go easy on me. I'm trying to setup a SOAP service that accepts the following header format: <soap:Header> <wsse:Security> <wsse:UsernameToken wsu:Id='SecurityToken-securityToken'> <wsse:Username>Username</wsse:Username> <wsse:Password>Password</wsse:Password> <wsu:Created>Timestamp</wsu:Created> </wsse:UsernameToken> </wsse:Security> </soap:Header> The application I'm incorporating this service into is an ASP.NET 3.5 web application and I've already setup a SOAP endpoint using WCF. I've setup a basic service to make sure the WCF works and it works fine (disregarding the header). I heard that the above format follows WS-Security so I added WSHttpBinding in the web.config: <service name="Nexternal.Service.XMLTools.VNService" behaviorConfiguration="VNServiceBehavior"> <!--The first endpoint would be picked up from the confirg this shows how the config can be overriden with the service host--> <endpoint address="" binding="wsHttpBinding" contract="Nexternal.Service.XMLTools.IVNService"/> </service> I downloaded a test harness (soapUI) and pasted in a test message with the above header and it came back with a 400 Bad Request error. ...for what it's worth, I'm running Visual Studio 2008 using IIS7. I feel like I'm going in circles so any help would be awesome. Thanks in advance.

    Read the article

  • SOAP Messages on iPhone

    - by CocoaNewBee
    Hello everyone !! I have to use several SOAP messages to get data from a web service. I got some examples how to do that but they all have the XML (http://icodeblog.com/2008/11/03/iphone-programming-tutorial-intro-to-soap-web-services/) // ---- LOGIN ----- NSString *soapMessage = [NSString stringWithFormat: @"<?xml version=\"1.0\" encoding=\"utf-8\"?>\n" "<soap12:Envelope xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\" xmlns:xsd=\"http://www.w3.org/2001/XMLSchema\" xmlns:soap12=\"http://www.w3.org/2003/05/soap-envelope\">\n" "<soap12:Body>\n" "<Login xmlns=\"http://tempuri.org/\">\n" "<sUserID>USER</sUserID>\n" "<sUserPw>PASSWORD</sUserPw>\n" "<sDomain>SERVER</sDomain>\n" "</Login>\n" "</soap12:Body>\n" "</soap12:Envelope>\n" ]; NSString *urlToSend = [[NSString alloc] initWithString:@"http://SERVER/DIRECTORY/WSDL_FILE.ASMX"]; NSString *callTOMake = [[NSString alloc] initWithString:@"http://WEBSERVER/Login"]; TWO questions: 1) Does it make sense to read the SOAP Message from a class or a file into xcode?? or sould I just define them thru the code ?? 2) I used SOAPUI & .NET to query the service. It works fine... but when I do it from the iphone simulator it returns the following: 2010-03-10 15:13:54.773 Hello_SOAP[91204:207] soap:ClientServer did not recognize the value of HTTP Header SOAPAction: http://WEBSERVER/DIRECTORY/Login How can I figure out what the issue is that's causing the said error on the simulator??

    Read the article

  • How to read SOAP response in FLEX 3

    - by Sam Rudolph
    SOAP Request<?xml version="1.0" encoding="UTF-8"?> <S:Envelope xmlns:S="http://schemas.xmlsoap.org/soap/envelope/"> <S:Header/> <S:Body> <ns2:deleteDataView xmlns:ns2="http://ws.$$$$$.@@@@@.####.com/"> <identifier>5</identifier> </ns2:deleteDataView> &lt;/S:Body&gt; </S:Envelope> SOAP Response<?xml version="1.0" encoding="UTF-8"?> <S:Envelope xmlns:S="http://schemas.xmlsoap.org/soap/envelope/"> <S:Body> <ns2:deleteDataViewResponse xmlns:ns2="http://ws.$$$$$.@@@@@.####.com/"> <return>ERROR: A bug has been encountered,please try later</return&gt </ns2:deleteDataViewResponse> </S:Body> </S:Envelope> I want to read SOAP response in flex,am some what new to FLEX,pls help,even good resources will work.

    Read the article

  • flex soap 1.2 webservice

    - by JSMB
    Hello, I want to connect to a soap 1.2 web service. I know how to do it with a soap 1.1 connection. But it doesn't work for a soap 1.2. Can anyone tell me if there is a workaround for my problem? With kind regard, JSMB

    Read the article

  • How to handle SOAP response in FLEX 3

    - by Sam Rudolph
    SOAP Request<?xml version="1.0" encoding="UTF-8"?> <S:Envelope xmlns:S="http://schemas.xmlsoap.org/soap/envelope/"> <S:Header/> <S:Body> <ns2:deleteDataView xmlns:ns2="http://ws.$$$$$.@@@@@.####.com/"> <identifier>5</identifier> </ns2:deleteDataView> &lt;/S:Body&gt; </S:Envelope> SOAP Response<?xml version="1.0" encoding="UTF-8"?> <S:Envelope xmlns:S="http://schemas.xmlsoap.org/soap/envelope/"> <S:Body> <ns2:deleteDataViewResponse xmlns:ns2="http://ws.$$$$$.@@@@@.####.com/"> <return>ERROR: A bug has been encountered,please try later</return&gt </ns2:deleteDataViewResponse> </S:Body> </S:Envelope> I want to read SOAP response in flex,am some what new to FLEX,pls help,even good resources will work.

    Read the article

  • tcpmon - http and soap message

    - by inigo
    First of all, I would like to apologize for the lack of research, this is kind of urgent. Are soap messages binded in http request/header? If yes, can I view soap messages using tcpmon? Is there any other way to view soap messages?

    Read the article

  • SOAP web services in haskell?

    - by Dave
    I have to write a bunch of small web services. They must be defined by a WSDL and work via SOAP-RPC, in order to work with an existing workflow engine and service registry framework. I can, however, serve them on a service stack/platform of my choice. I'm presently writing them in Java, and it's not too bad. But I'm thinking my life might be easier if I was able to write these services in Haskell. Searching on Google, it looks like, once upon a time, someone else had the same idea and started a project called "HAIFA". However, it looks like HAIFA hasn't been maintained for some years, and I couldn't find any other frameworks supporting serving up services written in Haskell as SOAP web services. Does anyone know of any other frameworks that will allow me to easily write SOAP-based web services using Haskell? If not, has anyone done this manually (i.e., use XML libraries from hackage to process the incoming soap-rpc requests, and create soap-rpc compliant replies)? Was it difficult to do? Any gotchas? Was it worth the effort? Thanks in advance!

    Read the article

  • iPhone XML SOAP requests or .NET Web Services

    - by CocoaNewBee
    I've been trying to to consume SOAP requests (.NET web services) and have found some pretty good tools that I wanted to share: 1) http://grabalife.com/2009/10/19/using-net-web-services-and-dataset-objects-in-your-iphone-app/ Really easy clean way to perform all the call needed for consuming the services. 2) http://code.google.com/p/mac-soapclient/ SOAP Client uses WSDL files you provide to dynamically create a graphical user interface for any given SOAP-based web service Hopefully that will help someone as much as me!!! Happy coding !

    Read the article

  • How call soap service using jQuery

    - by Alen D
    I have a problem with calling soap service from php page. I was implemented two page,first page was created in php, and second page was created in asp.net. In asp.net application I have SOAP service, which methods should be called from php. Method on my SOAP service, look like this: [WebMethod] [ScriptMethod(ResponseFormat = ResponseFormat.Json)] public bool UpdateVotes(string vote) { //Code } On PHP application I call UpdateVotes method on the next way: $.ajax({ type: "POST", url: "http://localhost:5690/VoteServices.asmx/UpdateVotes", data: "{'vote': '" + vote + "'}", contentType: "application/json; charset=utf-8", dataType: "json", success: function (msg) { }, error: function (xhr, status, error) { } }); First I run asp.net application with SOAP service, and than I start php aplication. When i click on button for calling web method on service i browser console i got this error: Failed to load resource: the server responded with a status of 500 (Internal Server Error) http://localhost:5690/VoteServices.asmx/UpdateVotes XMLHttpRequest cannot load http://localhost:5690/VoteServices.asmx/UpdateVotes. Origin http://localhost:8080 is not allowed by Access-Control-Allow-Origin.

    Read the article

  • Using PHP5s SOAP Client to send data to an ASP/.NET based SOAP server.

    - by user325143
    I am trying to write a snippet of PHP to connect to a third party's API via SOAP to enter some data into their database. The API requires me to pass several mandatory fields for every call (username, password, companyid, entitytype) in addition to the mandatory data fields. It also requires me to call the "ValidateEntity" funciton before calling the "CreateEntity" function. Documentation can be found here: http://wiki.agemni.com/Getting_Started/APIs/Database_API I have never worked with SOAP before, so I am very new to this. Here is what I have so far: error_reporting(E_ALL); ini_set('display_errors', '1'); $client = new SoapClient("http://agemni.com/AgemniWebservices/service1.asmx?WSDL", array('trace'=> true)); $options = array( 'username' => "myuser", 'password' => "mypassword", 'companyid' => myID, 'entitytype' => 2 ); $params = array( 'fname' => "John", 'lname' => "Doe", 'phone' => "859-333-3333", 'zip' => "40332", 'area id' => "12345", 'lead id' => "28222", 'contactdate' => "4/10/2010" ); $validate = $client->__soapCall("ValidateEntity", array($params), array($options)); $client->__soapCall("CreateEntity", array($params), array($options)); echo "<pre>"; var_dump($client-> __getLastRequestHeaders()); var_dump($client-> __getLastRequest()); var_dump($client-> __getLastResponseHeaders()); var_dump($client-> __getLastResponse()); var_dump($result); echo "</pre>"; Upon executing this code, I get the following error: Fatal error: Uncaught SoapFault exception: [Client] SOAP-ERROR: Encoding: object hasn't 'objecttype' property in /www/tmp/index-soap.php:24 Stack trace: #0 /www/tmp/index-soap.php(24): SoapClient->__soapCall('ValidateEntity', Array) #1 {main} thrown in /www/stealth/tmp/index-soap.php on line 24 I guess my question is.. am I even going about doing this the right way? I know this is a very broad question, but I appreciate any advice you can give me about making this work. Please let me know if you require more detail. Thanks!

    Read the article

  • SOAP vs REST (differences)

    - by Abdulaziz
    I have read articles about the differences between SOAP and REST as a web service communication protocol, but I think that the biggest advantage for REST over SOAP are : REST is more dynamic, no need for creating and updating UDDI. REST is not restricted to XML format. REST web services can send plain text, JSON, and also XML. But SOAP is more standardized (Ex; security). So, am I correct in these points? Thanks

    Read the article

  • How to post a SOAP request from a browser?

    - by understack
    Is it possible to send a SOAP request directly from a browser to service provider? And then parse the output in javascript to show the result? For example, if I've a SOAP request like this : POST /InStock HTTP/1.1 Host: www.example.org Content-Type: application/soap+xml; charset=utf-8 Content-Length: nnn <?xml version="1.0"?> <soap:Envelope xmlns:soap="http://www.w3.org/2001/12/soap-envelope" soap:encodingStyle="http://www.w3.org/2001/12/soap-encoding"> <soap:Body xmlns:m="http://www.example.org/stock"> <m:GetStockPrice> <m:StockName>IBM</m:StockName> </m:GetStockPrice> </soap:Body> </soap:Envelope> Then can I get the 'IBM stock price' by clicking on a link on a web page? And show result after xml processing. EDIT Can I send the whole envelope as POST data?

    Read the article

  • Is it legal to have different SOAP namespaces/versions between the request and response?

    - by Lord Torgamus
    THIRD EDIT: I now believe that this problem is due to a SOAP version mismatch (1.1 request, 1.2 response) masquerading as a namespace problem. Is it illegal to mix versions, or just bad style? Am I completely out of luck if I can't change my SOAP version or the service's? SECOND EDIT: Clarified error message, and tried to reduce "tl;dr"-ness. EDIT: [Link deleted, not related] Using soapUI, I'm sending a request that starts with: <soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" ... and getting a response that starts with: <soap:Envelope xmlns:soap="http://www.w3.org/2003/05/soap-envelope" ... I know the service is getting the info, because processes down the line are working. However, my soapUI teststep fails. It has two active assertions: "SOAP Response" and "Not SOAP Fault." The failure marker is next to "SOAP Response," with the following message: line -1: Element Envelope@http://www.w3.org/2003/05/soap-envelope is not a valid Envelope@http://schemas.xmlsoap.org/soap/envelope/ document or a valid substitution. I have tried mixing and matching the namespace prefixes and schema URLs. Changing prefixes seems to have no effect; changing URLs causes a VersionMismatch error. I have also tried to use a substitution group, but that doesn't seem to be legal.

    Read the article

  • Logging Apache2 payload to evaluate SOAP message

    - by Phil
    I am trying to log webservice specific information with Apache (Apache acts as a load-balancer by use of mod_jk). For instance I want to know how long the responsetime of each webservice-call takes. To do this I definitely would need to know the name of the webservice-method in the log-file. As a matter of fact, the name of the webservice-method is wrapped in the SOAP-body, to which I have no access to with the default-configuration. Does anybody know an Apache module to extend the log-information? Or are there any other ideas to solve this challenge? Thx!

    Read the article

  • Connecting Linux to WatchGuard Firebox SSL (OpenVPN client)

    Recently, I got a new project assignment that requires to connect permanently to the customer's network through VPN. They are using a so-called SSL VPN. As I am using OpenVPN since more than 5 years within my company's network I was quite curious about their solution and how it would actually be different from OpenVPN. Well, short version: It is a disguised version of OpenVPN. Unfortunately, the company only offers a client for Windows and Mac OS which shouldn't bother any Linux user after all. OpenVPN is part of every recent distribution and can be activated in a couple of minutes - both client as well as server (if necessary). WatchGuard Firebox SSL - About dialog Borrowing some files from a Windows client installation Initially, I didn't know about the product, so therefore I went through the installation on Windows 8. No obstacles (and no restart despite installation of TAP device drivers!) here and the secured VPN channel was up and running in less than 2 minutes or so. Much appreciated from both parties - customer and me. Of course, this whole client package and my long year approved and stable installation ignited my interest to have a closer look at the WatchGuard client. Compared to the original OpenVPN client (okay, I have to admit this is years ago) this commercial product is smarter in terms of file locations during installation. You'll be able to access the configuration and key files below your roaming application data folder. To get there, simply enter '%AppData%\WatchGuard\Mobile VPN' in your Windows/File Explorer and confirm with Enter/Return. This will display the following files: Application folder below user profile with configuration and certificate files From there we are going to borrow four files, namely: ca.crt client.crt client.ovpn client.pem and transfer them to the Linux system. You might also be able to isolate those four files from a Mac OS client. Frankly, I'm just too lazy to run the WatchGuard client installation on a Mac mini only to find the folder location, and I'm going to describe why a little bit further down this article. I know that you can do that! Feedback in the comment section is appreciated. Configuration of OpenVPN (console) Depending on your distribution the following steps might be a little different but in general you should be able to get the important information from it. I'm going to describe the steps in Ubuntu 13.04 (Raring Ringtail). As usual, there are two possibilities to achieve your goal: console and UI. Let's what it is necessary to be done. First of all, you should ensure that you have OpenVPN installed on your system. Open your favourite terminal application and run the following statement: $ sudo apt-get install openvpn network-manager-openvpn network-manager-openvpn-gnome Just to be on the safe side. The four above mentioned files from your Windows machine could be copied anywhere but either you place them below your own user directory or you put them (as root) below the default directory: /etc/openvpn At this stage you would be able to do a test run already. Just in case, run the following command and check the output (it's the similar information you would get from the 'View Logs...' context menu entry in Windows: $ sudo openvpn --config client.ovpn Pay attention to the correct path to your configuration and certificate files. OpenVPN will ask you to enter your Auth Username and Auth Password in order to establish the VPN connection, same as the Windows client. Remote server and user authentication to establish the VPN Please complete the test run and see whether all went well. You can disconnect pressing Ctrl+C. Simplifying your life - authentication file In my case, I actually set up the OpenVPN client on my gateway/router. This establishes a VPN channel between my network and my client's network and allows me to switch machines easily without having the necessity to install the WatchGuard client on each and every machine. That's also very handy for my various virtualised Windows machines. Anyway, as the client configuration, key and certificate files are located on a headless system somewhere under the roof, it is mandatory to have an automatic connection to the remote site. For that you should first change the file extension '.ovpn' to '.conf' which is the default extension on Linux systems for OpenVPN, and then open the client configuration file in order to extend an existing line. $ sudo mv client.ovpn client.conf $ sudo nano client.conf You should have a similar content to this one here: dev tunclientproto tcp-clientca ca.crtcert client.crtkey client.pemtls-remote "/O=WatchGuard_Technologies/OU=Fireware/CN=Fireware_SSLVPN_Server"remote-cert-eku "TLS Web Server Authentication"remote 1.2.3.4 443persist-keypersist-tunverb 3mute 20keepalive 10 60cipher AES-256-CBCauth SHA1float 1reneg-sec 3660nobindmute-replay-warningsauth-user-pass auth.txt Note: I changed the IP address of the remote directive above (which should be obvious, right?). Anyway, the required change is marked in red and we have to create a new authentication file 'auth.txt'. You can give the directive 'auth-user-pass' any file name you'd like to. Due to my existing OpenVPN infrastructure my setup differs completely from the above written content but for sake of simplicity I just keep it 'as-is'. Okay, let's create this file 'auth.txt' $ sudo nano auth.txt and just put two lines of information in it - username on the first, and password on the second line, like so: myvpnusernameverysecretpassword Store the file, change permissions, and call openvpn with your configuration file again: $ sudo chmod 0600 auth.txt $ sudo openvpn --config client.conf This should now work without being prompted to enter username and password. In case that you placed your files below the system-wide location /etc/openvpn you can operate your VPNs also via service command like so: $ sudo service openvpn start client $ sudo service openvpn stop client Using Network Manager For newer Linux users or the ones with 'console-phobia' I'm going to describe now how to use Network Manager to setup the OpenVPN client. For this move your mouse to the systray area and click on Network Connections => VPN Connections => Configure VPNs... which opens your Network Connections dialog. Alternatively, use the HUD and enter 'Network Connections'. Network connections overview in Ubuntu Click on 'Add' button. On the next dialog select 'Import a saved VPN configuration...' from the dropdown list and click on 'Create...' Choose connection type to import VPN configuration Now you navigate to your folder where you put the client files from the Windows system and you open the 'client.ovpn' file. Next, on the tab 'VPN' proceed with the following steps (directives from the configuration file are referred): General Check the IP address of Gateway ('remote' - we used 1.2.3.4 in this setup) Authentication Change Type to 'Password with Certificates (TLS)' ('auth-pass-user') Enter User name to access your client keys (Auth Name: myvpnusername) Enter Password (Auth Password: verysecretpassword) and choose your password handling Browse for your User Certificate ('cert' - should be pre-selected with client.crt) Browse for your CA Certificate ('ca' - should be filled as ca.crt) Specify your Private Key ('key' - here: client.pem) Then click on the 'Advanced...' button and check the following values: Use custom gateway port: 443 (second value of 'remote' directive) Check the selected value of Cipher ('cipher') Check HMAC Authentication ('auth') Enter the Subject Match: /O=WatchGuard_Technologies/OU=Fireware/CN=Fireware_SSLVPN_Server ('tls-remote') Finally, you have to confirm and close all dialogs. You should be able to establish your OpenVPN-WatchGuard connection via Network Manager. For that, click on the 'VPN Connections => client' entry on your Network Manager in the systray. It is advised that you keep an eye on the syslog to see whether there are any problematic issues that would require some additional attention. Advanced topic: routing As stated above, I'm running the 'WatchGuard client for Linux' on my head-less server, and since then I'm actually establishing a secure communication channel between two networks. In order to enable your network clients to get access to machines on the remote side there are two possibilities to enable that: Proper routing on both sides of the connection which enables both-direction access, or Network masquerading on the 'client side' of the connection Following, I'm going to describe the second option a little bit more in detail. The Linux system that I'm using is already configured as a gateway to the internet. I won't explain the necessary steps to do that, and will only focus on the additional tweaks I had to do. You can find tons of very good instructions and tutorials on 'How to setup a Linux gateway/router' - just use Google. OK, back to the actual modifications. First, we need to have some information about the network topology and IP address range used on the 'other' side. We can get this very easily from /var/log/syslog after we established the OpenVPN channel, like so: $ sudo tail -n20 /var/log/syslog Or if your system is quite busy with logging, like so: $ sudo less /var/log/syslog | grep ovpn The output should contain PUSH received message similar to the following one: Jul 23 23:13:28 ios1 ovpn-client[789]: PUSH: Received control message: 'PUSH_REPLY,topology subnet,route 192.168.1.0 255.255.255.0,dhcp-option DOMAIN ,route-gateway 192.168.6.1,topology subnet,ping 10,ping-restart 60,ifconfig 192.168.6.2 255.255.255.0' The interesting part for us is the route command which I highlighted already in the sample PUSH_REPLY. Depending on your remote server there might be multiple networks defined (172.16.x.x and/or 10.x.x.x). Important: The IP address range on both sides of the connection has to be different, otherwise you will have to shuffle IPs or increase your the netmask. {loadposition content_adsense} After the VPN connection is established, we have to extend the rules for iptables in order to route and masquerade IP packets properly. I created a shell script to take care of those steps: #!/bin/sh -eIPTABLES=/sbin/iptablesDEV_LAN=eth0DEV_VPNS=tun+VPN=192.168.1.0/24 $IPTABLES -A FORWARD -i $DEV_LAN -o $DEV_VPNS -d $VPN -j ACCEPT$IPTABLES -A FORWARD -i $DEV_VPNS -o $DEV_LAN -s $VPN -j ACCEPT$IPTABLES -t nat -A POSTROUTING -o $DEV_VPNS -d $VPN -j MASQUERADE I'm using the wildcard interface 'tun+' because I have multiple client configurations for OpenVPN on my server. In your case, it might be sufficient to specify device 'tun0' only. Simplifying your life - automatic connect on boot Now, that the client connection works flawless, configuration of routing and iptables is okay, we might consider to add another 'laziness' factor into our setup. Due to kernel updates or other circumstances it might be necessary to reboot your system. Wouldn't it be nice that the VPN connections are established during the boot procedure? Yes, of course it would be. To achieve this, we have to configure OpenVPN to automatically start our VPNs via init script. Let's have a look at the responsible 'default' file and adjust the settings accordingly. $ sudo nano /etc/default/openvpn Which should have a similar content to this: # This is the configuration file for /etc/init.d/openvpn## Start only these VPNs automatically via init script.# Allowed values are "all", "none" or space separated list of# names of the VPNs. If empty, "all" is assumed.# The VPN name refers to the VPN configutation file name.# i.e. "home" would be /etc/openvpn/home.conf#AUTOSTART="all"#AUTOSTART="none"#AUTOSTART="home office"## ... more information which remains unmodified ... With the OpenVPN client configuration as described above you would either set AUTOSTART to "all" or to "client" to enable automatic start of your VPN(s) during boot. You should also take care that your iptables commands are executed after the link has been established, too. You can easily test this configuration without reboot, like so: $ sudo service openvpn restart Enjoy stable VPN connections between your Linux system(s) and a WatchGuard Firebox SSL remote server. Cheers, JoKi

    Read the article

  • Best approach to designing multi-client applications

    - by Tomh
    Hi, I was wondering how you guys start out if you need to design a multi-client project where multiple clients can interact with a server. In specific how do you go about dealing with different states and message handling, how do you start designing and considering all these cases? For example a video webchat application where it is possible that you call another client, while that client is already in a call, or is stuck in a modal dialog such that the calling dialog does not come through.

    Read the article

  • SOAP, Python, suds

    - by iscarface
    Hello everybody! Please advise library for working with soap in python. Now, i'm trying to use "suds". And i can't undestand how get http headers from server reply Code example: from suds.client import Client url = "http://10.1.0.36/money_trans/api3.wsdl" client = Client(url) login_res = client.service.Login("login", "password") variable "login_res" contain xml answer and doesnt contain http headers. But i need to get session id from them. Thank you.

    Read the article

  • Suds array of arrays not nesting

    - by joshcartme
    Let me preface this by saying that I am still pretty new to SOAP and how things should work. I'm working with the Vertical Response API. I'm having trouble getting suds to construct the xml correctly for a request. Here is some code: from suds.client import Client url = 'https://api.verticalresponse.com/wsdl/1.0/VRAPI.wsdl' client = Client(url) vr = client.service ... test_list = ( ( { 'name' : 'email_address', 'value' : login['username'], }, { 'name' : 'First_Name', 'value' : 'VR_User', } ), ( { 'name' : 'email_address', 'value' : '[email protected]', }, { 'name' : 'First_Name', 'value' : login['username'], }, ), ) # sid and cid are correctly retrieved prior to this point print "Sending test message..." vr.sendEmailCampaignTest({ 'session_id' : sid, 'campaign_id' : cid, 'recipients' : test_list, }) In this context login['username'] is just an email address. That code raises this error: suds.WebFault: Server raised fault: 'Application failed during request deserialization: Too many elements in array. 4 instead of claimed 2 (2) Here is the the definition of sendEmailCampaignTest: http://developers.verticalresponse.com/api/soap/methods/campaigns/sendemailcampaigntest/ Here is the xml that logging outputs (I removed the session_id and list_id for display here): DEBUG:suds.client:headers = {'SOAPAction': u'"VR/API/1_0#sendEmailCampaignTest"', 'Content-Type': 'text/xml; charset=utf-8'} ERROR:suds.client:<?xml version="1.0" encoding="UTF-8"?> <SOAP-ENV:Envelope xmlns:ns3="http://api.verticalresponse.com/1.0/VRAPI.xsd" xmlns:SOAP-ENC="http://schemas.xmlsoap.org/soap/encoding/" xmlns:ns0="http://schemas.xmlsoap.org/soap/envelope/" xmlns:ns1="http://www.w3.org/2001/XMLSchema" xmlns:ns2="http://schemas.xmlsoap.org/soap/encoding/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:ns4="VR/API/1_0" xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" SOAP-ENV:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"> <SOAP-ENV:Header/> <ns0:Body> <ns4:sendEmailCampaignTest> <args xsi:type="ns3:sendEmailCampaignTestArgs"> <session_id xsi:type="ns1:string">redacted</session_id> <campaign_id xsi:type="ns1:int">redacted</campaign_id> <recipients xsi:type="ns3:ArrayOfNVDictionary" ns2:arrayType="ns3:NVDictionary[2]"> <item> <name xsi:type="ns1:string">email_address</name> <value xsi:type="ns1:string">[email protected]</value> </item> <item> <name xsi:type="ns1:string">First_Name</name> <value xsi:type="ns1:string">VR_User</value> </item> <item> <name xsi:type="ns1:string">email_address</name> <value xsi:type="ns1:string">[email protected]</value> </item> <item> <name xsi:type="ns1:string">First_Name</name> <value xsi:type="ns1:string">[email protected]</value> </item> </recipients> </args> </ns4:sendEmailCampaignTest> </ns0:Body> </SOAP-ENV:Envelope> DEBUG:suds.client:http failed: <?xml version="1.0" encoding="UTF-8"?><SOAP-ENV:Envelope xmlns:xsi="http://www.w3.org/2001/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/2001/XMLSchema" SOAP-ENV:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"><SOAP-ENV:Body><SOAP-ENV:Fault><faultcode>SOAP-ENV:Client</faultcode><faultstring>Application failed during request deserialization: Too many elements in array. 4 instead of claimed 2 (2) </faultstring></SOAP-ENV:Fault></SOAP-ENV:Body></SOAP-ENV:Envelope> a ruby script (provided by Vertical Response) that does the same things as the script I am working on in python outputs the following xml (I removed the session_id and list_id): <?xml version="1.0" encoding="utf-8" ?> <env:Envelope xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:env="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"> <env:Body> <n1:sendEmailCampaignTest xmlns:n1="VR/API/1_0" env:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"> <args xmlns:n2="http://api.verticalresponse.com/1.0/VRAPI.xsd" xsi:type="n2:sendEmailCampaignTestArgs"> <session_id xsi:type="xsd:string">redacted</session_id> <campaign_id xsi:type="xsd:int">redacted</campaign_id> <recipients xmlns:n3="http://schemas.xmlsoap.org/soap/encoding/" xsi:type="n3:Array" n3:arrayType="n2:NVDictionary[2]"> <item xsi:type="n3:Array" n3:arrayType="n2:NVPair[2]"> <item> <name xsi:type="xsd:string">email_address</name> <value href="#id9496430"></value> </item> <item> <name xsi:type="xsd:string">First_Name</name> <value xsi:type="xsd:string">VR_User</value> </item> </item> <item xsi:type="n3:Array" n3:arrayType="n2:NVPair[2]"> <item> <name xsi:type="xsd:string">email_address</name> <value xsi:type="xsd:string">[email protected]</value> </item> <item> <name xsi:type="xsd:string">First_Name</name> <value href="#id9496430"></value> </item> </item> </recipients> </args> </n1:sendEmailCampaignTest> <value id="id9496430" xsi:type="xsd:string" env:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/">[email protected]</value> </env:Body> </env:Envelope> I understand that the error is in the construction of recipients. It should contain two items, each that contain two items but my python script using suds is setting it up to contain four unnested items. So my question is how can I get suds to correctly construct the xml?

    Read the article

  • WCF Manual SOAP POST using HttpWebRequest over https with Usertoken

    - by VonBlender
    Hi, I'm writing a client that calls a number of WCF webservices (written externallyt to my company) that are very similar in structure. The design I was hoping to use is to manually build the SOAP message from XML chunks that are stored in a database and then processed through a generic web service handler class. I have access to the WSDL's for each webservice and example working XML. The design approach is such that we can easily add to the message dynamically, hence the reason for not using the auto generated proxy classes I am basically at the last part now with the entire SOAP message constructed but am getting a SOAP fault security error returned. I have used fiddler to compare the message I'm sending with one that is sent using the normal (far simpler...) WCF generated proxy classes and can't see any difference apart from the id attribute of the Usertoken element in the SOAP header. This is where my lack of experience in this area isn't helping. I think this is because the id is generated automatically (presumably because we're using https). My question is how do I generate this programatically? I have searched for hours online but the majority of solutions are either using the proxy classes or not over https. I have briefly looked at WCE but aware this is replaced by WCF now so don't want to waste time looking into this if it's not the solution. Any help with this would be greatly appreciated. I can post some code examples when I'm back in work if it will help but the method I'm using is very straightforward and only using XElements and such like at the moment (as we're using linq to sql). thanks, Andy

    Read the article

  • Invoking a SOAP ( Web Services ) from ORACLE DB

    - by Mousarules
    Dears, Kindly note that I’m trying to invoke a SOAP (web services) from ORACLE DB using pl\sql , after I have done some investigations it says that I have to use the UTL_HTTP package but It didn't work with me !!! Kindly to advice me , where should I exactly place the following SOAP in pl\SQL to be invoked .... is it posible ? SOAP 1.1 The following is a sample SOAP 1.1 request and response. The placeholders shown need to be replaced with actual values. POST /gmgwebservice/service.asmx HTTP/1.1 Host: bulk.umniah.com Content-Type: text/xml; charset=utf-8 Content-Length: length SOAPAction: "http://tempuri.org/SendSMS" <SendSMS xmlns="http://tempuri.org/"> <UserName>string</UserName> <Password>string</Password> <MessageBody>string</MessageBody> <Sender>string</Sender> <Destination>string</Destination> </SendSMS> HTTP/1.1 200 OK Content-Type: text/xml; charset=utf-8 Content-Length: length <SendSMSResponse xmlns="http://tempuri.org/"> <SendSMSResult>string</SendSMSResult> </SendSMSResponse> --This web services refers to a web site called Bulk Messaging ; the web site sends SMS to a specific mobile number by filling in some text boxes , I need it to be done from ORACLE forms when a specific action occurs ( JOB ) but I don’t know how to use it inside my pl\sql code . Hope that it’s clear ,is there something else I have to mention ?

    Read the article

  • Specifying SOAP Headers for a Zend_Soap Service

    - by Stephen
    I have a generally straight forward web service that I've written (converting code to ZF from a Java implementation of the same service and trying to maintain the same wsdl structure as much as possible). The service loads a PHP class, rather than individual functions. The PHP class contains three different functions within it. Everything seems to be working just fine, except that I can't seem to figure out how to specify that a given function parameter should be passed as a SOAP header. I've not seen any mention of SOAP headers in the Server context, only how to pass header parameters with a client to a server. In addition to the standard parameters for the function that would be sent in the SOAP body and detailed in the docblock, I would like to specify two parameters (a username and password) that would be sent in a SOAP header. I have to assume this is possible, but haven't been able to find anything online, nor have I had any responses to a similar post on Zend's forum. Is there something that can be added in the docblock area to specify a parameter as a header (maybe in a similar fashion to using WebParam?)? Any suggestions/examples on how to get this accomplished would be greatly appreciated!

    Read the article

  • Unobtrusive Client Side Validation with Dynamic Contents in ASP.NET MVC 3

    - by imran_ku07
        Introduction:          A while ago, I blogged about how to perform client side validation for dynamic contents in ASP.NET MVC 2 at here. Using the approach given in that blog, you can easily validate your dynamic ajax contents at client side. ASP.NET MVC 3 also supports unobtrusive client side validation in addition to ASP.NET MVC 2 client side validation for backward compatibility. I feel it is worth to rewrite that blog post for ASP.NET MVC 3 unobtrusive client side validation. In this article I will show you how to do this.       Description:           I am going to use the same example presented at here. Create a new ASP.NET MVC 3 application. Then just open HomeController.cs and add the following code,   public ActionResult CreateUser() { return View(); } [HttpPost] public ActionResult CreateUserPrevious(UserInformation u) { return View("CreateUserInformation", u); } [HttpPost] public ActionResult CreateUserInformation(UserInformation u) { if(ModelState.IsValid) return View("CreateUserCompanyInformation"); return View("CreateUserInformation"); } [HttpPost] public ActionResult CreateUserCompanyInformation(UserCompanyInformation uc, UserInformation ui) { if (ModelState.IsValid) return Content("Thank you for submitting your information"); return View("CreateUserCompanyInformation"); }             Next create a CreateUser view and add the following lines,   <%@ Page Title="" Language="C#" MasterPageFile="~/Views/Shared/Site.Master" Inherits="System.Web.Mvc.ViewPage<UnobtrusiveValidationWithDynamicContents.Models.UserInformation>" %> <asp:Content ID="Content1" ContentPlaceHolderID="TitleContent" runat="server"> CreateUser </asp:Content> <asp:Content ID="Content2" ContentPlaceHolderID="MainContent" runat="server"> <div id="dynamicData"> <%Html.RenderPartial("CreateUserInformation"); %> </div> </asp:Content>             Next create a CreateUserInformation partial view and add the following lines,   <%@ Control Language="C#" Inherits="System.Web.Mvc.ViewUserControl<UnobtrusiveValidationWithDynamicContents.Models.UserInformation>" %> <% Html.EnableClientValidation(); %> <%using (Html.BeginForm("CreateUserInformation", "Home")) { %> <table id="table1"> <tr style="background-color:#E8EEF4;font-weight:bold"> <td colspan="3" align="center"> User Information </td> </tr> <tr> <td> First Name </td> <td> <%=Html.TextBoxFor(a => a.FirstName)%> </td> <td> <%=Html.ValidationMessageFor(a => a.FirstName)%> </td> </tr> <tr> <td> Last Name </td> <td> <%=Html.TextBoxFor(a => a.LastName)%> </td> <td> <%=Html.ValidationMessageFor(a => a.LastName)%> </td> </tr> <tr> <td> Email </td> <td> <%=Html.TextBoxFor(a => a.Email)%> </td> <td> <%=Html.ValidationMessageFor(a => a.Email)%> </td> </tr> <tr> <td colspan="3" align="center"> <input type="submit" name="userInformation" value="Next"/> </td> </tr> </table> <%} %> <script type="text/javascript"> $("form").submit(function (e) { if ($(this).valid()) { $.post('<%= Url.Action("CreateUserInformation")%>', $(this).serialize(), function (data) { $("#dynamicData").html(data); $.validator.unobtrusive.parse($("#dynamicData")); }); } e.preventDefault(); }); </script>             Next create a CreateUserCompanyInformation partial view and add the following lines,   <%@ Control Language="C#" Inherits="System.Web.Mvc.ViewUserControl<UnobtrusiveValidationWithDynamicContents.Models.UserCompanyInformation>" %> <% Html.EnableClientValidation(); %> <%using (Html.BeginForm("CreateUserCompanyInformation", "Home")) { %> <table id="table1"> <tr style="background-color:#E8EEF4;font-weight:bold"> <td colspan="3" align="center"> User Company Information </td> </tr> <tr> <td> Company Name </td> <td> <%=Html.TextBoxFor(a => a.CompanyName)%> </td> <td> <%=Html.ValidationMessageFor(a => a.CompanyName)%> </td> </tr> <tr> <td> Company Address </td> <td> <%=Html.TextBoxFor(a => a.CompanyAddress)%> </td> <td> <%=Html.ValidationMessageFor(a => a.CompanyAddress)%> </td> </tr> <tr> <td> Designation </td> <td> <%=Html.TextBoxFor(a => a.Designation)%> </td> <td> <%=Html.ValidationMessageFor(a => a.Designation)%> </td> </tr> <tr> <td colspan="3" align="center"> <input type="button" id="prevButton" value="Previous"/>   <input type="submit" name="userCompanyInformation" value="Next"/> <%=Html.Hidden("FirstName")%> <%=Html.Hidden("LastName")%> <%=Html.Hidden("Email")%> </td> </tr> </table> <%} %> <script type="text/javascript"> $("#prevButton").click(function () { $.post('<%= Url.Action("CreateUserPrevious")%>', $($("form")[0]).serialize(), function (data) { $("#dynamicData").html(data); $.validator.unobtrusive.parse($("#dynamicData")); }); }); $("form").submit(function (e) { if ($(this).valid()) { $.post('<%= Url.Action("CreateUserCompanyInformation")%>', $(this).serialize(), function (data) { $("#dynamicData").html(data); $.validator.unobtrusive.parse($("#dynamicData")); }); } e.preventDefault(); }); </script>             Next create a new class file UserInformation.cs inside Model folder and add the following code,   public class UserInformation { public int Id { get; set; } [Required(ErrorMessage = "First Name is required")] [StringLength(10, ErrorMessage = "First Name max length is 10")] public string FirstName { get; set; } [Required(ErrorMessage = "Last Name is required")] [StringLength(10, ErrorMessage = "Last Name max length is 10")] public string LastName { get; set; } [Required(ErrorMessage = "Email is required")] [RegularExpression(@"^\w+([-+.']\w+)*@\w+([-.]\w+)*\.\w+([-.]\w+)*$", ErrorMessage = "Email Format is wrong")] public string Email { get; set; } }             Next create a new class file UserCompanyInformation.cs inside Model folder and add the following code,    public class UserCompanyInformation { public int UserId { get; set; } [Required(ErrorMessage = "Company Name is required")] [StringLength(10, ErrorMessage = "Company Name max length is 10")] public string CompanyName { get; set; } [Required(ErrorMessage = "CompanyAddress is required")] [StringLength(50, ErrorMessage = "Company Address max length is 50")] public string CompanyAddress { get; set; } [Required(ErrorMessage = "Designation is required")] [StringLength(50, ErrorMessage = "Designation max length is 10")] public string Designation { get; set; } }            Next add the necessary script files in Site.Master,   <script src="<%= Url.Content("~/Scripts/jquery-1.4.4.min.js")%>" type="text/javascript"></script> <script src="<%= Url.Content("~/Scripts/jquery.validate.min.js")%>" type="text/javascript"></script> <script src="<%= Url.Content("~/Scripts/jquery.validate.unobtrusive.min.js")%>" type="text/javascript"></script>            Now run this application. You will get the same behavior as described in this article. The key important feature to note here is the $.validator.unobtrusive.parse method, which is used by ASP.NET MVC 3 unobtrusive client side validation to initialize jQuery validation plug-in to start the client side validation process. Another important method to note here is the jQuery.valid method which return true if the form is valid and return false if the form is not valid .       Summary:          There may be several occasions when you need to load your HTML contents dynamically. These dynamic HTML contents may also include some input elements and you need to perform some client side validation for these input elements before posting thier values to server. In this article I shows you how you can enable client side validation for dynamic input elements in ASP.NET MVC 3. I am also attaching a sample application. Hopefully you will enjoy this article too.   SyntaxHighlighter.all()

    Read the article

  • Demonstrate bad code to client?

    - by jtiger
    I have a new client that has asked me to do a redesign of their website, an ASP.NET Webforms application that was developed by another consultant. It seemed straight-forward (it never is) but I took a look at the code to make sure I knew what I was in for. This application was not written well. At all. It is extremely vulnerable to SQL Injection attacks, business logic is spread throughout the entire application, a lot of duplication, and dead end code that does nothing. On top of that, it keeps throwing exceptions that are being smothered, so it all appears to be running smoothly. My job is to simply update the html and css, but much of the html is being generated in business logic and would be a nightmare for me to sort everything out. My estimates on the redesign were longer than the client was aiming for, and they are asking why so long. How can I explain to my client just how bad this code is? In their mind, the application is running great and the redesign should be a quick one-off. It's my word against the previous consultant, so how can I actually give simple, concrete examples that a non-technical client would understand?

    Read the article

< Previous Page | 1 2 3 4 5 6 7 8 9 10 11 12  | Next Page >