Menu
  • HOME
  • TAGS

IOS8 Paramter is not getting appended to URL when posting data

ios,web-services,rest

Use this code CLLocation *crnLoc = [locations lastObject]; self.locationDesc.text = [NSString stringWithFormat:@"%@",crnLoc.description]; NSLog(@"%@",crnLoc.description); NSURL *aUrl = [NSURL URLWithString:@"http://localhost/web/location/create.php?"]; NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:aUrl]; NSString *params = [[NSString alloc] initWithFormat:@"latitude=%g&longitude=%g", crnLoc.coordinate.latitude, crnLoc.coordinate.longitude]; NSData *postData = [params...

error: cannot find symbol class AsyncCallWS Android

java,android,web-services

On the link you post, I see a class like below. Create this class in your project before using it. private class AsyncCallWS extends AsyncTask<String, Void, Void> { @Override protected Void doInBackground(String... params) { Log.i(TAG, "doInBackground"); getFahrenheit(celcius); return null; } @Override protected void onPostExecute(Void result) { Log.i(TAG, "onPostExecute"); tv.setText(fahren +...

.NET web service gets null object

c#,.net,ajax,web-services,rest

Possibly the mistake in this line var data = '{ "c:":{"Id": "1", "Name": "myname"}'; should be var data = '{ "c":{"Id": "1", "Name": "myname"}'; ...

Retrofit error: Expected BEGIN_ARRAY but was STRING

android,web-services,retrofit

Did you try with the raw response type? @GET("your_url") void getDetails(Callback<Response> cb); Then you can parse the Response using JSONObject and JSONArray like this: Callback<Response> callback = new Callback<Response>() { @Override public void success(Response detailsResponse, Response response2) { String detailsString = getStringFromRetrofitResponse(detailsResponse); try { JSONObject object = new JSONObject(detailsString); //In...

No matching contract between WCF Service and QuickBooks Web Connector

c#,web-services,wcf,quickbooks,connector

This answer describes how to connect a WCF Service with the QuickBooks Web Connecter (e. g. authenticate method). I am not totally sure if it is the best implementation, but it works and I would like to help other people with similar problems. Enchantments and additional suggestions are always welcome....

Using Java web service on Amazon cloud

java,web-services,amazon-web-services,amazon-ec2

This is pretty standard in terms of deployment. First - create a EC2 box, this will be your server, you'll need to configure the firewall to allow connections over HTTP port 8080. Second - install Tomcat on said EC2 box. Third - upload your war file to said Tomcat instance....

Using client certificate with Apache Axis 1

web-services,tomcat,axis,client-certificates

The solutions is to use JVM-Paramters for truststore and keystore. java -Djavax.net.ssl.trustStore=/some/path/myTruststore.jks -Djavax.net.ssl.trustStorePassword=abc -Djavax.net.ssl.keyStore=/some/path/myKeystore.p12 -Djavax.net.ssl.keyStorePassword=defg -Djavax.net.ssl.keyStoreType=PKCS12 ...

How to deal with extra “/” in phpleague route?

php,web-services,routing

There are two options You can use htaccess to strip the trailing slash from the url. Send the dispatcher the url without the trailing slash. Solution 1: htaccess Add the following rewrite rule to your .htacces: RewriteRule ^(.*)/$ /$1 [L,R=301] Solution 2: dispatcher After you've created the router from a...

Can't save json data to variable (or cache) with angularjs $http.get

json,angularjs,web-services,rest

$http.get is asynchronous. When cache.get or return result are executed, HTTP request has not completed yet. How are you going to use that data? Display in UI? E.g. try the following: // Some View <div>{{myData}}</div> // Controller app.controller('MyController', function ($scope) { $http.get('yoururl').success(function (data) { $scope.myData = data; }); }); You...

Consuming and exposing webservices in one project (.NET)

.net,web-services,rest,soap

If you are trying to enrich the data from one source and combine that with information from another source, I think this is a decent solution. I think it is better to have one single point to talk to (your REST service), than to have two in your application and...

Save SOAP UI mock requests to a file

web-services,soap,request,soapui

If you want to save in a file all request that your Mock service recieve, simply do the follow. In your mock service open the onRequest script tab as in the follow image (this script executes each time that your service receives a request): And add the follow groovy script...

Authentication Window in .NET Web API

c#,.net,web-services,authentication

You are getting the authentication window because Chrome is getting back a 401 Unauthorized response when it tries to call the website as you have posted. This can either be caused by the web server rejecting your request based on a lack of authorization (e.g. windows authorization turned on as...

NSJSONSerialization dataWithJSONObject: options:NSJSONWritingPrettyPrinted error: method adding extra “/”

ios,objective-c,web-services

Try this: NSDictionary *dict = // Dictionary here.. NSData *dataRecvd = [NSJSONSerialization dataWithJSONObject:dict options:kNilOptions error:&error]; if(!dataRecvd && error){ NSLog(@"Error creating JSON: %@", [error localizedDescription]); return; } //NSJSONSerialization converts a URL string from http://... to http:\/\/... remove the extra escapes Str = [[NSString alloc] initWithData:dataRecvd encoding:NSUTF8StringEncoding]; Str = [Str stringByReplacingOccurrencesOfString:@"\\/" withString:@"/"];...

Nested JQuery Function Returns 'undefined' or '[object Object]'

javascript,jquery,web-services,getjson,webservice-client

For those who will follow this posting in the future I am pleased to provide the solution I finally found (5 days later). My key mistake centered on jQuery is essentially designed to manipulate existing HTML/DOM elements using CSS Selectors. In other languages such as C# you can procedurally call...

Why do we need to publish or deploy web services or WCF?

web-services,wcf

why do we need to publish/deploy a webservices or wcf In order to make it available over internet (or) intranet (make it globally accessible). If you don't publish your service then it is not accessible by others since it can't be found/discovered. Once you publish it, then your service...

Server side session in asp.net

asp.net,web-services,session

You've got a quotes problem, fix it like this: <% Session["path"] = "'" + vr_ + "'"; %> EDIT 1: Javascript and ASP.NET are not the same, so you cannot access the variables, so you can't do it on the client side. You must send something to the server like...

cxf request scoped bean not working in unit test (soap)

web-services,unit-testing,soap,scope,cxf

Meanwhile I found the solution: ... import org.springframework.context.ConfigurableApplicationContext; @Autowired private ConfigurableApplicationContext myCtxt; @Before public void setUp() throws Throwable { myCtxt.getBeanFactory().registerScope( "session", new CustomScope4Test() ); myCtxt.getBeanFactory().registerScope( "request", new CustomScope4Test() ); } public class CustomScope4Test implements Scope { private final Map<String, Object> beanMap = new HashMap<String, Object>(); /** * @see...

Parsing XML with same parent and child node name

c#,xml,web-services,soap

Try this using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Xml; using System.Xml.Linq; using System.IO; namespace ConsoleApplication33 { class Program { static void Main(string[] args) { string input = "<SOAP-ENV:Envelope SOAP-ENV:encodingStyle=\"http://schemas.xmlsoap.org/soap/encoding/\" xmlns:SOAP-ENV=\"http://schemas.xmlsoap.org/soap/envelope/\" xmlns:ns1=\"urn:RestControllerwsdl\" xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\"...

Add objects to list in web application

c#,asp.net,web-services,list,webmethod

public class WS : System.Web.Services.WebService { [WebMethod(EnableSession = true)] [ScriptMethod(UseHttpGet = true)] public void registerUser() { try { if(Session["users"] == null) Session["users"] = new List<User>(); List<User> users = (List<User>)Session["users"]; string s = HttpContext.Current.Request.Form[0].ToString(); User tempUser = new User(); tempUser = JsonConvert.DeserializeObject<User>(s); users.Add(tempUser); Session["users"] = users; } catch(Exception e) { HttpContext.Current.Response.Write(e.Message);...

Equivalent of org.apache.axis.components.net.SunFakeTrustSocketFactory for wsimport

java,web-services,jax-ws,axis,wsimport

All that's happening in that class is the provision of a bogus trust store manager, that trusts anything. Knowing that, you can use this article and put something together. First the easy trust manager public class EasyTrustManager implements X509TrustManager { public void checkClientTrusted(X509Certificate[] chain, String authType) { //do nothing }...

Android AsyncTask with JSON Parsing error

java,android,json,web-services,wcf

It seems you havn't use your JSONArray object JSONArray mainfoodlist = null; tipshealth = json.getJSONArray(TAG_RESPONSE); // looping through All RESPONSE for (int i = 0; i < tipshealth.length(); i++) { JSONObject jsonobj = tipshealth.getJSONObject(i); tipHealth = jsonobj.getString(KEY_HEALTHTIPS); listhealthtips.add(tipshealth.getJSONObject(i).getString("tips")); } ...

REST vs Session-Based-Applications

web-services,rest

REST is different fron session-based applications because it is stateless and session-based are not. Keeping "Session" is nothing more than the server keeping the state of the user. REST doesn't do that, it uses hypermedia to guide the state of the app. That's where the HATEOAS acronym comes from. Basically,...

couldn't copy pdb file to another directory while consuming wcf web service

c#,web-services,wcf,visual-studio-2013

Per your latest comment where you say ConsumeHelper is client project and it consumes WCF service Make sure you are not already running that project. I doubt it's already running and so the pdb file is not able to copy. Else, try running in Release mode instead of Debug mode....

Can I throw a message fault back to a WCF client from a routing service

c#,.net,web-services,wcf,encryption

Using Ricardo's information I was able to narrow down what I was doing. The actual answer to this is entirely up to the Endpoint configuration. It is dependent on your binding. We didn't have to change any thing in the router, but we had to change the client it looks...

How can I read a xml Response from T-SQL?

xml,web-services,tsql,stored-procedures

Your XML has two namespaces that matter; soap namespace declared at the root element and default namespace declared at <RegisterUserResponse> element. So you need to pass namespace prefixes mapping as parameter for sp_xml_preparedocument : declare @nsmap varchar(200) = '<root xmlns:d="http://tempuri.org/" xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/"/>' declare @iXDoc int EXEC sp_xml_preparedocument @iXDoc OUTPUT, @Response, @nsmap...

Profile/account REST API naming convention

php,web-services,api,rest,http

Your resource URIs should be more or less constant, and the HTTP verb determines what action is performed, eg: /api/orders: GET: list orders POST: create new order /api/orders/{order-id}; GET: retrieve info about an order POST: create an order with the specified ID PUT: modify an order DELETE: remove an order...

AFNetworking GET Parameters in body

ios,web-services,afnetworking-2

NSURLConnection which underlies AFHTTPRequestOperation does not allow a body in a GET request. In general GET does not allow a body even though curl does and it usually works on the server. If you want to send a body use a POST request....

Error with kSOAP2

android,web-services,wsdl,ksoap2

Have you tried simply adding property using below flavor of addProperty SoapObject request = new SoapObject(NAMESPACE, METHOD_NAME); request.addProperty("username", username); request.addProperty("deviceID", deviceID); Also, you can make sure that you have a valid value and you are not hitting any NPE while accessing userName.getText().toString()...

JAX-RS @FormParam one time for all methods

java,web-services,java-ee,jax-rs,java-ee-6

This will filter the required parameters before processing. import javax.servlet.*; import javax.servlet.annotation.WebFilter; import java.io.IOException; @WebFilter(urlPatterns = {"/*"}, description = "Filters!") public class MyFilter implements Filter { private FilterConfig filterConfig; @Override public void init(FilterConfig filterConfig) throws ServletException { this.filterConfig = filterConfig; } @Override public void doFilter(ServletRequest servletRequest, ServletResponse servletResponse, FilterChain filterChain)...

Continuing with Spring integration flow after SoapFault

web-services,spring-integration,soapfault

You can inject SoapFaultMessageResolver to the <int-ws:outbound-gateway> (fault-message-resolver). This one has pretty simple code: public void resolveFault(WebServiceMessage message) throws IOException { SoapMessage soapMessage = (SoapMessage) message; throw new SoapFaultClientException(soapMessage); } So, you failed WS invocation will end up with an Exception. Add <int-ws:request-handler-advice-chain> to your <int-ws:outbound-gateway> and place there...

Spring Boot- Producing a SOAP web service that expects application/soap+xml content type

web-services,soap,spring-boot,spring-ws,soap1.2

You need to configure Spring WS to use SOAP 1.2, as explained here: Producing SOAP webservices with spring-ws with Soap v1.2 instead of the default v1.1...

Including all @OneToMany Entities in Restful-WebService response?

java,web-services,rest,jpa,bidirectional-relation

Quick Fix: I had to change the Fetch and cascade settings for all of my @OneToMany's and @ManyToOnes' in my Entities. @XmlTransient @ManyToOne(cascade = CascadeType.PERSIST) @JoinColumn(name = "USER_ID") private Users user; @OneToMany( mappedBy = "device", fetch = FetchType.EAGER, cascade = {CascadeType.REMOVE, CascadeType.MERGE,CascadeType.PERSIST}) private List<Remotes> remotes; ...

IOS Swift Call Web Service using SOAP

ios,web-services,swift,soap

So i was being silly. The main this was that I missed setting the body of the message to the Soap request. my updated corrected code is below: // // ViewController.swift // TestWebServiceSoap // // Created by George M. Ceaser Jr on 6/2/15. // Copyright (c) 2015 George M. Ceaser...

Exclude Package From Gradle Dependency

java,web-services,rest,gradle

I found out that com.sun.jersey:jersey-core:1.19 doesn't bundle the javax.ws.rs class files and instead lists them as a compile-time dependency. Adding this snippet to my build.gradle fixed the issue. configurations.all { resolutionStrategy { // For a version that doesn't package javax.ws force 'com.sun.jersey:jersey-core:1.19' } } ...

Accessing JSON elements in PHP

php,ios,json,xcode,web-services

it's because json_decode($content, true) is returning an array, which has problems displaying if you echo the container. Try doing echo $post_data['lat']; you can also try using print_r($post_data); to have it output the actual contents of the variable so you can see if something isn't working properly...

SoapException: Host is not known, only when called from WebService

asp.net,web-services,azure

The error message was a bit of a red herring. Turns out the problem was that the external web service was throwing a 500. We solved that and the error disappeared.

understand spring-ws, integration with spring-mvc and automatic generation of wsdl

java,spring,web-services,wsdl,spring-ws

The problem is that your xsd is wrong. You should wrap your complex types in an element. <xs:element name="deliverShortMessageRequest"> <xs:complexType> <xs:sequence> <xs:element name="parameters" minOccurs="0"> <xs:complexType> <xs:sequence> <xs:element name="sms" type="tns:deliverShortMessage"/> </xs:sequence> </xs:complexType> </xs:element> </xs:sequence> </xs:complexType> </xs:element /> <xs:element name="deliverShortMessageResponse">...

Generate Web Pages For Git Repository?

git,web-services,github,server,webpage

If you're looking for something lighter-weight than GitLab, you might want to look at Gitweb, which is an official part of the Git project. It might even already be installed on your server. Gitweb is well-supported on Arch. Another possibility is Go Git Service (GOGS), which is a relative newcomer...

How to mock web service call without passing mocked class as parameter

web-services,junit,mocking

You are still instantiating a real PaymentManagerWebService in validatePaymentmsg(), so the mocks do not help. You can't mock construction of local variables with EasyMock, but you can with PowerMock. So if changing the code to receive and instance of PaymentManagerWebService is not an option, mock its construction with PowerMock. @RunWith(PowerMockRunner.class)...

Is there a command-line alternative to SOAP-UI for linux, for sending SOAP to HTTPS Service?

java,linux,web-services,soap,https

Found a guide for this here, which does load tests. For normal functional tests, the official documentation is here. A sample command for functional tests goes like: sh /opt/app/home/SOAP-UI/SoapUI-5.0.0/bin/testrunner.sh -a -s"Test_Suite2" -r -f/opt/app/home/SOAP-UI/test-project/reports/ /opt/app/home/SOAP-UI/test-project/test-soapui-project.xml ...

Soap envelope namespace prefix in Java web service

java,web-services

I think Customising JAX-WS prefix of a SOAP response summarizes your options. Option 1: I think you just need to put this above your package. @javax.xml.bind.annotation.XmlSchema(namespace = "http://schemas.xmlsoap.org/soap/envelope/", xmlns = { @javax.xml.bind.annotation.XmlNs(prefix = "soap", namespaceURI="http://schemas.xmlsoap.org/soap/envelope/") } ) Option 2: Alternatively (also mentioned in the link), you could use a SOAPHandler....

Is communication via web services standardized among JavaScript on different browsers?

javascript,web-services

If this code works in Chrome, can I assume that it will also work in other major browsers assuming you will be creating a httpRequest object and the appropriate fallback for what ever browsers you are using, then you can presume that it will work across browsers, providing the...

Use web service As Datasource in CRM reporting

web-services,reporting-services,dynamics-crm-2011,ssrs-2012

You can't use WebService as a datasource for CRM 2011. You have 2 ways - use SQL DataSource or FetchXml DataSource. You can read additional information here - https://msdn.microsoft.com/en-us/library/gg328097.aspx - same approaches would work for CRM 2011/2013/2015.

Adding Acumatica Customer Contacts

web-services,acumatica

Hope you are using Screen ID's AR303000 and CR302000, After you add the command for action "Add Contact" in customer schema and submit You may use the screen CR302000 and set the ContactID and submit first to load all information(if exists) to the schema later you add commands for the...

WCF Services In Background

c#,web-services,wcf

TLDR; Here is how I do this, I have a Program class that allows me to start my application either as Windows Service (for production) or as a Console Application (for debugging and easy testing) internal class Program { private static void Main(string[] args) { var appMgr = new ApplicationManager();...

How to make my web service url case insensitive?

web-services,wsdl,axis2

I've taken a quick look at the Axis2 code and it seems the ?wsdl extension compare is case sensitive. This thing sometimes happen. You could have a look at the code yourself and see if there is some switch somewhere to make this case insensitive (in case I missed something...

How to add object to WSDL service system.array

c#,arrays,web-services,wsdl

Why do you say the array is immutable? Does the 2nd to last line throw an error? If it is in fact immutable, you can use Array.Clone to copy the existing array and pass that. Alternatively, if the service is only expecting new/edited invoices to be passed to the SaveInvoices...

What is the advantage of using Maven for creating RESTful Web Services

java,web-services,rest,maven,web

Maven is automation tool that is designed for java projects.It will provide the structure for the java project you are building and will take care of jars. It creates a repository where it store all the jar that were downloaded automatically by your java program.If you want to see your...

Call asmx web method from master page

c#,jquery,asp.net,web-services,master-pages

The problem is due to content type and data type, just remove them from Ajax request: $.ajax({ type: "POST", url: "DevMasterEvents/masterservice.asmx/HelloWorld", success: SetTabSessionValueSucceed, error: SetTabSessionValueFailed }); Also you are ignoring the error in SetTabsessionValueFailed instead just displaying a message, which doesn't help you in debugging it. See: How do you...

How to consume multipart/form data request in C# mvc 4 webservice

c#,asp.net-mvc,web-services,wcf,asp.net-mvc-4

Check Request.Files variable. foreach (string file in Request.Files) { var postedFile = Request.Files[file]; postedFile.SaveAs(Server.MapPath("~/UploadedFiles") + pelicula.Id); } ...

Call to SOAP WebService using client certificate in objective c

objective-c,web-services,ssl,soap,client-certificates

I'll answer my own question because no one did and i've already found the solution. First of all, you need to save the certificate in the project's directory. Drag and drop the certificate from it's folder to the directory of the project in Xcode. Select "copy" and yes to the...

How to pass HTTP request to Web-Service

ajax,web-services,liferay,liferay-6,portlet

Suggesting to rethink your problem. A servlet request object does not make any sense as parameter for a web service call. Those are two totally different frameworks. A servlet request only makes sense within the processing of a servlet and is defined within that context. You are probably interested in...

How do I include a CDATA section in a WCF client webservice call in .Net?

c#,.net,web-services,wcf,cdata

Convert the XML into a Base64 string and transmit that instead. A simple re-conversion on the receiving end will give you the proper XML string.

Java-webservice: Glassfish3.0 error “org.codehaus.jackson.jaxrs.JacksonJsonProvider”

java,web-services,glassfish

I don't know your exact setup but the problem is that you are providing Jersey/Jackson 2.x libs but you are obviously using Jersey/Jackson 1.x. Note that Glassfish 3.x comes with Jersey/Jackson 1.x by default (Glassfish 4.x comes with Jersey/Jackson 2.x by default). The error message shows it can't find class...

JAXWS Client Basic Authentication

java,web-services,jax-ws

Cause of 401 Unauthorized Errors The 401 Unauthorized error is an HTTP status code that means the page you were trying to access can not be loaded until you first log on with a valid user ID and password. How To Fix the 401 Unauthorized Error Check for errors in...

Failed to load resource: the server responded with a status of 421 (Bad Request)

javascript,html,ios,web-services,cloudkit

The CloudKit.js library is a wrapper around the CloudKit Web Services, and its documentation states that an HTTP 421 happens when a request was called that required authentication, but the user was not logged in. This is expected as your app will likely need to determine if a user is...

Call php from javascript

javascript,php,html,web-services,google-maps

You're probably looking to implement AJAX. What you would do is separate the PHP code from your Javascript, and make a page that simply outputs the coordinates. You then call this page from your Javascript, and you'll get the result in a variable. The easiest (but not best as you'll...

How to call web service inside of forloop?

ios,objective-c,web-services

The web service calls could potentially take a few seconds for each call to complete, or even longer if the connection is slow or the server doesn't respond immediately. You cannot combine GUI code and synchronous code that is slow together, for example suppose your for loop is like this...

Not Able to consume external RestFul web service from Client in Eclipse or from restclient-ui

java,eclipse,web-services,restful-url,rest-client

Try setting your company's proxy using: System.getProperties().put("https.proxyHost", "proxyHost"); System.getProperties().put("https.proxyPort", "proxyPort"); Similarly for http....

PHP to WCF with SoapClient - Request Entity Too Large

c#,php,web-services,soap,soap-client

Solved! After many search and modification I finally solved the problem with a new web.config changing. How I have not client endpoints but server endpoints for all clients that communicates with my WS. I also needed to create a new service (svc and interface files in the same WCF project)...

HTTP 415 Unsupported Media Type

java,web-services,maven,jax-rs

I deleted all my dependency code in pom.xml and added following code which has jersey-core, jersey-bundle, jersey-json <dependency> <groupId>com.sun.jersey</groupId> <artifactId>jersey-bundle</artifactId> <version>1.19</version> </dependency> <dependency> <groupId>com.sun.jersey</groupId> <artifactId>jersey-json</artifactId> <version>1.19</version> </dependency> <dependency> <groupId>com.sun.jersey</groupId>...

Not able to create a WCF RestFul Service's client

asp.net,web-services,wcf,rest

I found the answer myself. In my service I had not declared an endpoint for met data exchange due to which when I was trying to add the reference of the service to the client the required app.config was not being generated. Adding the end point for metadata exchange solved...

How to do authentication using SOAP Header and PHP?

php,web-services,soap,wsdl

I found the solution. You should declare the function APIValidate in the binding in the file wsdl. <operation name='APIValidate'> <soap:operation soapAction='urn:PortfolioLookup#APIValidate'/> <input> <soap:body use='encoded' namespace='urn:PortfolioLookup' encodingStyle='http://schemas.xmlsoap.org/soap/encoding/'/> </input> <output> <soap:body use='encoded' namespace='urn:PortfolioLookup' encodingStyle='http://schemas.xmlsoap.org/soap/encoding/'/> </output> </operation> And...

Why do some servers run both Tomcat and also Apache Web Server?

java,apache,web-services,tomcat

Tomcat is a fine Servlet container, but there are a lot of things an Apache httpd can do better (easier and/or faster). For example Apache can handle security, SSL, provide load balancing, URL rewriting etc. You can also split content: you can have your Apache httpd to serve static content...

Basic Inheritance in PHP Child & Parent Class

php,web-services,class,oop,inheritance

You don't have to make them a parent - child relationship. In fact, if anything, it sounds like you need dependency injection instead class Activity { /** @var \Opportunity */ protected $opportunity; public function __construct(\Opportunity $opportunity) { $this->opportunity = $opportunity; } public function run() { $this->opportunity->doSomething(); } } $activity =...

Push notification to android from ASP.NET webservices

android,asp.net,vb.net,web-services,google-cloud-messaging

Seems as if something with the authentication did not work. According to the guide, your API key is not valid: If you receive a 401 HTTP status code, your API key is not valid See also this answer for possible causes for 401 when using GCM: http://stackoverflow.com/a/11903863. It refers to...

Error deploying yii2-starter-kit Yii2 installation

web-services,yii2

The Yii2-Starter-Kit is not ready to work in a single-domain installation. You must enable, for example: backend.website.com, storage.website.com and the frontpage www.website.com The installation guide, specifies this. You can use this guide, to setup your single-domain installation (remember that the yii2-starter-kit also uses the storage folder!). Have a great week....

Is JSON better than XML? Which one is more secured? [duplicate]

android,json,xml,web-services,rest

In compare to JSON and XML , there is no difference in security but JSON is much faster than XML thats why we prefer JSOn over XMl...But if you see from security point of view than you can go for SOAP

USBHIDDRIVER works in Visual Studio debug mode but not when deployed to IIS

web-services,iis,wcf-security,hid,windows-security

In order to resolve the problem I had to turn on "Enable 32-Bit Applications" for the website. Believe the problem is related to the DLL's that are used but USBHIDDRIVER

Giving a prepared SOAP response by Java

java,xml,web-services,soap

Sure you can. Even within the same Java program. Use Java HTTP Server. few lines of code and you have functional http server.

WebMethod having array as a parameter

asp.net,web-services

string[] it's not a primitive type, as String, o a Integer are. Maybe you can try SoapUI (http://www.soapui.org). Or you can place it into a test ASPx page, as a static method, and try it so, vía JS: function test() { PageMethods.Concat(array_values,integer1,integer2); } function test_callback(result){ alert(result); } ...

Responsive Websites - Is important or not for increase your business?

web-services,responsive-design

Both responsive and adaptive design attempt to optimize the user experience across different devices, adjusting for different viewport sizes, resolutions, usage contexts, control mechanisms, and so on. Responsive design works on the principle of flexibility. The idea is that a single fluid design based upon media queries, flexible grids, and...

Spring service and Spring web app in one

spring,web-services,rest,spring-mvc,web

yes that is possible to combine with web-app for example your controller package into your restful controller also work that is possible to crud operation via restful web service....

Spring RequestBody Mapping maps all attributes to null values

java,spring,web-services,rest,mapping

Try with first letter in lowercase for parameters { "name":"testLabel", "label":"testName", "annualBudget":9000 } Spring relies heavily on standard Java naming conventions, so I suggest you also follow them. In your example, you should name your class fields with lowercased first letter....

I am trying to load my servlet in the browser and it gives me this error

java,html,xml,web-services,servlets

You have to take following steps: 1. Remove <Servlet> and <servlet-mapping> tags and anything in between them. Since you have used @WebServlet annotation. There is no need to declare those tags in web.XML. In your form tag replace action attribute to: action="Lesson41" Don't try to call the Servlet directly through...

How to implement Facebook Realtime Update Subscription with callback URL [closed]

java,facebook,web-services,restfb

Configure Facebook app and then install the app on Facebook pages/users that you want updates for. We need to maintain a callback URL for Facebook to be able to post updates. Jersey based implementation as an example: @Path("/social/facebook/update") public class FacebookRealtimeAPIResource { private static final String HUB_MODE = "hub.mode";...

The remote server returned an unexpected response: (413) Request Entity Too Large.?

c#,web-services,wcf

Try this, <bindings> <basicHttpBinding> <binding maxBufferPoolSize="2147483647" maxBufferSize="2147483647" maxReceivedMessageSize="2147483647" messageEncoding="Text"> <readerQuotas maxDepth="2000000" maxStringContentLength="2147483647" maxArrayLength="2147483647" maxBytesPerRead="2147483647" maxNameTableCharCount="2147483647" /> </binding> </basicHttpBinding> </bindings> Instead of these lines in your code, <bindings> <basicHttpBinding> <binding name="SampleBinding"...

IOS Swift Soap Message with Ampersand in value

ios,web-services,swift,soap,encoding

So after some digging I finally found a suitable answer. XML / SOAP apparently support the ability to indicate that a value can contain special characters. You do this by enclosing the value in a CDATA element. For example, if I had a value for an XML node named Characters...

Not able to hit 2nd services with generated Token

c#,web-services,rest,soap,drupal-services

Finally i figured out what was the issue i was creating new cookie container for both the request request.CookieContainer = new CookieContainer(); thus server was unable to authenticate Error was resolved by using this code CookieContainer cookieJar = new CookieContainer(); private void CreateObject() { try { string abc = "";...

Parse error with empty date from webservice

c#,web-services

Yes, your assumption is correct. minOccurs="0" means that the element can be omitted altogether. So, the following two options would be correct: <SomeType> <StartDate>2015-01-01</StartDate> </SomeType> <SomeType> <StartDate>2015-01-01</StartDate> <EndDate>2015-01-02</EndDate> </SomeType> It does not mean that an empty string for EndDate becomes a valid entry. Thus, the following is not correct: <SomeType>...

Camel Multicast; Direct and AMQ

java,web-services,soap,apache-camel,activemq

Ok so I took the lead from Cyaegha (Thank you) and I generated POJO's using wsdl2java using the answer below. Solution for wsdl2java serialization Using these POJO's which implement Serializable interface now works! Happy times! =)...

call bpel process from jsp

web-services,jsp,bpel

I finally managed to genereate the client, I really don't understand why but I just had to reinstall Tomcat and ODE, I should have thought about it sooner, it drove me nuts!

Spring Webservices gives 406 error

java,spring,web-services,spring-mvc

You are trying to return a List of Student objects in your controller. So, create a wrapper class with JAXB annotations and use that wrapper class while returning from your controller to fix the issue. For example, create the class like this: @XmlRootElement public class WrapperList<T> { private List<T> list;...

How to send json data using post method in android?

android,json,web-services

do this : InputStream is = null; String result = ""; try{ HttpClient httpclient = new DefaultHttpClient(); HttpPost httppost = new HttpPost(url); List<NameValuePair> nameValuePairs = new ArrayList<NameValuePair>(); nameValuePairs.add(new BasicNameValuePair("data","your data")); Log.e("",String.valueOf(nameValuePairs)); httppost.setEntity(new UrlEncodedFormEntity(nameValuePairs)); HttpResponse response = httpclient.execute(httppost); HttpEntity entity = response.getEntity(); is = entity.getContent(); }catch(Exception e){...

JAX-RS service response is returning double fields without decimal places

java,json,web-services,jax-rs

Well, that's not how JAX-RS marshall your response, that's how JavaScript works. Try something like this in console: var a = 2.0; console.log(a); You will see 2 as an output. Should be part of ECMA specification, but I cannot find exact place. If you want, you could use toFixed method...

Same function for updating and Saving?

c#,asp.net-mvc,web-services

How about something along these lines: var UpdateDefCmpnyId = (from CmpnyId in db.DefCompanies where CmpnyId.Id == DefCmpny.Id select CmpnyId).FirstOrDefault(); if(UpdateDefCmpnyId == null) { //insert //(handle the id however you need to for insert. depending on your setup, you might be able to leave it empty and let the database put...

How do I figure out when the contents of NSData indicate that a webservice request has failed?

ios,objective-c,web-services,cocoa-touch,nsobject

Create an NSError object and pass it as argument to the sendSynchronousRequest: method, then if there is network or another error, the err object will populated with error information hence it will not be nil. That means you can check if(!err)contiune else there is an error check the code: NSMutableURLRequest...

Can not send Captcha image through nusoap webservice

php,web-services,nusoap,simplecaptcha

You need to give your imagepng() function another parameter to save the picture then with Get_file_content() function get the content of your image file then encode it to base64 to send via webservice in xml format. include_once('captcha.php'); class getCaptcha extends DBM { public function getcaptcha($dump) { //creating and generating captcha...

Calling java webservice from Android using ksoap2: parameters are all null

java,android,web-services,jax-ws,android-ksoap2

Well, after hours of changing namespaces/method names/annotations etc, I found the problem by comparing the request generated by soapUI and the one that was arriving at my server. The problem lies in the property names. Setting them the same as the parameter names in the jax-ws webservice doesn't work unless...

Embedded Web Service on Android device

java,android,web-services,rest,android-webservice

You should check whether Restlet is compliant with android, not just from server side code, but also from client side code (respectively). This means for example that every JAR that Restlet framework depends on has to contain code that is compliant with Android. An alternative approach would be to...

Sending Image From Android to C# webservice

c#,android,web-services,encoding,android-image

I figure it out I didn't Canvas it before sending it to server. use this too Canvas canvas = new Canvas(mBitmap); v.draw(canvas); public void save(View v) { mBitmap = Bitmap.createBitmap(v.getWidth(), v.getHeight(), Bitmap.Config.RGB_565); ByteArrayOutputStream outputStream = new ByteArrayOutputStream(); mBitmap.compress(Bitmap.CompressFormat.JPEG,40, outputStream); byte[] imgByte = outputStream.toByteArray(); String base64Str = Base64.encodeToString(imgByte, Base64.DEFAULT); Canvas canvas...