web-services

WSO2 API Manager - Replace URLs in response body

喜欢而已 提交于 2020-01-06 03:13:30
问题 I'm trying to setup a proxy for my RESTful API using WSO2 API Manager. My problem is that the responses from the backend API are left untouched so all the urls that connect to other endpoints still reference the backend server rather than the proxy. I need a way to replace those url values in the response body to point to the proxied api. I understand this can be accomplished via Mediation Extensions, using ESB Mediators. I'm not familiar enough with them to pick the one better suited for the

Is creating separate XSD type for data item key good Web Service design, when data item can be identified by multiple attributes?

荒凉一梦 提交于 2020-01-06 02:38:27
问题 I have specified like this because I want different consumers to be able to identify data differently. External consumers don't know about id and internal do. <!-- all are minoccurs=0 because only data present will be updated --> <xs:complexType name="tSomeData"> <xs:sequence> <xs:element name="id" type="xs:int" minOccurs="0"/> <xs:element name="name" type="xs:string" minOccurs="0"/> <xs:element name="externalname" type="xs:string" minOccurs="0"/> <xs:element name="manufacturer" type="xs

Create webservice on Android device with cxf?

核能气质少年 提交于 2020-01-06 02:28:25
问题 I was able to create webservice in desktop java using Apache CXF. However i need it to working on Android device. The problem is that java.ws package is absent in Android. I've copied all required jar with java.ws classes into libs folder of android project , but while dexing (building of the app in IDE) i'm having the next errors: Error:Android Pre Dex: [android-ws-combine.jar] trouble processing "javax/xml/bind/Binder.class": Error:Android Pre Dex: [android-ws-combine.jar] Ill-advised or

Create webservice on Android device with cxf?

吃可爱长大的小学妹 提交于 2020-01-06 02:28:08
问题 I was able to create webservice in desktop java using Apache CXF. However i need it to working on Android device. The problem is that java.ws package is absent in Android. I've copied all required jar with java.ws classes into libs folder of android project , but while dexing (building of the app in IDE) i'm having the next errors: Error:Android Pre Dex: [android-ws-combine.jar] trouble processing "javax/xml/bind/Binder.class": Error:Android Pre Dex: [android-ws-combine.jar] Ill-advised or

Sharing data between CXF interceptor and webservice

谁都会走 提交于 2020-01-06 02:20:08
问题 I'm using security interceptors with Apache CXF WSS4JInInterceptor . Is there any way to pass data from interceptor to webservice? I've been searching for that in WebServiceContext but I can't find it. 回答1: You can use the CXF Exchange Map to store arbitrary key/value pairs. The Exchange is available to both input and output messages. In your interceptor, add the object to the Exchange, e.g. Object value = ...; message.getExchange().put("key", value); Within your service, you can use

Non-static webapp alias

醉酒当歌 提交于 2020-01-05 23:59:05
问题 I would like to know, if there is a clean way to have a request answered by a webapp whose name does not appear in the request url. In a way, the url should be an alias of the webapp. Also, the alias should not be static or fixed with this single webapp but rather I need to be able to change the webapp behind the alias easily for version increments. The things, that come to my mind are build a "facade" webapp to redirect requests rename the complete webapp Both ideas don't lead to the desired

WCF with Http Basic Authentication

爱⌒轻易说出口 提交于 2020-01-05 17:43:12
问题 I'm building a webservice that needs to be accessible to a variety of potential platforms, including a number of older ASP and ASP .NET applications. After some research, I settled on a WCF service with both a REST (webHttpBinding) and SOAP (wsHttpBinding) endpoint (that way, I can support a wide range of platforms and still make the .NET coders happy). For security, I'm using SSL and HTTP Authentication Basic against my own database of username/passwords. So I've written an HttpModule to

WCF with Http Basic Authentication

蹲街弑〆低调 提交于 2020-01-05 17:42:27
问题 I'm building a webservice that needs to be accessible to a variety of potential platforms, including a number of older ASP and ASP .NET applications. After some research, I settled on a WCF service with both a REST (webHttpBinding) and SOAP (wsHttpBinding) endpoint (that way, I can support a wide range of platforms and still make the .NET coders happy). For security, I'm using SSL and HTTP Authentication Basic against my own database of username/passwords. So I've written an HttpModule to

Object hasn't in property - php soap wsdl

六眼飞鱼酱① 提交于 2020-01-05 15:35:44
问题 Every time I try to make a call to my webservice, through the wsdl, I get the error message shown here. I think it's probably an issue within the the WSDL defintion, because I am not really sure what I am doing within the WSDL definition to begin with: PHP Fatal error: SOAP-ERROR: Encoding: object hasn't 'in' property in /www/zendserver/htdocs/dev/csc/csc.php on line 10 I have a very simple web service, located at: http://192.168.1.2:10088/csc/csc.php <?php function EchoText($text){ return

send email to localhost from localhost via python

会有一股神秘感。 提交于 2020-01-05 15:18:11
问题 I'm building and testing a web service on my local machine before i put it in production. I want to test the mail service. I'm using the standard python email and smtplib libraries. import smtplib from email.mime.text import MIMEText fp = open('textfile', 'rb') msg = MIMEText(fp.read()) fp.close() me = 'me_email@localhost' you = 'me_again_email@localhost' msg['Subject'] = 'The contents of %s' %fp msg['From'] = me msg['To'] = you s = smtplib.SMTP('localhost') s.sendmail(me, [you], msg.as