web-services

send email to localhost from localhost via python

筅森魡賤 提交于 2020-01-05 15:16:56
问题 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

what would be the proper way to automate an xml import

别来无恙 提交于 2020-01-05 15:12:59
问题 I've written a script that imports data from an xml file into the mysql database by selecting it from the source disk and uploading it via a button submital. But what if a 3rd party application were to be used to automate this import. Would it be proper to check if a get parameter of a xml path exist and grab its content and import the same way i did before? or is there a better method? by get parameter i mean like this: http://domain.com/import.php?path=externaldomain.com/xml/page.xml 回答1:

what would be the proper way to automate an xml import

北战南征 提交于 2020-01-05 15:12:46
问题 I've written a script that imports data from an xml file into the mysql database by selecting it from the source disk and uploading it via a button submital. But what if a 3rd party application were to be used to automate this import. Would it be proper to check if a get parameter of a xml path exist and grab its content and import the same way i did before? or is there a better method? by get parameter i mean like this: http://domain.com/import.php?path=externaldomain.com/xml/page.xml 回答1:

Mismatch between between client and server - Soap

南楼画角 提交于 2020-01-05 12:28:13
问题 Server is running on Content-Type : Text/xml(soap 1.1) while client is trying to communicate using application/soap+xml(soap 1.2) . This is throwing following http error HTTP/1.1 415 Unsupported Media Type Date: Thu, 24 Jul 2014 15:35:02 GMT Content-Length: 0 X-Powered-By: Servlet/3.0 JSP/2.2 So is there any way to resolve this issue? The webservice is jax-ws webservice deployed on weblogic server configuration. We would like the issue to be resolved with changing the client code. How can we

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

感情迁移 提交于 2020-01-05 10:02:52
问题 I pass some values to my WCF service from the .net application in string format. Passing string format will be in this structure, ItemName~ItemDescription~ItemPrice|ItemName~ItemDescription~ItemPrice|... Every line item will be separated by '|' character. I was passing nearly 1000 items. It was working as expected, but when I came to pass 1500 items, this error occurs. The remote server returned an unexpected response: (413) Request Entity Too Large. Please help me in fixing this error. This

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

自作多情 提交于 2020-01-05 10:02:17
问题 I pass some values to my WCF service from the .net application in string format. Passing string format will be in this structure, ItemName~ItemDescription~ItemPrice|ItemName~ItemDescription~ItemPrice|... Every line item will be separated by '|' character. I was passing nearly 1000 items. It was working as expected, but when I came to pass 1500 items, this error occurs. The remote server returned an unexpected response: (413) Request Entity Too Large. Please help me in fixing this error. This

webHttpBinding with certificate

故事扮演 提交于 2020-01-05 09:14:16
问题 I am trying to secure a self hosted service. Calling the service returns this: The underlying connection was closed: An unexpected error occurred on a receive. The service endpoint looks like this <endpoint address="https://MACHINE:8010/rest/users" binding="webHttpBinding" bindingConfiguration="certificate" contract="Online.DomainObjects.Remote.IUserManagerRemote" /> I have done this to open up access: netsh http add urlacl "url=https://+:8010/" user=BUILTIN\Users I have turned WCF tracing on

WebMethod in my webservice should return a dataset and yet returns an array?

限于喜欢 提交于 2020-01-05 08:59:43
问题 [WebMethod] public DataSet GetPopularFlavors() { return Helper.PopularItems(); } localhost.Statistics s = new localhost.Statistics(); topItems.DataSource = s.GetPopularFlavors(); And just for the record, im kind of new at this so im really sorry if im doing something that is obviously wrong... 回答1: Web services by default return json ("stringed" objects). They can return XML too, if specified. A DataSet is complex and should be broken down into tables perhaps, or something smaller that can be

Is it bad design to have a link in email message result in no browser action when clicked?

瘦欲@ 提交于 2020-01-05 08:50:52
问题 Original post: This web application sends out emails which contain a link to a URL. Correction-Clarification 9/17/2014: An .EXE running as a scheduled task on a server (in "support" of the web app and connecting to same database) sends out emails which contain a link to a URL. The nature of the email content is essentially a "reminder"; the link when clicked is essentially an acknowledgement signaling "done". Resumption of original post follows: Clicking the link in the email does 2 things at

WebServices on Unity, Dll, compatibility with .Net 4.0

99封情书 提交于 2020-01-05 08:42:45
问题 I'm trying to use web services on unity. I used svcutil to generate a proxy class, however the proxy class was using "System.Threading.Tasks". I noticed that System.Threading.Tasks wasn't aviable on .Net 3.5. So I went to player setting and I changed to .Net 4.x But now I have an other issue, and I cannot find a way to fix it, I need to use System.Web.dll and System.Web.Services.dll to make my web service work, however, the dll that are include in Program Files\Unity\Editor\Data\Mono\lib\mono