Robust In Only with RPC
Is there a way to use the Robust In Only MEP with a web service generated by using the RPC Receivers? I have a method: void createItem( foo ) { } That may through an exception. I would like the client to get a soap fault if there is an exception? Is this possible. Michael MacFadden Tomax Corp - http://www.tomax.com [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Ant Task Documentation Error
FYI, the documentation for the codgen ant task has an error in it. On this page: http://ws.apache.org/axis2/tools/1_0/CodegenToolReference.html The documentation lists a generateserverxml option on the ant task. The proper attribute of the task is generateservicexml. Using the former will generate an ant error. I looked into the source to find the correct attribute. Michael MacFadden Tomax Corp - http://www.tomax.com [EMAIL PROTECTED]
How to create RPC Style Web Service
I have been really struggling trying to make an RPC style web service with Axis 2. I finally have my WSDL the way I want it I think. I have attached it. The problem is when I generate code with WSDL2Java and package the service and deploy it. The WSDL Axis2 shows when I go to MyService?wsdl shows a document style WSDL. Is there a way to supply the WSDL I wrote to axis2 because the generated one doesn't look right to me. If anyone can help I would be grateful. Can anyone show me an example of an RPC style web service in Axis2? Please help. Thanks. Michael MacFadden Tomax Corp - http://www.tomax.com [EMAIL PROTECTED]
Strange Codegen for RPC
I have a wsdl that I have written that describes an rpc style web service. When I generate the code using WSDL2Java I get some strange results. Or at least it looks strange to me. the first thing I notice is that I get the following classes: Item - This represents the complex type I have defined in the WSDL. Item0 - This seems to be a wrapper class that just has a setItem and getItem method ItemManagerServiceStub - has a createItem method that takes and Item0 This seems odd to me, I would have expected to see the ItemManagerServiceStub class to have a method called createItem( Item param1 ). Meaning that the client could create a Item object and submit it to the service without having to wrap it in an Item0 object first. If there is a way to achieve this I would like to know how. Another thing I noticed is that in the ItemManagerServiceStub class that I have submitted I see the following code: //Style is Doc. env = toEnvelope(getFactory(_operationClient.getOptions().getSoapVersionURI()), param2, optimizeContent(new javax.xml.namespace.QName(, createItem))); This seems strange because the comment says style is doc, when I have set the style to rpc. This code was in the createItem method. Basically, it just doesn't look like I am really getting a client that looks like a RPC client. The generated API that uses the Item0 class and the //Style is Doc comment are both making me suspicious. Just want to know if I am looking at a defect and/or if there is a way to get what I want. Thanks Michael MacFadden Tomax Corp - http://www.tomax.com [EMAIL PROTECTED] The views or opinions expressed here are not endorsed by Tomax Corp. They are purely the opinions of the email author. ItemManagerServiceStub.java Description: Binary data example-item.wsdl Description: Binary data
Axis2 Client Question
I have a question about axis2. I was in the process of evaluating axis 1.3 for a project and I noticed that axis2 was released. Axis2 has some very attractive features, but I have one large question I need answered. Assume this very simple object structure. public class Customer { private String name; private int id; public Customer( String name, int id ) { setName( name ); setId( id ); } public int getId() { return id; } public void setId( int id ) { this.id = id; } public String getName() { return name; } public void setName( String name ) { this.name = name; } } public class CustomerManager { Customer getCustomer( int id ) { return new Customer( default, id ); } } So basically I have a customer that has a name and an id and I have a dummy manager class that will simulate accessing some data store of customers. What I want to do is have a web service that exposes the CustomerManager.getCustomer( int ) method. The idea being that the web service client could use the service to get a customer object based on its id. The end goal would be that the client would have some class that has a method called getCustomer which takes and returns a customer object. While looking at axis2 I can't seem to do this. I did manage to create the WSDL using the wsdl generation utility for the above example. However when I try to generate the client I get a class that has a method that looks something like this. GetCustomerResponse getCustomer( GetCustomer ) This is not very user friendly. Is this a symptom of the automatic WSDL generation or is this the only way to produce a client in Axis2. Note that I don't necessarily mean that the return object called Customer has to be the same object as listed about. It can be a newly generated class that has the same basic bean style getters and setters. I would really like to offer the consumer of the web service and API that includes a Customer class with nice getters and setters and a manager class that takes an int as an input and produces a customer as an output. I could do this with Axis1.3. Is this functionality not possible in Axis2. Do I have to manually wrap the generated web services client with classes to conform to the API I want (this would defeat the purpose of WSDL and also require to create a distribution for multiple platforms, negating the advantage of web services in the first place). Any help or ideas would be greatly appreciated. Thanks. Michael MacFadden Tomax Corp - http://www.tomax.com [EMAIL PROTECTED] The views, opinions, and judgments expressed in this message are solely those of the author. The message contents have not been reviewed or approved by Tomax Corporation .
Re: Axis2 Client Question
Thanks for the info. I guess I am used to the RPC style web services model. With axis1 the plan was to expose a specific API for web services. The internal object model of the application would not be exposed directly. Rather a well thought out API would be constructed. Then that API would be made available as Web Services. The client would have an API to work with rather than working with documents. This would seem to minimize the amount of code an end user would have to write to consume the web service. Sending documents across doesn't seem to be much more convenient that just documenting a particular soap messaging scheme and letting the end user use soap directly. The only major benefit seems like they get a WSDL that they can use to create a set of object to manipulate the soap message according to a schema. However, they still are just configuring the soap message. I realize the same thing happens in the RPC style web services, but the with RPC the client has a nicer API (IMO) that they can immediately understand. I could certainly write a set of classes that would wrap the code generated by Axis2, but then I would have to do that ahead of time and ship that with the system providing the web services. That would seem to defeat the benefit of all of those WSDL to source code generation utilities built into popular IDE's. I can I manually create a WSDL that will achieve what I want and that will work with Axis2? Thanks. Michael MacFadden Tomax Corp - http://www.tomax.com [EMAIL PROTECTED] The views, opinions, and judgments expressed in this message are solely those of the author. The message contents have not been reviewed or approved by Tomax Corporation . Anne Wrote: First -- a comment about document-oriented systems versus object-oriented systems. In SOA, it's generally considered a good idea to expose coarse-grained interfaces rather than fine-grained interfaces. Your goal is not to expose an object, but to expose a service. In other words, your service interface should not expose getter and setter methods for each attribute in your object structure. Second -- Axis2 does not currently support the wrapped convention -- i.e., constructing a wrapper element for your method parameters (the element name being the same as the operation name) and automatically unwrapping that element for the application. Therefroe your application must do the unwrapping itself. If you use java2wsdl, Axis2 will generate in input message element that has the same name as the operation, which is defined as a sequence of your input parameters, and an output message element called operation-nameResponse. If you don't like this mnamign convention, you can hand-craft your own WSDL and generate your Java code from it. Anne
Re: Axis2 Client Question
I figured out a lot of my problems were infact a result of the WSDL. I have updated it to get more of what I want. My last post still has some questions in it that are valid. Michael MacFadden Tomax Corp - http://www.tomax.com [EMAIL PROTECTED]