Search Results

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

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

  • JSON Rpc libraries for use with .NET

    - by Deeptechtons
    I am looking into JSON RPC libraries for .net that are free to use in commercial applications. Up until now i just seem to have found JROCK. What other libraries, architecture have i got similar to JRock for .NET 2.0 What is the difference between a [WebMethod] in asmx web-service returning a instance of a class and a JSON Rpc method as in the JRock website page. Do i have any usability benefits, performance benefits or any benefits of using one over the other

    Read the article

  • GWT-RPC vs HTTP Call - which is better??

    - by Nirmal Patel
    I am evaluating if there is a performance variation between calls made using GWT-RPC and HTTP Call. My appln services are hosted as Java servlets and I am currently using HTTPProxy connections to fetch data from them. I am looking to convert them to GWT-RPC calls if that brings in performance improvement. I would like to know about pros/cons of each... Also any suggestions on tools to measure performance of Async calls...

    Read the article

  • JAX-WS MarshalException with custom JAX-B bindings: Unable to marshal type "java.lang.String" as an

    - by MoneyMark
    I seem to be having an issue with Jax-WS and Jax-b playing nicely together. I need to consume a web-service, which has a predefined WSDL. When executing the generated client I am receiving the following error: javax.xml.ws.WebServiceException: javax.xml.bind.MarshalException - with linked exception: [com.sun.istack.SAXException2: unable to marshal type "java.lang.String" as an element because it is missing an @XmlRootElement annotation] This started occurring when I used an external custom binding file to map needlessly complex types to java.lang.string. Here is an excerpt from my binding file: <?xml version="1.0" encoding="UTF-8"?> <bindings xmlns="http://java.sun.com/xml/ns/jaxb" version="2.0" xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/" xmlns:xjc="http://java.sun.com/xml/ns/jaxb/xjc"> <bindings schemaLocation="http://localhost:7777/GESOR/services/RegistryUpdatePort?wsdl#types?schema1" node="/xs:schema"> <bindings node="//xs:element[@name='StwrdCompany']//xs:complexType//xs:sequence//xs:element[@name='company_name']"> <property> <baseType name="java.lang.String" /> </property> </bindings> <bindings node="//xs:element[@name='StwrdCompany']//xs:complexType//xs:sequence//xs:element[@name='address1']"> <property> <baseType name="java.lang.String" /> </property> </bindings> <bindings node="//xs:element[@name='StwrdCompany']//xs:complexType//xs:sequence//xs:element[@name='address2']"> <property> <baseType name="java.lang.String" /> </property> </bindings> ...more fields </bindings> </bindings> When executing wsimport against the provided WSDL, StwrdCompany is generated with the following variables declared: @XmlRootElement(name = "StwrdCompany") public class StwrdCompany { @XmlElementRef(name = "company_name", type = JAXBElement.class) protected String companyName; @XmlElementRef(name = "address1", type = JAXBElement.class) protected String address1; @XmlElementRef(name = "address2", type = JAXBElement.class) ... more fields ... getters/setters @XmlAccessorType(XmlAccessType.FIELD) @XmlType(name = "", propOrder = { "value" }) public static class CompanyName { @XmlValue protected String value; @XmlAttribute protected Boolean updateToNULL; /** * Gets the value of the value property. * * @return * possible object is * {@link String } * */ public String getValue() { return value; } /** * Sets the value of the value property. * * @param value * allowed object is * {@link String } * */ public void setValue(String value) { this.value = value; } /** * Gets the value of the updateToNULL property. * * @return * possible object is * {@link Boolean } * */ public boolean isUpdateToNULL() { if (updateToNULL == null) { return false; } else { return updateToNULL; } } /** * Sets the value of the updateToNULL property. * * @param value * allowed object is * {@link Boolean } * */ public void setUpdateToNULL(Boolean value) { this.updateToNULL = value; } ... more inner classes } } Finally, here is the associated snippet from the WSDL that seems to be causing such grief. <xs:element name="StwrdCompany"> <xs:complexType> <xs:sequence> <xs:element maxOccurs="1" minOccurs="0" name="company_name" nillable="true"> <xs:complexType> <xs:simpleContent> <xs:extension base="xs:string"> <xs:attribute default="false" name="updateToNULL" type="xs:boolean"/> </xs:extension> </xs:simpleContent> </xs:complexType> </xs:element> <xs:element maxOccurs="1" minOccurs="0" name="address1" nillable="true"> <xs:complexType> <xs:simpleContent> <xs:extension base="xs:string"> <xs:attribute default="false" name="updateToNULL" type="xs:boolean"/> </xs:extension> </xs:simpleContent> </xs:complexType> </xs:element> ... more fields in the same format <xs:element maxOccurs="1" minOccurs="0" name="p_source_timestamp" nillable="false" type="xs:string"/> </xs:sequence> <xs:attribute name="company_xid" type="xs:string"/> </xs:complexType> </xs:element> The reason for the custom binding is so I can map user input from a pojo into the StwrdCompany object more easily, whether it be direct instantiation or through the use of Dozer for bean mapping. I was unable to successfully map between the objects without the custom binding. Finally, one other thing I tried was setting a globalBinding definition: <globalBindings generateValueClass="false"></globalBindings> This caused the server to through an argument mismatch exception since the Soap Message was using xs:string xml types instead of passing the defined complex types, so I abandoned that idea. Any insight into what is causing the MarshalException or how to go about solving the issue of calling the webservice and mapping these objects more easily, is greatly appreciated. I've been searching for days and I sadly think I am stumped.

    Read the article

  • JAX-WS Consuming web service with WS-Security and WS-Addressing

    - by aurealus
    I'm trying to develop a standalone Java web service client with JAX-WS (Metro) that uses WS-Security with Username Token Authentication (Password digest, nonces and timestamp) and timestamp verification along with WS-Addressing over SSL. The WSDL I have to work with does not define any security policy information. I have been unable to figure out exactly how to add this header information (the correct way to do so) when the WSDL does not contain this information. Most examples I have found using Metro revolve around using Netbeans to automatically generate this from the WSDL which does not help me at all. I have looked into WSIT, XWSS, etc. without much clarity or direction. JBoss WS Metro looked promising not much luck yet there either. Anyone have experience doing this or have suggestions on how to accomplish this task? Even pointing me in the right direction would be helpful. I am not restricted to a specific technology other than it must be Java based.

    Read the article

  • JAX-RS JSON java.util.Date Unmarshall

    - by user229498
    Hi, I'm using Jersey (jax-rs), to build a REST rich application. Everything is great, but I really don't understand how to set in JSON Marshalling and Unmarshalling converting option for dates and numbers. I have a User class: @XmlRootElement public class User { private String username; private String password; private java.util.Date createdOn; // ... getters and setters } When createdOn property is serialized, a string like this: '2010-05-12T00:00:00+02:00', but I need to choose date Pattern both, to marshall and unmarshall. Someone knows hot to do that? Thank's a lot, Davide.

    Read the article

  • JAX-WS with JAXB tutorial

    - by Mac
    I'm getting started in developing web services using JAX-WS. I'm trying to implement classes I can send between my service and client using JAXB, but having trouble getting it to work. I've tried following the example at this site but cannot seem to get it to work. After following the instructions, the test page that's displayed doesn't have any way of defining the Die objects as is suggested by the article. All of this is very new to me, so I'm really not sure where to go. I've checked the WSDL file linked from the test page, and my best guess is that the JAXB is not working properly as I don't see the Die class or its properties mentioned anywhere. A good, fully worked example would be very beneficial. Does anyone know where one can be found? If it's any help, I'm working in Netbeans. Thanks!

    Read the article

  • Java: JAX-WS passing authentication info to a call to webservice

    - by agnieszka
    I am using JAX-WS. I am connecting to .NET webservice that requires authentication. I first call the Authentication.asmx so that I can be authenticated. The call returns me a LoginResult that contains a cookie name. Then I call another webservice and I need to somehow pass this cookie or a cookie name. and I don't know how. Here is the code: //first service that returns login information Authentication auth = new Authentication(new URL("the_url"), new QName("http://schemas.microsoft.com/sharepoint/soap/", "Authentication")); LoginResult result = auth.getAuthenticationSoap().login(HTTPuserName, HTTPpassword); //i need to pass cookie or cookie name or any other login information to call to this service Copy copyService = new Copy(new URL("service_url"), new QName("http://schemas.microsoft.com/sharepoint/soap/", "Copy")); BindingProvider p = (BindingProvider) copyService.getCopySoap();

    Read the article

  • Inject a EJB into JAX-RS (RESTfull service)

    - by Zeck
    Hi guys, I'm trying to inject Stateless EJB into my JAX-RS webservice via Annotations. Unfortunately the ejb is just null and I get a NullPointerException when I try to use it. @Path("book") public class BookResource { @EJB private BookEJB bookEJB; public BookResource() { } @GET @Produces("application/xml") @Path("/{bookId}") public Book getBookById(@PathParam("bookId") Integer id) { return bookEJB.findById(id); } } What am I wrong doing? Here are some informations about my machine: Glassfish 3.1 Netbeans 6.9 RC 2 Java EE 6 Can you guys put some working example? And thank you for every advises and examples?

    Read the article

  • JAX-WS: when input soap validation fails

    - by Jakob
    I have created a web service with JAX-WS. When the input SOAP message is not well formed or can not be validated, a soap fault is returned automatically to the caller. I dont want the caller to receive this standard SOAP message but i want to create an own custom SOAP fault. So if the call looks like this (note Envelope1, its not valid): hello a default return message is something like this: S:Client Couldn't create SOAP message due to exception: unexpected XML tag. expected: {http://schemas.xmlsoap.org/soap/envelope/}Envelope but found: {http://schemas.xmlsoap.org/soap/envelope/}Envelope1 I want the return message to be something like this: S:Client My own custom SOAP message! I have tried to get this to work the whole day, but i cant figure out how to do it. So if someone could help me I would be really glad!

    Read the article

  • Mapping java.util.Date to xs:date instead of xs:dateTime in JAX-WS

    - by Larsing
    Hi all, We hav an EJB, jws-anotated as a web service. It has a pretty complex pojo-model that generates an equally complex xsd. The pojos contain numerous java.util.Date. These all map to xs:dateTime. This service is used as "business service" in Oracle(BEA) OSB(AquaLogic). We also have a "proxy service" which we map to the BS with XQuery (the OSB/AquaLogic way). The proxy service's xsd has xs:date for the corresponding fields. For some reason, Oracle's implementation of XQuery does not support casting from xs:date to xs:dateTime(!). I could solve this by casting to xs:string and concat:ing with "T00:00:00", however, i would rather try to get JAX-WS to generate an xsd with xs:date instead. Only, I can't find any info on how to do this (anotations?). Can anyone give me a hint? Kind regards, Lars

    Read the article

  • Advantages of using a Dynamic Client with JAX-WS

    - by jconlin
    What are the advantages of using a dynamic client with JAX-WS services as opposed to just using generated client classes? What are the disadvantages? **For my particular case I am using Apache CXF, I'm not sure what other libraries allow "dynamic" clients. -I thought I didn't need to add this, but... I'm looking for non-obvious(I know...subjective) advantages. I don't need someone else to tell me that an advantage of not using generated classes is that I don't need to generate classes.

    Read the article

  • Gravatar XML-RPC request problem in Objective-C

    - by Erik
    Hi all, I'm trying to incorporate some Gravatar functionality using its XML-RPC API in an iPhone app I'm writing. I grabbed the Cocoa XML-RPC Framework by Eric Czarny (http://github.com/eczarny/xmlrpc) and it works well when I tested it with some of the Wordpress methods. However, when I try to use the Gravatar API, I always receive a response of "Error code: -9 Authentication error". I think I'm constructing the request correctly, but I've been wracking my brain and can't seem to figure it out. Maybe someone has some experience with this API or can see what I'm doing wrong. Here's the call: <?xml version="1.0"> <methodCall> <methodName>grav.addresses</methodName> <params> <param><value><string>PASSWORD_HERE</string></value></param> </params> </methodCall> Again, the Cocoa XML-RPC Framework worked like a dream with Wordpress, but it's choking on the Gravatar API for some reason. Thanks for your help.

    Read the article

  • XML-RPC over SSL with Ruby: end of file reached (EOFError)

    - by Michael Conigliaro
    Hello, I have some very simple Ruby code that is attempting to do XML-RPC over SSL: require 'xmlrpc/client' require 'pp' server = XMLRPC::Client.new2("https://%s:%d/" % [ 'api.ultradns.net', 8755 ]) pp server.call2('UDNS_OpenConnection', 'sponsor', 'username', 'password') The problem is that it always results in the following EOFError exception: /System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/lib/ruby/1.8/net/protocol.rb:135:in `sysread': end of file reached (EOFError) So it appears that after doing the POST, I don't get anything back. Interestingly, this is the behavior I would expect if I tried to make an HTTP connection on the HTTPS port (or visa versa), and I actually do get the same exact exception if I change the protocol. Everything I've looked at indicates that using "https://" in the URL is enough to enable SSL, but I'm starting wonder if I've missed something. Note that Even though the credentials I'm using in the RPC are made up, I'm expecting to at least get back an XML error page (similar to if you access https://api.ultradns.net:8755/ with a web browser). I've tried running this code on OSX and Linux with the exact same result, so I have to conclude that I'm just doing something wrong here. Does anyone have any examples of doing XML-RPC over SSL with Ruby?

    Read the article

  • Using @Context, @Provider and ContextResolver in JAX-RS

    - by Tamás
    I'm just getting acquainted with implementing REST web services in Java using JAX-RS and I ran into the following problem. One of my resource classes requires access to a storage backend, which is abstracted away behind a StorageEngine interface. I would like to inject the current StorageEngine instance into the resource class serving the REST requests and I thought a nice way of doing this would be by using the @Context annotation and an appropriate ContextResolver class. This is what I have so far: In MyResource.java: class MyResource { @Context StorageEngine storage; [...] } In StorageEngineProvider.java: @Provider class StorageEngineProvider implements ContextResolver<StorageEngine> { private StorageEngine storage = new InMemoryStorageEngine(); public StorageEngine getContext(Class<?> type) { if (type.equals(StorageEngine.class)) return storage; return null; } } I'm using com.sun.jersey.api.core.PackagesResourceConfig to discover the providers and the resource classes automatically, and according to the logs, it picks up the StorageEngineProvider class nicely (timestamps and unnecessary stuff left out intentionally): INFO: Root resource classes found: class MyResource INFO: Provider classes found: class StorageEngineProvider However, the value of storage in my resource class is always null - neither the constructor of StorageEngineProvider nor its getContext method is called by Jersey, ever. What am I doing wrong here?

    Read the article

  • How do you configure jax-ws to work with Spring using jax-ws commons?

    - by LES2
    In web.xml I have the following: <servlet> <description>JAX-WS endpoint - EARM</description> <display-name>jaxws-servlet</display-name> <servlet-name>jaxws-servlet</servlet-name> <servlet-class>com.sun.xml.ws.transport.http.servlet.WSSpringServlet</servlet-class> </servlet> <servlet-mapping> <servlet-name>jaxws-servlet</servlet-name> <url-pattern>/webServices/*</url-pattern> </servlet-mapping> In my application context I have the following definitions: <bean id="helloService" class="com.foo.HelloServiceImpl"> <property name="regularService" ref="regularService" /> </bean> <wss:binding url="/webServices/helloService" service="#helloService" /> I get a NullPointerException when trying to access the WSDL: java.lang.NullPointerException at com.sun.xml.ws.transport.http.HttpAdapter.<init>(HttpAdapter.java:145) at com.sun.xml.ws.transport.http.servlet.ServletAdapter.<init>(ServletAdapter.java:76) at com.sun.xml.ws.transport.http.servlet.ServletAdapterList.createHttpAdapter(ServletAdapterList.java:5 0) at com.sun.xml.ws.transport.http.servlet.ServletAdapterList.createHttpAdapter(ServletAdapterList.java:4 7) at com.sun.xml.ws.transport.http.HttpAdapterList.createAdapter(HttpAdapterList.java:73) at com.sun.xml.ws.transport.http.servlet.SpringBinding.create(SpringBinding.java:24) at com.sun.xml.ws.transport.http.servlet.WSSpringServlet.init(WSSpringServlet.java:46) Strange ... appears to be a configuration error but the darn thing just dies with a NullPointerException!!!!!!!! No logging is provided. Deployed in Resin.

    Read the article

  • Renaming the argument name in JAX-WS

    - by user182944
    I created a web service using JAX-WS in RSA 7.5 and Websphere 7 using bottom-up approach. When I open the WSDL in SOAP UI, then the arguments section is appearing like this: <!--Optional--> <arg0> <empID>?</empId> </arg0> <!--Optional--> <arg1> <empName>?</empName> </arg1> <!--Optional--> <arg2> <empAddress>?</empAddress> </arg2> <!--Optional--> <arg3> <empCountry>?</empCountry> </arg3> The service method takes the above 4 elements as the parameters to return the employee details. 1) I want to rename this arg0, arg1, and so on with some valid names. 2) I want to remove the <!--optional--> present above the arg tags. (For removing the <!--optional--> from elements name, I used @XMLElement(required=true)). But I am not sure where exactly to use this annotation in this case :( Please help. Regards,

    Read the article

  • XML-RPC with PHP and GoDaddy? Confusion sets in.

    - by Chris Cooper
    Hey folks, I am attempting to work with XML-RPC via PHP on a GoDaddy server. This same server is hosting a Wordpress Blog that makes use of XML-RPC and is functioning, though that may be unrelated... Whenever I attempt to use any functions that are integrated into PHP for use with XML-RPC, I get an error (function list here: http://us3.php.net/manual/en/ref.xmlrpc.php) e.g.: Fatal error: Class 'xmlrpc_client' not found Is this because XML-RPC's PHP functions are not enabled on my server? If so, how do I go about enabling those - it would seem I would have to install the XML-RPC library to do so and of course I cannot do that on a shared server. Doesn't Wordpress use the same batch of XML-RPC functions though (it works fine)? I think I have managed to thoroughly confuse myself. I have zero experience with XML-RPC.

    Read the article

  • Create an Asynchronous JAX-WS Web Service and call it from Oracle BPEL 11g

    - by Bob Webster
    This posting is the result of a simple requirement to take an existing JAX-WS Web service,convert it to be asynchronous and call it from Oracle BPEL 11g It turned out that this is not a trivial task... BPEL has some very specific expectations about the WSDL for an asynchronous process. One approach is to develop the service starting from a WSDL document that meets BPEL's requirements. This is possible but requires considerable WSDL authoring skills. The other approach is to modify the WSDL generated by Web Service Annotations in Java code (Bottom up development) and instruct JAX-WS to use that WSDL instead of dynamically generating one from annotations. This is the approach taken in this article. This posting details how to: Modify a JAX-WS Web Service developed using a "Bottom up " approach to have an asynchronous method and callback. Call the Asynchronous Service from Oracle BPEL 11g. Read the full posting here.

    Read the article

  • JAX Innovation Awards 2011

    - by Tori Wieldt
    The JAX Innovation Awards were presented tonight at the JAX Conference in San Jose, California, to reward those technologies, companies, organizations and individuals that make outstanding contributions to Java. The winners were:     •    Most Innovative Java Technology - JRebel    •    Most Innovative Java Company - Red Hat    •    Top Java Community Ambassador - Martin Odersky    •    Special Jury Award - Brian GoetzIn addition to being acknowledged best-in-class by peers from the Java community, winners received $2500 each. The JAXConf team took nominations from the community, had them reviewed by a panel of independent experts to create a shortlist, which was then voted on by the Java community."The java culture inspires innovation" said Sebastian Meyen, JAX Conference Chair, "and we are happy to reward that."  

    Read the article

  • how get xml responce using JAX-WS SOAP handler

    - by khris
    I have implemented web service: @WebServiceClient(//parameters//) @HandlerChain(file = "handlers.xml") public class MyWebServiceImpl {...} Also I have implemented ObjectFactory with list of classes for creating my requests and responses. For Example class Test. I need to get xml of response. I try to use JAX-WS SOAP handler, so I add this @HandlerChain(file = "handlers.xml") anotation. My handlers.xml looks like: <?xml version="1.0" encoding="UTF-8"?> <handler-chains xmlns="http://java.sun.com/xml/ns/javaee"> <handler-chain> <handler> <handler-class>java.com.db.crds.ws.service.LoggingHandler</handler-class> </handler> </handler-chain> </handler-chains> My LoggingHandler class is: import java.io.PrintWriter; import java.util.Set; import javax.xml.namespace.QName; import javax.xml.soap.SOAPMessage; import javax.xml.ws.handler.MessageContext; import javax.xml.ws.handler.soap.SOAPMessageContext; public class LoggingHandler implements javax.xml.ws.handler.soap.SOAPHandler<SOAPMessageContext> { public void close(MessageContext messagecontext) { } public Set<QName> getHeaders() { return null; } public boolean handleFault(SOAPMessageContext messagecontext) { return true; } public boolean handleMessage(SOAPMessageContext smc) { Boolean outboundProperty = (Boolean) smc.get (MessageContext.MESSAGE_OUTBOUND_PROPERTY); if (outboundProperty.booleanValue()) { System.out.println("\nOutbound message:"); } else { System.out.println("\nInbound message:"); } SOAPMessage message = smc.getMessage(); try { PrintWriter writer = new PrintWriter("soap_responce" + System.currentTimeMillis(), "UTF-8"); writer.println(message); writer.close(); message.writeTo(System.out); System.out.println(""); // just to add a newline } catch (Exception e) { System.out.println("Exception in handler: " + e); } return outboundProperty; } } I have test class which creates request, here are part of code: MyWebServiceImpl impl = new MyWebServiceImpl(url, qName); ws = impl.getMyWebServicePort(); Test req = new Test(); I suppose to get xml response in file "soap_responce" + System.currentTimeMillis(). But such file isn't even created. Please suggest how to get xml response, I'm new to web services and may do something wrong. Thanks

    Read the article

  • Example WCF XML-RPC client C# code against custom XML-RPC server implementation?

    - by mr.b
    I have built my own little custom XML-RPC server, and since I'd like to keep things simple, on both server and client side (server side PHP runs, by the way), what I would like to accomplish is to create a simplest possible client in C# using WCF. Let's say that Contract for service exposed via XML-RPC is as follows. [ServiceContract] public interface IContract { [OperationContract(Action="Ping")] string Ping(); // server returns back string "Pong" [OperationContract(Action="Echo")] string Echo(string message); // server echoes back whatever message is } So, there are two example methods, one without any arguments, and another with simple string argument, both returning strings (just for sake of example). Service is exposed via http. What's next? Thanks for reading! P.S. I have done my homework of googling around for samples and similar, but all that I could come up with are some blog-related samples that use existing (and very big) classes, which implement correct IContract (or IBlogger) interfaces, so that most of what I am interested is hidden below several layers of abstraction...

    Read the article

  • Tutorial: Simple WCF XML-RPC client

    - by mr.b
    Update: I have provided complete code example in answer below. I have built my own little custom XML-RPC server, and since I'd like to keep things simple, on both server and client side, what I would like to accomplish is to create a simplest possible client (in C# preferably) using WCF. Let's say that Contract for service exposed via XML-RPC is as follows: [ServiceContract] public interface IContract { [OperationContract(Action="Ping")] string Ping(); // server returns back string "Pong" [OperationContract(Action="Echo")] string Echo(string message); // server echoes back whatever message is } So, there are two example methods, one without any arguments, and another with simple string argument, both returning strings (just for sake of example). Service is exposed via http. Aaand, what's next? :)

    Read the article

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