web-services

Issue with connection string in web config file

拈花ヽ惹草 提交于 2020-01-01 05:38:05
问题 I am trying to set the mysql connection in web config file. Here is the connection string code: <connectionStrings> <add name="connstring" connectionString="DRIVER={MySQL ODBC= 3.51= Driver};Database=marctest;Server=localhost;UID=root;PWD=1234;" providerName="System.Data.SqlClient"/> </connectionStrings> and i am accessing it in following step: MySqlConnection connmysql = new MySqlConnection(WebConfigurationManager.ConnectionStrings["connstring"].ConnectionString); When I run my code it

How to change address location of JAX-WS webservice

不想你离开。 提交于 2020-01-01 05:36:08
问题 We have currently exposed JAX-RPC webservice with following URL http://xx.xx.xx.xx/myservice/MYGatewaySoapHttpPort?wsdl We migrated webservice to JAX-WS by generating WebService from above WSDL But new webservice is accessible from following URL http://xx.xx.xx.xx/myservice/MYGateway?wsdl How i can make my JAX-WS webservice to be accessible by same URL mentioned first? so that our customer dont have any problem. Update: Service Element of WSDL from which i created is as per expectation

WebService / java.net.SocketTimeoutException: Read timed out

…衆ロ難τιáo~ 提交于 2020-01-01 05:16:11
问题 I am facing an issue in WebService, in details : Caused by: org.apache.cxf.interceptor.Fault: Could not send Message. at org.apache.cxf.interceptor.MessageSenderInterceptor$MessageSenderEndingInterceptor.handleMessage(MessageSenderInterceptor.java:64) at org.apache.cxf.phase.PhaseInterceptorChain.doIntercept(PhaseInterceptorChain.java:220) at org.apache.cxf.endpoint.ClientImpl.invoke(ClientImpl.java:276) at org.apache.cxf.endpoint.ClientImpl.invoke(ClientImpl.java:222) at org.apache.cxf

Catching a custom Exception thrown by a WebMethod on ASP.NET WebService

巧了我就是萌 提交于 2020-01-01 05:13:06
问题 I have a classical asp.net web service (asmx) and a web method in it. I need to throw a custom exception for some case in my web method, and I need to catch that specific custom exception where I call the web service method. [WebService(Namespace = "http://tempuri.org/")] [WebServiceBinding(ConformsTo = WsiProfiles.BasicProfile1_1)] public class WebService : System.Web.Services.WebService { [WebMethod] public HelloWorldOutput HelloWorld(HelloWorldInput input) { try { // My Code return new

Alternatives to HTTP Session state in plain-vanilla .NET web services app

做~自己de王妃 提交于 2020-01-01 04:57:11
问题 After a long struggle with the Page Lifecycle in ASP.NET and its performance, we've begun refactoring our web app to implement web services (plain-vanilla .asmx .NET web-services) and jQuery on the client-side. NOTE: this does not implement MVC or ASP.NET in any way, these are just web services. In both dispensations of the application, we generate all content dynamically in a single page. In the ASP.NET dispensation, this meant (due to the Page Lifecycle) that the entire page needed to be

CXF jaxws endpoint relative publish address

℡╲_俬逩灬. 提交于 2020-01-01 04:50:52
问题 I am having a lot of difficulty trying to use a relative publish address in my CXF web service endpoint configuration. I have a simple Java-first JAX-WS project with the following configuration files: applicationContent-cxf.xml: <beans xmlns=...> ... <jaxws:endpoint id="helloWorldService" implementorClass="org.helloworld.ws.HelloWorldServiceImpl" implementor="#helloWorldServiceImpl" <!-- spring managed --> endpointName="sayHello" address="HelloWorldService"/> </beans> web.xml: <web-app>

Clickatell SOAP wsdl to JAXB java classes

半腔热情 提交于 2020-01-01 04:30:07
问题 I'm trying to generate JAXB classes from the Clickatell wsdl: You can find the wsdl definition here it quite large: http://api.clickatell.com/soap/webservice.php?WSDL When trying to generate java classes from this Wsdl i got the following errors: [ERROR] undefined simple or complex type 'SOAP-ENC:Array' [ERROR] undefined attribute 'SOAP-ENC:arrayType' I hope someone can help me out. Cheers, Tim 回答1: Your schema refers to the type SOAP-ENC:Array defined in the schema xmlns:SOAP-ENC="http:/

Error Consuming a RPC/Encoded SOAP web service in .NET

丶灬走出姿态 提交于 2020-01-01 03:44:10
问题 I am receiving the following error when calling a web service method. Cannot assign object of type System.Xml.XmlNode[] to an object of type System.String. The web service is a PHP service. I created my proxy class using wsdl.exe from the wsdl document defined here - http://webservice.intelecast.com.au/traffic/PublicSoap/server.php?wsdl Below is the proxy client method I am calling. [System.Web.Services.Protocols.SoapRpcMethodAttribute("http://webservice.intelecast.com.au/traffic/PublicSoap

Cross context communication between two web application deployed on same tomcat server

巧了我就是萌 提交于 2020-01-01 03:41:09
问题 I have two web application, webAppMaster and webAppSlave , deployed in same tomcat server. Now in webAppMaster application, there is a java class, RequestHandler whose processRequest method takes a customObject1 as parameter and returns customObject2 . Now, from RequestCreator class of webAppSlave application, I want to invoke processRequest method of RequestHandler class of webAppMaster application. How this should be done ? Thanks in advance. 回答1: You need to talk between applications as if

ASP.Net Web API vs WCF, which one should I choose in my project

若如初见. 提交于 2020-01-01 02:53:08
问题 I have read many articles in the web so far, about the differences between WCF and ASP.Net web API. Unfortunately I could not come up to a clear idea about what will serve my purpose. Most of the Articles I have read highlighted on the design point of view of the two web services. But I am confused what will work best for my project and why? Here is my brief description of the project. I need to create a communication channel between two servers (both are written in C#). The servers will