web-services

Java SOAP client stub generation with service endpoint determined at runtime

邮差的信 提交于 2020-01-05 03:16:40
问题 Previously, I've written SOAP clients in Python and used the SUDS library. Without getting into the details, the "stub" generation is really quite dynamic as it's done at runtime and, with Python being so typeless, I'm able to reference the expected methods generated by the WSDL without a pre-compiled stub. I'm fine with generating a stub with something like wsimport, because it's great to have the composition of SOAP messages being handled via a nice Java object structure. So, I'm not

Asp.Net : Web service throws “Thread was being aborted”

懵懂的女人 提交于 2020-01-05 01:08:52
问题 I have a web service that I call via ajax that requires the user to be logged in. in each method I want to check if the user is logged in and send a 403 code if they are not, however when I call a Response.End() I get the error "Thread was being aborted". What should I call instead? [WebMethod(true)] public string MyMethod() { if(!userIsLoggedIn) { HttpContext.Current.Response.StatusCode = 403; HttpContext.Current.Response.End(); } /* Do stuff that should not execute unless the user is logged

How to catch any exceptions in a SOAP webservice method?

跟風遠走 提交于 2020-01-05 00:55:28
问题 I'm offering a SOAP @WebMethod using Spring and CXF . And I would like to catch any exceptions (checked and unchecked) and transform them to a custom @WebFault . Can I somehow assign a erro-handler/interceptor to my @WebSerivce class so that I don't have to provide extra try-catch blocks for every webserivce method? <jaxws:endpoint implementor="de.MyService" address="/MyService" /> @Component @WebService public class MyService { @WebMethod public void test() throws MyException { try { service

Calling an internal api within another api in using Slim Framework

混江龙づ霸主 提交于 2020-01-04 19:06:48
问题 Good day, Im trying to develop a web platform using Slim framework. I've done it in MVC way. some of my APIs are used to render the view and some is just built to get data from the db. for example : $app->get('/api/getListAdmin', function () use ($app) { $data = ...//code to get admins' list echo json_encode($data); })->name("getListAdmin"); $app->get('/adminpage', function () use ($app) { // **** METHOD 1 :// get the data using file_get_contents $result = file_get_contents(APP_ROOT.'api

Jax ws- xs:date format validation

大城市里の小女人 提交于 2020-01-04 19:04:10
问题 I have this in my XSD (please check code below): <xs:element name="Report_Date" type="xs:date" minOccurs="0"/> it is true that this field accepts only the date format yyyy-mm-dd and if any other format is given, JAXB unmarshalls it as null. But i want to validate the report_date field for incorrect format given in the request. Since this is an optional field, the application behaves same for even when the date not given and when the date is given in incorrect format. To make it simple, i want

How to implement backward compatible soap webservice (java based)?

本小妞迷上赌 提交于 2020-01-04 18:18:51
问题 One of our product publishes a webservice using contract-last approach. This has becoming a real problem as all of our clients (ws clients) have to rebuild their client apps as soon as we release a new version of our product. This is due to all namespace changes that comes as a cost with auto-generated wsdls. We use Axis1 for javatowsdl. I've been seeking for a good methodology/ tool to develop backward compatible webservice for this. i.e. version 9.3 clients can still hit the 10.0 service,

Linking a progressive web app to a beacon to trigger a event

萝らか妹 提交于 2020-01-04 17:46:12
问题 I'am trying to make a progressive web app where I will use beacons to transmit the eddystone URL. As soon as the phones catch the Eddystone URL and click on the notification(using physical web) it will open the Progressive web app. My question is that is there a way to integrate the web app with beacons such that when the phone comes in the range of a certain beacon, it triggers an event specific to that. For eg: if i go in a park and there is a beacon on a bench, the PWA should know be aware

Is it sufficient to use only catalina-ws.jar to have a REST webservice in Tomcat7?

自作多情 提交于 2020-01-04 15:33:55
问题 I came across many tutorials using Jersey and Tomcat7 to implement rest web services. But I also see that tomcat provides web services support if you download catalina-ws.jar (look here). So I would like to ask if we can use only this jar in the project and call rest web services ? Has anyone used this before ? 回答1: Jersey is JAX-RS (JSR-311) which is absolutely not the same as WebServices 1.2 (JSR-109), which is part of Java EE 5. Either install Jersey separately, or replace Tomcat by TomEE.

Is it sufficient to use only catalina-ws.jar to have a REST webservice in Tomcat7?

[亡魂溺海] 提交于 2020-01-04 15:33:28
问题 I came across many tutorials using Jersey and Tomcat7 to implement rest web services. But I also see that tomcat provides web services support if you download catalina-ws.jar (look here). So I would like to ask if we can use only this jar in the project and call rest web services ? Has anyone used this before ? 回答1: Jersey is JAX-RS (JSR-311) which is absolutely not the same as WebServices 1.2 (JSR-109), which is part of Java EE 5. Either install Jersey separately, or replace Tomcat by TomEE.

Adding independent aspx/asmx pages into DotNetNuke

大兔子大兔子 提交于 2020-01-04 14:31:38
问题 Howdy, I just installed dotnetnuke 5.06 on my server, say, the path is mydomain.com/dnn I have a library independent of dotnetnuke that I have to run and it contains web services and various other httphandlers so I haven't tried to integrate it into DNN just yet. the library is located under mydomain.com/dnn/lib The library worked fine on my old server running 5.04 and everything worked fine, but for some reason my new installation with 5.06 (windows 2008, sql server, iis 7.5) returns 404