Re: [Axis2] SSL and certificate support
Dumindu Pallewela wrote: Subra A Narayanan wrote: But when I was reading rampart documentation, it talks about soap body encryption using SSL certs. How is that different from using apache for SSL? To add to my previous reply, *SSL certificate* seems a misnomer when talking about Rampart, and SOAP body encryption. Shouldn't it rather be *x509 certificate*? Any thoughts? Which documentation are we talking about? Installation/Configuration guides[1][2] ? It should be X509 certificates. -Kau [1] http://ws.apache.org/rampart/c/docs/installationguide.html [2] http://ws.apache.org/rampart/c/docs/configurations.html -Dumindu. -- http://blog.kaushalye.org/ http://wso2.org/ - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Axis CPP 1.6 and Complex element
Sunil, If you are having server-side problems, then you will probably be out of luck for getting a timely fix, if you get one, since that side of things has been dormant for quite a while. However, on the client side of things, I still will perform debug and try to fix bugs assuming that I can recreate the problem, which requires WSDL and SOAP response. Nadir K. Amra Sunil Pandit [EMAIL PROTECTED] wrote on 11/19/2007 10:12:36 PM: Hello Axis experts , I am having some problems using axis cpp 1.6 . I have already posted my question but I have not got any feedback . I hope I get some feedback this time. I am using latest axis cpp build out of source code from svn . My web service is consuming a complex element which has two sub elements of type string . The code is genereted fine. However the webservice fails while deserializing the complex element . I am attaching the Axis log . I also tried invoking getElementAsString , passing the name of element . This function returns null value . I can see a valid soap request message in CPMonitor. I would appreciate any help in resolving this issue. (See attached file: AxisLog) Regards Sunil Pandit RD , CSC FSG Austin (512)2755792 - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Axis CPP 1.6 and Complex element
Nadir Thanks for your response. This is a server side problem. However I believe it is a very common use of web service and wondering if I am missing something . Your comments makes me think if I should switch to Axis2c. We are evaluating these products . Does Axis2/C have a good support for complex elements ? Regards Sunil Pandit RD , CSC FSG Austin (512)2755792 Computer Sciences Corporation Registered Office: 2100 East Grand Avenue, El Segundo California 90245, USA Registered in USA No: C-489-59 This is a PRIVATE message. If you are not the intended recipient, please delete without copying and kindly advise us by e-mail of the mistake in delivery. NOTE: Regardless of content, this e-mail shall not operate to bind CSC to any order or other contract unless pursuant to explicit written agreement or government initiative expressly permitting the use of e-mail for such purpose. Nadir Amra [EMAIL PROTECTED] To 11/20/2007 09:10 Apache AXIS C User List AMaxis-c-user@ws.apache.org cc Please respond to Subject Apache AXIS C Re: Axis CPP 1.6 and Complex User List element [EMAIL PROTECTED] pache.org Sunil, If you are having server-side problems, then you will probably be out of luck for getting a timely fix, if you get one, since that side of things has been dormant for quite a while. However, on the client side of things, I still will perform debug and try to fix bugs assuming that I can recreate the problem, which requires WSDL and SOAP response. Nadir K. Amra Sunil Pandit [EMAIL PROTECTED] wrote on 11/19/2007 10:12:36 PM: Hello Axis experts , I am having some problems using axis cpp 1.6 . I have already posted my question but I have not got any feedback . I hope I get some feedback this time. I am using latest axis cpp build out of source code from svn . My web service is consuming a complex element which has two sub elements of type string . The code is genereted fine. However the webservice fails while deserializing the complex element . I am attaching the Axis log . I also tried invoking getElementAsString , passing the name of element . This function returns null value . I can see a valid soap request message in CPMonitor. I would appreciate any help in resolving this issue. (See attached file: AxisLog) Regards Sunil Pandit RD , CSC FSG Austin (512)2755792 - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Axis2/C Memory Leaks
So there are still some known memory leak issues in axis2/c? I have been doing some testing to look for memory leaks and I do see that memory is being lost. I am using apache and _not_ the simple axis server. do we know when axis 1.2 is scheduled to be released? we are getting pretty close to our launch date, thats why I am concerned. the memory leaks that you have found, are they significant? ur input is much appreciated. Subra On Nov 19, 2007 9:30 PM, [EMAIL PROTECTED] wrote: Hi Edward, I've recently being fixing memory leaks in Axis2/C (using libxml2 parser). As far as I know, all the samples that we have do free all the resources before they exit, when the latest fixes would be done in 1.2.0. I haven't tried any generated code by the WSDL2C tool however, to see whether they do the freeing properly. *** If you could take a look at how the echo sample [axis2/c/samples] is implemented in both client and server sides, it should help. *** Please note that there are some still reachable blocks when you valgrind and I'm not sure whether it is a valgrind issue with glibc, or whether it is a dangling pointer, but there are no definite losses or indirect losses at the moment. Somebody correct me if I have made a wrong conclusion. On the other hand, there are still quite a number of leaks when you use the Guththila parser, which we are looking forward to fix. If you believe that the code generated by the codegen tool, lacks the freeing of memory, as in the samples that are provided, please feel free to raise an issue at the JIRA, and propose a patch. N.B. I'm not sure whether all the patches that I proposed are reflected on the current svn. But, I'm pretty sure that they would be, with the Axis2/C 1.2.0 release. Hi, I am designing some web service client code using the Axis2/C framework (used WSDL2C to generate client stubs that call the framework). I have a separate executable C file (C file that a main()) that calls the stub. When I ran valgrind initially on it, I saw many memory leaks from this; 49 loss records to be exact. However, after inserting axis2_stub_free and axutil_env_free before my end return statement in my executable C file, I noticed that the loss records decreased greatly to 5. I noticed that this freeing of the stub and env variables is not in the sample client code. Should the sample client code also demonstrate this freeing, and is this freeing logical to do on the client side? Also, I did some initial tests on the server side and noticed many memory leaks as well. Should this client-side freeing be also implemented on my server code, or is the server-side freeing done differently and how if anyone can describe where to insert the freeing statements? Thanks, Edward - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Freeing in axutil_array_list
I did some investigation in the source code for axutil_array_list_free and I noticed that the individual array elements in array_list are not being freed up, just the entire data object. From my diff, here is the change I made (lines starting with the plus): Index: util/src/array_list.c === --- util/src/array_list.c (revision ) +++ util/src/array_list.c (working copy) @@ -258,7 +258,14 @@ if (array_list-data) { + int i; + for (i = 0; i array_list-size; i++) + { + AXIS2_FREE(env-allocator, array_list-data[i]); + array_list-data[i] = NULL; + } AXIS2_FREE(env-allocator, array_list-data); + array_list-data = NULL; } AXIS2_FREE(env-allocator, array_list); return; With these new lines, I noticed that there is a slight improvement, with less memory leakage. The increase in memory recovery is very beneficial, whether small or large, for me. Is there a reason why the individual elements were not being freed up in the first place? Can this be tested outside of my environment for validity? Thanks, Edward - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Axis2/C Memory Leaks
Subra A Narayanan wrote: So there are still some known memory leak issues in axis2/c? I have been doing some testing to look for memory leaks and I do see that memory is being lost. I am using apache and _not_ the simple axis server. With Apache module, you are better off, because of the use of apr pools. We have plugged our allocator to apr pool mechanisms and we can be assured we are in good hands. There would be a slight memory growth, due to the operation contexts being stored in the global pool, however, IMHO that is something that we can live with for the time being. Once we figure out the shared memory mechanisms, that too would be hopefully solved. do we know when axis 1.2 is scheduled to be released? we are getting pretty close to our launch date, thats why I am concerned. 1.2 could be released in another months time. the memory leaks that you have found, are they significant? We have hit zero for echo samples in the early releases. I am sure this time too we could be able to do that. The generated code would have possibilities of memory leaks. That needs to be looked into. Samisa... ur input is much appreciated. Subra On Nov 19, 2007 9:30 PM, [EMAIL PROTECTED] wrote: Hi Edward, I've recently being fixing memory leaks in Axis2/C (using libxml2 parser). As far as I know, all the samples that we have do free all the resources before they exit, when the latest fixes would be done in 1.2.0. I haven't tried any generated code by the WSDL2C tool however, to see whether they do the freeing properly. *** If you could take a look at how the echo sample [axis2/c/samples] is implemented in both client and server sides, it should help. *** Please note that there are some still reachable blocks when you valgrind and I'm not sure whether it is a valgrind issue with glibc, or whether it is a dangling pointer, but there are no definite losses or indirect losses at the moment. Somebody correct me if I have made a wrong conclusion. On the other hand, there are still quite a number of leaks when you use the Guththila parser, which we are looking forward to fix. If you believe that the code generated by the codegen tool, lacks the freeing of memory, as in the samples that are provided, please feel free to raise an issue at the JIRA, and propose a patch. N.B. I'm not sure whether all the patches that I proposed are reflected on the current svn. But, I'm pretty sure that they would be, with the Axis2/C 1.2.0 release. Hi, I am designing some web service client code using the Axis2/C framework (used WSDL2C to generate client stubs that call the framework). I have a separate executable C file (C file that a main()) that calls the stub. When I ran valgrind initially on it, I saw many memory leaks from this; 49 loss records to be exact. However, after inserting axis2_stub_free and axutil_env_free before my end return statement in my executable C file, I noticed that the loss records decreased greatly to 5. I noticed that this freeing of the stub and env variables is not in the sample client code. Should the sample client code also demonstrate this freeing, and is this freeing logical to do on the client side? Also, I did some initial tests on the server side and noticed many memory leaks as well. Should this client-side freeing be also implemented on my server code, or is the server-side freeing done differently and how if anyone can describe where to insert the freeing statements? Thanks, Edward - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: WSDL2C create function conflicts with SOAP operation named create
If I understand your reference to the absence of namespaces in my example, Dimuthu, you are correct to identify that as a distinct but similar name uniqueness issue. Certainly the WSDL itself could contain name conflicts that are resolved through the use of distinct namespaces. So, where I wrote axis2_stub_start_op_servicename_opname, in the general case that would need to be axis2_stub_start_op_ns1_servicename_ns2_opname. This could certainly be remedied as part of the same project. In the simple case where all the user names are part of the same namespace, one could default to the status quo and leave these out. To handle the general case, one could use the -N command line argument to WSDL2Java for the similar purpose here. This would allow the WSDL2C user to determine the prefix to be used for each namespace. The important part to avoid name conflicts, similar to the other situations I raised, is that every element always be generated or never generated. In a situation where namespace identifiers are included, they need to be included everywhere to guarantee that a namespace identifier in one place is not confused with the same string that is part of a user name in another place. And, of course, the other important part is the suggestion I made below, that all parts of the Axis generated name precede any parts of the user name, and no Axis string prefix be the leading substring of another Axis generated string prefix. I made my suggestion for an option to preserve the status quo only to handle the case where you folks think there is enough installed base and the change is awkward enough to demand it. I personally don't have a strong opinion one way or the other on compatibility with the status quo. Thanks, Bill Hi Bill, So briefly your suggestion is, For wsdl operations in the stub, axis2_stub_servicename_opname should be replaced with axis2_stub_op_servicename_opname. axis2_stub_servicename_opname_start should be replaced with axis2_stub_start_op_servicename_opname. and for consistency non wsdl-operations in the stub, axis2_stub_servicename_create should be replaced with axis2_stub_create_servicename. The only issue against this suggestion is, there the namespace part of the operation is not prefixed. But we can just forget that, if this solves all the problems. Anyway I doubt whether we can provide the old functions with a user option, since it need to add some code to the java tool (code portions not specific to c codegeneration), But we can give a try. I will let devs know this discussion and ask their suggestions. Thanks Dimuthu -- View this message in context: http://www.nabble.com/WSDL2C-create-function-conflicts-with-SOAP-operation-named-create-tf4818227.html#a13870069 Sent from the Axis - C++ - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Freeing in axutil_array_list
Hi Edward, Please see my comments inline. On Tue, 2007-11-20 at 16:33 -0500, [EMAIL PROTECTED] wrote: I did some investigation in the source code for axutil_array_list_free and I noticed that the individual array elements in array_list are not being freed up, just the entire data object. From my diff, here is the change I made (lines starting with the plus): Index: util/src/array_list.c === --- util/src/array_list.c (revision ) +++ util/src/array_list.c (working copy) @@ -258,7 +258,14 @@ if (array_list-data) { + int i; + for (i = 0; i array_list-size; i++) + { + AXIS2_FREE(env-allocator, array_list-data[i]); + array_list-data[i] = NULL; + } AXIS2_FREE(env-allocator, array_list-data); + array_list-data = NULL; } AXIS2_FREE(env-allocator, array_list); return; With these new lines, I noticed that there is a slight improvement, with less memory leakage. The increase in memory recovery is very beneficial, whether small or large, for me. Is there a reason why the individual elements were not being freed up in the first place? Yes in the real situation we don't know what sort of data type is stored in the arraylist. so we can't use AXIS2_FREE to free those individual elements. Those should be freed using there own free function. So it is arraylist user's responsibility to free those individual elements. -Manjula. Thanks, Edward - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: AW: echo.exe client has infer transport error
Hi Josef, Please find my comments inline. Stadelmann Josef [EMAIL PROTECTED] writes: Now my simple http server is up and running on OpenVMS, in fact it is waiting within it's first accept() for the client to initiate a conversation. Now, the echo_blocking client fails with the following echo_blocking.log Can you see the deployed services through the browser ? [Tue Nov 20 15:36:31 2007] [debug] DSA5:[webservices.axis2.trunk.c.src.core.clientapi]op_client.c;3(813) Start:axis2_op_client_infer_transport [Tue Nov 20 15:36:31 2007] [error] DSA5:[webservices.axis2.trunk.c.src.core.clientapi]op_client.c;3(863) [axis2c] Cannot infer transport [Tue Nov 20 15:36:31 2007] [debug] DSA5:[webservices.axis2.trunk.c.src.core.clientapi]op_client.c;3(868) End:axis2_op_client_infer_transport This error usually happens when op_client unable to locate the transport in/out descriptors (as you mentioned in the later in this mail). According to my knowledge That happens due to several reasons. 1. axis2.xml has wrong transport sender/receiver information 2. Axis2/C engine unable to locate libaxis2_http_sender.so or libaxis2_http_receiver.so. 3.When there is unloadable (corrupted) library. BTW, what axis2/c version are you using? as per log messages it should be prior to the Axis2/C 1.1.0. * Tell me ! if the client code finds all the services and the addr module and the logging module why should axis2c_home be the problem with this client run? * AFAIK, AXIS2C_HOME is not important , but repo_path is essential. (AXIS2C_HOME use to make the repo_path). Repo path is use to find axis2.xml. Details in axis2.xml use to build axis2 configuration. HTH thanks, Dinesh - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: WSDL2C create function conflicts with SOAP operation named create
Hi Bill, Currently whenever there is a name conflict in schema elements, they will be named with a post fix. And in the headers we should show the namespaces, so the developers will be able to figure out the right element. Thanks Dimuthu On Nov 21, 2007 8:16 AM, Bill Mitchell [EMAIL PROTECTED] wrote: If I understand your reference to the absence of namespaces in my example, Dimuthu, you are correct to identify that as a distinct but similar name uniqueness issue. Certainly the WSDL itself could contain name conflicts that are resolved through the use of distinct namespaces. So, where I wrote axis2_stub_start_op_servicename_opname, in the general case that would need to be axis2_stub_start_op_ns1_servicename_ns2_opname. This could certainly be remedied as part of the same project. In the simple case where all the user names are part of the same namespace, one could default to the status quo and leave these out. To handle the general case, one could use the -N command line argument to WSDL2Java for the similar purpose here. This would allow the WSDL2C user to determine the prefix to be used for each namespace. The important part to avoid name conflicts, similar to the other situations I raised, is that every element always be generated or never generated. In a situation where namespace identifiers are included, they need to be included everywhere to guarantee that a namespace identifier in one place is not confused with the same string that is part of a user name in another place. And, of course, the other important part is the suggestion I made below, that all parts of the Axis generated name precede any parts of the user name, and no Axis string prefix be the leading substring of another Axis generated string prefix. I made my suggestion for an option to preserve the status quo only to handle the case where you folks think there is enough installed base and the change is awkward enough to demand it. I personally don't have a strong opinion one way or the other on compatibility with the status quo. Thanks, Bill Hi Bill, So briefly your suggestion is, For wsdl operations in the stub, axis2_stub_servicename_opname should be replaced with axis2_stub_op_servicename_opname. axis2_stub_servicename_opname_start should be replaced with axis2_stub_start_op_servicename_opname. and for consistency non wsdl-operations in the stub, axis2_stub_servicename_create should be replaced with axis2_stub_create_servicename. The only issue against this suggestion is, there the namespace part of the operation is not prefixed. But we can just forget that, if this solves all the problems. Anyway I doubt whether we can provide the old functions with a user option, since it need to add some code to the java tool (code portions not specific to c codegeneration), But we can give a try. I will let devs know this discussion and ask their suggestions. Thanks Dimuthu -- View this message in context: http://www.nabble.com/WSDL2C-create-function-conflicts-with-SOAP-operation-named-create-tf4818227.html#a13870069 Sent from the Axis - C++ - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: wsdl version
Simon Steinacker ha scritto: Hello, I have a general question: Which version of WSDL (1.1/2.0) is recommended to be used? Is WSDL 2.0 already stable and applicable in a critical business applications? Thanks, Lg Simon It may depend on the level of interoperability you want to have. I might be wrong, but I think .NET 1.1 is not compatible with WSDL 2.0. -- Mauro Molinari Software Developer [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Shared schemas: where to put them?
Mauro Molinari ha scritto: Another clue is that if I try to generate a client pointing to http://server:8080/contextpath/services/MyService1?wsdl, Java2WSDL says that it cannot retrieve the schema. Sorry, I meant WSDL2Java, not Java2WSDL ;-) -- Mauro Molinari Software Developer [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Shared schemas: where to put them?
Hi! I had similar requirements and decided to rely on code generation by WSDL2JAVA. WSDL2JAVA takes the unique shared XSD from a source directory and copies it for each service. That is, I have a directory wsdlDefinitions that contains service1.wsdl, service2.wsdl, and common.xsd. Then I run WSDL2JAVA to generate server code with the -R option, and .../MyService1/META-INF/service1.wsdl .../MyService1/META-INF/common.xsd .../MyService2/META-INF/service2.wsdl .../MyService2/META-INF/common.xsd are generated. I have no troubles with the replication of common.xsd because I only change wsdlDefinitions/common.xsd. Generated artefacts won't be touched anyway. I know that my approach above may not be appropriate in your situation. If so, perhaps You can try setting the useOriginalWSDL parameter in the service.xml to true. Frankly, I don't know the effects of doing this. Good luck, Peter. Mauro Molinari [EMAIL PROTECTED] schrieb am 20.11.2007 10:53:47: Hello! I have a problem if I want to share some schema files between services. Suppose I have the following structure: The WSDLs for MyService1 and MyService2 are in the following folders, respectively: contextpath/WEB-INF/services/MyService1/META-INF/ contextpath/WEB-INF/services/MyService2/META-INF/ I want them to share Common.xsd: where should I put it? If I put it here: contextpath/WEB-INF/services/ and the xsd:import schemaLocation in the WSDLs points to ../../Common.xsd, Axis2 can find them and processes the services correctly, but when it substitutes the link to it in the WSDLs, it generates the following links: MyService1?xsd=../../Common.xsd (in MyService1 WSDL) MyService2?xsd=../../Common.xsd (in MyService2 WSDL) The problem is that from an HTTP client point of view, this translates to path contextpath/Common.xsd: in fact, if you try to write the link: http://server:8080/contextpath/services/MyService1?xsd=../../Common.xsd a file not found error is given. Another clue is that if I try to generate a client pointing to http://server:8080/contextpath/services/MyService1?wsdl, Java2WSDL says that it cannot retrieve the schema. By manually typing: http://server:8080/contextpath/services/MyService1?xsd=../Common.xsd I see that the schema can actually be found; but if I replace the xsd:import in the original WSDL so that the schemaLocation points to ../Common.xsd, then Axis2 can't find it anymore, because it searches for it in contextpath/WEB-INF/services/MyService1/ and the generation of the WSDL fails. How to face this problem? Where should I put the shared schemas? How to reference them from within the original WSDLs? Thanks in advance. -- Mauro Molinari Software Developer [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Axis2 and oc4j deployment
Maybe it's blocked from a firewall or something? Does the error come out right away or does it wait first? Also, if the web application requires some security then you might need to provide your credentials first (e.g. principal password). You can view the wsdl before logging in the application? On Nov 20, 2007 9:46 AM, Hoda, Nadeem [USA] [EMAIL PROTECTED] wrote: Folks, We are deploying our Axis2 services on oc4j 1012 (simplest service possible, based on /samples/quickstart [code first]). Locally (even if we access from a different machine), the services work pefectly, but the dev environment deployment is failing with the following error (via Axis2 client): org.apache.axis2.AxisFault: Transport error: 503 Error: Service Unavailable at org.apache.axis2.transport.http.HTTPSender.handleResponse(HTTPSender.java:298) at org.apache.axis2.transport.http.HTTPSender.sendViaPost(HTTPSender.java:192) at org.apache.axis2.transport.http.HTTPSender.send(HTTPSender.java:77) at org.apache.axis2.transport.http.CommonsHTTPTransportSender.writeMessageWithCommons(CommonsHTTPTransportSender.java:327) at org.apache.axis2.transport.http.CommonsHTTPTransportSender.invoke(CommonsHTTPTransportSender.java:206) at org.apache.axis2.engine.AxisEngine.send(AxisEngine.java:396) at org.apache.axis2.description.OutInAxisOperationClient.send(OutInAxisOperation.java:374) at org.apache.axis2.description.OutInAxisOperationClient.executeImpl(OutInAxisOperation.java:211) at org.apache.axis2.client.OperationClient.execute(OperationClient.java:163) The WSDL is easily assessible through the browser, so the port, etc, are correct. I have tried multiple web service clients, and they all fail. Can anyone provide guidance? Thanks, Nadeem -- Dimitris Mouchritsas Computer Services - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: generating SOAP Header Elements - SOLVED
It was easy, I just did not see it at first: // add an ServiceAuthHeader node SOAPHeaderElement authHeader = new SOAPHeaderElement(new QName(ServiceAuthHeader)); authHeader.setAttribute(xmlns, NAMESPACE); SOAPElement userIdNode = authHeader.addChildElement(Username); userIdNode.addTextNode(USER_ID); SOAPElement passwordNode = authHeader.addChildElement(Password); passwordNode.addTextNode(PASSWORD); But I am still curious: shouldn't those two snippets both work? Andy Andy Pahne schrieb: I have a problem with a SOAP header element that I added to a webservice request, after the webservice provider improved their webservice. SOAPHeaderElement authHeader = new SOAPHeaderElement( http://xyz.com/services;, ServiceAuthHeader); SOAPElement userIdNode = authHeader.addChildElement(Username); userIdNode.addTextNode(USER_ID); SOAPElement passwordNode = authHeader.addChildElement(Password); passwordNode.addTextNode(PASSWORD); ((Stub) service).setHeader(authHeader); That resultet in generated XML like this: soap:Header ns1:ServiceAuthHeader xmlns:ns1=http://xyz.com/services; soap:actor=http://schemas.xmlsoap.org/soap/actor/next; soap:mustUnderstand=0 ns1:UsernameABC/ns1:Username ns1:PasswordDEF/ns1:Password /ns1:ServiceAuthHeader /soap:Header Now, after the upgrade, it just doesn't work anymore. As I am told, the namespace that is added to the header causes the problem. If the header would be more like the following, everything would be fine. soap:Header ServiceAuthHeader MyAttribute= xmlns=http://xyz.com/webservice; UsernameABC/Username PasswordDEF/Password /ServiceAuthHeader /soap:Header I really tried hard to modify the code in order to achieve a result like the above, which works with the remote system, but I couldn't. Is this possible with generated client code? Just for curiosity: those two XML-snippets should work equally well, shouldn't they? At least if I understand XML right, or not? Best regards, Andy -- Andy Pahne System Architektur Software Design net22 GmbH Ehrenbergweg 24 32760 Detmold http://www.net22.de Email [EMAIL PROTECTED] Telefon +49 (5231) 58 06 40 Mobil +49 (174) 171 68 70 - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: How to create a soap envelope using AXIOM?
It could be an OMElement. eg. soap11Factory.createOMElement(...) Upul On Nov 20, 2007 3:25 PM, juliocest [EMAIL PROTECTED] wrote: Hi Upul! Thanks for your help... But, what would be a omnode in this context? I do not understand. Thanks. Julio Upul Godage wrote: SOAPFactory soap11Factory = OMAbstractFactory.getSOAP11Factory(); SOAPEnvelope newEnvelope = soap11Factory.getDefaultEnvelope(); ... SOAPHeaderBlock newSOAPHeaderBlock = soap11Factory.createSOAPHeaderBlock( localName, namespace); ... newEnvelope.getHeader().addChild(newSOAPHeaderBlock); ... newEnvelope.getBody().addChild(omNode); Hope these bits help. Upul On Nov 20, 2007 5:54 AM, juliocest [EMAIL PROTECTED] wrote: Hi, I would like to know how can I do a SOAP envelope using axiom. I want to construct the envelope with header and body. Many tutorials explain how to create the soap body, but few explain how create the envelope from scratch. Thanks for a possible help. Julio -- View this message in context: http://www.nabble.com/How-to-create-a-soap-envelope-using-AXIOM--tf4840398.html#a13848521 Sent from the Axis - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] -- View this message in context: http://www.nabble.com/How-to-create-a-soap-envelope-using-AXIOM--tf4840398.html#a13853730 Sent from the Axis - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: SOAP XML from HttpRequest
You could use the Axis2 MessageContext to retrieve an AXIOM representation of the SOAPEnvelope. For example, something like org.apache.axiom.soap.SOAPEnvelope se = org.apache.axis2.context.MessageContext.getCurrentMessageContext ().getEnvelope(); may get you started. Regards, Peter. Lahoria [EMAIL PROTECTED] schrieb am 19.11.2007 22:07:18: Hi There I am kinda new to SOAP and may be its very basic question but I am having hard time to find the answer: how to extract/retrieve SOAP XML from am incoming HttpRequest. I want to intercept the incoming SOAP call and do some processing. From the HttpRequest header I know there is a SOAP call as the SOAPAction is set and the content type of rquest are text/xml. Any help/pointers would be really appreciated. Regards -- View this message in context: http://www.nabble.com/SOAP-XML-from- HttpRequest-tf4839475.html#a13845400 Sent from the Axis - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Hos axis2 is integrated with Rampart ?
Hi, When rampart is used, it creates wsse headers in the soap request from the client side, and from the server side it validates the headers. I want to know where it is instructed that the rampart handlers are to be executed to validate the security headers? I tried going through the axis source files but I am not able to understand how the soap request reaches the WSDoAllReceiver class!! I say this because, if I trim the security headers in the soap request and then send this request, it throws back an Axis fault saying WSDoAllReceiver: Incoming message does not contain required Security header Can anyone try to throw light on this? Thanks, -Subhash- This e-mail and any files transmitted with it are for the sole use of the intended recipient(s) and may contain confidential and privileged information. If you are not the intended recipient, please contact the sender by reply e-mail and destroy all copies of the original message. Any unauthorized review, use, disclosure, dissemination, forwarding, printing or copying of this email or any action taken in reliance on this e-mail is strictly prohibited and may be unlawful.
RE: NullPointerException in WSDL20ToAxisServiceBuilder
Hi Sean, Have you validated the wsdl file? The exception thrown looks very clear and points to that direction. Regards, Sietse -Original Message- From: Sullivan, Sean [mailto:[EMAIL PROTECTED] Sent: 19 November 2007 20:01 To: axis-user@ws.apache.org Subject: NullPointerException in WSDL20ToAxisServiceBuilder Hello, I am using Apache Axis 2 version 1.3 and JDK 1.5.0_13 When I run wsdl2java, I encounter a NullPointerException in WSDL20ToAxisServiceBuilder Is this a known bug? Sean c:\axis2-1.3\bin\wsdl2java -ss -wv 2.0 -p com.mycorp.foo -o src -uri .\webservices\TmsServices.wsdl Using AXIS2_HOME: c:\axis2-1.3 Using JAVA_HOME:C:\Progra~1\Java\jdk1.5.0_13 Exception in thread main org.apache.axis2.wsdl.codegen.CodeGenerationException : Error parsing WSDL at org.apache.axis2.wsdl.codegen.CodeGenerationEngine.init(CodeGenerat ionEngine.java:147) at org.apache.axis2.wsdl.WSDL2Code.main(WSDL2Code.java:35) at org.apache.axis2.wsdl.WSDL2Java.main(WSDL2Java.java:24) Caused by: org.apache.axis2.AxisFault at org.apache.axis2.AxisFault.makeFault(AxisFault.java:417) at org.apache.axis2.description.WSDL20ToAxisServiceBuilder.populateServi ce(WSDL20ToAxisServiceBuilder.java:236) at org.apache.axis2.wsdl.codegen.CodeGenerationEngine.init(CodeGenerat ionEngine.java:101) ... 2 more Caused by: java.lang.NullPointerException at org.apache.axis2.description.WSDL20ToAxisServiceBuilder.createAxisMes sage(WSDL20ToAxisServiceBuilder.java:976) at org.apache.axis2.description.WSDL20ToAxisServiceBuilder.populateOpera tions(WSDL20ToAxisServiceBuilder.java:926) at org.apache.axis2.description.WSDL20ToAxisServiceBuilder.processInterf ace(WSDL20ToAxisServiceBuilder.java:849) at org.apache.axis2.description.WSDL20ToAxisServiceBuilder.processServic e(WSDL20ToAxisServiceBuilder.java:306) at org.apache.axis2.description.WSDL20ToAxisServiceBuilder.populateServi ce(WSDL20ToAxisServiceBuilder.java:233) ... 3 more - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
generating SOAP Header Elements
I have a problem with a SOAP header element that I added to a webservice request, after the webservice provider improved their webservice. SOAPHeaderElement authHeader = new SOAPHeaderElement( http://xyz.com/services;, ServiceAuthHeader); SOAPElement userIdNode = authHeader.addChildElement(Username); userIdNode.addTextNode(USER_ID); SOAPElement passwordNode = authHeader.addChildElement(Password); passwordNode.addTextNode(PASSWORD); ((Stub) service).setHeader(authHeader); That resultet in generated XML like this: soap:Header ns1:ServiceAuthHeader xmlns:ns1=http://xyz.com/services; soap:actor=http://schemas.xmlsoap.org/soap/actor/next; soap:mustUnderstand=0 ns1:UsernameABC/ns1:Username ns1:PasswordDEF/ns1:Password /ns1:ServiceAuthHeader /soap:Header Now, after the upgrade, it just doesn't work anymore. As I am told, the namespace that is added to the header causes the problem. If the header would be more like the following, everything would be fine. soap:Header ServiceAuthHeader MyAttribute= xmlns=http://xyz.com/webservice; UsernameABC/Username PasswordDEF/Password /ServiceAuthHeader /soap:Header I really tried hard to modify the code in order to achieve a result like the above, which works with the remote system, but I couldn't. Is this possible with generated client code? Just for curiosity: those two XML-snippets should work equally well, shouldn't they? At least if I understand XML right, or not? Best regards, Andy -- Andy Pahne - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Stub generated is not proper,few important classesare missing
Hi All, please help me out,the stub which i got generated is not proper i feel. on executing the code wsdl2java -u -ss -g -uri http:// -o (o/p path) i get the following error though my files are created,how to resolve this plz help. Exception in thread main org.apache.axis2.wsdl.codegen.CodeGenerationException : java.lang.RuntimeException: java.lang.reflect.InvocationTargetException at org.apache.axis2.wsdl.codegen.CodeGenerationEngine.generate(CodeGener ationEngine.java:265) at org.apache.axis2.wsdl.WSDL2Code.main(WSDL2Code.java:35) at org.apache.axis2.wsdl.WSDL2Java.main(WSDL2Java.java:24) Caused by: java.lang.RuntimeException: java.lang.reflect.InvocationTargetExcepti on at org.apache.axis2.wsdl.codegen.extension.SimpleDBExtension.engage(Simp leDBExtension.java:53) at org.apache.axis2.wsdl.codegen.CodeGenerationEngine.generate(CodeGener ationEngine.java:218) ... 2 more Caused by: java.lang.reflect.InvocationTargetException at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl. java:39) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAcces sorImpl.java:25) at java.lang.reflect.Method.invoke(Method.java:597) at org.apache.axis2.wsdl.codegen.extension.SimpleDBExtension.engage(Simp leDBExtension.java:50) ... 3 more Caused by: org.apache.axis2.schema.SchemaCompilationException: {http://schemas.x mlsoap.org/soap/encoding/}Array is not supported. at org.apache.axis2.schema.SchemaCompiler.findClassName(SchemaCompiler.j ava:819) at org.apache.axis2.schema.SchemaCompiler.processComplexContent(SchemaCo mpiler.java:1201) at org.apache.axis2.schema.SchemaCompiler.processContentModel(SchemaComp iler.java:1077) at org.apache.axis2.schema.SchemaCompiler.processComplexType(SchemaCompi ler.java:993) at org.apache.axis2.schema.SchemaCompiler.processNamedComplexSchemaType( SchemaCompiler.java:914) at org.apache.axis2.schema.SchemaCompiler.compile(SchemaCompiler.java:32 7) at org.apache.axis2.schema.SchemaCompiler.compile(SchemaCompiler.java:21 2) at org.apache.axis2.schema.ExtensionUtility.invoke(ExtensionUtility.java :80) thanks, Amardeep -- View this message in context: http://www.nabble.com/Stub-generated-is-not-proper%2Cfew-important-classesare-missing-tf4842277.html#a13853716 Sent from the Axis - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Shared schemas: where to put them?
Hello! I have a problem if I want to share some schema files between services. Suppose I have the following structure: The WSDLs for MyService1 and MyService2 are in the following folders, respectively: contextpath/WEB-INF/services/MyService1/META-INF/ contextpath/WEB-INF/services/MyService2/META-INF/ I want them to share Common.xsd: where should I put it? If I put it here: contextpath/WEB-INF/services/ and the xsd:import schemaLocation in the WSDLs points to ../../Common.xsd, Axis2 can find them and processes the services correctly, but when it substitutes the link to it in the WSDLs, it generates the following links: MyService1?xsd=../../Common.xsd (in MyService1 WSDL) MyService2?xsd=../../Common.xsd (in MyService2 WSDL) The problem is that from an HTTP client point of view, this translates to path contextpath/Common.xsd: in fact, if you try to write the link: http://server:8080/contextpath/services/MyService1?xsd=../../Common.xsd a file not found error is given. Another clue is that if I try to generate a client pointing to http://server:8080/contextpath/services/MyService1?wsdl, Java2WSDL says that it cannot retrieve the schema. By manually typing: http://server:8080/contextpath/services/MyService1?xsd=../Common.xsd I see that the schema can actually be found; but if I replace the xsd:import in the original WSDL so that the schemaLocation points to ../Common.xsd, then Axis2 can't find it anymore, because it searches for it in contextpath/WEB-INF/services/MyService1/ and the generation of the WSDL fails. How to face this problem? Where should I put the shared schemas? How to reference them from within the original WSDLs? Thanks in advance. -- Mauro Molinari Software Developer [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: How to create a soap envelope using AXIOM?
Hi Upul! Thanks for your help... But, what would be a omnode in this context? I do not understand. Thanks. Julio Upul Godage wrote: SOAPFactory soap11Factory = OMAbstractFactory.getSOAP11Factory(); SOAPEnvelope newEnvelope = soap11Factory.getDefaultEnvelope(); ... SOAPHeaderBlock newSOAPHeaderBlock = soap11Factory.createSOAPHeaderBlock( localName, namespace); ... newEnvelope.getHeader().addChild(newSOAPHeaderBlock); ... newEnvelope.getBody().addChild(omNode); Hope these bits help. Upul On Nov 20, 2007 5:54 AM, juliocest [EMAIL PROTECTED] wrote: Hi, I would like to know how can I do a SOAP envelope using axiom. I want to construct the envelope with header and body. Many tutorials explain how to create the soap body, but few explain how create the envelope from scratch. Thanks for a possible help. Julio -- View this message in context: http://www.nabble.com/How-to-create-a-soap-envelope-using-AXIOM--tf4840398.html#a13848521 Sent from the Axis - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] -- View this message in context: http://www.nabble.com/How-to-create-a-soap-envelope-using-AXIOM--tf4840398.html#a13853730 Sent from the Axis - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: SOAP XML from HttpRequest
Hi, Why do you want to do that yourself. Axis can do the tricks for you. As far as I can see you should just read about the Axis handler concept. You can chain them so that you're able to first process the header with one handler and then chain it to the next handler which takes care of the body. Hope this answers your question. Regards, Sietse -Original Message- From: Lahoria [mailto:[EMAIL PROTECTED] Sent: 19 November 2007 21:07 To: axis-user@ws.apache.org Subject: SOAP XML from HttpRequest Hi There I am kinda new to SOAP and may be its very basic question but I am having hard time to find the answer: how to extract/retrieve SOAP XML from am incoming HttpRequest. I want to intercept the incoming SOAP call and do some processing. From the HttpRequest header I know there is a SOAP call as the SOAPAction is set and the content type of rquest are text/xml. Any help/pointers would be really appreciated. Regards -- View this message in context: http://www.nabble.com/SOAP-XML-from-HttpRequest-tf4839475.html#a13845400 Sent from the Axis - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Shared schemas: where to put them?
Hi all, In my opinion Peter sketched out a nice solution. Why do you care of having multiple copies of the xsd while they're generated? Generated code shouldn't be in version management, only the sources. And because of his solution makes use of only one xsd you're not duplicating anything. The only source is the original (shared) xsd file. I have to use this soon too, so this message opened my eyes on this point! Regards, Sietse -Original Message- From: Mauro Molinari [mailto:[EMAIL PROTECTED] Sent: 20 November 2007 10:56 To: axis-user@ws.apache.org Subject: Re: Shared schemas: where to put them? Hi Peter, thank you for your reply! Peter Hrastnik ha scritto: Hi! I had similar requirements and decided to rely on code generation by WSDL2JAVA. WSDL2JAVA takes the unique shared XSD from a source directory and copies it for each service. That is, I have a directory wsdlDefinitions that contains service1.wsdl, service2.wsdl, and common.xsd. Then I run WSDL2JAVA to generate server code with the -R option, and .../MyService1/META-INF/service1.wsdl .../MyService1/META-INF/common.xsd .../MyService2/META-INF/service2.wsdl .../MyService2/META-INF/common.xsd are generated. I have no troubles with the replication of common.xsd because I only change wsdlDefinitions/common.xsd. Generated artefacts won't be touched anyway. This could be a work-around, although it is not so convenient if all those things are then put under version-control. I might consider to add the replication of common.xsd in every META-INF directory at deploy time, but this makes things more complicate than they should and could cause a burden at development time when working with IDEs. I was wondering if a more clean way of doing this exists, however thank you very much for your suggestion! I know that my approach above may not be appropriate in your situation. If so, perhaps You can try setting the useOriginalWSDL parameter in the service.xml to true. Frankly, I don't know the effects of doing this. Actually, I am using useOriginalWSDL=true. The problem is that if I put things so that Axis2 can find all the WSDLs and XSDs and make the necessary changes (e.g.: the port address, the WSDL and XSD import locations, etc.), then things cannot be downloaded by a HTTP client; while, if I put things so that HTTP client could access them, Axis2 cannot find all the WSDLs and XSDs anymore. -- Mauro Molinari Software Developer [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
AUTO: Mukundan Desikan is out of the office (returning 11/26/2007)
I am out of the office until 11/26/2007. Please contact Dharmesh Bhakta (bhakta@ us.ibm.com) for any issues related to Web Services Note: This is an automated response to your message RE: Does Axis 2 allow passing of sub class objects ?? sent on 11/19/07 22:45:29. This is the only notification you will receive while this person is away.
[Axiom]Send receive an object with an ArrayList
Hi, I'm using Axiom method to sendReceive a list. In fact, at the client level I call the server via a web service to get a list of user : Client : public static ListUserLite getUserList(String login, char[] password) throws PapoException { EndpointReference targetEPR =3D new EndpointReference(baseUrl + CoreVariables.APPLICATION_WEBSERVICE); OMFactory fac =3D OMAbstractFactory.getOMFactory(); OMNamespace omNs =3D fac.createOMNamespace( http://webservices.papo/xsd;, tns); OMElement method =3D fac.createOMElement(getUserList, omNs); OMElement loginElement =3D fac.createOMElement(login, omNs); loginElement.addChild(fac.createOMText(loginElement, login)); method.addChild(loginElement); OMElement passwordElement =3D fac.createOMElement(password, omNs)= ; passwordElement.addChild(fac.createOMText(passwordElement, new String(password))); method.addChild(passwordElement); Options options =3D new Options(); options.setTo(targetEPR); options.setTransportInProtocol(Constants.TRANSPORT_HTTP); try { ServiceClient sender =3D new ServiceClient(); sender.setOptions(options); OMElement result =3D sender.sendReceive(method); OMElement firstElement =3D result.getFirstElement(); if(firstElement.getLocalName().equals(message)) { throw new PapoException(firstElement.getText()); } else { OMElement userList =3D result.getFirstElement(); if (!userList.getText().equals(UserList)) { throw new PapoException(The xml receive is different from what expected. Unknown server response!!); } userList.getChildElements(); OMElement firstNameElement =3D (OMElement)loginElement.getNextOMSibling(); String firstName =3D firstNameElement.getText(); OMElement lastNameElement =3D (OMElement)firstElement.getNextOMSibling(); String lastName =3D lastNameElement.getText(); OMElement emailElement =3D (OMElement)lastNameElement.getNextOMSibling(); String email =3D emailElement.getText(); MainUser user =3D new MainUser(login); user.setFirstName(firstName); user.setLastName(lastName); user.setEmail(email); return new ArrayList(); } } catch (AxisFault af) { af.printStackTrace(); throw new PapoException(af.getMessage(), af); } } I have a ClassCastException for this line : OMElement result =3D sender.sendReceive(method); The web service is : public OMElement getUserList(OMElement element) throws XMLStreamException { // Something that get a user object if (user !=3D null) { ApplicationServiceImpl asi =3D new ApplicationServiceImpl(); try { // UserList OMElement userListElement =3D fac.createOMElement(UserList, omNs)= ; UserList userList =3D asi.getUserList(); for (int i =3D 0; i userList.getUserList().size(); i++) { UserLite userLite =3D userList.getUserList().get(i); // User OMElement userElement =3D fac.createOMElement(User, omNs); // loginString/login loginElement =3D fac.createOMElement(login, omNs); loginElement.addChild(fac.createOMText(loginElement, userLite.getLogin())); userElement.addChild(loginElement); // statusboolean/status OMElement statusElement =3D fac.createOMElement(status, omNs); statusElement.addChild(fac.createOMText(statusElement, userLite.isAlive())); userElement.addChild(statusElement); // ipString/ip OMElement ipElement =3D fac.createOMElement(ip, omNs); ipElement.addChild(fac.createOMText(ipElement, userLite.getLastIP ())); userElement.addChild(ipElement); // lastUpdateDate.toString/lastUpdate OMElement lastUpdateElement =3D fac.createOMElement(lastUpdate, omNs); lastUpdateElement.addChild(fac.createOMText(lastUpdateElement, userLite.getLastUpdate())); userElement.addChild(lastUpdateElement); // /User userListElement.addChild(userElement); } logger.debug(\tListe des utilisateurs cr=E9=E9 sous forme de messa= ge. ); // /UserList method.addChild(userListElement); } catch (PapoException pe) { OMElement message =3D fac.createOMElement(errorMessage, omNs); message.addChild(fac.createOMText(message, Unable to get the refreshed user list! Try again later or check the server status)); method.addChild(message); } } else { OMElement message =3D fac.createOMElement(errorMessage, omNs); message.addChild(fac.createOMText(message, Unable to get the refreshed user list! Try again later or check the server status));
Minimum Library Requirement?
Hi everybody, I have a question about the libraries. I have a little number of services using AXIOM but there so many libraries that my application is huge compare with the little ko for the code. In fact I develop a Client (GUI Swing application) that use axis2 to call some services to a server. My method is quite simple : public static MainUser getAuthenticatedUser(String login, char[] password) throws PapoException { EndpointReference targetEPR = new EndpointReference(baseUrl + CoreVariables.USER_WEBSERVICE); OMFactory fac = OMAbstractFactory.getOMFactory(); OMNamespace omNs = fac.createOMNamespace( http://webservices.papo/xsd;, tns); OMElement method = fac.createOMElement(getAuthenticatedUser, omNs); OMElement loginElement = fac.createOMElement(login, omNs); loginElement.addChild(fac.createOMText(loginElement, login)); method.addChild(loginElement); OMElement passwordElement = fac.createOMElement(password, omNs); passwordElement.addChild(fac.createOMText(passwordElement, new String(password))); method.addChild(passwordElement); Options options = new Options(); options.setTo(targetEPR); options.setTransportInProtocol(Constants.TRANSPORT_HTTP); try { ServiceClient sender = new ServiceClient(); sender.setOptions(options); OMElement result = sender.sendReceive(method); OMElement firstElement = result.getFirstElement(); if(firstElement.getLocalName().equals(message)) { throw new PapoException(firstElement.getText()); } else { loginElement = firstElement; login = loginElement.getText(); OMElement firstNameElement = (OMElement)loginElement.getNextOMSibling(); String firstName = firstNameElement.getText(); OMElement lastNameElement = (OMElement)firstElement.getNextOMSibling(); String lastName = lastNameElement.getText(); OMElement emailElement = (OMElement)lastNameElement.getNextOMSibling(); String email = emailElement.getText(); MainUser user = new MainUser(login); user.setFirstName(firstName); user.setLastName(lastName); user.setEmail(email); return user; } } catch (AxisFault af) { af.printStackTrace(); throw new PapoException(The call to the service has failed !!, af); } } What are the minimal list of library to make this run. At the moment I put all the libraries, and try to delete one by one the jar to see what is needed, but, I still have something like 15 jars... just for this piece of code :( At the server side, it is less important but still huge compare with the code... -- Michael Bernagou Java Developper
Re: Shared schemas: where to put them?
Hi Peter, thank you for your reply! Peter Hrastnik ha scritto: Hi! I had similar requirements and decided to rely on code generation by WSDL2JAVA. WSDL2JAVA takes the unique shared XSD from a source directory and copies it for each service. That is, I have a directory wsdlDefinitions that contains service1.wsdl, service2.wsdl, and common.xsd. Then I run WSDL2JAVA to generate server code with the -R option, and .../MyService1/META-INF/service1.wsdl .../MyService1/META-INF/common.xsd .../MyService2/META-INF/service2.wsdl .../MyService2/META-INF/common.xsd are generated. I have no troubles with the replication of common.xsd because I only change wsdlDefinitions/common.xsd. Generated artefacts won't be touched anyway. This could be a work-around, although it is not so convenient if all those things are then put under version-control. I might consider to add the replication of common.xsd in every META-INF directory at deploy time, but this makes things more complicate than they should and could cause a burden at development time when working with IDEs. I was wondering if a more clean way of doing this exists, however thank you very much for your suggestion! I know that my approach above may not be appropriate in your situation. If so, perhaps You can try setting the useOriginalWSDL parameter in the service.xml to true. Frankly, I don't know the effects of doing this. Actually, I am using useOriginalWSDL=true. The problem is that if I put things so that Axis2 can find all the WSDLs and XSDs and make the necessary changes (e.g.: the port address, the WSDL and XSD import locations, etc.), then things cannot be downloaded by a HTTP client; while, if I put things so that HTTP client could access them, Axis2 cannot find all the WSDLs and XSDs anymore. -- Mauro Molinari Software Developer [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Axis2 and oc4j deployment
The error comes right away, and there is no username/password needed. There were some earlier postings about changing to HTTP/1.0 from 1.1 to fix this problem (something to do with chunking), but that did not fix the problem in this case. -Original Message- From: Dimitris Mouchritsas [mailto:[EMAIL PROTECTED] Sent: Tuesday, November 20, 2007 2:18 PM To: axis-user@ws.apache.org Subject: Re: Axis2 and oc4j deployment Maybe it's blocked from a firewall or something? Does the error come out right away or does it wait first? Also, if the web application requires some security then you might need to provide your credentials first (e.g. principal password). You can view the wsdl before logging in the application? On Nov 20, 2007 9:46 AM, Hoda, Nadeem [USA] [EMAIL PROTECTED] wrote: Folks, We are deploying our Axis2 services on oc4j 1012 (simplest service possible, based on /samples/quickstart [code first]). Locally (even if we access from a different machine), the services work pefectly, but the dev environment deployment is failing with the following error (via Axis2 client): org.apache.axis2.AxisFault: Transport error: 503 Error: Service Unavailable at org.apache.axis2.transport.http.HTTPSender.handleResponse(HTTPSender.j ava:298) at org.apache.axis2.transport.http.HTTPSender.sendViaPost(HTTPSender.java :192) at org.apache.axis2.transport.http.HTTPSender.send(HTTPSender.java:77) at org.apache.axis2.transport.http.CommonsHTTPTransportSender.writeMessag eWithCommons(CommonsHTTPTransportSender.java:327) at org.apache.axis2.transport.http.CommonsHTTPTransportSender.invoke(Comm onsHTTPTransportSender.java:206) at org.apache.axis2.engine.AxisEngine.send(AxisEngine.java:396) at org.apache.axis2.description.OutInAxisOperationClient.send(OutInAxisOp eration.java:374) at org.apache.axis2.description.OutInAxisOperationClient.executeImpl(OutI nAxisOperation.java:211) at org.apache.axis2.client.OperationClient.execute(OperationClient.java:1 63) The WSDL is easily assessible through the browser, so the port, etc, are correct. I have tried multiple web service clients, and they all fail. Can anyone provide guidance? Thanks, Nadeem -- Dimitris Mouchritsas Computer Services - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Shared schemas: where to put them?
Hi Mauro, I am not working in a big dev environment. But that doesn't make a difference. Common schemas or parts of it isn't a problem. I also have the webservice structure in SCM (svn in this case). Having the generated code in there is the wrong usage of it in my opinion. This causes duplication. What I do is: - Check out the sources (using eclipse or another program/IDE who can perform svn client operations); - Let the IDE generate the sources (I use maven for this, but ant can also be used); - Now you have a working environment on your local machine (which should be independent of IDE/OS etc); - Go ahead and makes changes / improvements to your code. (I like the test driven approach, but learning that atm); - Try running them locally; - If it works local, check out the newest version from the SCM (to adapt with changes from other developers); - If you got it working and the tests pass after this you check the changes in to the SCM. I hope this helps you. I think the important bit is to NOT duplicate sources in the SCM (which you do imho with storing the generated sources). Regards, Sietse -Original Message- From: Mauro Molinari [mailto:[EMAIL PROTECTED] Sent: 20 November 2007 11:25 To: axis-user@ws.apache.org Subject: Re: Shared schemas: where to put them? [EMAIL PROTECTED] ha scritto: Hi all, In my opinion Peter sketched out a nice solution. Why do you care of having multiple copies of the xsd while they're generated? Generated code shouldn't be in version management, only the sources. And because of his solution makes use of only one xsd you're not duplicating anything. The only source is the original (shared) xsd file. Hi Sietse, I don't know which is your development environment, however here we have a very huge web application for which we are going to write many web services. These web services can have some data in common (think of exceptions/faults, for instance) and this is why we need a shared common.xsd. We use environments like Eclipse and Netbeans to develop. Having the webservice structure ready after a CVS checkout enables us to let the IDE auomatically do the deployment and hit a couple of clicks to make the webapp start inside our development environment, in order to test and/or debug. Adding a custom deployment phase like the replication of this XSD into all services META-INF folders breaks this automation. Although there are ways of partially solve this, it simply adds overhead to a process that isn't working because of what seems to me just a minor flaw of Axis2. Moreover, maybe I'm missing something, but I can hardly realize how you could implement your webservices without putting the generated code (at least the Java code) under version control... How do you fill your skeleton with the implementation? How do you use type classes generated from the WSDL if they are not available at development time? -- Mauro Molinari Software Developer [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Shared schemas: where to put them?
[EMAIL PROTECTED] ha scritto: Hi all, In my opinion Peter sketched out a nice solution. Why do you care of having multiple copies of the xsd while they're generated? Generated code shouldn't be in version management, only the sources. And because of his solution makes use of only one xsd you're not duplicating anything. The only source is the original (shared) xsd file. Hi Sietse, I don't know which is your development environment, however here we have a very huge web application for which we are going to write many web services. These web services can have some data in common (think of exceptions/faults, for instance) and this is why we need a shared common.xsd. We use environments like Eclipse and Netbeans to develop. Having the webservice structure ready after a CVS checkout enables us to let the IDE auomatically do the deployment and hit a couple of clicks to make the webapp start inside our development environment, in order to test and/or debug. Adding a custom deployment phase like the replication of this XSD into all services META-INF folders breaks this automation. Although there are ways of partially solve this, it simply adds overhead to a process that isn't working because of what seems to me just a minor flaw of Axis2. Moreover, maybe I'm missing something, but I can hardly realize how you could implement your webservices without putting the generated code (at least the Java code) under version control... How do you fill your skeleton with the implementation? How do you use type classes generated from the WSDL if they are not available at development time? -- Mauro Molinari Software Developer [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: [Axis2] Unable to set socket timeout
I think the problem is on the way you create your service client - you have to create it by passing as argument your custom axis2.xml. Michele On 20 Nov 2007, at 02:13, Xinjun Chen wrote: Hi Julio, Thanks for your reply. I have managed to set socket timeout. Till now, I have tried the following. 1. Configure the following in axis2.xml TransportSender http and https: parameter name=SO_TIMEOUT locked=false6/parameter parameter name=CONNECTION_TIMEOUT locked=false6/ parameter Result: Failure. It doesn't take effect at all. 2. In client code, set options property. options.setProperty(HTTPConstants.SO_TIMEOUT,new Integer (so_timeout)); options.setProperty (HTTPConstants.CONNECTION_TIMEOUT,new Integer(conn_timeout)); Result: Failure. It doesn't take effect at all. 3. Configure the following in axis2.xml TransportReceiver http: parameter name=requestTimeout locked=false6/ parameter Result: Failure. It doesn't take effect at all. 4. In client code, set options timeout options.setTimeOutInMilliSeconds(timeout); Result: Success. Since the first three ways of set timeout is not working, why it still exist in Axis2? Is this a bug or my environment issue? Regards, Xinjun On Nov 20, 2007 8:49 AM, juliocest [EMAIL PROTECTED] wrote: Dear Xinjun, First of all you have to import the packages below in the client code: import org.apache.axis2.client.Options; import org.apache.axis2.Constants; After, Options options = new Options(); options.setProperty(HTTPConstans.SO_TIMEOUT, new Integer(36); (timeout of 5 minutes) Try to do it. Julio Sao Carlos - SP - Brazil -- View this message in context: http://www.nabble.com/-Axis2--Unable- to-set-socket-timeout-tf4836105.html#a13848812 Sent from the Axis - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: How to capture Message Context in sendReceive (Blocking) call
Hi Deepal! Thanks for help! How could I to do it? Could you show me how to do with an example? Thanks a lot. Julio Deepal Jayasinghe wrote: Hi , From the service client you can get the operation context , and once you have the operation context you can get both message contexts. Thanks Deepal juliocest wrote: Hi everybody!!! I have a client code that have 2 calls. One of them is blocking and other nonblocking. Part of my code is writing as follow: synchronized (callback) { if (!ClienteServico.finish) { //callback.wait(1000); initb = System.nanoTime(); //blocking invocation resultado = emissor01.sendReceive(payload01); System.out.println(-- Localization: + urlremoto01); response = result.getFirstElement().getText(); LINE X - MessageContext msg = MessageContext.getCurrentMessageContext(); LINE Y - SOAPBody soapBody = msg.getEnvelope().getBody(); fimb = System.nanoTime(); resultadobloc = Double.toString((double)(fimb-initb)/10); System.out.println(Esperando callback); callback.wait(); System.out.println(Fim do callback); } As you can see, I am calling a sendreceive (blocking) into a callback (which takes care of nonblocking invocation). As there are two messages, they are in differents contexts. Am I right? I would like to know how to capture messagecontext of the sendreceive (blocking)? Is it possible? I ask it, because when I compile my program the lines X and Y are not called and I have an error like: java.langNullPointerException Someone could help me? Thanks a lot. Julio - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] -- View this message in context: http://www.nabble.com/How-to-capture-Message-Context-in-sendReceive-%28Blocking%29-call-tf4838078.html#a13855572 Sent from the Axis - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: How to create a soap envelope using AXIOM?
Dear Upul, This is mys service: public SOAPEnvelope fatorial(SOAPEnvelope elemento) throws XMLStreamException { // Obtém o endereço IP de cada cliente que acesso o serviço MessageContext msgCtx = MessageContext.getCurrentMessageContext(); String remoteAddress = (String)msgCtx.getProperty(REMOTE_ADDR); // Obtém o timeout estabelecido entre cliente/servidor String default_timeout = Integer.toString(Options.DEFAULT_TIMEOUT_MILLISECONDS); // Verifica o tipo de conteúdo da mensagem enviada via HTTP HttpServletRequest request = (HttpServletRequest)msgCtx.getProperty(HTTPConstants.MC_HTTP_SERVLETREQUEST); String contentType = request.getHeader(HTTPConstants.HEADER_CONTENT_TYPE); elemento.build(); elemento.detach(); String rootName = elemento.getLocalName(); System.out.println(Reading +rootName+ element); OMElement elementoFilho = elemento.getFirstElement(); String valorxml = elementoFilho.getText(); long valrecebido = Long.parseLong(valorxml); String resultado = Fatorial.retornaFatorial(valrecebido); // Construct the Envelope + Header + Body SOAPFactory soap11Factory = OMAbstractFactory.getSOAP11Factory(); SOAPEnvelope newEnvelope = soap11Factory.getDefaultEnvelope(); OMNamespace soapnamespace = soap11Factory.createOMNamespace(http://teste.org;, teste); OMFactory fac = OMAbstractFactory.getOMFactory(); OMNamespace omNs = fac.createOMNamespace(http://exemplo1.org/exemplo1;, exemplo); OMElement metodo = fac.createOMElement(fatorialResposta,omNs); OMElement valor = fac.createOMElement(resposta, null); valor.addChild(fac.createOMText(valor, Resultado do Fatorial: +resultado)); metodo.addChild(valor); SOAPHeaderBlock newSOAPHeaderBlock = soap11Factory.createSOAPHeaderBlock(http://legal.org;, soapnamespace); newEnvelope.getHeader().addChild(newSOAPHeaderBlock); newEnvelope.getBody().addChild(metodo); return newEnvelope; } This is my client: public static SOAPEnvelope CalculaFatorial(String numero) { // Construct the Envelope + Header + Body SOAPFactory soap11Factory = OMAbstractFactory.getSOAP11Factory(); SOAPEnvelope newEnvelope = soap11Factory.getDefaultEnvelope(); OMNamespace soapnamespace = soap11Factory.createOMNamespace(http://teste.org;, teste); OMFactory fac = OMAbstractFactory.getOMFactory(); OMNamespace omNs = fac.createOMNamespace(http://exemplo.org/exemplo;, exemplo); OMElement metodo = fac.createOMElement(fatorial, omNs); OMElement valor = fac.createOMElement(numero, omNs); valor.addChild(fac.createOMText(valor, numero)); metodo.addChild(valor); SOAPHeaderBlock newSOAPHeaderBlock = soap11Factory.createSOAPHeaderBlock(http://legal.org;, soapnamespace); newEnvelope.getHeader().addChild(newSOAPHeaderBlock); newEnvelope.getBody().addChild(metodo); return newEnvelope; } When a try execute, I have the following error: [INFO] Unable to sendViaPost to url[http://localhost:8080/axis2/services/ServicoFatorial] org.apache.axis2.AxisFault: Can not output XML declaration, after other output has already been done. at org.apache.axis2.AxisFault.makeFault(AxisFault.java:417) at org.apache.axis2.transport.http.SOAPMessageFormatter.writeTo(SOAPMessageFormatter.java:72) at org.apache.axis2.transport.http.AxisRequestEntity.writeRequest(AxisRequestEntity.java:84) at org.apache.commons.httpclient.methods.EntityEnclosingMethod.writeRequestBody(EntityEnclosingMethod.java:495) at org.apache.commons.httpclient.HttpMethodBase.writeRequest(HttpMethodBase.java:1973) at org.apache.commons.httpclient.HttpMethodBase.execute(HttpMethodBase.java:993) at org.apache.commons.httpclient.HttpMethodDirector.executeWithRetry(HttpMethodDirector.java:397) at org.apache.commons.httpclient.HttpMethodDirector.executeMethod(HttpMethodDirector.java:170) at org.apache.commons.httpclient.HttpClient.executeMethod(HttpClient.java:396) at org.apache.commons.httpclient.HttpClient.executeMethod(HttpClient.java:346) at
consume WSDL and call WS at runtime
Dear ALL! There is trivial sample code which is not running in some reason. Please point me where is a bug. Application should retrieve WSDL by URL and call method from that WS. Code snippet: import java.net.URL; import javax.xml.namespace.QName; import org.apache.axiom.om.OMAbstractFactory; import org.apache.axiom.om.OMElement; import org.apache.axiom.om.OMFactory; import org.apache.axiom.om.OMNamespace; import org.apache.axis2.client.Options; import org.apache.axis2.client.ServiceClient; import org.apache.axis2.context.ConfigurationContext; import org.apache.axis2.engine.AxisConfiguration; public class Client { public static void main(String[] argv) { try { ServiceClient client = new ServiceClient( null, new URL(http://127.0.0.1:8080/axis2/services/MyService?wsdl;), new QName(http://example1.userguide;, MyService), MyServiceHttpport ); OMFactory fac = OMAbstractFactory.getOMFactory(); OMNamespace omNs = fac.createOMNamespace(http://example1.userguide;, ns1); OMElement method = fac.createOMElement(echo, omNs); OMElement value = fac.createOMElement(value, omNs); value.setText(Hello , my first service utilization); method.addChild(value); OMElement result = client.sendReceive(method); System.out.println(result); } catch (Throwable th) { th.printStackTrace(); } } } Unfortunately it throws runtime error: 2007-11-20 13:43:02,632 ERROR org.apache.axis2.description.WSDL11ToAxisServiceBuilder - RPC-literal type message part parameters should have a type attribute org.apache.axis2.description.WSDL11ToAxisServiceBuilder$WSDLProcessingException: RPC-literal type message part parameters should have a type attribute at org.apache.axis2.description.WSDL11ToAxisServiceBuilder.addPartToElement(WSDL11ToAxisServiceBuilder.java:1992) at org.apache.axis2.description.WSDL11ToAxisServiceBuilder.getNewComplextType(WSDL11ToAxisServiceBuilder.java:1879) at org.apache.axis2.description.WSDL11ToAxisServiceBuilder.createSchemaForPorttype(WSDL11ToAxisServiceBuilder.java:1544) at org.apache.axis2.description.WSDL11ToAxisServiceBuilder.generateWrapperSchema(WSDL11ToAxisServiceBuilder.java:1431) at org.apache.axis2.description.WSDL11ToAxisServiceBuilder.populateService(WSDL11ToAxisServiceBuilder.java:255) at org.apache.axis2.description.AxisService.createClientSideAxisService(AxisService.java:1644) at org.apache.axis2.description.AxisService.createClientSideAxisService(AxisService.java:1608) at org.apache.axis2.client.ServiceClient.init(ServiceClient.java:215) at com.fizzback.qa.gates.fake.Client.main(Client.java:56) ... etc. It is strange for me because similar sample code from inet source is working correctly: ... EndpointReference targetEPR = new EndpointReference(http://localhost:8080/axis2/services/MyService;); OMElement payload = getEchoOMElement(); Options options = new Options(); options.setTo(targetEPR); options.setAction(urn:echo); ServiceClient sender = new ServiceClient(); sender.setOptions(options); OMElement result = sender.sendReceive(payload); ... A WSDL for test service is as follow: ?xml version=1.0 encoding=UTF-8? wsdl:definitions xmlns:wsdl=http://schemas.xmlsoap.org/wsdl/; xmlns:ns1=http://org.apache.axis2/xsd; xmlns:wsaw=http://www.w3.org/2006/05/addressing/wsdl; xmlns:http=http://schemas.xmlsoap.org/wsdl/http/; xmlns:ns0=http://example1.userguide; xmlns:xs=http://www.w3.org/2001/XMLSchema; xmlns:mime=http://schemas.xmlsoap.org/wsdl/mime/; xmlns:soap=http://schemas.xmlsoap.org/wsdl/soap/; xmlns:soap12=http://schemas.xmlsoap.org/wsdl/soap12/; targetNamespace=http://example1.userguide; wsdl:documentationMyService/wsdl:documentation wsdl:types xs:schema xmlns:ns=http://example1.userguide; attributeFormDefault=qualified elementFormDefault=qualified targetNamespace=http://example1.userguide; xs:complexType name=Exception xs:sequence xs:element minOccurs=0 name=Exception nillable=true type=xs:anyType/ /xs:sequence /xs:complexType xs:element name=XMLStreamException xs:complexType xs:sequence xs:element minOccurs=0 name=XMLStreamException nillable=true type=xs:anyType/ /xs:sequence /xs:complexType /xs:element xs:element name=echo xs:complexType xs:sequence xs:element minOccurs=0 name=echo nillable=true type=xs:anyType/ /xs:sequence /xs:complexType /xs:element xs:element name=echoResponse xs:complexType xs:sequence xs:element
Re: Shared schemas: where to put them?
Hi Sietse! [EMAIL PROTECTED] ha scritto: Hi Mauro, I am not working in a big dev environment. But that doesn't make a difference. Common schemas or parts of it isn't a problem. I also have the webservice structure in SCM (svn in this case). Having the generated code in there is the wrong usage of it in my opinion. This causes duplication. What I do is: - Check out the sources (using eclipse or another program/IDE who can perform svn client operations); This is a not so easy thing: our application is made up of something like 20 different software modules, each of them have its own version information and must be checked out and put together to prepare a complete project for the web application. We have some Ant scripts that can partially automatize this task, but there are some implications with Eclipse, which has a CVS support that is not so flexible... but this is another story. - Let the IDE generate the sources (I use maven for this, but ant can also be used); We don't use Maven, but we can use Ant. First problem here is this: were to store the ant script to do that? Which relation should it have with the code, with the modules and with their versions? This is overhead... I hope this helps you. I think the important bit is to NOT duplicate sources in the SCM (which you do imho with storing the generated sources). But why do you say that putting Axis2 generated code under source control means duplicating code? I don't have any duplicated code! For each WSDL I have a couple of unique generated classes, while I share generated types between web services implementations by translating shared schemas. If one day you have to modify a WSDL, you just need to generate code for it again and commit it over the previous one. This also enables you to make changes to the generated code, if needed: I know this has to be done with care, but sometimes it could be necessary. Moreover, if I understood it well, you are saying that you have some code under source control that doesn't compile as soon as you don't generate the Java code from the WSDLs each time you do a checkout? -- Mauro Molinari Software Developer [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: [Axiom]Send receive an object with an ArrayList
Hum, just a word to say I know my code is not finished to create the list received. Anyway the error comes immediately after de sendReceive(method) call. I tried to explicitely force having ArrayList instead of List, without success... 2007/11/20, Michael Bernagou [EMAIL PROTECTED]: Hi, I'm using Axiom method to sendReceive a list. In fact, at the client level I call the server via a web service to get a list of user : Client : public static ListUserLite getUserList(String login, char[] password) throws PapoException { EndpointReference targetEPR =3D new EndpointReference(baseUrl + CoreVariables.APPLICATION_WEBSERVICE); OMFactory fac =3D OMAbstractFactory.getOMFactory (); OMNamespace omNs =3D fac.createOMNamespace( http://webservices.papo/xsd;, tns); OMElement method =3D fac.createOMElement(getUserList, omNs); OMElement loginElement =3D fac.createOMElement(login, omNs); loginElement.addChild(fac.createOMText(loginElement, login)); method.addChild(loginElement); OMElement passwordElement =3D fac.createOMElement(password, omNs)= ; passwordElement.addChild(fac.createOMText (passwordElement, new String(password))); method.addChild(passwordElement); Options options =3D new Options(); options.setTo(targetEPR); options.setTransportInProtocol(Constants.TRANSPORT_HTTP); try { ServiceClient sender =3D new ServiceClient(); sender.setOptions(options); OMElement result =3D sender.sendReceive(method); OMElement firstElement =3D result.getFirstElement(); if(firstElement.getLocalName().equals(message)) { throw new PapoException(firstElement.getText()); } else { OMElement userList =3D result.getFirstElement(); if (!userList.getText().equals(UserList)) { throw new PapoException(The xml receive is different from what expected. Unknown server response!!); } userList.getChildElements(); OMElement firstNameElement =3D (OMElement)loginElement.getNextOMSibling(); String firstName =3D firstNameElement.getText(); OMElement lastNameElement =3D (OMElement)firstElement.getNextOMSibling(); String lastName =3D lastNameElement.getText (); OMElement emailElement =3D (OMElement)lastNameElement.getNextOMSibling(); String email =3D emailElement.getText(); MainUser user =3D new MainUser(login); user.setFirstName(firstName); user.setLastName(lastName); user.setEmail(email); return new ArrayList(); } } catch (AxisFault af) { af.printStackTrace(); throw new PapoException(af.getMessage(), af); } } I have a ClassCastException for this line : OMElement result =3D sender.sendReceive(method); The web service is : public OMElement getUserList(OMElement element) throws XMLStreamException { // Something that get a user object if (user !=3D null) { ApplicationServiceImpl asi =3D new ApplicationServiceImpl(); try { // UserList OMElement userListElement =3D fac.createOMElement(UserList, omNs)= ; UserList userList =3D asi.getUserList(); for (int i =3D 0; i userList.getUserList().size(); i++) { UserLite userLite =3D userList.getUserList().get(i); // User OMElement userElement =3D fac.createOMElement(User, omNs); // loginString/login loginElement =3D fac.createOMElement(login, omNs); loginElement.addChild(fac.createOMText (loginElement, userLite.getLogin())); userElement.addChild(loginElement); // statusboolean/status OMElement statusElement =3D fac.createOMElement(status, omNs); statusElement.addChild(fac.createOMText(statusElement, userLite.isAlive())); userElement.addChild(statusElement); // ipString/ip OMElement ipElement =3D fac.createOMElement(ip, omNs); ipElement.addChild(fac.createOMText(ipElement, userLite.getLastIP ())); userElement.addChild(ipElement); // lastUpdateDate.toString /lastUpdate OMElement lastUpdateElement =3D fac.createOMElement(lastUpdate, omNs); lastUpdateElement.addChild(fac.createOMText(lastUpdateElement, userLite.getLastUpdate())); userElement.addChild(lastUpdateElement); // /User userListElement.addChild(userElement); } logger.debug(\tListe des utilisateurs cr=E9=E9 sous forme de messa= ge. ); // /UserList method.addChild(userListElement); } catch (PapoException pe) { OMElement message =3D fac.createOMElement(errorMessage, omNs);
RE: Shared schemas: where to put them?
Hi Mauro! Just want to add my 2 cents (even though it's off-topic), perhaps it helps you. We are using (My)Eclipse, keep the sources in CVS, and do not put generated artefacts into CVS. It's like Sietse's approach. Concerning magnitude, we have 5 Web services with ~5 operations per service. When we set up a new development environment, a checkout is done and an ANT script is run - that's all the Webapplication is ready for development AND deployment (the ant script generates needed aretfacts directly in the WEB-INF folder). Development is done using hot code replacement on a local Tomcat Server (Eclipse compiles classes to /WEB-INF/classes, no reload/restart is necessary changes are in effect immediately). Artefacts don't have to be generated for each code change during development. For a production release, the ANT script generates a clean WAR file from scratch (this includes artefact generation and re-compilation of sources). So, artefact generation takes place only when setting up the environment, for making production releases, and of course when source WSDL and/or XSD documents change. The overhead added to the development process is neglibible, also (but not only) because WSDL s and XSDs tend to change infrequently. However, resources needed for developing the necessary ANT build script were definitly significant. Cheers, Peter. [EMAIL PROTECTED] schrieb am 20.11.2007 12:37:40: Hi Mauro, I am not working in a big dev environment. But that doesn't make a difference. Common schemas or parts of it isn't a problem. I also have the webservice structure in SCM (svn in this case). Having the generated code in there is the wrong usage of it in my opinion. This causes duplication. What I do is: - Check out the sources (using eclipse or another program/IDE who can perform svn client operations); - Let the IDE generate the sources (I use maven for this, but ant can also be used); - Now you have a working environment on your local machine (which should be independent of IDE/OS etc); - Go ahead and makes changes / improvements to your code. (I like the test driven approach, but learning that atm); - Try running them locally; - If it works local, check out the newest version from the SCM (to adapt with changes from other developers); - If you got it working and the tests pass after this you check the changes in to the SCM. I hope this helps you. I think the important bit is to NOT duplicate sources in the SCM (which you do imho with storing the generated sources). Regards, Sietse -Original Message- From: Mauro Molinari [mailto:[EMAIL PROTECTED] Sent: 20 November 2007 11:25 To: axis-user@ws.apache.org Subject: Re: Shared schemas: where to put them? [EMAIL PROTECTED] ha scritto: Hi all, In my opinion Peter sketched out a nice solution. Why do you care of having multiple copies of the xsd while they're generated? Generated code shouldn't be in version management, only the sources. And because of his solution makes use of only one xsd you're not duplicating anything. The only source is the original (shared) xsd file. Hi Sietse, I don't know which is your development environment, however here we have a very huge web application for which we are going to write many web services. These web services can have some data in common (think of exceptions/faults, for instance) and this is why we need a shared common.xsd. We use environments like Eclipse and Netbeans to develop. Having the webservice structure ready after a CVS checkout enables us to let the IDE auomatically do the deployment and hit a couple of clicks to make the webapp start inside our development environment, in order to test and/or debug. Adding a custom deployment phase like the replication of this XSD into all services META-INF folders breaks this automation. Although there are ways of partially solve this, it simply adds overhead to a process that isn't working because of what seems to me just a minor flaw of Axis2. Moreover, maybe I'm missing something, but I can hardly realize how you could implement your webservices without putting the generated code (at least the Java code) under version control... How do you fill your skeleton with the implementation? How do you use type classes generated from the WSDL if they are not available at development time? -- Mauro Molinari Software Developer [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: how to define invokeBlocking to return you a byte[]??
?xml version=1.0 encoding=UTF-8? wsdl:definitions xmlns:wsdl=http://schemas.xmlsoap.org/wsdl/; xmlns:ns1=http://io.java/xsd; xmlns:wsaw=http://www.w3.org/2006/05/addressing/wsdl; xmlns:http=http://schemas.xmlsoap.org/wsdl/http/; xmlns:ns0=http://ws.apache.org/axis2; xmlns:xs=http://www.w3.org/2001/XMLSchema; xmlns:mime=http://schemas.xmlsoap.org/wsdl/mime/; xmlns:soap=http://schemas.xmlsoap.org/wsdl/soap/; xmlns:soap12=http://schemas.xmlsoap.org/wsdl/soap12/; targetNamespace=http://ws.apache.org/axis2; wsdl:documentationLicenseService/wsdl:documentation wsdl:types xs:schema xmlns:ns=http://ws.apache.org/axis2; attributeFormDefault=qualified elementFormDefault=qualified targetNamespace=http://ws.apache.org/axis2; xs:complexType name=Exception xs:sequence xs:element minOccurs=0 name=Exception nillable=true type=xs:anyType/ /xs:sequence /xs:complexType xs:element name=IOException xs:complexType xs:sequence xs:element minOccurs=0 name=IOException nillable=true type=ns1:IOException/ /xs:sequence /xs:complexType /xs:element xs:element name=forward2 xs:complexType xs:sequence xs:element minOccurs=0 name=param0 type=xs:int/ xs:element minOccurs=0 name=param1 nillable=true type=xs:base64Binary/ /xs:sequence /xs:complexType /xs:element xs:element name=forward2Response xs:complexType xs:sequence xs:element minOccurs=0 name=return nillable=true type=xs:base64Binary/ /xs:sequence /xs:complexType /xs:element xs:element name=l xs:complexType xs:sequence xs:element minOccurs=0 name=param0 type=xs:int/ xs:element minOccurs=0 name=param1 nillable=true type=xs:base64Binary/ xs:element minOccurs=0 name=param2 nillable=true type=ns1:OutputStream/ xs:element minOccurs=0 name=param3 nillable=true type=ns1:InputStream/ /xs:sequence /xs:complexType /xs:element xs:element name=lResponse xs:complexType xs:sequence xs:element minOccurs=0 name=return nillable=true type=xs:base64Binary/ /xs:sequence /xs:complexType /xs:element /xs:schema xs:schema xmlns:ax21=http://io.java/xsd; attributeFormDefault=qualified elementFormDefault=qualified targetNamespace=http://io.java/xsd; xs:complexType name=IOException xs:complexContent xs:extension base=ns0:Exception xs:sequence/ /xs:extension /xs:complexContent /xs:complexType xs:complexType name=OutputStream xs:sequence/ /xs:complexType xs:complexType name=InputStream xs:sequence/ /xs:complexType /xs:schema /wsdl:types wsdl:message name=forward2Request wsdl:part name=parameters element=ns0:forward2/ /wsdl:message wsdl:message name=forward2Response wsdl:part name=parameters element=ns0:forward2Response/ /wsdl:message wsdl:message name=IOException wsdl:part name=parameters element=ns0:IOException/ /wsdl:message wsdl:message name=lRequest wsdl:part name=parameters element=ns0:l/ /wsdl:message wsdl:message name=lResponse wsdl:part name=parameters element=ns0:lResponse/ /wsdl:message wsdl:portType name=LicenseServicePortType wsdl:operation name=forward2 wsdl:input message=ns0:forward2Request wsaw:Action=urn:forward2/ wsdl:output message=ns0:forward2Response wsaw:Action=urn:forward2Response/ wsdl:fault message=ns0:IOException name=IOException wsaw:Action=urn:forward2IOException/ /wsdl:operation wsdl:operation name=l wsdl:input message=ns0:lRequest wsaw:Action=urn:l/ wsdl:output message=ns0:lResponse wsaw:Action=urn:lResponse/ wsdl:fault message=ns0:IOException name=IOException wsaw:Action=urn:lIOException/ /wsdl:operation /wsdl:portType wsdl:binding name=LicenseServiceSOAP11Binding type=ns0:LicenseServicePortType soap:binding transport=http://schemas.xmlsoap.org/soap/http; style=document/ wsdl:operation name=forward2 soap:operation soapAction=urn:forward2 style=document/ wsdl:input soap:body use=literal/ /wsdl:input
[Axis2] SOAP12 parameter types
Hi, everyone. I worked with Axis1.x and I used the next code to determine operations and parameter types of the concrete port: ... SymbolTable symbolTable = wsdlParser.getSymbolTable(); BindingEntry bEntry = symbolTable.getBindingEntry(binding.getQName()); Parameters parameters = null; Operation operation = null; Iterator i = bEntry.getParameters().keySet().iterator(); while (i.hasNext()) { Operation o = (Operation) i.next(); if (o.getName().equals(operationName)) { operation = o; parameters = (Parameters) bEntry.getParameters().get(o); break; } } ... But this code doesn't work with SOAP12 binding. Can someone tell me how to determine operations parameters and their types using Axis1 or Axis2? And one more... Please, tell me the way to convert AXIOM's OMElement to org.w3c.Element and backward. Regards, Eugene - Never miss a thing. Make Yahoo your homepage.
WSDL generation error
I have an interface like, import java.net.URL; public interface MyInterface { public URL createURL(String url); } I am trying to generate WSDL using axis java2wsdl program. But, i am getting the following error: [axis-java2wsdl] - The class java.net.URL is defined in a java or javax package and cannot be converted into an xml schema type. An xml schema anyType will be used to define this class in the wsdl file. Any Idea? Please help to resolve the issue. -- Manivannan.Palanichamy (@) Oracle.com http://mani.gw.googlepages.com/index.html
Re: consume WSDL and call WS at runtime
Anne Thomas Manes wrote: It sounds like your WSDL is not valid. The error message indicates that the service binding specifies RPC/literal, but the message parts reference elements rather than types. Thanks for reply Anne. Please post the WSDL. Anne Actually I've posted its in previous post :) A WSDL for test service is as follow: ?xml version=1.0 encoding=UTF-8? wsdl:definitions xmlns:wsdl=http://schemas.xmlsoap.org/wsdl/; xmlns:ns1=http://org.apache.axis2/xsd; xmlns:wsaw=http://www.w3.org/2006/05/addressing/wsdl; xmlns:http=http://schemas.xmlsoap.org/wsdl/http/; xmlns:ns0=http://example1.userguide; xmlns:xs=http://www.w3.org/2001/XMLSchema; xmlns:mime=http://schemas.xmlsoap.org/wsdl/mime/; xmlns:soap=http://schemas.xmlsoap.org/wsdl/soap/; xmlns:soap12=http://schemas.xmlsoap.org/wsdl/soap12/; targetNamespace=http://example1.userguide; wsdl:documentationMyService/wsdl:documentation wsdl:types xs:schema xmlns:ns=http://example1.userguide; attributeFormDefault=qualified elementFormDefault=qualified targetNamespace=http://example1.userguide; xs:complexType name=Exception xs:sequence xs:element minOccurs=0 name=Exception nillable=true type=xs:anyType/ /xs:sequence /xs:complexType xs:element name=XMLStreamException xs:complexType xs:sequence xs:element minOccurs=0 name=XMLStreamException nillable=true type=xs:anyType/ /xs:sequence /xs:complexType /xs:element xs:element name=echo xs:complexType xs:sequence xs:element minOccurs=0 name=echo nillable=true type=xs:anyType/ /xs:sequence /xs:complexType /xs:element xs:element name=echoResponse xs:complexType xs:sequence xs:element minOccurs=0 name=return nillable=true type=xs:anyType/ /xs:sequence /xs:complexType /xs:element xs:element name=ping xs:complexType xs:sequence xs:element minOccurs=0 name=ping nillable=true type=xs:anyType/ /xs:sequence /xs:complexType /xs:element xs:element name=pingF xs:complexType xs:sequence xs:element minOccurs=0 name=param0 nillable=true type=xs:anyType/ /xs:sequence /xs:complexType /xs:element /xs:schema /wsdl:types wsdl:message name=pingFRequest wsdl:part name=parameters element=ns0:pingF/ /wsdl:message wsdl:message name=pingFResponse/ wsdl:message name=echoRequest wsdl:part name=parameters element=ns0:echo/ /wsdl:message wsdl:message name=echoResponse wsdl:part name=parameters element=ns0:echoResponse/ /wsdl:message wsdl:message name=XMLStreamException wsdl:part name=parameters element=ns0:XMLStreamException/ /wsdl:message wsdl:message name=pingRequest wsdl:part name=parameters element=ns0:ping/ /wsdl:message wsdl:message name=pingResponse/ wsdl:portType name=MyServicePortType wsdl:operation name=pingF wsdl:input message=ns0:pingFRequest wsaw:Action=urn:pingF/ wsdl:output message=ns0:pingFResponse wsaw:Action=urn:pingFResponse/ /wsdl:operation wsdl:operation name=echo wsdl:input message=ns0:echoRequest wsaw:Action=urn:echo/ wsdl:output message=ns0:echoResponse wsaw:Action=urn:echoResponse/ wsdl:fault message=ns0:XMLStreamException name=XMLStreamException wsaw:Action=urn:echoXMLStreamException/ /wsdl:operation wsdl:operation name=ping wsdl:input message=ns0:pingRequest wsaw:Action=urn:ping/ wsdl:output message=ns0:pingResponse wsaw:Action=urn:pingResponse/ wsdl:fault message=ns0:XMLStreamException name=XMLStreamException wsaw:Action=urn:pingXMLStreamException/ /wsdl:operation /wsdl:portType wsdl:binding name=MyServiceSOAP11Binding type=ns0:MyServicePortType soap:binding transport=http://schemas.xmlsoap.org/soap/http; style=document/ wsdl:operation name=pingF soap:operation soapAction=urn:pingF style=document/ wsdl:input soap:body use=literal/ /wsdl:input wsdl:output soap:body use=literal/ /wsdl:output /wsdl:operation wsdl:operation name=echo soap:operation soapAction=urn:echo style=document/ wsdl:input soap:body use=literal/ /wsdl:input wsdl:output soap:body
Re: consume WSDL and call WS at runtime
It sounds like your WSDL is not valid. The error message indicates that the service binding specifies RPC/literal, but the message parts reference elements rather than types. Please post the WSDL. Anne On Nov 20, 2007 7:14 AM, Dmitry Trunikov [EMAIL PROTECTED] wrote: Dear ALL! There is trivial sample code which is not running in some reason. Please point me where is a bug. Application should retrieve WSDL by URL and call method from that WS. Code snippet: import java.net.URL; import javax.xml.namespace.QName; import org.apache.axiom.om.OMAbstractFactory; import org.apache.axiom.om.OMElement; import org.apache.axiom.om.OMFactory; import org.apache.axiom.om.OMNamespace; import org.apache.axis2.client.Options; import org.apache.axis2.client.ServiceClient; import org.apache.axis2.context.ConfigurationContext; import org.apache.axis2.engine.AxisConfiguration; public class Client { public static void main(String[] argv) { try { ServiceClient client = new ServiceClient( null, new URL(http://127.0.0.1:8080/axis2/services/MyService?wsdl;), new QName(http://example1.userguide;, MyService), MyServiceHttpport ); OMFactory fac = OMAbstractFactory.getOMFactory(); OMNamespace omNs = fac.createOMNamespace(http://example1.userguide;, ns1); OMElement method = fac.createOMElement(echo, omNs); OMElement value = fac.createOMElement(value, omNs); value.setText(Hello , my first service utilization); method.addChild(value); OMElement result = client.sendReceive(method); System.out.println(result); } catch (Throwable th) { th.printStackTrace(); } } } Unfortunately it throws runtime error: 2007-11-20 13:43:02,632 ERROR org.apache.axis2.description.WSDL11ToAxisServiceBuilder - RPC-literal type message part parameters should have a type attribute org.apache.axis2.description.WSDL11ToAxisServiceBuilder$WSDLProcessingException: RPC-literal type message part parameters should have a type attribute at org.apache.axis2.description.WSDL11ToAxisServiceBuilder.addPartToElement(WSDL11ToAxisServiceBuilder.java:1992) at org.apache.axis2.description.WSDL11ToAxisServiceBuilder.getNewComplextType(WSDL11ToAxisServiceBuilder.java:1879) at org.apache.axis2.description.WSDL11ToAxisServiceBuilder.createSchemaForPorttype(WSDL11ToAxisServiceBuilder.java:1544) at org.apache.axis2.description.WSDL11ToAxisServiceBuilder.generateWrapperSchema(WSDL11ToAxisServiceBuilder.java:1431) at org.apache.axis2.description.WSDL11ToAxisServiceBuilder.populateService(WSDL11ToAxisServiceBuilder.java:255) at org.apache.axis2.description.AxisService.createClientSideAxisService(AxisService.java:1644) at org.apache.axis2.description.AxisService.createClientSideAxisService(AxisService.java:1608) at org.apache.axis2.client.ServiceClient.init(ServiceClient.java:215) at com.fizzback.qa.gates.fake.Client.main(Client.java:56) ... etc. It is strange for me because similar sample code from inet source is working correctly: ... EndpointReference targetEPR = new EndpointReference(http://localhost:8080/axis2/services/MyService;); OMElement payload = getEchoOMElement(); Options options = new Options(); options.setTo(targetEPR); options.setAction(urn:echo); ServiceClient sender = new ServiceClient(); sender.setOptions(options); OMElement result = sender.sendReceive(payload); ... A WSDL for test service is as follow: ?xml version=1.0 encoding=UTF-8? wsdl:definitions xmlns:wsdl=http://schemas.xmlsoap.org/wsdl/; xmlns:ns1=http://org.apache.axis2/xsd; xmlns:wsaw=http://www.w3.org/2006/05/addressing/wsdl; xmlns:http=http://schemas.xmlsoap.org/wsdl/http/; xmlns:ns0=http://example1.userguide; xmlns:xs=http://www.w3.org/2001/XMLSchema; xmlns:mime=http://schemas.xmlsoap.org/wsdl/mime/; xmlns:soap=http://schemas.xmlsoap.org/wsdl/soap/; xmlns:soap12=http://schemas.xmlsoap.org/wsdl/soap12/; targetNamespace=http://example1.userguide; wsdl:documentationMyService/wsdl:documentation wsdl:types xs:schema xmlns:ns=http://example1.userguide; attributeFormDefault=qualified elementFormDefault=qualified targetNamespace=http://example1.userguide; xs:complexType name=Exception xs:sequence xs:element minOccurs=0 name=Exception nillable=true type=xs:anyType/ /xs:sequence /xs:complexType xs:element name=XMLStreamException xs:complexType xs:sequence xs:element minOccurs=0 name=XMLStreamException nillable=true type=xs:anyType/ /xs:sequence /xs:complexType
commons-logging library problem
Hi, I have a pretty simple application that queries a web service. For the application I needed of course several jars from axis distribution, among which commons-logging-1.0.4.jar. Application runs ok, but when I try to stop tomcat, the process doesn't stop.Tomcat stops listening on port 8080 but the process itself still runs. If I remove commons-logging-1.0.4.jar from the library, then tomcat starts and stops normally but of course, the application doesn't work anymore. Is there any way I can remove this jar and have the application working? or did anyone had this problem before and know why this is happening? 10x P.S. I am using axis2-1.3 with tomcat 6 on ubuntu Be a better sports nut! Let your teams follow you with Yahoo Mobile. Try it now. http://mobile.yahoo.com/sports;_ylt=At9_qDKvtAbMuh1G1SQtBI7ntAcJ - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: commons-logging library problem
I seen what may be the same problem last year. Axis2 now ships with commons-logging-1.1 - see if you can use that to fix your problems. HTH, Robert On Nov 20, 2007 10:17 AM, Vaduvoiu Tiberiu [EMAIL PROTECTED] wrote: Hi, I have a pretty simple application that queries a web service. For the application I needed of course several jars from axis distribution, among which commons-logging-1.0.4.jar. Application runs ok, but when I try to stop tomcat, the process doesn't stop.Tomcat stops listening on port 8080 but the process itself still runs. If I remove commons-logging-1.0.4.jar from the library, then tomcat starts and stops normally but of course, the application doesn't work anymore. Is there any way I can remove this jar and have the application working? or did anyone had this problem before and know why this is happening? 10x P.S. I am using axis2-1.3 with tomcat 6 on ubuntu Be a better sports nut! Let your teams follow you with Yahoo Mobile. Try it now. http://mobile.yahoo.com/sports;_ylt=At9_qDKvtAbMuh1G1SQtBI7ntAcJ - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Cannot validate signatures of XML messages
Hi, I'm using Axis 1.4 and I'm trying to send in the SOAP header a signed SAML assertion (using opensaml 1 library). But when the SOAP message is sent, it changes the XML message, so the validation of that SAML assertion is invalid. I know that this subject has been discussed [1] in axis-dev and I was wondering if anyone has a solution. Also, I think this problem is known as a bug [2] so I think there isn't any solution. Is it right? We're using Axis for our project but we need to send signed SAML assertion, so I need to know if we should use another implementation of SOAP. Thanks in advance [1] http://marc.info/?t=10988067624r=1w=2 [2] https://issues.apache.org/jira/browse/AXIS-2497 -- Cándido Rodríguez MontesE-mail: [EMAIL PROTECTED] Red.ES/RedIRIS Tel:+34 955 05 66 13 Edificio CICA Avenida Reina Mercedes, s/n 41012 Sevilla SPAIN
Re: wsdl version
The WSDL 2.0 specification [1] became a W3C recommendation in June 2007. While WSDL 2.0 is the future it has not yet seen widespread adoption (although adoption is increasing, in part because of Axis2). For now I think your best bet is to use WSDL 1.1 and, if you'd like to future proof your app and be on the cutting edge, implement WSDL 2.0 as well. You might be interested in WSDL 1.1 - 2.0 converters. Apache Woden [2] has one in SVN that's a bit out of date. There is also one available from the W3C [3] but it too looks to be out of date. [1] http://www.w3.org/2002/ws/desc/ [2] http://incubator.apache.org/woden/ [3] http://www.w3.org/2006/02/WSDLConvert.html Lawrence Mauro Molinari [EMAIL PROTECTED] 11/20/2007 03:36 AM Please respond to axis-user@ws.apache.org To axis-user@ws.apache.org cc Subject Re: wsdl version Simon Steinacker ha scritto: Hello, I have a general question: Which version of WSDL (1.1/2.0) is recommended to be used? Is WSDL 2.0 already stable and applicable in a critical business applications? Thanks, Lg Simon It may depend on the level of interoperability you want to have. I might be wrong, but I think .NET 1.1 is not compatible with WSDL 2.0. -- Mauro Molinari Software Developer [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Optional elements of primitive type
I have created a JIRA for this: https://issues.apache.org/jira/browse/AXIS2-3353 Cheers. -- Mauro Molinari Software Developer [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: How to create a soap envelope using AXIOM?
It is difficult to see how you have exposed the SOAPEnvelope fatorial(SOAPEnvelope elemento) method as a web service or how you send the return value of SOAPEnvelope CalculaFatorial(String numero) to web service from what is given. But from the looks of it, you might be using the the service and client as follows. service: http://ws.apache.org/axis2/1_3/quickstartguide.html#axiom client: http://ws.apache.org/axis2/1_3/quickstartguide.html#clientaxiom In these cases you do not need the purple coloured code (SOAPEnvelope.) You can see that the the service method accepts and sends an OMElement, which is the element inside the body element. Likewise on the client side you are giving the payload OMElement to sendReceive(), which is the first element of the SOAP body element. So you are not handling the SOAP Envelope, Body elements. They are handled by the Axis2. You only give and take the SOAP body contents. That is why SOAPEnvelope creation parts are not seen in the code. Upul On Nov 20, 2007 5:23 PM, juliocest [EMAIL PROTECTED] wrote: Dear Upul, This is mys service: public SOAPEnvelope fatorial(SOAPEnvelope elemento) throws XMLStreamException { // ObtÃ(c)m o endereço IP de cada cliente que acesso o serviço MessageContext msgCtx = MessageContext.getCurrentMessageContext(); String remoteAddress = (String)msgCtx.getProperty(REMOTE_ADDR); // ObtÃ(c)m o timeout estabelecido entre cliente/servidor String default_timeout = Integer.toString(Options.DEFAULT_TIMEOUT_MILLISECONDS); // Verifica o tipo de conteúdo da mensagem enviada via HTTP HttpServletRequest request = (HttpServletRequest)msgCtx.getProperty(HTTPConstants.MC_HTTP_SERVLETREQUEST); String contentType = request.getHeader(HTTPConstants.HEADER_CONTENT_TYPE); elemento.build(); elemento.detach(); String rootName = elemento.getLocalName(); System.out.println(Reading +rootName+ element); OMElement elementoFilho = elemento.getFirstElement(); String valorxml = elementoFilho.getText(); long valrecebido = Long.parseLong(valorxml); String resultado = Fatorial.retornaFatorial(valrecebido); // Construct the Envelope + Header + Body SOAPFactory soap11Factory = OMAbstractFactory.getSOAP11Factory(); SOAPEnvelope newEnvelope = soap11Factory.getDefaultEnvelope(); OMNamespace soapnamespace = soap11Factory.createOMNamespace(http://teste.org;, teste); OMFactory fac = OMAbstractFactory.getOMFactory(); OMNamespace omNs = fac.createOMNamespace(http://exemplo1.org/exemplo1;, exemplo); OMElement metodo = fac.createOMElement(fatorialResposta,omNs); OMElement valor = fac.createOMElement(resposta, null); valor.addChild(fac.createOMText(valor, Resultado do Fatorial: +resultado)); metodo.addChild(valor); SOAPHeaderBlock newSOAPHeaderBlock = soap11Factory.createSOAPHeaderBlock(http://legal.org;, soapnamespace); newEnvelope.getHeader().addChild(newSOAPHeaderBlock); newEnvelope.getBody().addChild(metodo); return newEnvelope; } This is my client: public static SOAPEnvelope CalculaFatorial(String numero) { // Construct the Envelope + Header + Body SOAPFactory soap11Factory = OMAbstractFactory.getSOAP11Factory(); SOAPEnvelope newEnvelope = soap11Factory.getDefaultEnvelope(); OMNamespace soapnamespace = soap11Factory.createOMNamespace(http://teste.org;, teste); OMFactory fac = OMAbstractFactory.getOMFactory(); OMNamespace omNs = fac.createOMNamespace(http://exemplo.org/exemplo;, exemplo); OMElement metodo = fac.createOMElement(fatorial, omNs); OMElement valor = fac.createOMElement(numero, omNs); valor.addChild(fac.createOMText(valor, numero)); metodo.addChild(valor); SOAPHeaderBlock newSOAPHeaderBlock = soap11Factory.createSOAPHeaderBlock(http://legal.org;, soapnamespace); newEnvelope.getHeader().addChild(newSOAPHeaderBlock); newEnvelope.getBody().addChild(metodo); return newEnvelope; } When a try execute, I have the following error: [INFO] Unable to sendViaPost to url[http://localhost:8080/axis2/services/ServicoFatorial] org.apache.axis2.AxisFault: Can not output XML declaration, after other output has already been done. at org.apache.axis2.AxisFault.makeFault(AxisFault.java:417) at
Axis2 1.3 JAX-WS Client with WSDL in Classpath
I'm trying to connect to a JAX-WS web service served from GlassFish. What JAX-WS API version does Axis2 1.3 support? I was hoping it would be listed in the manifest.mf in axis2-jaxws-api-1.3.jar, but it isn't. The attached client code works in that it retrieves the wsdl from the classpath, but then it gets the schema from the server. How would I make it resolve the schema on the classpath also? This gets logged to the console: Retrieving document at 'file:/D:/projects-nb/Axis2-Test/build/classes/com/fluke/metbase/soap/client/EchoSoapImpl.wsdl.xml'. Retrieving schema at 'http://localhost:8080/EchoSoapService/EchoSoapImpl?xsd=1', relative to 'file:/D:/projects-nb/Axis2-Test/build/classes/com/fluke/metbase/soap/client/EchoSoapImpl.wsdl.xml'. echo string: hello Cameron package com.fluke.metbase.soap.client; import com.fluke.metbase.soap.EchoSoap; import java.net.URL; import javax.xml.namespace.QName; import javax.xml.ws.Service; public class TryEchoService3 { public static void main(String[] args) throws Exception{ //URL wsdl = new URL(http://localhost:8080/EchoSoapService/EchoSoapImpl?wsdl;); URL wsdl = new URL(TryEchoService3.class.getResource(.),EchoSoapImpl.wsdl.xml); QName serviceName = new QName(http://soap.metbase.fluke.com/,EchoSoapService;); Service ws = Service.create(wsdl, serviceName); EchoSoap echoService = ws.getPort(EchoSoap.class); String s = echoService.echoString(hello); System.out.printf(echo string: %s, s); } } - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Minimum Library Requirement?
There have been many such discussions on the user and dev lists. (I started one as well [1].) There was a good discussion a few weeks ago on the Axis dev list (for the record I'm not an Axis committer) and the agreed outcome was that Axis2 should be repackaged into server, client, and optional packages to help users better understand what they need. The conversation also helped trim the fat identifying some packages that can be removed. See [2] for a post somewhere in the middle of the conversation. [1] http://marc.info/?l=axis-userm=119213917321134w=2 [2] http://marc.info/?l=axis-devm=119237705617226w=2 Lawrence Michael Bernagou [EMAIL PROTECTED] 11/20/2007 05:47 AM Please respond to axis-user@ws.apache.org To axis-user@ws.apache.org cc Subject Minimum Library Requirement? Hi everybody, I have a question about the libraries. I have a little number of services using AXIOM but there so many libraries that my application is huge compare with the little ko for the code. In fact I develop a Client (GUI Swing application) that use axis2 to call some services to a server. My method is quite simple : public static MainUser getAuthenticatedUser(String login, char[] password) throws PapoException { EndpointReference targetEPR = new EndpointReference(baseUrl + CoreVariables.USER_WEBSERVICE); OMFactory fac = OMAbstractFactory.getOMFactory(); OMNamespace omNs = fac.createOMNamespace( http://webservices.papo/xsd;, tns); OMElement method = fac.createOMElement(getAuthenticatedUser, omNs); OMElement loginElement = fac.createOMElement(login, omNs); loginElement.addChild(fac.createOMText(loginElement, login)); method.addChild(loginElement); OMElement passwordElement = fac.createOMElement(password, omNs); passwordElement.addChild (fac.createOMText(passwordElement, new String(password))); method.addChild(passwordElement); Options options = new Options(); options.setTo(targetEPR); options.setTransportInProtocol (Constants.TRANSPORT_HTTP); try { ServiceClient sender = new ServiceClient(); sender.setOptions(options); OMElement result = sender.sendReceive(method); OMElement firstElement = result.getFirstElement(); if(firstElement.getLocalName().equals(message)) { throw new PapoException(firstElement.getText()); } else { loginElement = firstElement; login = loginElement.getText(); OMElement firstNameElement = (OMElement)loginElement .getNextOMSibling(); String firstName = firstNameElement.getText (); OMElement lastNameElement = (OMElement)firstElement.getNextOMSibling(); String lastName = lastNameElement.getText(); OMElement emailElement = (OMElement)lastNameElement.getNextOMSibling(); String email = emailElement.getText(); MainUser user = new MainUser(login); user.setFirstName(firstName); user.setLastName(lastName); user.setEmail(email); return user; } } catch (AxisFault af) { af.printStackTrace(); throw new PapoException(The call to the service has failed !!, af); } } What are the minimal list of library to make this run. At the moment I put all the libraries, and try to delete one by one the jar to see what is needed, but, I still have something like 15 jars... just for this piece of code :( At the server side, it is less important but still huge compare with the code... -- Michael Bernagou Java Developper - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Minimum Library Requirement?
Thanks! So I just have to wait for the repackaging :) Personnaly I would prefer 2 light packages (client and server) and a repository for optional libs with a good description. The axis-optional.jarwill still contain many jars not needed, especially if I just need one of them ;) Anyway, let's wait and see! M. 2007/11/20, Lawrence Mandel [EMAIL PROTECTED]: There have been many such discussions on the user and dev lists. (I started one as well [1].) There was a good discussion a few weeks ago on the Axis dev list (for the record I'm not an Axis committer) and the agreed outcome was that Axis2 should be repackaged into server, client, and optional packages to help users better understand what they need. The conversation also helped trim the fat identifying some packages that can be removed. See [2] for a post somewhere in the middle of the conversation. [1] http://marc.info/?l=axis-userm=119213917321134w=2 [2] http://marc.info/?l=axis-devm=119237705617226w=2 Lawrence Michael Bernagou [EMAIL PROTECTED] 11/20/2007 05:47 AM Please respond to axis-user@ws.apache.org To axis-user@ws.apache.org cc Subject Minimum Library Requirement? Hi everybody, I have a question about the libraries. I have a little number of services using AXIOM but there so many libraries that my application is huge compare with the little ko for the code. In fact I develop a Client (GUI Swing application) that use axis2 to call some services to a server. My method is quite simple : public static MainUser getAuthenticatedUser(String login, char[] password) throws PapoException { EndpointReference targetEPR = new EndpointReference(baseUrl + CoreVariables.USER_WEBSERVICE); OMFactory fac = OMAbstractFactory.getOMFactory(); OMNamespace omNs = fac.createOMNamespace( http://webservices.papo/xsd;, tns); OMElement method = fac.createOMElement(getAuthenticatedUser, omNs); OMElement loginElement = fac.createOMElement(login, omNs); loginElement.addChild(fac.createOMText(loginElement, login)); method.addChild(loginElement); OMElement passwordElement = fac.createOMElement(password, omNs); passwordElement.addChild (fac.createOMText(passwordElement, new String(password))); method.addChild(passwordElement); Options options = new Options(); options.setTo(targetEPR); options.setTransportInProtocol (Constants.TRANSPORT_HTTP); try { ServiceClient sender = new ServiceClient(); sender.setOptions(options); OMElement result = sender.sendReceive(method); OMElement firstElement = result.getFirstElement(); if(firstElement.getLocalName().equals(message)) { throw new PapoException(firstElement.getText()); } else { loginElement = firstElement; login = loginElement.getText(); OMElement firstNameElement = (OMElement)loginElement .getNextOMSibling(); String firstName = firstNameElement.getText (); OMElement lastNameElement = (OMElement)firstElement.getNextOMSibling(); String lastName = lastNameElement.getText(); OMElement emailElement = (OMElement)lastNameElement.getNextOMSibling(); String email = emailElement.getText(); MainUser user = new MainUser(login); user.setFirstName(firstName); user.setLastName(lastName); user.setEmail(email); return user; } } catch (AxisFault af) { af.printStackTrace(); throw new PapoException(The call to the service has failed !!, af); } } What are the minimal list of library to make this run. At the moment I put all the libraries, and try to delete one by one the jar to see what is needed, but, I still have something like 15 jars... just for this piece of code :( At the server side, it is less important but still huge compare with the code... -- Michael Bernagou Java Developper - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] -- Michael Bernagou Java Developper
mapping WSDL types to Java types
I'm using WSDL2Java (Axis 1.3) to generate a WS client for the following WSDL. However, the table is generated as an array of string arrays. Is there some way to force the generation of Java Beans for the TableType and LineType elements? Thanks. generated Java code: public class MyDocType implements java.io.Serializable { private java.lang.String[][] table; WSDL: ?xml version=1.0 encoding=UTF-8 standalone=no? wsdl:definitions name=to2DStringArray targetNamespace=http://www.mycom.com/ns; xmlns:ns=http://www.mycom.com/ns; xmlns:wsdl=http://schemas.xmlsoap.org/wsdl/; xmlns:soapbind=http://schemas.xmlsoap.org/wsdl/soap/; wsdl:types xsd:schema targetNamespace=http://www.mycom.com/ns; xmlns=http://www.mycom.com/ns; xmlns:xsd=http://www.w3.org/2001/XMLSchema; xsd:element name=MyDoc type=MyDocType / xsd:complexType name=LineType xsd:sequence xsd:element name=Column type=xsd:string minOccurs=1 maxOccurs=unbounded xmlns:xsd=http://www.w3.org/2001/XMLSchema; /xsd:element /xsd:sequence /xsd:complexType xsd:complexType name=TableType xsd:sequence xsd:element name=Line minOccurs=2 type=LineType maxOccurs=7 xmlns:xsd=http://www.w3.org/2001/XMLSchema; /xsd:element /xsd:sequence /xsd:complexType xsd:complexType name=MyDocType xsd:sequence xsd:element name=Table minOccurs=0 type=TableType /xsd:element /xsd:sequence /xsd:complexType /xsd:schema /wsdl:types wsdl:message name=MyMessage wsdl:part name=parameters element=ns:MyDoc / /wsdl:message wsdl:portType name=MyPortType wsdl:operation name=submit wsdl:input message=ns:MyMessage / /wsdl:operation /wsdl:portType wsdl:binding name=MyBinding type=ns:MyPortType xmlns:wsdl=http://schemas.xmlsoap.org/wsdl/; soapbind:binding style=document transport=http://schemas.xmlsoap.org/soap/http; / wsdl:operation name=submit soapbind:operation soapAction= / wsdl:input soapbind:body use=literal / /wsdl:input /wsdl:operation /wsdl:binding wsdl:service name=MyService wsdl:port name=MyPort binding=ns:MyBinding soapbind:address location=http://localhost:8080/axis/services/myservice; / /wsdl:port /wsdl:service /wsdl:definitions -- Dário Abdulrehman PGP Public Key: http://tinyurl.com/2pm9d7 --
RE: Does Axis 2 allow passing of sub class objects ??
Thanks Moosani, I believe I am facing similar issue. Could you please help me with following I am seeing the snippet where I egenrate java classes from wsdl but not sure how could I specify -g ? wsdl2java wsdlFilename=http://localhost:8080/services/InventoryService?wsdl; output=${build.dir}/client packageName=com.hp.cp.stubs.inv databindingName=adb namespaceToPackages=http://quickstart.samples/xsd=com.hp.cp.stubs.inv.xsd; language=java synconly=true / and in wsdl, I added manually following snippet. Filter is an interface and LocationFilter is a class implementing it xs:element name=LocationFilter type=ns:LocationFilter / xs:complexType name=LocationFilter xs:complexContent xs:extension base=ns:Filter xs:sequence xs:element name=locationId nillable=true type=xs:int/ /xs:sequence /xs:extension /xs:complexContent /xs:complexType Thanks in advance Petr V. Vivekananda Moosani [EMAIL PROTECTED] wrote:v\:* {behavior:url(#default#VML);} o\:* {behavior:url(#default#VML);} w\:* {behavior:url(#default#VML);} .shape {behavior:url(#default#VML);} Hello, We had a similar case. We were generating both sever side and client classes from WSDL. We had a DataNode type which gets passed in the WebService methods. But the client can also send a subtype like StructuredDataNode or UnstructuredDataNode. We had the subtypes even defined in the schema in the WSDL. If you have a similar situation then while generating classes also give g option to WSDL2Java. This generates classes for types which are not directly used in Web service operations like the sub type in this case. You can pass a subtype in the calls to Web Service methods. Hope this helps! - Vivek - From: Petr V. [mailto:[EMAIL PROTECTED] Sent: Tuesday, November 20, 2007 6:31 AM To: axis-user@ws.apache.org Subject: Does Axis 2 allow passing of sub class objects ?? Let's assume that I have a web service that has an operation void fun(MyInterface if) can I call it like fun(mo); where mo is of type MyObject that implements MyInterface. Does Axis 2 and web services in general support this i-e passing object of sub class or implementing class for interface. Thanks, - Be a better pen pal. Text or chat with friends inside Yahoo! Mail. See how. DISCLAIMER == This e-mail may contain privileged and confidential information which is the property of Persistent Systems Ltd. It is intended only for the use of the individual or entity to which it is addressed. If you are not the intended recipient, you are not authorized to read, retain, copy, print, distribute or use this message. If you have received this communication in error, please notify the sender and delete all copies of this message. Persistent Systems Ltd. does not accept any liability for virus infected mails. - Never miss a thing. Make Yahoo your homepage.
Re: wsdl version
I'm not convinced that WSDL 2.0 is the future. There's still no sign from Microsoft that they plan to implement support for it. Stick with WSDL 1.1 for the immediate future. Anne On Nov 20, 2007 12:00 PM, Lawrence Mandel [EMAIL PROTECTED] wrote: The WSDL 2.0 specification [1] became a W3C recommendation in June 2007. While WSDL 2.0 is the future it has not yet seen widespread adoption (although adoption is increasing, in part because of Axis2). For now I think your best bet is to use WSDL 1.1 and, if you'd like to future proof your app and be on the cutting edge, implement WSDL 2.0 as well. You might be interested in WSDL 1.1 - 2.0 converters. Apache Woden [2] has one in SVN that's a bit out of date. There is also one available from the W3C [3] but it too looks to be out of date. [1] http://www.w3.org/2002/ws/desc/ [2] http://incubator.apache.org/woden/ [3] http://www.w3.org/2006/02/WSDLConvert.html Lawrence Mauro Molinari [EMAIL PROTECTED] 11/20/2007 03:36 AM Please respond to axis-user@ws.apache.org To axis-user@ws.apache.org cc Subject Re: wsdl version Simon Steinacker ha scritto: Hello, I have a general question: Which version of WSDL (1.1/2.0) is recommended to be used? Is WSDL 2.0 already stable and applicable in a critical business applications? Thanks, Lg Simon It may depend on the level of interoperability you want to have. I might be wrong, but I think .NET 1.1 is not compatible with WSDL 2.0. -- Mauro Molinari Software Developer [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Minimum Library Requirement?
I think you're right about the optional repository. The key really is the good description. I got the feeling from the axis-dev conversation that there are very few people who understand all of Axis2's dependencies. Lawrence Michael Bernagou [EMAIL PROTECTED] 11/20/2007 01:01 PM Please respond to axis-user@ws.apache.org To axis-user@ws.apache.org cc Subject Re: Minimum Library Requirement? Thanks! So I just have to wait for the repackaging :) Personnaly I would prefer 2 light packages (client and server) and a repository for optional libs with a good description. The axis-optional.jar will still contain many jars not needed, especially if I just need one of them ;) Anyway, let's wait and see! M. 2007/11/20, Lawrence Mandel [EMAIL PROTECTED]: There have been many such discussions on the user and dev lists. (I started one as well [1].) There was a good discussion a few weeks ago on the Axis dev list (for the record I'm not an Axis committer) and the agreed outcome was that Axis2 should be repackaged into server, client, and optional packages to help users better understand what they need. The conversation also helped trim the fat identifying some packages that can be removed. See [2] for a post somewhere in the middle of the conversation. [1] http://marc.info/?l=axis-userm=119213917321134w=2 [2] http://marc.info/?l=axis-devm=119237705617226w=2 Lawrence Michael Bernagou [EMAIL PROTECTED] 11/20/2007 05:47 AM Please respond to axis-user@ws.apache.org To axis-user@ws.apache.org cc Subject Minimum Library Requirement? Hi everybody, I have a question about the libraries. I have a little number of services using AXIOM but there so many libraries that my application is huge compare with the little ko for the code. In fact I develop a Client (GUI Swing application) that use axis2 to call some services to a server. My method is quite simple : public static MainUser getAuthenticatedUser(String login, char[] password) throws PapoException { EndpointReference targetEPR = new EndpointReference(baseUrl + CoreVariables.USER_WEBSERVICE); OMFactory fac = OMAbstractFactory.getOMFactory(); OMNamespace omNs = fac.createOMNamespace( http://webservices.papo/xsd;, tns); OMElement method = fac.createOMElement(getAuthenticatedUser, omNs); OMElement loginElement = fac.createOMElement(login, omNs); loginElement.addChild(fac.createOMText(loginElement, login)); method.addChild(loginElement); OMElement passwordElement = fac.createOMElement(password, omNs); passwordElement.addChild (fac.createOMText(passwordElement, new String(password))); method.addChild(passwordElement); Options options = new Options(); options.setTo(targetEPR); options.setTransportInProtocol (Constants.TRANSPORT_HTTP); try { ServiceClient sender = new ServiceClient(); sender.setOptions(options); OMElement result = sender.sendReceive(method); OMElement firstElement = result.getFirstElement(); if(firstElement.getLocalName().equals(message)) { throw new PapoException( firstElement.getText()); } else { loginElement = firstElement; login = loginElement.getText(); OMElement firstNameElement = (OMElement)loginElement .getNextOMSibling(); String firstName = firstNameElement.getText (); OMElement lastNameElement = (OMElement)firstElement.getNextOMSibling(); String lastName = lastNameElement.getText(); OMElement emailElement = (OMElement)lastNameElement.getNextOMSibling(); String email = emailElement.getText(); MainUser user = new MainUser(login); user.setFirstName(firstName); user.setLastName(lastName); user.setEmail(email); return user; } } catch (AxisFault af) { af.printStackTrace(); throw new PapoException(The call to the service has failed !!, af); } } What are the minimal list of library to make this run. At the moment I put all the libraries, and try to delete one by one the jar to see what is needed, but, I still have something like 15 jars... just for this piece of code :( At the server side, it is less important but still huge compare with the code... -- Michael Bernagou Java Developper - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] -- Michael Bernagou Java Developper - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Q: wsdl2java: How to turn off conversion to CamelCase
Axis2 Crew, I have noticed that when I have a fragment of wsdl that looks like this: xs:complexType name=AD01tableType That wsdl2java generates a class like this: AD01TableType.java But when the wsdl fragment looks like this: xs:complexType name=PLBCtableType The class looks like this: PLBCtableType.java I can see the pattern, but I am interested in just having wsdl2java not change the names that it pulls from the .wsdl. Is there an option on wsdl2java that turns this off? This is important to me because I have my own generator that complements wsdl2java. My generator has to match the class names that wsdl generates. If I could make the rule simple: don't do anything it would save me some headache now, and possibly in the future if wsdl2java developers change their rules. -- Michael Potter - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Released Axis2 jars
Amila,Yes, I think that is correct. Creating those jars should be part of a release checklist. Users of my application (http://www.alanfeldstein.com/products/software/fss/) depend only on ADB. Asking them to download Axis2 1.3 in its entirety is unreasonable.Alan Original Message Subject: Re: Released Axis2 jars From: "Amila Suriarachchi" [EMAIL PROTECTED] Date: Sun, November 18, 2007 11:29 pm To: axis-user@ws.apache.org hmm, none of the Axis2 1.3 jars available isn't it? Amila. On Nov 18, 2007 5:34 AM, alan@alanfeldstein.com wrote: Why is axis2-adb-1.3.jar missing from http://people.apache.org/repo/m1-ibiblio-rsync-repository/org.apache.axis2/jars/ ? Alan M. Feldstein Cosmic Horizon http://www.alanfeldstein.com/ - To unsubscribe, e-mail: axis-user-unsubscribe@ws.apache.org For additional commands, e-mail: axis-user-help@ws.apache.org -- Amila Suriarachchi, WSO2 Inc. - To unsubscribe, e-mail: axis-user-unsubscribe@ws.apache.org For additional commands, e-mail: axis-user-help@ws.apache.org - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Error when deploying in to web-inf directory
Hi all, Has anyone seen this error? I am deploying all the axis2 jar files into WEB-INF\lib directory and my axis2.xml and services.xml files are in WEB-INF directory. After starting Tomcat I get a crash (stack is below). I checked out DeploymentEngine.java and it calls 'new DeploymentFileData(null, null);' which causes the crash as the constructor is not expecting 'file' ( the first parameter for DeploymentFileData()) to be null. I also tried setting axis.repository.path and that gives the same error as below. Does anyone know if there is a fix? If not is there a workaround that I can use? I am curious how this works for anyone else if they deploy in the WEB-INF directory java.lang.IllegalArgumentException: Filename must not be null at org.apache.axis2.deployment.repository.util.DeploymentFileData.init(De ploymentFileData.java:43) at org.apache.axis2.deployment.repository.util.DeploymentFileData.init(De ploymentFileData.java:48) at org.apache.axis2.deployment.DeploymentEngine.buildServiceGroup(Deploymen tEngine.java:1015) at org.apache.axis2.deployment.WarBasedAxisConfigurator.loadServicesFromWeb Inf(WarBasedAxisConfigurator.java:309) at org.apache.axis2.deployment.WarBasedAxisConfigurator.loadServices(WarBas edAxisConfigurator.java:270) at org.apache.axis2.context.ConfigurationContextFactory.createConfiguration Context(ConfigurationContextFactory.java:78) at org.apache.axis2.transport.http.AxisServlet.initConfigContext(AxisServle t.java:500) at org.apache.axis2.transport.http.AxisServlet.init(AxisServlet.java:420) at org.apache.axis2.transport.http.AxisAdminServlet.init(AxisAdminServlet.j ava:54) at org.apache.catalina.core.StandardWrapper.loadServlet(StandardWrapper.jav a:1105) at org.apache.catalina.core.StandardWrapper.load(StandardWrapper.java:932) at org.apache.catalina.core.StandardContext.loadOnStartup(StandardContext.j ava:3917) at org.apache.catalina.core.StandardContext.start(StandardContext.java:4201 ) at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.ja va:759) at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:739) at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:524) at org.apache.catalina.startup.HostConfig.deployDescriptor(HostConfig.java: 608) at org.apache.catalina.startup.HostConfig.deployDescriptors(HostConfig.java :535) at org.apache.catalina.startup.HostConfig.deployApps(HostConfig.java:470) at org.apache.catalina.startup.HostConfig.start(HostConfig.java:1122) at org.apache.catalina.startup.HostConfig.lifecycleEvent(HostConfig.java:31 0) at org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent(LifecycleSu pport.java:119) at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1021) at org.apache.catalina.core.StandardHost.start(StandardHost.java:718) at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1013) at org.apache.catalina.core.StandardEngine.start(StandardEngine.java:442) at org.apache.catalina.core.StandardService.start(StandardService.java:450) at org.apache.catalina.core.StandardServer.start(StandardServer.java:709) at org.apache.catalina.startup.Catalina.start(Catalina.java:551) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.jav a:39) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessor Impl.java:25) at java.lang.reflect.Method.invoke(Method.java:585) at org.apache.catalina.startup.Bootstrap.start(Bootstrap.java:294) at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:432) Thanks, --kumar
Re: problem with axis and sockets
Can i send a reference to a stream? Michele Mazzucco-2 wrote: You cannot send socket references across the network. Sockets - like other resources like DB and JMS connections, are not serializable. The serialization mechanism is described here [1]. Michele [1] http://java.sun.com/j2se/1.5.0/docs/guide/serialization/spec/ serialTOC.html On 19 Nov 2007, at 23:04, tina-- wrote: hello!! Can you please help me? I am facing a problem while calling (invoking) a web service with a socket as its parameter. The exception is: org.apache.axiom.om.OMException: java.lang.RuntimeException: java.lang.IllegalAccessException: Class org.apache.axis2.databinding.utils.BeanUtil can not access a member of class java.net.SocketInputStream with modifiers public final at org.apache.axiom.om.impl.builder.StAXOMBuilder.next (StAXOMBuilder.java:239) at org.apache.axiom.om.impl.llom.OMNodeImpl.build(OMNodeImpl.java: 318) at org.apache.axiom.om.impl.llom.OMElementImpl.build (OMElementImpl.java:614) at org.apache.axiom.om.impl.llom.OMElementImpl.detach (OMElementImpl.java:583) at org.apache.axiom.om.impl.llom.OMNodeImpl.setParent (OMNodeImpl.java:117) at org.apache.axiom.om.impl.llom.OMElementImpl.addChild (OMElementImpl.java:239) at org.apache.axiom.om.impl.llom.OMElementImpl.addChild (OMElementImpl.java:195) at org.apache.axis2.client.ServiceClient.fillSOAPEnvelope (ServiceClient.java:689) at org.apache.axis2.client.ServiceClient.sendReceive (ServiceClient.java:525) at org.apache.axis2.client.ServiceClient.sendReceive (ServiceClient.java:508) at org.apache.axis2.rpc.client.RPCServiceClient.invokeBlocking (RPCServiceClient.java:101) at tcp2.LicenseServiceClient.deamon(LicenseServiceClient.java:36) at tcp2.LicenseDeamonHandler.run(LicenseDeamonHandler.java:30) Caused by: java.lang.RuntimeException: java.lang.IllegalAccessException: Class org.apache.axis2.databinding.utils.BeanUtil can not access a member of class java.net.SocketInputStream with modifiers public final at org.apache.axis2.databinding.utils.BeanUtil.getPullParser (BeanUtil.java:246) at org.apache.axis2.databinding.utils.reader.ADBXMLStreamReaderImpl.proce ssProperties(ADBXMLStreamReaderImpl.java:988) at org.apache.axis2.databinding.utils.reader.ADBXMLStreamReaderImpl.next( ADBXMLStreamReaderImpl.java:854) at org.apache.axis2.databinding.utils.reader.WrappingXMLStreamReader.next (WrappingXMLStreamReader.java:48) at org.apache.axis2.databinding.utils.reader.ADBXMLStreamReaderImpl.next( ADBXMLStreamReaderImpl.java:857) at org.apache.axis2.util.StreamWrapper.next(StreamWrapper.java:71) at org.apache.axiom.om.impl.builder.StAXOMBuilder.next (StAXOMBuilder.java:153) ... 12 more Caused by: java.lang.IllegalAccessException: Class org.apache.axis2.databinding.utils.BeanUtil can not access a member of class java.net.SocketInputStream with modifiers public final at sun.reflect.Reflection.ensureMemberAccess(Reflection.java:65) at java.lang.reflect.Method.invoke(Method.java:588) at org.apache.axis2.databinding.utils.BeanUtil.getPullParser (BeanUtil.java:224) ... 18 more I don't get this thing with public and final . Thank you very much!! -- View this message in context: http://www.nabble.com/problem-with- axis-and-sockets-tf4840115.html#a13847572 Sent from the Axis - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] -- View this message in context: http://www.nabble.com/problem-with-axis-and-sockets-tf4840115.html#a13870191 Sent from the Axis - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: problem with axis and sockets
Imagine that I have 4 programs (.java); A,B,C,D. A is a server and is listening to a port. When a client appears, A calls B, B, calls C and C calls a webservice named D. The web service has to tranfer data between the client and another server E. So , it has to read/write from/to the client's stream . If I cannot have as a parameter of a web service, the socket of the client,and if I cannot have as parameters the in/out streams of the client how can I do it? I tried to save the port and ip of the client, for D to open a stream in these data, but I have to make a new socket. So I have to terminate the first (client). If I terminate the client, system crashes. Is there a way, 1)to keep the client's socket alive 2)to make the web service create the streams (...getInputStream();) or 3) to pass as a parameter the socket? or is there a way to take the stream of a socket, just knowing the ip, and without having the socket? thanks you.. ps: I don't understand serialization. Maybe my questions are silly. :) -- View this message in context: http://www.nabble.com/problem-with-axis-and-sockets-tf4840115.html#a13870428 Sent from the Axis - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: how to define invokeBlocking to return you a byte[]??
The object you are getting must be a DataHandler [1] or a base64 encoded string... If it is a DataHandler you can use the getInputStream method or getContent() to read the content. thanks, Thilina [1] http://java.sun.com/j2ee/1.4/docs/api/javax/activation/DataHandler.html On Nov 20, 2007 8:05 AM, tina-- [EMAIL PROTECTED] wrote: ?xml version=1.0 encoding=UTF-8? wsdl:definitions xmlns:wsdl=http://schemas.xmlsoap.org/wsdl/; xmlns:ns1=http://io.java/xsd; xmlns:wsaw=http://www.w3.org/2006/05/addressing/wsdl; xmlns:http=http://schemas.xmlsoap.org/wsdl/http/; xmlns:ns0=http://ws.apache.org/axis2; xmlns:xs=http://www.w3.org/2001/XMLSchema; xmlns:mime=http://schemas.xmlsoap.org/wsdl/mime/; xmlns:soap=http://schemas.xmlsoap.org/wsdl/soap/; xmlns:soap12=http://schemas.xmlsoap.org/wsdl/soap12/; targetNamespace=http://ws.apache.org/axis2; wsdl:documentationLicenseService/wsdl:documentation wsdl:types xs:schema xmlns:ns=http://ws.apache.org/axis2; attributeFormDefault=qualified elementFormDefault=qualified targetNamespace=http://ws.apache.org/axis2; xs:complexType name=Exception xs:sequence xs:element minOccurs=0 name=Exception nillable=true type=xs:anyType/ /xs:sequence /xs:complexType xs:element name=IOException xs:complexType xs:sequence xs:element minOccurs=0 name=IOException nillable=true type=ns1:IOException/ /xs:sequence /xs:complexType /xs:element xs:element name=forward2 xs:complexType xs:sequence xs:element minOccurs=0 name=param0 type=xs:int/ xs:element minOccurs=0 name=param1 nillable=true type=xs:base64Binary/ /xs:sequence /xs:complexType /xs:element xs:element name=forward2Response xs:complexType xs:sequence xs:element minOccurs=0 name=return nillable=true type=xs:base64Binary/ /xs:sequence /xs:complexType /xs:element xs:element name=l xs:complexType xs:sequence xs:element minOccurs=0 name=param0 type=xs:int/ xs:element minOccurs=0 name=param1 nillable=true type=xs:base64Binary/ xs:element minOccurs=0 name=param2 nillable=true type=ns1:OutputStream/ xs:element minOccurs=0 name=param3 nillable=true type=ns1:InputStream/ /xs:sequence /xs:complexType /xs:element xs:element name=lResponse xs:complexType xs:sequence xs:element minOccurs=0 name=return nillable=true type=xs:base64Binary/ /xs:sequence /xs:complexType /xs:element /xs:schema xs:schema xmlns:ax21=http://io.java/xsd; attributeFormDefault=qualified elementFormDefault=qualified targetNamespace=http://io.java/xsd; xs:complexType name=IOException xs:complexContent xs:extension base=ns0:Exception xs:sequence/ /xs:extension /xs:complexContent /xs:complexType xs:complexType name=OutputStream xs:sequence/ /xs:complexType xs:complexType name=InputStream xs:sequence/ /xs:complexType /xs:schema /wsdl:types wsdl:message name=forward2Request wsdl:part name=parameters element=ns0:forward2/ /wsdl:message wsdl:message name=forward2Response wsdl:part name=parameters element=ns0:forward2Response/ /wsdl:message wsdl:message name=IOException wsdl:part name=parameters element=ns0:IOException/ /wsdl:message wsdl:message name=lRequest wsdl:part name=parameters element=ns0:l/ /wsdl:message wsdl:message name=lResponse wsdl:part name=parameters element=ns0:lResponse/ /wsdl:message wsdl:portType name=LicenseServicePortType wsdl:operation name=forward2 wsdl:input message=ns0:forward2Request wsaw:Action=urn:forward2/ wsdl:output message=ns0:forward2Response wsaw:Action=urn:forward2Response/ wsdl:fault message=ns0:IOException name=IOException wsaw:Action=urn:forward2IOException/ /wsdl:operation wsdl:operation name=l wsdl:input message=ns0:lRequest wsaw:Action=urn:l/ wsdl:output message=ns0:lResponse wsaw:Action=urn:lResponse/ wsdl:fault message=ns0:IOException name=IOException
Re: Error when deploying in to web-inf directory
Hi Iyengar, I think someone else has also noticed this issue and has created a jira. I think we are having this issue in Axis2 1.3 release and will try to fix the issue soon.So that you can test with the nightly builds. Thanks Deepal Has anyone seen this error? I am deploying all the axis2 jar files into WEB-INF\lib directory and my axis2.xml and services.xml files are in WEB-INF directory. After starting Tomcat I get a crash (stack is below). I checked out DeploymentEngine.java and it calls ‘new DeploymentFileData(null, null);’ which causes the crash as the constructor is not expecting ‘file’ ( the first parameter for DeploymentFileData()) to be null. I also tried setting axis.repository.path and that gives the same error as below. Does anyone know if there is a fix? If not is there a workaround that I can use? I am curious how this works for anyone else if they deploy in the WEB-INF directory java.lang.IllegalArgumentException: Filename must not be null at org.apache.axis2.deployment.repository.util.DeploymentFileData.init(DeploymentFileData.java:43) at org.apache.axis2.deployment.repository.util.DeploymentFileData.init(DeploymentFileData.java:48) at org.apache.axis2.deployment.DeploymentEngine.buildServiceGroup(DeploymentEngine.java:1015) at org.apache.axis2.deployment.WarBasedAxisConfigurator.loadServicesFromWebInf(WarBasedAxisConfigurator.java:309) at org.apache.axis2.deployment.WarBasedAxisConfigurator.loadServices(WarBasedAxisConfigurator.java:270) at org.apache.axis2.context.ConfigurationContextFactory.createConfigurationContext(ConfigurationContextFactory.java:78) at org.apache.axis2.transport.http.AxisServlet.initConfigContext(AxisServlet.java:500) at org.apache.axis2.transport.http.AxisServlet.init(AxisServlet.java:420) at org.apache.axis2.transport.http.AxisAdminServlet.init(AxisAdminServlet.java:54) at org.apache.catalina.core.StandardWrapper.loadServlet(StandardWrapper.java:1105) at org.apache.catalina.core.StandardWrapper.load(StandardWrapper.java:932) at org.apache.catalina.core.StandardContext.loadOnStartup(StandardContext.java:3917) at org.apache.catalina.core.StandardContext.start(StandardContext.java:4201) at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:759) at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:739) at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:524) at org.apache.catalina.startup.HostConfig.deployDescriptor(HostConfig.java:608) at org.apache.catalina.startup.HostConfig.deployDescriptors(HostConfig.java:535) at org.apache.catalina.startup.HostConfig.deployApps(HostConfig.java:470) at org.apache.catalina.startup.HostConfig.start(HostConfig.java:1122) at org.apache.catalina.startup.HostConfig.lifecycleEvent(HostConfig.java:310) at org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent(LifecycleSupport.java:119) at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1021) at org.apache.catalina.core.StandardHost.start(StandardHost.java:718) at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1013) at org.apache.catalina.core.StandardEngine.start(StandardEngine.java:442) at org.apache.catalina.core.StandardService.start(StandardService.java:450) at org.apache.catalina.core.StandardServer.start(StandardServer.java:709) at org.apache.catalina.startup.Catalina.start(Catalina.java:551) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) at java.lang.reflect.Method.invoke(Method.java:585) at org.apache.catalina.startup.Bootstrap.start(Bootstrap.java:294) at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:432) Thanks, --kumar - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: wsdl version
Axis2 supports both WSDL 1.1 and WSDL 2.0 deployment. If you are hoping to use WSDL deployment I recommend WSDL 2.0 as its easy to learn (Less Complex) and it gives you better control in a REST sense. If you want your service to be more RESTy then I guess WSDL 2.0 is the way forward. BTW, Axis2 will generate a WSDL 1.1 for your service even if you use WSDL 2.0 deployment. Thanks, Keith. On Nov 20, 2007 12:04 PM, Simon Steinacker [EMAIL PROTECTED] wrote: Hello, I have a general question: Which version of WSDL (1.1/2.0) is recommended to be used? Is WSDL 2.0 already stable and applicable in a critical business applications? Thanks, Lg Simon - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] -- Keith Chapman WSO2 Inc. Oxygen for Web Services Developers. http://wso2.org/
Re: How to capture Message Context in sendReceive (Blocking) call
Hi Deepal! Thanks for help! How could I to do it? Could you show me how to do with an example? ServiceClient client = new ServiceClient(); - client.sendRecieve(); client.getLastOperationConetxt().getMessageContext(In); Thanks Deepal - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Does Axis 2 allow passing of sub class objects ??
Hi Petr, The schema looks fine. You have an attribute generateAllClasses for the ant task. You can refer http://ws.apache.org/axis2/tools/1_3/CodegenToolReference.html here for more options (both for command line execution and for the ant task) Regards, Vivek From: Petr V. [mailto:[EMAIL PROTECTED] Sent: Wednesday, November 21, 2007 3:42 AM To: axis-user@ws.apache.org Subject: RE: Does Axis 2 allow passing of sub class objects ?? Thanks Moosani, I believe I am facing similar issue. Could you please help me with following I am seeing the snippet where I egenrate java classes from wsdl but not sure how could I specify -g ? wsdl2java wsdlFilename=http://localhost:8080/services/InventoryService?wsdl; output=${build.dir}/client packageName=com.hp.cp.stubs.inv databindingName=adb namespaceToPackages=http://quickstart.samples/xsd=com.hp.cp.stubs.inv.xsd; language=java synconly=true / and in wsdl, I added manually following snippet. Filter is an interface and LocationFilter is a class implementing it xs:element name=LocationFilter type=ns:LocationFilter / xs:complexType name=LocationFilter xs:complexContent xs:extension base=ns:Filter xs:sequence xs:element name=locationId nillable=true type=xs:int/ /xs:sequence /xs:extension /xs:complexContent /xs:complexType Thanks in advance Petr V. Vivekananda Moosani [EMAIL PROTECTED] wrote: Hello, We had a similar case. We were generating both sever side and client classes from WSDL. We had a DataNode type which gets passed in the WebService methods. But the client can also send a subtype like StructuredDataNode or UnstructuredDataNode. We had the subtypes even defined in the schema in the WSDL. If you have a similar situation then while generating classes also give g option to WSDL2Java. This generates classes for types which are not directly used in Web service operations like the sub type in this case. You can pass a subtype in the calls to Web Service methods. Hope this helps! - Vivek From: Petr V. [mailto:[EMAIL PROTECTED] Sent: Tuesday, November 20, 2007 6:31 AM To: axis-user@ws.apache.org Subject: Does Axis 2 allow passing of sub class objects ?? Let's assume that I have a web service that has an operation void fun(MyInterface if) can I call it like fun(mo); where mo is of type MyObject that implements MyInterface. Does Axis 2 and web services in general support this i-e passing object of sub class or implementing class for interface. Thanks, Be a better pen pal. Text or chat with friends inside Yahoo! Mail. See how. DISCLAIMER == This e-mail may contain privileged and confidential information which is the property of Persistent Systems Ltd. It is intended only for the use of the individual or entity to which it is addressed. If you are not the intended recipient, you are not authorized to read, retain, copy, print, distribute or use this message. If you have received this communication in error, please notify the sender and delete all copies of this message. Persistent Systems Ltd. does not accept any liability for virus infected mails. Never miss a thing. Make Yahoo your homepage. DISCLAIMER == This e-mail may contain privileged and confidential information which is the property of Persistent Systems Ltd. It is intended only for the use of the individual or entity to which it is addressed. If you are not the intended recipient, you are not authorized to read, retain, copy, print, distribute or use this message. If you have received this communication in error, please notify the sender and delete all copies of this message. Persistent Systems Ltd. does not accept any liability for virus infected mails. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Error in deploying samples
Folks, I've tried to deploy the Axis2 samples out of the box, and I am getting the following error: Error: java.lang.NoSuchMethodError: org.w3c.dom.Document.getXmlEncoding()Ljava/lang/String; at org.apache.ws.commons.schema.utils.DOMUtil.getXmlEncoding(DOMUtil.java:6 04) at org.apache.ws.commons.schema.XmlSchemaCollection.read(XmlSchemaCollectio n.java:388) at org.apache.axis2.description.WSDLToAxisServiceBuilder.getXMLSchema(WSDLT oAxisServiceBuilder.java:140) at org.apache.axis2.description.WSDL11ToAxisServiceBuilder.copyExtensibleEl ements(WSDL11ToAxisServiceBuilder.java:2202) at org.apache.axis2.description.WSDL11ToAxisServiceBuilder.processTypes(WSD L11ToAxisServiceBuilder.java:384) at org.apache.axis2.description.WSDL11ToAxisServiceBuilder.processTypes(WSD L11ToAxisServiceBuilder.java:373) at org.apache.axis2.description.WSDL11ToAxisServiceBuilder.populateService( WSDL11ToAxisServiceBuilder.java:321) at org.apache.axis2.description.WSDL11ToAllAxisServicesBuilder.populateAllS ervices(WSDL11ToAllAxisServicesBuilder.java:109) at org.apache.axis2.deployment.repository.util.ArchiveReader.processWSDLFil e(ArchiveReader.java:249) at org.apache.axis2.deployment.repository.util.ArchiveReader.processWSDLs(A rchiveReader.java:357) at org.apache.axis2.deployment.ServiceDeployer.deploy(ServiceDeployer.java: 65) at org.apache.axis2.deployment.repository.util.DeploymentFileData.deploy(De ploymentFileData.java:137) at org.apache.axis2.deployment.DeploymentEngine.doDeploy(DeploymentEngine.j ava:584) at org.apache.axis2.deployment.repository.util.WSInfoList.update(WSInfoList .java:141) at org.apache.axis2.deployment.RepositoryListener.update(RepositoryListener .java:318) at org.apache.axis2.deployment.RepositoryListener.checkServices(RepositoryL istener.java:220) at org.apache.axis2.deployment.RepositoryListener.startListener(RepositoryL istener.java:312) at org.apache.axis2.deployment.scheduler.SchedulerTask.checkRepository(Sche dulerTask.java:64) at org.apache.axis2.deployment.scheduler.SchedulerTask.run(SchedulerTask.ja va:71) at org.apache.axis2.deployment.scheduler.Scheduler$SchedulerTimerTask.run(S cheduler.java:83) at java.util.TimerThread.mainLoop(Timer.java:432) at java.util.TimerThread.run(Timer.java:382) Anybody know what I am missing? I am using Java 1.4. Do I need to configure something specific for using Axis2 with Java 1.4? I have included xerces 2.9.1 into the app server (oc4j 10.1.2) as a global lib. Thanks, Nadeem
Re: [AXIS2] Proposal to implement http content negotiation
Hi all, I've added Content Negotiation via Accept header to Axis2 in revision 596950. As stated previously this would mean that doing a GET (Just typing in a URL on the browser) from the browser would result in a SOAP 1.1response cause the browsers accept header says text/xml. Do we need a switch in the axis2.xml to control this feature? Thanks, Keith. On Oct 21, 2007 1:21 PM, keith chapman [EMAIL PROTECTED] wrote: Yes they are unaffected as long as they dont send the Accept header (Wich clients dont do unless explicitly set) Thanks, Keith. On 10/19/07, Sanjiva Weerawarana [EMAIL PROTECTED] wrote: However, isn't the answer to Nick's first question yes? That is, existing services which do only SOAP are unaffected by this proposed change. Sanjiva. keith chapman wrote: Hi Nicholas, Yes it will be in effect for all application (Subjected to the fact that it sends an Accept header). If the client does not send an Accept header then everything will be as it used to be. But as Glen suggested we could have a switch to turn this feature off. Thanks, Keith. On 10/19/07, *Nicholas L Gallardo* [EMAIL PROTECTED] mailto:[EMAIL PROTECTED] wrote: Glen, If the request is SOAP 1.1, we should always return SOAP 1.1 regardless of the Accept header, right? That's my understanding. I believe this is addressed in the SOAP 1.2 spec as to what constitutes a mismatch error and what kinds of responses can go back. Would this leave the existing behavior unchanged for services that declare an explicit SOAP binding in a WSDL? In other words, does this just apply to endpoints choosing to leverage a RESTful pattern/API, or will all applications be subject to negotiation? -Nick Inactive hide details for Glen Daniels [EMAIL PROTECTED] Glen Daniels [EMAIL PROTECTED] mailto:[EMAIL PROTECTED] *Glen Daniels [EMAIL PROTECTED] mailto: [EMAIL PROTECTED]* 10/18/2007 05:41 AM Please respond to [EMAIL PROTECTED] mailto:[EMAIL PROTECTED] To [EMAIL PROTECTED] mailto:[EMAIL PROTECTED] cc Subject Re: [AXIS2] Proposal to implement http content negotiation Hi folks: +1 from me *if* we make sure there's a flag to allow people to control whether a given operation supports POX or not. Essentially I'm just saying we should backport the SOAP-Response MEP to SOAP 1.1, and allow the user to specify. By default the behavior should be as in Keith's proposal, but if they indicate that a particular operation is using the SOAP-Response MEP (this could also be a disablePOX flag or whatever), it should always return SOAP on a GET. Also... a SOAP 1.1 response uaing http content negotiation (A SOAP 1.1 response will be went only when the request is SOAP 1.1 and there is no matching value in the Accept header). If the request is SOAP 1.1, we should always return SOAP 1.1regardless of the Accept header, right? --Glen Sanjiva Weerawarana wrote: +1 from me. For some further discussion on this see [1]. In particular [2] gives rationale for why its ok to give more weight to POX over SOAP 1.1. Sanjiva. [1] http://wso2.org/mailarchive/registry-dev/2007-October/thread.html#473 http://wso2.org/mailarchive/registry-dev/2007-October/thread.html#473 [2] http://wso2.org/mailarchive/registry-dev/2007-October/000540.html http://wso2.org/mailarchive/registry-dev/2007-October/000540.html keith chapman wrote: Hi Devs, There have been some thought on http content negotiation. With the concept of builders and formatters we have now this could be implemented trivially. The idea is to use the Accept http header to serve the response requested by the client. While going through this though I came across a issue though. This occurs when a request is sent via a GET using a browser (Cause the browser automatically adds the Accept http header). The Accept header sent by firefox is Accept: text/xml,application/xml,application/xhtml+xml,text/html;q=0.9 ,text/plain;q=0.8,image/png,*/*;q=0.5. The confusion comes in because text/xml is used for both SOAP and REST responses. I believe having http content negotiation as a feature will be a nice addition to Axis2. And I propose
parameters of a web service--problem
Imagine that I have 4 programs (.java); A,B,C,D. A is a server and is listening to a port. When a client appears, A calls B, B, calls C and C calls a webservice named D. The web service has to tranfer data between the client and another server E. So , it has to read/write from/to the client's stream . If I cannot have as a parameter of a web service, the socket of the client,and if I cannot have as parameters the in/out streams of the client how can I do it? I tried to save the port and ip of the client, for D to open a stream in these data, but I have to make a new socket. So I have to terminate the first (client). If I terminate the client, system crashes. Is there a way, 1)to keep the client's socket alive 2)to make the web service create the streams (...getInputStream();) or 3) to pass as a parameter the socket? or is there a way to take the stream of a socket, just knowing the ip, and without having the socket? thanks you.. ps: I don't understand serialization. Maybe my questions are silly. :) -- View this message in context: http://www.nabble.com/parameters-of-a-web-service--problem-tf4848404.html#a13871975 Sent from the Axis - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: [AXIS2] Proposal to implement http content negotiation
Hi keith , Hi all, I've added Content Negotiation via Accept header to Axis2 in revision 596950. As stated previously this would mean that doing a GET (Just typing in a URL on the browser) from the browser would result in a SOAP 1.1 response cause the browsers accept header says text/xml. Do we need a switch in the axis2.xml to control this feature? Yes please do so. Thanks Deepal - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Error when deploying in to web-inf directory
Hi Deepal, Thanks for the fast reply. I browsed through jira and found that it is AXIS2-3246 and it is assigned to you. As you mention, it is an issue with Axis2 1.3 release. Hope you can fix it soon. Thanks, --kumar -Original Message- From: Deepal jayasinghe [mailto:[EMAIL PROTECTED] Sent: Tuesday, November 20, 2007 8:32 PM To: axis-user@ws.apache.org Subject: Re: Error when deploying in to web-inf directory Hi Iyengar, I think someone else has also noticed this issue and has created a jira. I think we are having this issue in Axis2 1.3 release and will try to fix the issue soon.So that you can test with the nightly builds. Thanks Deepal Has anyone seen this error? I am deploying all the axis2 jar files into WEB-INF\lib directory and my axis2.xml and services.xml files are in WEB-INF directory. After starting Tomcat I get a crash (stack is below). I checked out DeploymentEngine.java and it calls 'new DeploymentFileData(null, null);' which causes the crash as the constructor is not expecting 'file' ( the first parameter for DeploymentFileData()) to be null. I also tried setting axis.repository.path and that gives the same error as below. Does anyone know if there is a fix? If not is there a workaround that I can use? I am curious how this works for anyone else if they deploy in the WEB-INF directory java.lang.IllegalArgumentException: Filename must not be null at org.apache.axis2.deployment.repository.util.DeploymentFileData.init(De ploymentFileData.java:43) at org.apache.axis2.deployment.repository.util.DeploymentFileData.init(De ploymentFileData.java:48) at org.apache.axis2.deployment.DeploymentEngine.buildServiceGroup(Deploymen tEngine.java:1015) at org.apache.axis2.deployment.WarBasedAxisConfigurator.loadServicesFromWeb Inf(WarBasedAxisConfigurator.java:309) at org.apache.axis2.deployment.WarBasedAxisConfigurator.loadServices(WarBas edAxisConfigurator.java:270) at org.apache.axis2.context.ConfigurationContextFactory.createConfiguration Context(ConfigurationContextFactory.java:78) at org.apache.axis2.transport.http.AxisServlet.initConfigContext(AxisServle t.java:500) at org.apache.axis2.transport.http.AxisServlet.init(AxisServlet.java:420) at org.apache.axis2.transport.http.AxisAdminServlet.init(AxisAdminServlet.j ava:54) at org.apache.catalina.core.StandardWrapper.loadServlet(StandardWrapper.jav a:1105) at org.apache.catalina.core.StandardWrapper.load(StandardWrapper.java:932) at org.apache.catalina.core.StandardContext.loadOnStartup(StandardContext.j ava:3917) at org.apache.catalina.core.StandardContext.start(StandardContext.java:4201 ) at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.ja va:759) at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:739) at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:524) at org.apache.catalina.startup.HostConfig.deployDescriptor(HostConfig.java: 608) at org.apache.catalina.startup.HostConfig.deployDescriptors(HostConfig.java :535) at org.apache.catalina.startup.HostConfig.deployApps(HostConfig.java:470) at org.apache.catalina.startup.HostConfig.start(HostConfig.java:1122) at org.apache.catalina.startup.HostConfig.lifecycleEvent(HostConfig.java:31 0) at org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent(LifecycleSu pport.java:119) at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1021) at org.apache.catalina.core.StandardHost.start(StandardHost.java:718) at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1013) at org.apache.catalina.core.StandardEngine.start(StandardEngine.java:442) at org.apache.catalina.core.StandardService.start(StandardService.java:450) at org.apache.catalina.core.StandardServer.start(StandardServer.java:709) at org.apache.catalina.startup.Catalina.start(Catalina.java:551) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.jav a:39) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessor Impl.java:25) at java.lang.reflect.Method.invoke(Method.java:585) at org.apache.catalina.startup.Bootstrap.start(Bootstrap.java:294) at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:432) Thanks, --kumar - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Error in deploying samples
Hi, I recently started working with Axis2 and worked thru most of the samples, I am using Windows XP SP2 Tomcat 5.5, Java 5.0, Ant 1.7 I downloaded the axis2-1.3-war.zip and placed the war in C:\apache-tomcat-5.5.25\webapps and started Tomcat. The Axis2 samples are in C:\apache-tomcat-5.5.25\webapps\axis2\WEB-INF\samples. Using the Readmes, I could build and copy the services to \services. Rick On Nov 21, 2007 6:18 AM, Hoda, Nadeem [USA] [EMAIL PROTECTED] wrote: Folks, I've tried to deploy the Axis2 samples out of the box, and I am getting the following error: Error: java.lang.NoSuchMethodError: org.w3c.dom.Document.getXmlEncoding()Ljava/lang/String; at org.apache.ws.commons.schema.utils.DOMUtil.getXmlEncoding(DOMUtil.java:604) at org.apache.ws.commons.schema.XmlSchemaCollection.read(XmlSchemaCollection.java:388) at org.apache.axis2.description.WSDLToAxisServiceBuilder.getXMLSchema(WSDLToAxisServiceBuilder.java:140) at org.apache.axis2.description.WSDL11ToAxisServiceBuilder.copyExtensibleElements(WSDL11ToAxisServiceBuilder.java:2202) at org.apache.axis2.description.WSDL11ToAxisServiceBuilder.processTypes(WSDL11ToAxisServiceBuilder.java:384) at org.apache.axis2.description.WSDL11ToAxisServiceBuilder.processTypes(WSDL11ToAxisServiceBuilder.java:373) at org.apache.axis2.description.WSDL11ToAxisServiceBuilder.populateService(WSDL11ToAxisServiceBuilder.java:321) at org.apache.axis2.description.WSDL11ToAllAxisServicesBuilder.populateAllServices(WSDL11ToAllAxisServicesBuilder.java:109) at org.apache.axis2.deployment.repository.util.ArchiveReader.processWSDLFile(ArchiveReader.java:249) at org.apache.axis2.deployment.repository.util.ArchiveReader.processWSDLs(ArchiveReader.java:357) at org.apache.axis2.deployment.ServiceDeployer.deploy(ServiceDeployer.java:65) at org.apache.axis2.deployment.repository.util.DeploymentFileData.deploy(DeploymentFileData.java:137) at org.apache.axis2.deployment.DeploymentEngine.doDeploy(DeploymentEngine.java:584) at org.apache.axis2.deployment.repository.util.WSInfoList.update(WSInfoList.java:141) at org.apache.axis2.deployment.RepositoryListener.update(RepositoryListener.java:318) at org.apache.axis2.deployment.RepositoryListener.checkServices(RepositoryListener.java:220) at org.apache.axis2.deployment.RepositoryListener.startListener(RepositoryListener.java:312) at org.apache.axis2.deployment.scheduler.SchedulerTask.checkRepository(SchedulerTask.java:64) at org.apache.axis2.deployment.scheduler.SchedulerTask.run(SchedulerTask.java:71) at org.apache.axis2.deployment.scheduler.Scheduler$SchedulerTimerTask.run(Scheduler.java:83) at java.util.TimerThread.mainLoop(Timer.java:432) at java.util.TimerThread.run(Timer.java:382) Anybody know what I am missing? I am using Java 1.4. Do I need to configure something specific for using Axis2 with Java 1.4? I have included xerces 2.9.1 into the app server (oc4j 10.1.2) as a global lib. Thanks, Nadeem - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]