Search Results

Search found 1067 results on 43 pages for 'jax rpc'.

Page 7/43 | < Previous Page | 3 4 5 6 7 8 9 10 11 12 13 14  | Next Page >

  • GWT RPC - Does it do enough to protect against CSRF ?

    - by sri
    GWT's RPC mechanism does the following things on every HTTP Request - Sets two custom request headers - X-GWT-Permutation and X-GWT-Module-Base Sets the content-type as text/x-gwt-rpc; charset=utf-8 The HTTP request is always a POST, and on server side GET methods throw an exception (method not supported). Also, if these headers are not set or have the wrong value, the server fails processing with an exception "possibly CSRF?" or something to that effect. Question is : Is this sufficient to prevent CSRF? Is there a way to set custom headers and change content type in a pure cross-site request forgery method?

    Read the article

  • JAX-WS modifying handler chain programmatically? PortInfo?

    - by wuntee
    I have a JAX-WS client that needs to have a modified handler-chain. I am currently doing it by binding this XML when generated the WSDL stubs: <jaxws:bindings xmlns:jaxws="http://java.sun.com/xml/ns/jaxws"> <jws:handler-chains xmlns:jws="http://java.sun.com/xml/ns/javaee"> <jws:handler-chain> <jws:handler> <jws:handler-name>ServiceRequestServiceClientHandler</jws:handler-name> <jws:handler-class>blah.ServiceRequestServiceClientHandler</jws:handler-class> </jws:handler> </jws:handler-chain> </jws:handler-chains> </jaxws:bindings> I was looking that the ServiceRequestService_Service object, and it seems like this could be done programmatically (easier in my opinion - less configuration files). new ServiceRequestService_Service().getHandlerResolver().getHandlerChain(PORTINFO).add(HANDLER); But, I do not know what the PortInfo object is, or how to obtain it in relation to the specific service. Has anyone done this?

    Read the article

  • How to create a JAX-RS service where the sub-resource @Path doesn't have a leading slash

    - by Matt
    I've created a JAX-RS service (MyService) that has a number of sub resources, each of which is a subclass of MySubResource. The sub resource class being chosen is picked based on the parameters given in the MyService path, for example: @Path("/") @Provides({"text/html", "text/xml"}) public class MyResource { @Path("people/{id}") public MySubResource getPeople(@PathParam("id") String id) { return new MyPeopleSubResource(id); } @Path("places/{id}") public MySubResource getPlaces(@PathParam("id") String id) { return new MyPlacesSubResource(id); } } where MyPlacesSubResource and MyPeopleSubResource are both sub-classes of MySubResource. MySubResource is defined as: public abstract class MySubResource { protected abstract Results getResults(); @GET public Results get() { return getResults(); } @GET @Path("xml") public Response getXml() { return Response.ok(getResults(), MediaType.TEXT_XML_TYPE).build(); } @GET @Path("html") public Response getHtml() { return Response.ok(getResults(), MediaType.TEXT_HTML_TYPE).build(); } } Results is processed by corresponding MessageBodyWriters depending on the mimetype of the response. While this works it results in paths like /people/Bob/html or /people/Bob/xml where what I really want is /people/Bob.html or /people/Bob.xml Does anybody know how to accomplish what I want to do?

    Read the article

  • JAX-RS --- How to return JSON and HTTP Status code together?

    - by masato-san
    I'm writing REST web app (Netbean6.9, JAX-RS, Toplink-essential) and trying to return JSON and Http status code. I have code ready and working just to return JSON when HTTP GET Method is called from client. Code snippet @Path("get/id") @GET @Produces("application/json") public M_?? getMachineToUpdate(@PathParam("id") String id) { //some code to return JSON . . return myJson But I also want to return HTTP status code (500, 200, 204 etc) along with returning JSON. I tried using HttpServletResponse object, response.sendError("error message", 500); But this made browser to think it's real 500 so output web page was regular Http 500 error page. What I want to is just to return status code so that my Javascript on client side can handle some logic depending on what HTTP status code is returned. (maybe just to display the error code and message on html page.) Is it possible to do so? or should HTTP status code not be used for such thing?

    Read the article

  • BugZilla XML RPC Interface

    - by Damo
    I am attempting to setup BugZilla to receive but reports from another system using the XML-RPC interface. BugZilla works fine on its own with its own interface. When I attempt to test the XML-RPC functionality by accessing "xmlrpc.cgi" in my browser I get the error: The XML-RPC Interface feature is not available in this Bugzilla at C:\BugZilla\xmlrpc.cgi line 27 main::BEGIN(...) called at C:\BugZilla\xmlrpc.cgi line 29 eval {...} called at C:\BugZilla\xmlrpc.cgi line 29 Following this I install test-taint package from the default perl repository, this installs version 1.04. Re-running "xmlrpc.cgi" gives me an IIS error: 502 - Web server received an invalid response while acting as a gateway or proxy server. There is a problem with the page you are looking for, and it cannot be displayed. When the Web server (while acting as a gateway or proxy) contacted the upstream content server, it received an invalid response from the content server. So I run the checksetup.pl which inform me that: Use of uninitialized value in open at C:/Perl/site/lib/Test/Taint.pm line 334, <DATA> line 558. Installing Test-Taint from CPAN is the same. I assume XML-RPC is relent on Test-Taint, but Test-Taint doesn't seem to run correctly. If I ignore this error and attempt to invoke "bz_webservice_demo.pl" to add an entry the script times out. How can I get the XML-RPC / Test-Taint function working ? Current Setup: IIS7.5 on Windows Server 2008 Bugzilla 4.2.2 Perl 5.14.2 C:\BugZilla>perl checksetup.pl Set up gcc environment - 3.4.5 (mingw-vista special r3) * This is Bugzilla 4.2.2 on perl 5.14.2 * Running on Win2008 Build 6002 (Service Pack 2) Checking perl modules... Checking for CGI.pm (v3.51) ok: found v3.59 Checking for Digest-SHA (any) ok: found v5.62 Checking for TimeDate (v2.21) ok: found v2.24 Checking for DateTime (v0.28) ok: found v0.76 Checking for DateTime-TimeZone (v0.79) ok: found v1.48 Checking for DBI (v1.614) ok: found v1.622 Checking for Template-Toolkit (v2.22) ok: found v2.24 Checking for Email-Send (v2.16) ok: found v2.198 Checking for Email-MIME (v1.904) ok: found v1.911 Checking for URI (v1.37) ok: found v1.59 Checking for List-MoreUtils (v0.22) ok: found v0.33 Checking for Math-Random-ISAAC (v1.0.1) ok: found v1.004 Checking for Win32 (v0.35) ok: found v0.44 Checking for Win32-API (v0.55) ok: found v0.64 Checking available perl DBD modules... Checking for DBD-Pg (v1.45) ok: found v2.18.1 Checking for DBD-mysql (v4.001) ok: found v4.021 Checking for DBD-SQLite (v1.29) ok: found v1.33 Checking for DBD-Oracle (v1.19) ok: found v1.30 The following Perl modules are optional: Checking for GD (v1.20) ok: found v2.46 Checking for Chart (v2.1) ok: found v2.4.5 Checking for Template-GD (any) ok: found v1.56 Checking for GDTextUtil (any) ok: found v0.86 Checking for GDGraph (any) ok: found v1.44 Checking for MIME-tools (v5.406) ok: found v5.503 Checking for libwww-perl (any) ok: found v6.02 Checking for XML-Twig (any) ok: found v3.41 Checking for PatchReader (v0.9.6) ok: found v0.9.6 Checking for perl-ldap (any) ok: found v0.44 Checking for Authen-SASL (any) ok: found v2.15 Checking for RadiusPerl (any) ok: found v0.20 Checking for SOAP-Lite (v0.712) ok: found v0.715 Checking for JSON-RPC (any) ok: found v0.96 Checking for JSON-XS (v2.0) ok: found v2.32 Use of uninitialized value in open at C:/Perl/site/lib/Test/Taint.pm line 334, <DATA> line 558. Checking for Test-Taint (any) ok: found v1.04 Checking for HTML-Parser (v3.67) ok: found v3.68 Checking for HTML-Scrubber (any) ok: found v0.09 Checking for Encode (v2.21) ok: found v2.44 Checking for Encode-Detect (any) not found Checking for Email-MIME-Attachment-Stripper (any) ok: found v1.316 Checking for Email-Reply (any) ok: found v1.202 Checking for TheSchwartz (any) not found Checking for Daemon-Generic (any) not found Checking for mod_perl (v1.999022) not found Checking for Apache-SizeLimit (v0.96) not found *********************************************************************** * OPTIONAL MODULES * *********************************************************************** * Certain Perl modules are not required by Bugzilla, but by * * installing the latest version you gain access to additional * * features. * * * * The optional modules you do not have installed are listed below, * * with the name of the feature they enable. Below that table are the * * commands to install each module. * *********************************************************************** * MODULE NAME * ENABLES FEATURE(S) * *********************************************************************** * Encode-Detect * Automatic charset detection for text attachments * * TheSchwartz * Mail Queueing * * Daemon-Generic * Mail Queueing * * mod_perl * mod_perl * * Apache-SizeLimit * mod_perl * *********************************************************************** COMMANDS TO INSTALL OPTIONAL MODULES: Encode-Detect: ppm install Encode-Detect TheSchwartz: ppm install TheSchwartz Daemon-Generic: ppm install Daemon-Generic mod_perl: ppm install mod_perl Apache-SizeLimit: ppm install Apache-SizeLimit Reading ./localconfig... OPTIONAL NOTE: If you want to be able to use the 'difference between two patches' feature of Bugzilla (which requires the PatchReader Perl module as well), you should install patchutils from: http://cyberelk.net/tim/patchutils/ Checking for DBD-mysql (v4.001) ok: found v4.021 Checking for MySQL (v5.0.15) ok: found v5.5.27 WARNING: You need to set the max_allowed_packet parameter in your MySQL configuration to at least 3276750. Currently it is set to 3275776. You can set this parameter in the [mysqld] section of your MySQL configuration file. Removing existing compiled templates... Precompiling templates...done. checksetup.pl complete.

    Read the article

  • JAX-WS wsgen and collections of collections: wsgen broken?

    - by ayang
    I've been playing around with "bottom-up" JAX-WS and have come across something odd when running wsgen. If I have a service class that does something like: @WebService public class Foo { public ArrayList<Bar> getBarList(String baz) { ... } } then running wsgen gets me a FooService_schema1.xsd that has something like this: <xs:complexType name="getBarListResponse"> <xs:sequence> <xs:element name="return" type="tns:bar" minOccurs="0" maxOccurs="unbounded"/> </xs:sequence> </xs:complexType> which seems reasonable. However, if I want a collection of collections like: public BarCollection getBarCollection(String baz) { ... } // BarCollection is just a container for an ArrayList<Bar> then the generated schema ends up with stuff like: <xs:complexType name="barCollection"> <xs:sequence/> </xs:complexType> <xs:complexType name="getBookCollectionsResponse"> <xs:sequence> <xs:element name="return" type="tns:barCollection" minOccurs="0" maxOccurs="unbounded"/> </xs:sequence> </xs:complexType> An empty sequence is not what I had in mind at all. My original approach was to go with: public ArrayList<ArrayList<Bar>> getBarLists(String baz) { ... } but that ends up with a big chain of complexTypes that just wind up with an empty sequence at the end as well: <xs:complexType name="getBarListsResponse"> <xs:sequence> <xs:element name="return" type="tns:arrayList" minOccurs="0" maxOccurs="unbounded"/> </xs:sequence> </xs:complexType> <xs:complexType name="arrayList"> <xs:complexContent> <xs:extension base="tns:abstractList"> <xs:sequence/> </xs:extension> </xs:complexContent> </xs:complexType> <xs:complexType name="abstractList" abstract="true"> <xs:complexContent> <xs:extension base="tns:abstractCollection"> <xs:sequence/> </xs:extension> </xs:complexContent> </xs:complexType> <xs:complexType name="abstractCollection" abstract="true"> <xs:sequence/> </xs:complexType> Am I missing something or is this a known hole in wsgen? JAXB? Andy

    Read the article

  • Issues with mx:method, mx.rpc.remoting.mxml.RemoteObject, and sub-classing mx.rpc.remoting.mxml.Remo

    - by Ryan Wilson
    I am looking to subclass RemoteObject. Instead of: <mx:RemoteObject ... > <mx:method ... /> <mx:method ... /> </mx:RemoteObject> I want to do something like: <remoting:CustomRemoteObject ...> <mx:method ... /> <mx:method ... /> </remoting:CustomRemoteObject> where CustomRemoteObject extends mx.rpc.remoting.mxml.RemoteObject like so: package remoting { import mx.rpc.remoting.mxml.RemoteObject; public class CustomRemoteObject extends RemoteObject { public function CustomRemoteObject(destination:String=null) { super(destination); } } } However, when doing so and declaring a CustomRemoteObject in MXML as above, the flex compiler shows the error: Could not resolve <mx:method> to a component implementation At first I thought it had something to do with CustomRemoteObject failing to do something, despite that (or since) it had no change except as to the name. So, I copied the source from mx.rpc.remoting.mxml.RemoteObject into CustomRemoteObject and modified it so the only difference was a refactoring of the class and package name. But still, the same error. Unlike many MXML components, I cannot cmd+click <mx:method> in FlashBuilder to open the source. Likewise, I have not found a reference in mx.rpc.remoting.mxml.RemoteObject, mx.rpc.remoting.RemoteObject, or mx.rpc.remoting.AbstractService, and have been unsuccessful in find its source online. Which leads me to the questions in the title: What exactly is <mx:method>? (yes, I know it's a declaration of a RemoteObject method, and I know how to use it, but it's peculiar in regard to other components) Why did my attempt at subclassing RemoteObject fail, despite it effectually being a rename? Perhaps the root, why can mx.rpc.remoting.mxml.RemoteObject as an MXML declaration accept <mx:method> child tags, yet the source of said class cannot when refactored in name only?

    Read the article

  • How to sign in Chrome extension built with GWT using RPC.

    - by nick
    I have an application built with GWT/Appengine/Jdo...and i am using Google User Service for authentication. Google Chrome Extensions can use OAuth...I don't really undestand OAuth yet.. Would GWT RPC have to be reworked to enable OAuth? Is there another way to authenticate users for Chrome Extensions?

    Read the article

  • RPC Server Unavailable on Hyper-V cluster when moving resources after the host adapter has failed

    - by Doug Luxem
    On a Windows 2008 R2 SP1 cluster running Hyper-V, a lost network connectivity on the primary host interface. The interface was rapidly flapping up and down, and this was later determined to be caused by a faulty switch port. As this was a clustered server, the host interface was not fault tolerant (seeing as how the whole server was fault tolerant), so connectivity to the host was going up and down. The Hyper-V guests were completely unaffected by the network outage as they used a dedicated trunk on the server separate from the host interface. Additionally, dedicated interfaces for the cluster and live migration networks were fine. In order to diagnose the server, I tried to move all resources (Hyper-V Guests) to other nodes through Failover Cluster Manager. These moves failed with an error RPC Server Unavailable. The only way to move resources was by shutting down the guests, stopping the cluster service on the Node A, allowing other nodes to take ownership of the resources, and restarting the guests. A few other notes: All nodes have Client for MS Networks and File & Printer Sharing enabled on the Cluster and LM networks. Node A was accessible over cluster and LM networks from other nodes (these are private, cluster-only networks); pingable, CIFs, etc. Accessing \\NODEA is done over the Host adapters, as you would expect in this case and is the reason for the RPC Server Unavailable error with that adapter being down. My questions here are - Is there a way to still use Live Migration in a failure scenario such as this to prevent shutting down the Hyper-V guests? How can the network be reconfigured in the future so that the cluster service attempts to use the cluster and/or live migration networks to issue the RPC requests?

    Read the article

  • How do I set the timeout for a JAX-WS webservice client?

    - by ninesided
    I've used JAXWS-RI 2.1 to create an interface for my web service, based on a WSDL. I can interact with the web service no problems, but haven't been able to specify a timeout for sending requests to the web service. If for some reason it does not respond the client just seems to spin it's wheels forever. Hunting around has revealed that I should probably be trying to do something like this: ((BindingProvider)myInterface).getRequestContext().put("com.sun.xml.ws.request.timeout", 10000); ((BindingProvider)myInterface).getRequestContext().put("com.sun.xml.ws.connect.timeout", 10000); I also discovered that, depending on which version of JAXWS-RI you have, you may need to set these properties instead: ((BindingProvider)myInterface).getRequestContext().put("com.sun.xml.internal.ws.request.timeout", 10000); ((BindingProvider)myInterface).getRequestContext().put("com.sun.xml.internal.ws.connect.timeout", 10000); The problem I have is that, regardless of which of the above is correct, I don't know where I can do this. All I've got is a Service subclass that implements the auto-generated interface to the webservice and at the point that this is getting instanciated, if the WSDL is non-responsive then it's already too late to set the properties: MyWebServiceSoap soap; MyWebService service = new MyWebService("http://www.google.com"); soap = service.getMyWebServiceSoap(); soap.sendRequestToMyWebService(); Can anyone point me in the right direction?!

    Read the article

  • Unable to load WSDL file error in flex while making a call to a web service.

    - by Angeline Aarthi
    I am trying to call a webservice from my Flex application and this is the code: <mx:WebService id="myWebService" wsdl="http://172.16.111.103:22222/cics/services/PRESENT1?wsdl"> <mx:operation name="PRESENT1Operation" result="resultHandler(event)" fault="faultHandler(event)"> </mx:operation> </mx:WebService> //Function to send customer id to the wsdl request private function searchDetails():void{ myWebService.PRESENT1Operation.send(cusNo.text); cusDetails.visible=true; } The webservice is up and running. I have a separate Java application to test the webservice, And I am able to execute it properly. I am able to request the webservice and get response. But If I try to call the webservice through the Flex application, I get the following error. [RPC Fault faultString="HTTP request error" faultCode="Server.Error.Request" faultDetail="Unable to load WSDL. If currently online, please verify the URI and/or format of the WSDL (http://172.16.111.103:22222/cics/services/PRESENT1?WSDL)"] at mx.rpc.wsdl::WSDLLoader/faultHandler()[C:\autobuild\3.2.0\frameworks\projects\rpc\src\mx\rpc\wsdl\WSDLLoader.as:98] at flash.events::EventDispatcher/dispatchEventFunction() at flash.events::EventDispatcher/dispatchEvent() at mx.rpc::AbstractInvoker/http://www.adobe.com/2006/flex/mx/internal::dispatchRpcEvent()[C:\autobuild\3.2.0\frameworks\projects\rpc\src\mx\rpc\AbstractInvoker.as:170] at mx.rpc::AbstractInvoker/http://www.adobe.com/2006/flex/mx/internal::faultHandler()[C:\autobuild\3.2.0\frameworks\projects\rpc\src\mx\rpc\AbstractInvoker.as:225] at mx.rpc::Responder/fault()[C:\autobuild\3.2.0\frameworks\projects\rpc\src\mx\rpc\Responder.as:53] at mx.rpc::AsyncRequest/fault()[C:\autobuild\3.2.0\frameworks\projects\rpc\src\mx\rpc\AsyncRequest.as:103] at DirectHTTPMessageResponder/errorHandler()[C:\autobuild\3.2.0\frameworks\projects\rpc\src\mx\messaging\channels\DirectHTTPChannel.as:362] at flash.events::EventDispatcher/dispatchEventFunction() at flash.events::EventDispatcher/dispatchEvent() at flash.net::URLLoader/redirectEvent() Please some one help me with this.

    Read the article

  • JAX-WS and JPA, how to load stub objects using JPA?

    - by opensas
    I'm trying to develope a soap web service that has to access a mysql db. I have to replicate an existing service, so I created all the stub object from it's wsdl file Netbeans created all the necessary stuff for me (new, web service from wsdl), it works ok... Now I'm trying to use JPA to load all those objects from the database. So far I was going fine, I created the classes using (new, entity class from database), and then copied all the annotations to the classes generated by wsimport, and it was working fine. The problem is that netbeans insists on running wsimport again, and then I loose all my annotations... Is there some way to tell netbeans not to regenerate those files? I think this situation shoulb be pretty common, I mean developing a web service from a wsdl and then having to fill those objects with data using JPA. what would be the correct aproach to this kind of situation? thanks a lot saludos sas I've also tried inheriting from the stubs, and addign there the persistence annotations, but I had troubles with overlaping members, I'm redeclaring protected properties...

    Read the article

  • How do you marshall a parameterized type with JAX-WS / JAXB?

    - by LES2
    Consider the following classes (please assume public getter and setter methods for the private fields). // contains a bunch of properties public abstract class Person { private String name; } // adds some properties specific to teachers public class Teacher extends Person { private int salary; } // adds some properties specific to students public class Student extends Person { private String course; } // adds some properties that apply to an entire group of people public class Result<T extends Person> { private List<T> group; private String city; // ... } We might have the following web service implementation annotated as follows: @WebService public class PersonService { @WebMethod public Result<Teacher> getTeachers() { ... } @WebMethod public Result<Student> getStudents() { ... } } The problem is that JAXB appears to marshall the Result object as a Result<Person> instead of the concrete type. So the Result returned by getTeachers() is serialized as containing a List<Person> instead of List<Teacher>, and the same for getStudents(), mutatis mutandis. Is this the expected behavior? Do I need to use @XmlSeeAlso on Person? Thanks! LES

    Read the article

  • Missing [mx.rpc]::IResponder

    - by Arms
    I'm trying to use the Flex 4 SDK's mx.rpc package in a Flash application. I imported Flex's rpc.swc (Adobe\Adobe Flash Builder 4\sdks\4.0.0\frameworks\libs\rpc.swc) into my project by adding it to the list in Flash's "Publish Settings/Flash/ActionScrip 3.0 Settings/Library Path". It seems like I have access to the classes, however when I compile I get this error: 1046: Type was not found or was not a compile-time constant: [mx.rpc]::IResponder. There's no location or line for the error either. Any idea how to get this to work? TIA! Notes: I'm using Flash Builder 4 and Flash CS5

    Read the article

  • Beyond the @Produces annotation, how does Jersey (JAX-RS) know to treat a POJO as a specific mime ty

    - by hal10001
    I see a lot of examples for Jersey that look something like this: public class ItemResource { @GET @Path("/items") @Produces({"text/xml", "application/json"}) public List<Item> getItems() { List<Item> items = new ArrayList<Item>(); Item item = new Item(); item.setItemName("My Item Name!"); items.add(item); return items; } } But then I have trouble dissecting Item, and how Jersey knows how to translate an Item to either XML or JSON. I've seen very basic examples that just return a String of constructed HTML or XML, which makes more sense to me, but I'm missing the next step. I looked at the samples, and one of them stood out (the json-from-jaxb sample), since the object was marked with these types of annotations: @XmlAccessorType(XmlAccessType.FIELD) @XmlType(name = "", propOrder = { "flight" }) @XmlRootElement(name = "flights") I'm looking for tutorials that cover this "translation" step-by-step, or an explanation here of how to translate a POJO to output as a specific mime type. Thanks!

    Read the article

  • How can you handle cross-cutting conerns in JAX-WS without Spring or AOP? Handlers?

    - by LES2
    I do have something more specific in mind, however: Each web service method needs to be wrapped with some boiler place code (cross cutting concern, yes, spring AOP would work great here but it either doesn't work or unapproved by gov't architecture group). A simple service call is as follows: @WebMethod... public Foo performFoo(...) { Object result = null; Object something = blah; try { soil(something); result = handlePerformFoo(...); } catch(Exception e) { throw translateException(e); } finally { wash(something); } return result; } protected abstract Foo handlePerformFoo(...); (I hope that's enough context). Basically, I would like a hook (that was in the same thread - like a method invocation interceptor) that could have a before() and after() that could could soil(something) and wash(something) around the method call for every freaking WebMethod. Can't use Spring AOP because my web services are not Spring managed beans :( HELP!!!!! Give advice! Please don't let me copy-paste that boiler plate 1 billion times (as I've been instructed to do). Regards, LES

    Read the article

  • XSL-stylesheet URI using JAX-WS and Glassfish v3.

    - by Tony
    Hi there. I'm trying to use XSL-stylesheets in order to transform some generated XML-data to HTML-output. The architecture that I'm using is as follows: [Client Side] Web-Browser = [Server Side: Glassfish v3] JSP-pages - Web-Services. My web service generates some XML-data, then I want to format it with XSL-stylesheet, pass the result to JSP-page and show to user. I'm using JAXP for XSL-transformations and I want to create a javax.xml.transform.stream.StreamSource object with XSL-file stream for the javax.xml.transform.Transformer object, but I'm having a difficulty with specifying the path/URL for the XSL-file. So the question is: where should I put my XSL-stylesheets in a project and how should I access them from code? I'm using Glassfish v3 and NetBeans 6.8. Thanks.

    Read the article

  • Using an EJB inside a JAX-RS resource class in RestEasy?

    - by Laird Nelson
    I would like to have the following kind of resource class work when deployed under RestEasy in JBoss 6: @Path("Something") public class Foo { @EJB private SomeService service @GET public Object frobnicate() { assert service != null; // JBoss blows up here return result; } } Two questions: It is a limitation of RestEasy, not of the Java EE specification, right, that RestEasy can't inject anything annotated with @EJB? What have people done to work around this limitation? My developers are about to surge forward with hard-coded JNDI lookups (e.g. context.lookup(someHardCodedNameHere)) because no one can find a workaround to this specification violation at the present time. I really want to avoid this. Lastly, I've looked at using CDI, but the story here isn't much better as RestEasy and CDI still aren't talking to each other. Thanks in advance for any pointers.

    Read the article

  • Possible to split one JAX-WS service across multiple source files?

    - by Rob S.
    Hi everyone, Is it possible to split a web service in to multiple classes and still provide a single path to the web service? I know this isn't possible because of the duplicate url-pattern values. It sort of illustrates where we're wanting to go :) <endpoint name="OneBigService" implementation="SmallImpl1" url-pattern="/OneBigService"/> <endpoint name="OneBigService" implementation="SmallImpl2" url-pattern="/OneBigService"/> Basically, how do avoid having one monolithic @WebService class? Thanks! Rob

    Read the article

  • Java JAX-WS web-service client: how log request & response xml ?

    - by EugeneP
    I created an implementation of LoggingHandler that implements SOAPHandler It should log whenever handleMessage triggers. [ And it is never called in my case ] then : MyService service = new MyService(); MyServicePort port = service.getPortType(); now I try this: BindingProvider bindingProvider = (BindingProvider)port; bindingProvider.getBinding().getHandlerChain().add(new LoggingHandler()); I do not see any request / response xml though. Can you suggest any solution? Maybe there's other way to see output and request xml s ?

    Read the article

  • Can you return an array from a JAX-WS @WebMethod?

    - by LES2
    I'm pretty sure you can, but in addition to answering the question in the title, could you also explain the pros, cons, caveats, if any, to doing so? I know that you can't return a List, Set, Collection, Map, or any interface, from a WebMethod (which is stupid, IMO, but I don't know what the design reasons were should I should probably withhold judgment). Thanks for any advice. -- LES

    Read the article

  • Android XML-RPC Serialization Issue

    - by Josh Pennington
    I am attempting to use Android XML-RPC and for some calls I get the following exception: W/System.err( 837): java.io.IOException: Cannot serialize java.lang.Object@43759748 It looks like it is having troubles serializing the returned data, but I cannot find much documentation on how to actually use Android XML-RPC. The way I am using Android XML-RPC is as follows: Object response = (Object)client.call("sales_order.list", new Object()); This one is pretty odd. I have tried setting this call up in a few different ways (using HashMaps, not passing second variable, etc) and the response I get is that sales_order.list is not a valid Method. I have been able to login to the service using the following code: this.sessionId = (String)client.call("login", this.apiUserName, this.apiPassword); Does anyone have any ideas or a good resource on how to use Android XML-RPC? Thanks

    Read the article

< Previous Page | 3 4 5 6 7 8 9 10 11 12 13 14  | Next Page >