http « Web Service « Java Enterprise Q&A





1. Reading HTTP headers from JAX-WS Web Service    stackoverflow.com

I currently have a JAX-WS Web Service that receives some credentials in the HTTP header. These are used for BASIC authentication. There is a filter that performs authentication by reading the HTTP ...

2. How can I opt NOT to respond to a request in a Java webservice?    stackoverflow.com

Suppose we have a webservice request we don't even want to dignify with a response:

@WebMethod(operationName = "doSomethingForNicePeopleOnly")
public String doSomethingForNicePeopleOnly(@WebParam(name="username") String user) {
    if (userIsNice(user)) {
    ...

3. Can I deploy a web services in my application without a http containter?    coderanch.com

Most web services work over HTTP -hence the name *WEB* service-, but you can use SMTP or a messaging service (JMS) if you really need to. But since you'll need some kind of server anyway, you might as well go with HTTP, which is much more widely used than the other options. Tomcat can be embedded in another (desktop) Java application, ...

4. Need Help with HTTP Request    coderanch.com

Hi PeerReynders, thanks for the response. But The client in the link you have supplied is writing an XML output to the server after connecting to it. In my case that is not the issue. The problem is that "I NEED TO SEND A HTTP REQUEST (by using an encoded URL). Bascially it would instantiate a servlet with the parameters that ...

5. How to get the HTTP Header from the request?    coderanch.com

Hi all, I want to the know, what the entries are coming in the HTTP header, So, is there any software(monitoring tool) to get the header from the request in between the process. Actually I am doing handshaking (basic authentication) before sending SOAP envelop, And it passes the first step(authentication) and then it gives "500 internal server error" So, I want ...

6. Can WebService response be HTTP?    coderanch.com

I have situation - where user will start request in Asynchronous mode - may be within windows based client server application. This request needs to launch real-time web application at specific workflow using the information send through Asynchronous request. I am thinking of following design - I would like to know how feasible it is 1. Client application will send Webservice ...

7. how to use "HTTP GET" as a binding?    coderanch.com

8. How can i captor xml response return from http non web app    coderanch.com

Hello all its not exactly web services but its like ... im using WBEM http://wbemservices.sourceforge.net/#Development client to communicate to distant server , this is some kind of simple way to send and receive object thorough xml ( like light version of web services ) . im sending the requests via http with requests throw the client but i have no way ...

9. Design : transport protocol HTTP to MQ    coderanch.com

Hello, I have a question about designing web service and SOAP message. I'd like to design (web) service so that we can easily change the transport protocol from HTTP to MQ (for example). Can anyone advise me about the design of the SOAP message and the web service concerning this requirement? Thanks Thom





11. WebServiceException: HTTP Status-Code 404    coderanch.com

The error that you see because of invalidation might be because jax-ws tries to validate the wsdlLocation and the service name that you at service creation in client code with the values specified in WSDL. So, I would suggest give the service name in WSDL at service creation time and overrite it after the port creation using the following code : ...

12. http post with bpel    coderanch.com

I am not sure if this forum is the right forum for my question but I post anyway to see if anyone can help me. I have created a very simple bpel using http post; all it does is to copy the input to the output. The output from my bpel looks like this:

13. HTTP Status code 413: Request entity too large    coderanch.com

This Web Service is deployed on the integration broker ICS (IBM WBI suit) and web services adaptor agent is polling for the events. When an J2EE application deployed on WAS (version 6.0.0) fires a request for this web services this message gets logged into the web services adaptor log: Mesg: HTTP listener "SOAPHTTPListener1": Parsing failed for the request. The error message ...

14. xml over http    coderanch.com

protected void doGet(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException { PrintWriter pw = response.getWriter(); ClassLoader loader = Thread.currentThread().getContextClassLoader(); URL resource = loader.getResource("test.xml"); File file = new File(resource.getFile()); BufferedReader br = new BufferedReader(new FileReader(file)); String line = null; while (( line = br.readLine()) != null){ pw.println(line); } } test.xml -------- ankur bajju mohit

15. java.io.IOException: Type {http://lang.java}Exception is referenced but not defined.    coderanch.com

Originally posted by nalamati satyanarayana: if i remove those name spaces it will effect to webservice or not while converting to wsdl to java Removing those namespaces isn't enough because references are made to XML types that exist in those namespaces - so you would have to remove or replace those references. You did not indicate whether you are creating a ...





17. Difference between Webservice and XML over HTTP??    coderanch.com

Does that mean it is safe to say that a webservice is XML over HTTP? No. As Ulf already pointed out a web service can deal with any content-type, not just XML. Right now, in the majority of cases "web service" actually means "SOAP Web Service" though strictly speaking that is incorrect. "XML over HTTP" classifies as a web service. HTML ...

18. HTTP Proxy w/ JAX-WS (Metro)    coderanch.com

I have a web service that calls another web service in order to accomplish its work. I need to allow for clients that use an HTTP Proxy to use that proxy for my service's call. This is easy enough to accomplish with Axis, but I am having trouble getting this to work with JAX-WS (Metro). Any pointers in the right direction ...

20. http get    coderanch.com

21. java.io.IOException: Server returned HTTP response code: 403 for URL:    coderanch.com

hi, while iam calling the webservice method from a standalone java application. i am getting error on the console saying 14:20:38,317 ERROR [STDERR] java.io.IOException: Server returned HTTP response code: 403 for URL: http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd 14:20:38,317 ERROR [STDERR] at sun.net.www.protocol.http.HttpURLConnection.getInputStream(HttpURLConnection.java:1149) 14:20:38,317 ERROR [STDERR] at org.apache.xerces.impl.XMLEntityManager.setupCurrentEntity(Unknown Source) 14:20:38,317 ERROR [STDERR] at org.apache.xerces.impl.XMLEntityManager.startEntity(Unknown Source) 14:20:38,317 ERROR [STDERR] at org.apache.xerces.impl.XMLEntityManager.startDTDEntity(Unknown Source) 14:20:38,317 ERROR [STDERR] at org.apache.xerces.impl.XMLDTDScannerImpl.setInputSource(Unknown ...

22. org.xml.sax.SAXException: No deserializer for{http://DefaultNamespace}ARRAYNAME    coderanch.com

Hi Everybody.. I am very New to Web service. And i developed a web service. the Java calss looks like below.. import java.net.HttpURLConnection; import java.net.URL; import java.net.URLDecoder; import org.apache.log4j.Logger; import org.apache.soap.encoding.Hex; import utility.ArrayString; public class CPServices implements Serializable { /** * */ HttpURLConnection _oConn = null; public void smsMo(java.lang.String service_id, java.lang.String source_mobtel, java.lang.String sub_id, java.lang.String keyword, java.lang.String transaction_id, java.lang.String short_code_suffix_ind, java.lang.String ...

23. Http Call VS Webservice    coderanch.com

What is the difference between Http post vs webservice call Http Post HttpClient client = new HttpClient(); PostMethod method = new PostMethod(_url); method.setRequestEntity(new MultipartRequestEntity(_data, method.getParams())); int statusCode = client.executeMethod(method); We are currently using Http post for communicating third party, they have developed web service as new interface, so just want to know why we should use WS. Thanks, Dhananjay

25. MIME and HTTP GET/POST bindings are not permitted by the Profile.    coderanch.com

Hi! Take a look at the following two links: http://www.w3.org/TR/wsdl#_http http://www.w3.org/TR/wsdl#_Toc492291084 If you look at the text on HTTP GET/POST binding, you see that the in the case of a GET request, there is no payload and in the case of the POST request, the payload is not SOAP. The GET requests look more like they could be requests to a ...

26. java.io.IOException: Server returned HTTP response code: 401 for URL    coderanch.com

Hi, I have been facing an issue for quite some time. I have make 2 webservice calls, 1st call is to webservice running in Axis2 and deployed in Weblogic9.1 and the 2nd call is from the 1st webservice (running under axis2) to another webservice running under Weblogic9.1 and is using weblogic webservices. 2nd set of webservices are secured using basic http ...

28. Wish Clear HTTP POST XML Example    coderanch.com

Let's say I have a web application which responds to HTTP GET requests and was called via http://something.org/someApp?param1=ok Now my web application will respond to POST requests where they send XML instead of URL parameters. Without knowing what language my client will use, I want to provide an API example. With GET HTTP requests, it is clear that one just sends ...

29. DELETE http request in HttpURLConnection....    coderanch.com

The xml data has details like which record (record's id, name, etc) to delete etc., This is what i am doing .... In RESTful web service when i get the xml data in the http request object, i insert the data into a load table first & then call the stored proc to insert the data into the main table which ...

30. Web Services-SOAP over HTTP    coderanch.com

I am newbie to web services. I created a web service class with the necessary SOAP annotations and a few web methods within, and generated .wsdl from it using axis - ant build. Now I generated the client code from the .wsdl again using the axis build. Deployed my web service class as a web project in my jboss with the ...

31. Endpoint {http://www.}ContentManagementService_v1_0 does not contain operation metadata for {...}    coderanch.com

Hi All, This is very urgent requirement. I'm wrote a webservice client for an external service using http. I can paste the code below. I'm getting a exception shown below If I try to use the service hosted. Exception in thread "main" org.apache.axis2.AxisFault: Endpoint {http://www.dolby.com/dcinema/ws/smi/v1}ContentManagementService_v1_0 does not contain operation meta data for: {http://www.dolby.com/dcinema/ws/smi/v1/getClipInfosResponse}getClipInfosResponse at org.apache.axis2.util.Utils.getInboundFaultFromMessageContext(Utils.java:512) at org.apache.axis2.description.OutInAxisOperationClient.handleResponse(OutInAxisOperation.java:370) at org.apache.axis2.description.OutInAxisOperationClient.send(OutInAxisOperation.java:416) at org.apache.axis2.description.OutInAxisOperationClient.executeImpl(OutInAxisOperation.java:228) ...

32. SOAPFaultException: Endpoint {http://test.com/}TestPort: does not contain operation meta data    coderanch.com

Hi, I am writing my first WebService. Server is jboss 4.2.2. I wrote a bean and registered as a servlet in my web.xml and deployed it to the server. it deployed fine and generated the wsdl. Now, I am trying to writing a client to invoke this service, but I am gettting the following exception: java.rmi.RemoteException: Call invocation failed with code ...

33. http://xml.apache.org/axis/}stackTrace:No such operation 'getStandardPackageList_VB' exception    coderanch.com

Hi, i have want to access the secure web service through axis client and created keystore and imported the CA certifictae to my key store and configured my jboss server.xml to enable SLL port.After all these iam getting following exception when i try to call asecure service.please any one come across and solved this issue please reply and any one have ...

34. java httpclient print HTTP Headers    coderanch.com

36. Is there a way I can view the raw (HTTP) web service response?    coderanch.com

Thank you, William. I downloaded soapUI and it was pretty easy to get up and running. I placed a call to my web service method, and inspected the raw HTTP response which I received, and it looks okay to me: HTTP/1.1 200 OK Server: Apache-Coyote/1.1 X-Powered-By: Servlet 2.5; JBoss-5.0/JBossWeb-2.1 Content-Type: text/xml;charset=UTF-8 Transfer-Encoding: chunked Date: Wed, 06 Jan 2010 20:45:25 GMT

37. #import' is not permitted as constrained by 'http://www.w3.org/2001/XMLSchema#schema_._type';    coderanch.com

Hi! Where are you trying to import the XML schema? In a WSDL file? If that is the case, then the WS-I Basic Profile 1.1 has the following to say about the WSDL import statement: - The WSDL import statement must only be used to import other WSDL documents. Reference & examples: http://www.ws-i.org/Profiles/BasicProfile-1.1.html#WSDL_and_Schema_Import Furthermore: - XML schemas may only be imported ...

38. IBM HTTP Server 7 with 2 instance on single machine    coderanch.com

Hi All, I have configured 2 instance of IHS on single machin with different conf files (two IP address x.x.x.73/74) running perfectly. I have restarted my system for some maintainance work and tryed to start both the instance, but failed. only instance1 is started not instance2. If I stop the instance1 and start instance2 it will start. I can only start ...

39. JAX-WS HTTP Binding    coderanch.com

I have a question related to JAX-WS and their support for HTTP Binding. I think you can specify the Binding type (either SOAP or HTTP binding ) by annotating your SEI with BindingType. So in order to declare HTTP Binding I will use @BindingType(HTTPBinding.HTTP_BINDING). However this annotation only works when I have my class implements Provider interface instead. I guess it ...

40. question on wsa:Action="http://example.com/numbers/AddNumbersPortType/Result"    coderanch.com

Hi. wsa:Action, like SOAPAction, indicates the intent of the SOAP HTTP request. When applied to the message input (), Axis2 will use the information to find the operation to invoke. Per this link, how the action information is used varies with the tool: "In WSE, the action URI is used to figure out what policy to apply to a ...

42. @Responsebody for HTTP msg and a View to show the HTTP response msg    coderanch.com

How exactly can I trigger display of a model and view from another model and views controller? HTTP Request View --> HttpRequestController POST -> new HttpResponse POJO and a string of the POJO in XML for the Http Response msg to be sent back to the Requestor --> I have HttpRequestController() to handle ...

43. Mutiple WSDLs, same portType, is it possible to run a single HTTP server on a single port?    coderanch.com

I have got three WSDLS which contains same PortType suppose ABC. Under ABC in the three WSDL different operations are defined. Now if I want to implement a HTTP server to provide the services defined by the WSDLs, I have to implement ABC. In the below example service1 and service2 are from two different wsdls. public class ABCImpl implements ABC{ ........................... ...

44. The server sent HTTP status code -1    coderanch.com

Thanks Srini, I tried to create a client by giving the URL in netbeans which doesn't worked same happen on SOAP UI also, it worked on browser(after installing a certificate), so i saved the wsdl from browser and generated a client locally with wsdl file. and the External service Document says it needs "Client Certificate" and "HTTP Basic Authorization" to handle. ...

45. Help with approach to problem - HTTP POST to upload an XML file to URL    coderanch.com

I have an XML file that I need to be able to upload, via HTTP POST, to a known URL which will accept the file and process it. I am not sure of the process that I need to take. For example, to "upload a file", do I need to read the file in line by line and then upload it ...

47. Creating a webservice using XML over HTTP.    coderanch.com

Hi, My client has a requirement, which involves a call to my webservice. Here, he does not want to send the messages in SOAP envelop. Instead he intends to send simple XML over HTTP. Now, I googled and found out that REST is a kind of webservice, which uses simple XML over HTTP, and does not require any SOAP envelope around. ...

48. JAX-WS - please help convert proxy to BindingProvider for HTTP auth    coderanch.com

Hi guys, I'm running eclipse 3.6, tomcat 5.5 config, metro 2.0.1. I am setting up a WS using basic http authentication, and it works in the browser, I get prompted for the user name and password, I enter it and can access the necessary wsdl The service looks like this - @WebService(serviceName="wsofferssvc") public class wsoffers { @WebMethod @RolesAllowed(value = {"basicUser"}) public ...

49. New HTTP PATCH method!    coderanch.com

The other day I was surprised to see a discussion in the Jersey mailing list for implementing the PATCH method! Yow, I didn't even know there was a HTTP PATCH method but it turns out that the IETF has been mulling it for years and RFC5789 was released in March 2010, defined for HTTP 1.1. To quote the RFC: The difference ...

50. Endpoint References vs Http Request URL    coderanch.com

51. Can you pass complex type from pl sql to web service using utl_http    coderanch.com

Not sure if this belongs here or in JDBC forum really. But I want to call a web service from pl sql and pass in a String (VARCHAR2) and a Type made up of 4 VARCHAR2 parameters If I were just passing in a VARCHAR2 I would not have trouble. But I am unsure how to pass in a type, or ...

52. Debugging HTTP 500    coderanch.com

Hi there, I have a JAX-RS application and am attempting to delete an item. I receive HTTP 500 errors and am unsure where the problem lies. What is the best way to debug these? I am using NetBeans 7 and Glassfish. I have started Glassfish in debug mode and reproduced my problem, placing a breakpoint on the line of code that ...

53. AxisFault faultCode: {http://xml.apache.org/axis/}HTTP    coderanch.com

Hi All, When I call a method I am getting this error AxisFault faultCode: {http://xml.apache.org/axis/}HTTP faultSubcode: faultString: (405)Method Not Allowed faultActor: faultNode: faultDetail: {}string: return code: 405 (405)Method Not Allowed at org.apache.axis.transport.http.HTTPSender.readFromSocket(HTTPSender.java:630) at org.apache.axis.transport.http.HTTPSender.invoke(HTTPSender.java:128) at org.apache.axis.strategies.InvocationStrategy.visit(InvocationStrategy.java:71) at org.apache.axis.SimpleChain.doVisiting(SimpleChain.java:150) at org.apache.axis.SimpleChain.invoke(SimpleChain.java:120) at org.apache.axis.client.AxisClient.invoke(AxisClient.java:180) at org.apache.axis.client.Call.invokeEngine(Call.java:2564) at org.apache.axis.client.Call.invoke(Call.java:2553) at org.apache.axis.client.Call.invoke(Call.java:2248) at org.apache.axis.client.Call.invoke(Call.java:2171) at org.apache.axis.client.Call.invoke(Call.java:1691) at com.csc.pt.surround.util.medmgt.ServiceAppSoapStub.MMSearchAlt(ServiceAppSoapStub.java:369) at com.csc.pt.servlet.common.MVDocServlet.callProgram(MVDocServlet.java:808) at com.csc.pt.servlet.common.MVDocServlet.doGet(MVDocServlet.java:458) at javax.servlet.http.HttpServlet.service(HttpServlet.java:627) at ...

54. HTTP Post request to Web Map Service...    forums.oracle.com

Wha'ts a Web Map Service? How should we know what some server wants you to send it? The POST'ing part of the code looks correct. But POST is generally going to be the same format as a GET request (name=value...), except the params are in the body instead of the URL. So unless the server explicitly accepts something else, then probably ...