web-services

Error “No corresponding start element is open.” when calling a webservice : where to start?

冷暖自知 提交于 2020-01-03 04:34:14
问题 I am consuming a webservice and out of the blue it's suddently failing with the following error: System.InvalidOperationException was caught Message="No corresponding start element is open." Source="mscorlib" The webservice is called correctly and returns a normal response (as checked with fiddler) with valid xml. I have a hunge I am missing a data element somewhere in my generated soap client but don't know where to start since I can not step into the autogenerated soap client code.. After a

org.apache.axis2.AxisFault: Transport out has not been set

青春壹個敷衍的年華 提交于 2020-01-03 04:27:05
问题 I have a big problem with WS with Axis2 use case (localhost server, no internet access [under proxy]) : I have created a little local web service and a client which calls this service.... endpoint is something like this "http://localhost:8080/MyService" that's all ok: client requests and server responses!! i'm bas***d and i want test my client, so i have changed endpoint in "http://localhost:8082/MyService" (port is changed) that's all ok: client requests...and it goes in timeout...no service

How to send XML soap request using php curl

半城伤御伤魂 提交于 2020-01-03 04:25:11
问题 I am sending request through soap using php curl getting java Exception. When I request for response I am getting error. I tried a lot at my end but problem is not solve. $soap_request = "<?xml version=\"1.0\"?>"; $soap_request .= "<soap:Envelope xmlns:soap=\"http://schemas.xmlsoap.org/soap/envelope/\">\n"; $soap_request .= " <soap:Body>\n"; $soap_request .= " <RevodocLead xmlns='http://localhost/'>\n"; $soap_request .= " <inode>\n"; $soap_request .= " <version>1.0</version>\n"; $soap_request

“Add Service Reference” is failing in VS

送分小仙女□ 提交于 2020-01-03 03:42:11
问题 In MS's Visual Web Developer, I have a completely default ASP.NET web service project and another project. When use the right click menu on the second project to run "Add Service Reference", I can find the first project listed as an option but I get an error when I attempt to select it, I get an error Metadata contains a reference that cannot be resolved: 'http://0.0.0.0:3495/Service1.asmx?wsdl'. There was an error downloading 'http://0.0.0.0:3495/Service1.asmx?wsdl'. Unable to connect to the

model exist or not in YII using a custom function - Performance

风流意气都作罢 提交于 2020-01-03 03:39:07
问题 I am writing an REST API and need to check weather the given model name exist or not in the directory. 1 - http://example.com/RestApi/index.php/api/posts/ 2 - http://example.com/RestApi/index.php/api/post/ from these two, URL 1 is incorrect and URL 2 is correct (post). so i am taking this param and doing a search as following, $model = $m::model()->findAll($criteria); $m = TK::get('model'); when $m is incorrect, PHP warning include(posts.php): failed to open stream: No such file or directory

SOAP - nillable=“true”

对着背影说爱祢 提交于 2020-01-03 03:38:10
问题 I am building a web service using the Zend Framework. I am using the Zend_Soap_AutoDiscover class for the generation of my WSDL. I am using various complex type in this web service form example: StockItemEntity Class class StockItemEntity { /** @var string */ public $sStockCode; /** @var string */ public $sQty; public function __construct($sStockCode, $sQty){ $this->sStockCode = $sStockCode; $this->sQty = $sQty; } } WSDL Definition <xsd:complexType name="StockItemEntity"> <xsd:all> <xsd

Generate token for access server resources

試著忘記壹切 提交于 2020-01-03 03:16:10
问题 I am trying to generate token at run time using sign certificate and verify that token on server to access any resources. I don't want to store token in XML file because it is available after reverse engineering of APK Code for generating token is public String getToken() { Signature[] sigs; try { sigs = context.getPackageManager().getPackageInfo(context.getPackageName(), PackageManager.GET_SIGNATURES).signatures; String token = sigs[0].toCharsString(); return token; } catch (Exception e) { e

Spring-ws using custom schema for SOAP Faults

三世轮回 提交于 2020-01-03 03:11:09
问题 I am working on creating a web service using Spring-WS. And i am using the validation framework provided by Spring-WS to validate the request. When there are validation errors, the web service returns a SOAP fault with the validation errors in the detail element of the SOAP Fault. I'd like to know if there is a way we can send a custom response(message with my own schema) instead of a SOAP Fault response? If so, i'd be grateful if you can describe how i can achieve this. I have checked the

Web service: RPC vs. RESTful = CISC vs. RISC?

人盡茶涼 提交于 2020-01-03 02:50:08
问题 I read some discussions about RPC style and RESTful web services. So far I have the following 2 thoughts: The argue between RPC and REST seems kind of similar to the argue between CISC and RISC instruction architecture. RPC looks forward to using a more complex vocabulary while REST just use a few common verbs. The REST style just introduce the HTTP protocol as the middle-layer between client and server in the hope to decouple the 2 parties. Just like David Wheeler said: All problems in

How to attach a file (pdf, jpg, etc) in a SOAP POST request?

给你一囗甜甜゛ 提交于 2020-01-03 02:46:08
问题 I have the next method: public String uploadFile(String body, File uploadFile) throws Exception { String xmlBody = startEnvelopeTag + body + endEnvelopeTag; URL urlObj = new URL(urlWS); HttpURLConnection connection = (HttpURLConnection) urlObj.openConnection(); connection.setRequestProperty("Connection", "Keep-Alive"); connection.setRequestMethod("POST"); connection.setRequestProperty("SOAPAction", action); connection.setDoInput(true); connection.setDoOutput(true); connection.setUseCaches