RE: using faults w/ wsdl2c
While I see that this approach allows the creation of user-defined fault types, is it possible to also use it to specify the standard SOAP-ENV:Fault? I see a struct named axiom_soap_fault_t in the distribution, but I can't seem to return it from the axis2_svc_skel_*_on_fault() function because it requires a pointer to the SOAP body to create one. Is there some other way to return a standard SOAP fault from a service? -- Doug Price Research Director | Presagis T. +1 972 943.2433 F. +1 469 467.4564 C. +1 469 867.8399 DISCLAIMER: This e-mail message is for the sole use of the intended recipient(s) and may contain confidential and/or proprietary information. Do not read, copy, or disseminate this message unless you are the addressee. Any unauthorized review, use, disclosure or distribution is strictly prohibited. If you have received this message in error, please contact the sender by reply e-mail and delete the original and any copies from your system. -Original Message- From: Amir Mousavizadegan [mailto:amir.mousavizade...@cox.net] Sent: Tuesday, November 17, 2009 10:29 AM To: Apache AXIS C User List Subject: Re: using faults w/ wsdl2c I did not write the sample codes nor the document, however in order to get it working, you have to change the body of the generated code, or create a replacement function as I did. thx Amir - Original Message - From: "Doug Price" To: "Apache AXIS C User List" Sent: Tuesday, November 17, 2009 11:05 AM Subject: RE: using faults w/ wsdl2c Just what I was looking for. Thanks so much. A quick follow up question on the code though. Is there a reason that axis2_svc_skel_Division_on_fault() doesn't use the adv_divFault api to create the fault? -- Doug Price Research Director | Presagis T. +1 972 943.2433 F. +1 469 467.4564 C. +1 469 867.8399 DISCLAIMER: This e-mail message is for the sole use of the intended recipient(s) and may contain confidential and/or proprietary information. Do not read, copy, or disseminate this message unless you are the addressee. Any unauthorized review, use, disclosure or distribution is strictly prohibited. If you have received this message in error, please contact the sender by reply e-mail and delete the original and any copies from your system. -Original Message- From: Amir Mousavizadegan [mailto:amir.mousavizade...@cox.net] Sent: Tuesday, November 17, 2009 7:52 AM To: Apache AXIS C User List Subject: Re: using faults w/ wsdl2c Please see attached document - Original Message - From: "Doug Price" To: Sent: Monday, November 16, 2009 4:47 PM Subject: using faults w/ wsdl2c I created a simple web service w/ Axis2c using wsdl2c on a WSDL file I created in Eclipse. The default functionality of this works fine. However, now I'd like to incorporate faults into my SOAP messages. I created a fault type in my WSDL and wsdl2c creates the wrappers for the fault message, but the service skeleton and client stubs files seem to hard coded to assume no faults are ever sent / received. For example, the client axis2_stub_op_*() function takes my request message type and returns my response message type, but doesn't seem to account for my fault type. Modifying the code, I can see that the fault is received and correctly deserialized, but I'll have to continually hand edit the axis2_stub*.c and my client.c file as I make modifications to my WSDL in order to make this work. The same is true on the service side w/ the axis2_skel*() functions. Am I missing something here, or are faults not supported w/ wsdl2c? -- Doug Price Research Director | Presagis T. +1 972 943.2433 F. +1 469 467.4564 C. +1 469 867.8399 DISCLAIMER: This e-mail message is for the sole use of the intended recipient(s) and may contain confidential and/or proprietary information. Do not read, copy, or disseminate this message unless you are the addressee. Any unauthorized review, use, disclosure or distribution is strictly prohibited. If you have received this message in error, please contact the sender by reply e-mail and delete the original and any copies from your system.
RE: using faults w/ wsdl2c
Just what I was looking for. Thanks so much. A quick follow up question on the code though. Is there a reason that axis2_svc_skel_Division_on_fault() doesn't use the adv_divFault api to create the fault? -- Doug Price Research Director | Presagis T. +1 972 943.2433 F. +1 469 467.4564 C. +1 469 867.8399 DISCLAIMER: This e-mail message is for the sole use of the intended recipient(s) and may contain confidential and/or proprietary information. Do not read, copy, or disseminate this message unless you are the addressee. Any unauthorized review, use, disclosure or distribution is strictly prohibited. If you have received this message in error, please contact the sender by reply e-mail and delete the original and any copies from your system. -Original Message- From: Amir Mousavizadegan [mailto:amir.mousavizade...@cox.net] Sent: Tuesday, November 17, 2009 7:52 AM To: Apache AXIS C User List Subject: Re: using faults w/ wsdl2c Please see attached document - Original Message - From: "Doug Price" To: Sent: Monday, November 16, 2009 4:47 PM Subject: using faults w/ wsdl2c I created a simple web service w/ Axis2c using wsdl2c on a WSDL file I created in Eclipse. The default functionality of this works fine. However, now I'd like to incorporate faults into my SOAP messages. I created a fault type in my WSDL and wsdl2c creates the wrappers for the fault message, but the service skeleton and client stubs files seem to hard coded to assume no faults are ever sent / received. For example, the client axis2_stub_op_*() function takes my request message type and returns my response message type, but doesn't seem to account for my fault type. Modifying the code, I can see that the fault is received and correctly deserialized, but I'll have to continually hand edit the axis2_stub*.c and my client.c file as I make modifications to my WSDL in order to make this work. The same is true on the service side w/ the axis2_skel*() functions. Am I missing something here, or are faults not supported w/ wsdl2c? -- Doug Price Research Director | Presagis T. +1 972 943.2433 F. +1 469 467.4564 C. +1 469 867.8399 DISCLAIMER: This e-mail message is for the sole use of the intended recipient(s) and may contain confidential and/or proprietary information. Do not read, copy, or disseminate this message unless you are the addressee. Any unauthorized review, use, disclosure or distribution is strictly prohibited. If you have received this message in error, please contact the sender by reply e-mail and delete the original and any copies from your system.
using faults w/ wsdl2c
I created a simple web service w/ Axis2c using wsdl2c on a WSDL file I created in Eclipse. The default functionality of this works fine. However, now I'd like to incorporate faults into my SOAP messages. I created a fault type in my WSDL and wsdl2c creates the wrappers for the fault message, but the service skeleton and client stubs files seem to hard coded to assume no faults are ever sent / received. For example, the client axis2_stub_op_*() function takes my request message type and returns my response message type, but doesn't seem to account for my fault type. Modifying the code, I can see that the fault is received and correctly deserialized, but I'll have to continually hand edit the axis2_stub*.c and my client.c file as I make modifications to my WSDL in order to make this work. The same is true on the service side w/ the axis2_skel*() functions. Am I missing something here, or are faults not supported w/ wsdl2c? -- Doug Price Research Director | Presagis T. +1 972 943.2433 F. +1 469 467.4564 C. +1 469 867.8399 DISCLAIMER: This e-mail message is for the sole use of the intended recipient(s) and may contain confidential and/or proprietary information. Do not read, copy, or disseminate this message unless you are the addressee. Any unauthorized review, use, disclosure or distribution is strictly prohibited. If you have received this message in error, please contact the sender by reply e-mail and delete the original and any copies from your system.
RE: generating wsdl for complex return types
Thanks for the tip. The book sounds like a good investment. -- Doug Price Research Director | Presagis T. +1 972 943.2433 F. +1 469 467.4564 C. +1 469 867.8399 DISCLAIMER: This e-mail message is for the sole use of the intended recipient(s) and may contain confidential and/or proprietary information. Do not read, copy, or disseminate this message unless you are the addressee. Any unauthorized review, use, disclosure or distribution is strictly prohibited. If you have received this message in error, please contact the sender by reply e-mail and delete the original and any copies from your system. From: Sam Carleton [mailto:scarle...@gmail.com] Sent: Friday, October 16, 2009 2:05 PM To: Apache AXIS C User List Subject: Re: generating wsdl for complex return types Doug, A basic WSDL is by no means simple. There are a number of different concepts that are captured in a complete WSDL document. I am not a big fan of buying books anymore, but the Developing Web Services with Apache Axis2<http://bit.ly/JcZxs> was VERY helpful in getting me jump started in the world of Axis2/C. The book focuses on Axis2/Java, but it does a wonderful job of explaining the basics of WSDL and show how to use the GUI editor in Eclipse to create and edit them. The best part of the book is that it is NOT wordy Now when I edit my Axis2/C WSDL's, I simply edit the XML directly. Sam On Fri, Oct 16, 2009 at 2:41 PM, Doug Price mailto:doug.pr...@presagis.com>> wrote: I was able to get a simple web service running w/ Axis2/C using the approach shown here<http://wso2.org/library/3534>, which creates a WSDL file from a Java interface using the Axis2 java2wsdl and then uses the WSDL file to create the C skeleton and stubs using wsdl2c. So far so good. Now I’d like to create a more sophisticated interface. For example, what if I need to return multiple values, or a list of objects? For example, let’s say I have some data that represents a user (e.g. name, password, id, etc.) and my service has two methods getUser and getActiveUsers. The first would return the data for the user w/ the given id and the second would return the data for all users that are currently logged onto the system. I’d expect the SOAP responses to be something like the following: fred … < getActiveUsersResponse> fred … barney … How do I write the Java interface to produce such a result w/ java2wsdl? I would have hoped something like the following would have done it, but that WSDL generated seems like it wants to pass the object reference instead. Any help would be greatly appreciated. class User { string name; … } interface MyInterface { public User getUser(int id); public User [] getActiveUsers(); } -- Doug Price Research Director | Presagis T. +1 972 943.2433 F. +1 469 467.4564 C. +1 469 867.8399 DISCLAIMER: This e-mail message is for the sole use of the intended recipient(s) and may contain confidential and/or proprietary information. Do not read, copy, or disseminate this message unless you are the addressee. Any unauthorized review, use, disclosure or distribution is strictly prohibited. If you have received this message in error, please contact the sender by reply e-mail and delete the original and any copies from your system.
generating wsdl for complex return types
I was able to get a simple web service running w/ Axis2/C using the approach shown here<http://wso2.org/library/3534>, which creates a WSDL file from a Java interface using the Axis2 java2wsdl and then uses the WSDL file to create the C skeleton and stubs using wsdl2c. So far so good. Now I'd like to create a more sophisticated interface. For example, what if I need to return multiple values, or a list of objects? For example, let's say I have some data that represents a user (e.g. name, password, id, etc.) and my service has two methods getUser and getActiveUsers. The first would return the data for the user w/ the given id and the second would return the data for all users that are currently logged onto the system. I'd expect the SOAP responses to be something like the following: fred ... < getActiveUsersResponse> fred ... barney ... How do I write the Java interface to produce such a result w/ java2wsdl? I would have hoped something like the following would have done it, but that WSDL generated seems like it wants to pass the object reference instead. Any help would be greatly appreciated. class User { string name; ... } interface MyInterface { public User getUser(int id); public User [] getActiveUsers(); } -- Doug Price Research Director | Presagis T. +1 972 943.2433 F. +1 469 467.4564 C. +1 469 867.8399 DISCLAIMER: This e-mail message is for the sole use of the intended recipient(s) and may contain confidential and/or proprietary information. Do not read, copy, or disseminate this message unless you are the addressee. Any unauthorized review, use, disclosure or distribution is strictly prohibited. If you have received this message in error, please contact the sender by reply e-mail and delete the original and any copies from your system.
RE: problems running default http server
Looks like the axis2_http_sender.dll had a dependency on ssleay32.dll and libeay32.dll, which were not included in the distribution. I found these in several other locations on my system, however, and adding these to the lib directory fixed the problem. -- Doug Price Research Director | Presagis T. +1 972 943.2433 F. +1 469 467.4564 C. +1 469 867.8399 DISCLAIMER: This e-mail message is for the sole use of the intended recipient(s) and may contain confidential and/or proprietary information. Do not read, copy, or disseminate this message unless you are the addressee. Any unauthorized review, use, disclosure or distribution is strictly prohibited. If you have received this message in error, please contact the sender by reply e-mail and delete the original and any copies from your system. -Original Message- From: Selvaratnam Uthaiyashankar [mailto:uthaiyashan...@gmail.com] Sent: Monday, October 05, 2009 5:54 PM To: Apache AXIS C User List Subject: Re: problems running default http server Hi, You might have to install openssl. Regards, Shankar On Tue, Oct 6, 2009 at 12:36 AM, Doug Price wrote: > I apologize in advance for the probably very trivial question, but I'm new > to web services and was trying to experiment to see what I could do w/ Axis > 2/C. From the documentation, the code itself seems reasonably straight > forward, but so far I have been unsuccessful in getting the sample services > to run. After downloading the zip file, I copied the contents to > "C:\axis2c-bin-1.6.0-win32". Then I set the AXIS2C_HOME environment > variable to "C:\axis2c-bin-1.6.0-win32" and added > "C:\axis2c-bin-1.6.0-win32\lib" to my path. Then in a console window I went > to "C:\axis2c-bin-1.6.0-win32\bin" and ran axis2_http_server.exe. Looking > at the axis2.log file, I get the following errors when I do this: > > > > [Mon Oct 05 14:00:25 2009] [error] ..\..\util\src\class_loader.c(167) > Loading shared library ..//lib/axis2_http_sender.dll Failed. DLERROR IS DLL > Load Error 126: The specified module could not be found. > > [Mon Oct 05 14:00:25 2009] [error] > ..\..\src\core\deployment\conf_builder.c(903) Transport sender is NULL for > transport http, unable to continue > > [Mon Oct 05 14:00:25 2009] [error] > ..\..\src\core\deployment\conf_builder.c(262) Processing transport senders > failed, unable to continue > > [Mon Oct 05 14:00:25 2009] [error] > ..\..\src\core\deployment\dep_engine.c(752) Populating Axis2 Configuration > failed > > [Mon Oct 05 14:00:25 2009] [error] ..\..\src\core\deployment\conf_init.c(64) > Loading deployment engine failed for repository ../. > > [Mon Oct 05 14:00:25 2009] [error] > ..\..\src\core\transport\http\receiver\http_receiver.c(126) unable to create > private configuration contextfor repo path ../ > > [Mon Oct 05 14:00:25 2009] [error] > ..\..\src\core\transport\http\server\simple_axis2_server\http_server_main.c(215) > Server creation failed: Error code: 103 :: Failed in creating DLL > > > > The dll in question is present in the lib folder. Any ideas why this > wouldn't be working? I've checked the path environment variable in the > console window and the lib directory is there. Is there something else I > need to do to "install" the system and set it up to work? > > > > > > -- > Doug Price > Research Director | Presagis > > T. +1 972 943.2433 F. +1 469 467.4564 C. +1 469 867.8399 > > DISCLAIMER: This e-mail message is for the sole use of the intended > recipient(s) and may contain confidential and/or proprietary information. Do > not read, copy, or disseminate this message unless you are the addressee. > Any unauthorized review, use, disclosure or distribution is strictly > prohibited. If you have received this message in error, please contact the > sender by reply e-mail and delete the original and any copies from your > system. > > -- S.Uthaiyashankar Software Architect WSO2 Inc. http://wso2.com/ - "The Open Source SOA Company"
problems running default http server
I apologize in advance for the probably very trivial question, but I'm new to web services and was trying to experiment to see what I could do w/ Axis 2/C. From the documentation, the code itself seems reasonably straight forward, but so far I have been unsuccessful in getting the sample services to run. After downloading the zip file, I copied the contents to "C:\axis2c-bin-1.6.0-win32". Then I set the AXIS2C_HOME environment variable to "C:\axis2c-bin-1.6.0-win32" and added "C:\axis2c-bin-1.6.0-win32\lib" to my path. Then in a console window I went to "C:\axis2c-bin-1.6.0-win32\bin" and ran axis2_http_server.exe. Looking at the axis2.log file, I get the following errors when I do this: [Mon Oct 05 14:00:25 2009] [error] ..\..\util\src\class_loader.c(167) Loading shared library ..//lib/axis2_http_sender.dll Failed. DLERROR IS DLL Load Error 126: The specified module could not be found. [Mon Oct 05 14:00:25 2009] [error] ..\..\src\core\deployment\conf_builder.c(903) Transport sender is NULL for transport http, unable to continue [Mon Oct 05 14:00:25 2009] [error] ..\..\src\core\deployment\conf_builder.c(262) Processing transport senders failed, unable to continue [Mon Oct 05 14:00:25 2009] [error] ..\..\src\core\deployment\dep_engine.c(752) Populating Axis2 Configuration failed [Mon Oct 05 14:00:25 2009] [error] ..\..\src\core\deployment\conf_init.c(64) Loading deployment engine failed for repository ../. [Mon Oct 05 14:00:25 2009] [error] ..\..\src\core\transport\http\receiver\http_receiver.c(126) unable to create private configuration contextfor repo path ../ [Mon Oct 05 14:00:25 2009] [error] ..\..\src\core\transport\http\server\simple_axis2_server\http_server_main.c(215) Server creation failed: Error code: 103 :: Failed in creating DLL The dll in question is present in the lib folder. Any ideas why this wouldn't be working? I've checked the path environment variable in the console window and the lib directory is there. Is there something else I need to do to "install" the system and set it up to work? -- Doug Price Research Director | Presagis T. +1 972 943.2433 F. +1 469 467.4564 C. +1 469 867.8399 DISCLAIMER: This e-mail message is for the sole use of the intended recipient(s) and may contain confidential and/or proprietary information. Do not read, copy, or disseminate this message unless you are the addressee. Any unauthorized review, use, disclosure or distribution is strictly prohibited. If you have received this message in error, please contact the sender by reply e-mail and delete the original and any copies from your system.