soap

Savon: Array of XML tags

不问归期 提交于 2019-12-24 04:54:10
问题 I'm using Savon for SOAP requests and in some place of the SOAP request XML, I need to generate this piece of code: <content> <item a="1" b="0"/> <item a="2" b="0"/> <item a="3" b="0"/> </content> What's the best way to do this? 回答1: I have found the solution. soap.body = { #... other tags "content" => { "item" => ["", "", ""], :attributes! => { "item" => { "a" => ["1", "2", "3"], "b" => ["0", "0", "0"] } } } #... other tags } 回答2: Savon v0.9.7 comes with improved support for Builder and I

Ruby How to know what to rescue?

霸气de小男生 提交于 2019-12-24 04:39:04
问题 I'm using eurovat gem to check a VAT number. Eurovat.check_vat_number vat_number If I run that from irb, sometimes I receive this: SOAP::FaultError: MS_UNAVAILABLE from (Nothing appear after "from") I want to write a begin rescue block to rescue those error, but how I do know what to rescue? I have tried with rescue SOAP::FaultError but didn't works 回答1: I found the way after a bit of testing: rescue SOAP::FaultError => e if e.message == "MS_UNAVAILABLE" # @ToDO handle service unavailable

How to use XQuery/T-SQL to parse customer xml that contains nested default namesapces

萝らか妹 提交于 2019-12-24 04:21:58
问题 I have a customer using a platform we have developed that allows customer webservice return data to be parsed by a stored procedure in MSSQL. We have a customer sending xml back that contains nested xmlns="xxxxxx" declarations that are to different URI locations. First off is this valid? And secondly is it possible to parse using XQuery? I have tried using both .value and .query capabilities of the t-sql xml datatype to try to work through the issue but the point where the "second default

SoapServer send response without envelope

做~自己de王妃 提交于 2019-12-24 04:21:50
问题 I would like to send a soap response which is pure xml i.e without a soap envelope. This is my current response <SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" xmlns:ns1="http://tempuri.org/"> <SOAP-ENV:Body> <ns1:getMemberResponse> <User> <ValidationErrors/> <IsDeleted>false</IsDeleted> <ID>1691</ID>...... However, this is the response I would like to send <User xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema">

Append an element to an already existing SOAP::Data complex type

。_饼干妹妹 提交于 2019-12-24 04:12:05
问题 I'm very new to SOAP, PERL and pretty much everything else I've been asked to do so I'm hoping someone can point me in the right direction. I've implemented a simple WCF solution and I've written a PERL client which passes a "complex data structure" to the solution using SOAP::lite and SOAP::Data. All this works very well so far, WCF solution see's the array as an array and I'm able to iterate through the array on the server side just fine. However, I'm having an issue trying to append a data

Append an element to an already existing SOAP::Data complex type

情到浓时终转凉″ 提交于 2019-12-24 04:11:52
问题 I'm very new to SOAP, PERL and pretty much everything else I've been asked to do so I'm hoping someone can point me in the right direction. I've implemented a simple WCF solution and I've written a PERL client which passes a "complex data structure" to the solution using SOAP::lite and SOAP::Data. All this works very well so far, WCF solution see's the array as an array and I'm able to iterate through the array on the server side just fine. However, I'm having an issue trying to append a data

PHP Soap ssl how to trust self-signed certificate

不打扰是莪最后的温柔 提交于 2019-12-24 04:09:07
问题 I am making a client in php with soap for a webservice in .net. The webservice run over https with a self-signed certificate and for the tests I must trust this certificate without install it. The problem is that I allways get this error: SOAP-ERROR: Parsing WSDL: Couldn't load from 'https://winsystemsintl.com:54904/PSAService.svc?wsdl' : failed to load external entity "https://winsystemsintl.com:54904/PSAService.svc?wsdl". Here is my code: $opts = [ 'ssl' => [ // set some SSL/TLS specific

Using SOAP web service object as a model in ASP.NET MVC 2

江枫思渺然 提交于 2019-12-24 04:02:13
问题 Good day! I've existing web service I need to call from controller's action. My web service method looks like this: MyWebServiceMethod(MyWebServiceClass param1) . Is it possible to use MyWebServiceClass directly in MVC, I mean attach DataAnnotations (the web services classes are partial) for validation and create action like this: [HttpPost] public ActionResult MyAction(MyWebServiceClass param1) { } Or I should create separate ViewModel class and copy data to MyWebServiceClass instance after

JAX-WS fails to unmarshal in an OSGI environment

独自空忆成欢 提交于 2019-12-24 03:59:23
问题 I've been tasked with updating a plugin for Cytoscape, a biological visualization software platform, to the latest version of the Cytoscape API. Cytoscape 3.x uses an OSGI framework (Karaf 2.2.x, I think) to interface with its plugins (which are now called "apps"). The plugin/app is actually a client that uses JAX-WS to communicate with an external server. But for some reason, despite the absence of any error messages, it fails to unmarshal the SOAP messages that it's getting. The desired

Overcome Encoding Problems with PHP, SoapServer, UTF-8, and non English Characters?

谁说胖子不能爱 提交于 2019-12-24 03:19:26
问题 I'm having problems getting PHP to play nicely with SoapServer + UTF-8. Anytime anyone sends a Soap Request with non english characters (i.e. funny quotes, accented characters, etc) the SoapServer throws an exception saying "Bad Request." I've tried decoding the request with utf8_decode and even HTML Special Characters encoded the text. Nothing is working for me. I'm looking for a point in the right direction because I'm lost at the moment. 回答1: make sure both SoapServer and SoapClient are