soap

Arrays in SOAP method Parameters generated via JAX-WS?

喜夏-厌秋 提交于 2020-01-02 07:46:10
问题 I am building a SOAP service in Java with JAX-WS annotations. Among other things I wonder how to annotate array parameters in my methods. At the moment when I generate a wsdl from my annotated interface and then generate java classes again from that wsdl (I do that for testing, in both cases using Apache cxf), it will generate Classes to hold the array parameters. Example: @WebService(name="sillyService", ... ) @SOAPBinding(style=SOAPBinding.Style.DOCUMENT, use=SOAPBinding.Use.LITERAL,

How to throw Soap Fault manually in mule

旧时模样 提交于 2020-01-02 07:27:49
问题 I'm face with a situation where we cannot use schema to validate incoming request (basically schema is there but it accepts any String in request, wsdl designers have their own reasons to do that to accept request from different sources and flexibility). But when the request is received, I validate that the child element of request wrapper is what we expect (using XPath for that). Now if the child element is not what expected, I'd like to throw Soap Fault with Client code and may be include

After creating a wcf service how do I tell whether its restful or soap from the wsdl?

一个人想着一个人 提交于 2020-01-02 05:37:07
问题 I created a service and I'm presented with a page saying: You have created a service. To test this service, you will need to create a client and use it to call the service. You can do this using the svcutil.exe tool from the command line with the following syntax: But how do I tell if its a SOAP or a REST service from that? How would I tell from the wsdl etc? Service config: <services> <service name="VLSContentService" behaviorConfiguration="VLSContentServiceBehaviour" > <endpoint name="rest"

[iPhone-APP]手机归属地查询软件

青春壹個敷衍的年華 提交于 2020-01-02 05:35:42
无聊。周末写几个APP玩,终于在上午把网络折腾好了。5块钱的8139网卡让我时常能在MAC下上网。 图标简陋啊。。。 技术要点: 1。组一个SOAP包。用NLURLConnection连接。 2。找一个webservice。 http://webservice.webxml.com.cn 3。解析XML。 4。显示,拖拽控件。 随便贴点组SOAP包头,发送的Code NSString * soapMessage = [NSString stringWithFormat: @" <?xml version=\ " 1.0 \ " encoding=\ " utf - 8 \ " ?>\n " " <soap:Envelope xmlns:xsi=\ " http: // www.w3.org/2001/XMLSchema-instance\" xmlns:xsd=\" http://www.w3.org/2001/XMLSchema \" xmlns:soap=\" http://schemas.xmlsoap.org/soap/envelope/ \">\n" " <soap:Body>\n " " <getMobileCodeInfo xmlns=\ " http: // WebXml.com.cn/\">\n" " <mobileCode>%@</mobileCode>\n "

Access web service from GWT

自作多情 提交于 2020-01-02 04:47:11
问题 Is there any way how I can access a web service from GWT using its WSDL? Previously I was trying to use the generated classes from ws-import.... but then someone pointed out to me that GWT cannot handle all Java, just a subset of it, hence it won't understand the ws-import classes. Thanks and regards, Krt_Malta 回答1: GWT can access web services using a RequestBuilder, which makes HTTP calls to a service and then gets access to its response. Since your web service is using SOAP, the response

How to change “SOAP-ENV” default prefix of Spring-WS

≡放荡痞女 提交于 2020-01-02 03:44:06
问题 I've created a web service using Spring-WS. To maintain compatibility with the old system, I need to change namespace prefix from SOAP-ENV to soap . I know that SOAP-ENV and soap are just namespace prefixes. As long as they refer to the correct namespace ( "http://schemas.xmlsoap.org/soap/envelope/" ), it should be fine. But the old system hard coded the parser code to expect only soap namespace prefix. Current response: <SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap

BigDecimal has scientific notation in soap message

心不动则不痛 提交于 2020-01-02 03:20:10
问题 I have got strange problem with our webservice. I have got object OrderPosition which has got a price (which is xsd:decimal with fractionDigits = 9). Apache CXF generate proxy classes for me, and this field is BigDecimal. When I'd like to send value greater than 10000000.00000, this field in soap message has got scientific notation (for example 1.1423E+7). How can I enforce that the value has not been sent in scientific notation. 回答1: Here is one way this can be done. BigDecimal has a

401 Authentication Error when SoapClient tries to fetch schema file

◇◆丶佛笑我妖孽 提交于 2020-01-02 03:00:50
问题 My application routinely connects to a third-party server to fetch data via SOAP/WSDL: $this->soap_client = new SoapClient("https://[the-domain]:443/[path]?wsdl", array( 'trace'=>1, 'login'=>$this->username, 'password'=>$this->password, 'exceptions' => true, 'cache_wsdl' => WSDL_CACHE_NONE ) Everything has been great for the last year, but they recently updated their WSDL file and now when the application tries to connect I'm getting the following two errors : SoapClient::SoapClient(http://

网络协议 21 - RPC 协议(中)- 基于 JSON 的 RESTful 接口协议

微笑、不失礼 提交于 2020-01-02 01:59:20
原文: 网络协议 21 - RPC 协议(中)- 基于 JSON 的 RESTful 接口协议     上一节我们了解了基于 XML 的 SOAP 协议,SOAP 的 S 是啥意思来着?是 Simple,但是好像一点儿都不简单啊! 传输协议问题     对于 SOAP 来讲,比如我创建一个订单,用 POST,在 XML 里面写明动作是 CreateOrder;删除一个订单,还是用 POST,在 XML 里面写明了动作是 DeleteOrder。其实创建订单完全可以使用 POST 动作,然后在 XML 里面放一个订单的信息就可以了,而删除用 DELETE 动作,然后在 XML 里面放一个订单的 ID 就可以了。     于是上面的那个 SOAP 就变成下面这个简单的模样。 POST /purchaseOrder HTTP/1.1 Host: www.cnblog.com Content-Type: application/xml; charset=utf-8 Content-Length: nnn <?xml version="1.0"?> <order> <date>2018-07-01</date> <className> 板栗焖鸡 </className> <price>58</price> </order>     而且 XML

SOAP Webservice和RESTful Webservice

a 夏天 提交于 2020-01-02 01:45:43
REST是一种架构风格,其核心是面向资源,REST专门针对网络应用设计和开发方式,以降低开发的复杂性,提高系统的可伸缩性。REST提出设计概念和准则为: 1.网络上的所有事物都可以被抽象为资源(resource) 2.每一个资源都有唯一的资源标识(resource identifier),对资源的操作不会改变这些标识 3.所有的操作都是无状态的 REST简化开发,其架构遵循CRUD原则,该原则告诉我们对于资源(包括网络资源)只需要四种行为:创建,获取,更新和删除就可以完成相关的操作和处理。您可以通过统一资源标识符(Universal Resource Identifier,URI)来识别和定位资源,并且针对这些资源而执行的操作是通过 HTTP 规范定义的。其核心操作只有GET,PUT,POST,DELETE。 由于REST强制所有的操作都必须是stateless的,这就没有上下文的约束,如果做分布式,集群都不需要考虑上下文和会话保持的问题。极大的提高系统的可伸缩性。 对于SOAP Webservice和Restful Webservice的选择问题,首先需要理解就是SOAP偏向于面向活动,有严格的规范和标准,包括安全,事务等各个方面的内容,同时SOAP强调操作方法和操作对象的分离,有WSDL文件规范和XSD文件分别对其定义。而REST强调面向资源