RE: Questions/suggestions on WSDL2C
Hi, Thanks to all for your quick responses. I think a simple demo client (with useful inlined comments explaining what a user should do) will fit my need. WRT makefile generation, I understand it's hard to auto-generate one that works perfectly in _all_ projects, but it might be helpful to create a makefile.template kind of thing to set up all the basic stuff (required defines, libs, include paths, libpaths, etc) and let the users add their stuff on top of it. Now back to the problems I encountered with the client. (I apologize for the following long copy-and-paste text, please tell me the proper way if this is not recommended). WSDL2C generates the following header code but I'm not sure what to do with each function (see my inlined questions): /* function prototypes - for header file */ /** * axis2_stub_create_CalculatorService * Create and return the stub with services populated * @param env Environment ( mandatory) * @param client_home Axis2/C home ( mandatory ) * @param endpoint_uri Service endpoint uri( optional ) - if NULL default picked from WSDL used * @return Newly created stub object */ axis2_stub_t* axis2_stub_create_CalculatorService(const axutil_env_t *env, axis2_char_t *client_home, axis2_char_t *endpoint_uri); // wz: I looked at the math example source and thought // this function should correspond to axis2_math_stub.c's axis2_math_stub_create_with_endpoint_uri_and_client_home()? /** * axis2_stub_populate_services_for_CalculatorService * populate the svc in stub with the service and operations * @param stub The stub * @param env environment ( mandatory) */ void axis2_stub_populate_services_for_CalculatorService( axis2_stub_t *stub, const axutil_env_t *env); // wz: implement it a la axis2_math_stub.c's axis2_populate_axis_service()? /** * axis2_stub_get_endpoint_uri_of_CalculatorService * Return the endpoint URI picked from WSDL * @param env environment ( mandatory) * @return The endpoint picked from WSDL */ axis2_char_t * axis2_stub_get_endpoint_uri_of_CalculatorService(const axutil_env_t *env); // wz: no question here /** * Auto generated function declaration * for Arithmetic|http://xml.ms.com/ns/msjava/cxfutils/examples/calculator; operation. * @param stub The stub (axis2_stub_t) * @param env environment ( mandatory) * @param _arithmetic * return adb_ArithmeticResponse_t* */ adb_ArithmeticResponse_t* axis2_stub_op_CalculatorService_Arithmetic( axis2_stub_t *stub, const axutil_env_t *env, adb_Arithmetic_t* _arithmetic); // wz: how should this function extract input parameters from _arithmetic and send them to the server? /** * Auto generated function declaration * for Arithmetic|http://xml.ms.com/ns/msjava/cxfutils/examples/calculator; operation. * @param stub The stub * @param env environment ( mandatory) * @param _arithmetic * @param user_data user data to be accessed by the callbacks * @param on_complete callback to handle on complete * @param on_error callback to handle on error */ void axis2_stub_start_op_CalculatorService_Arithmetic( axis2_stub_t *stub, const axutil_env_t *env, adb_Arithmetic_t* _arithmetic, void *user_data, axis2_status_t ( AXIS2_CALL *on_complete ) (const axutil_env_t *, adb_ArithmeticResponse_t* _arithmeticResponse, void *data) , axis2_status_t ( AXIS2_CALL *on_error ) (const axutil_env_t *, int exception, void *data) ); // wz: is this the asynchronous version of axis2_stub_op_CalculatorService_Arithmetic()? What do I do with data? Thanks, Wayne Zhang Morgan Stanley | Technology [EMAIL PROTECTED] -Original Message- From: Dimuthu Gamage [mailto:[EMAIL PROTECTED] Sent: Wednesday, January 30, 2008 10:29 PM To: Apache AXIS C User List Subject: Re: Questions/suggestions on WSDL2C Please see my inline comment. On Jan 31, 2008 8:07 AM, Samisa Abeysinghe [EMAIL PROTECTED] wrote: Dimuthu Gamage wrote: Hi Zhang, Thanks for your suggestions. 1). In fact generating a demo client is a good idea. I will look in to that. For the time being, I'm using a ruby script to generate simple demonstrations for stub and skels (it automatically generates simple logic with adb), if you find useful you can check it from http://people.apache.org/~dimuthu/leisure/23_oct/generate_demos.rb. When there are so many operations, with complex params, how are we supposed to generate a demo client? I think what we can provide is empty functions (with empty logic) as in server side. The adb object manipulation should be anyway done by the user. so we don't need to worry about complex types in the demo client.. That indeed should be done by the user. BTW the ruby script I mentioned there, recursively fills the object matching pattern in the generated code.. That works only for in-out MEP. Anyway what we are
Re: Questions/suggestions on WSDL2C
hello users, share ? sure ;-) at the moment i am very busy - sorry, i will have time - let me say next week wednesday, to work on this issue. to have a look at my generating process, you can download a zip at [1] to get an idea how its works. at the moment nearly everthing is hardcoded, so it won't work on other maschines, there was no need to took the long way, everything is quick and dirty ;-) the gen.bat is how i generate java-wsdl and wsdl-java, the both folders are for the vs studio generation, to start and deploy the generated service. mfg derMark [1] www.9elements.com/dermark/axis2_vs_gen.zip Dimuthu Gamage schrieb: On Jan 31, 2008 12:10 PM, Mark Nüßler [EMAIL PROTECTED] wrote: hello users, just to let you know - i have java classes, that generates visual studio project files 4 vs2003 and vs2005 - so that you just generate your code. deployment und running simple_http_sever is done by compiling - just press play button ;-) Wow, is that something you like to share with us:). i think its better to have these kind of tools in java, so there is no need to have a third language like ruby - i know that ruby is much more intuitve to build this kind of skripts. Yea sure, It is better if we can limit users to use only (at most) two languages. Thanks Dimuthu mfg derMark Dimuthu Gamage schrieb: On Jan 31, 2008 9:19 AM, Samisa Abeysinghe [EMAIL PROTECTED] wrote: Dimuthu Gamage wrote: Please see my inline comment. On Jan 31, 2008 8:07 AM, Samisa Abeysinghe [EMAIL PROTECTED] wrote: Dimuthu Gamage wrote: Hi Zhang, Thanks for your suggestions. 1). In fact generating a demo client is a good idea. I will look in to that. For the time being, I'm using a ruby script to generate simple demonstrations for stub and skels (it automatically generates simple logic with adb), if you find useful you can check it from http://people.apache.org/~dimuthu/leisure/23_oct/generate_demos.rb. When there are so many operations, with complex params, how are we supposed to generate a demo client? I think what we can provide is empty functions (with empty logic) as in server side. The adb object manipulation should be anyway done by the user. so we don't need to worry about complex types in the demo client.. That indeed should be done by the user. BTW the ruby script I mentioned there, recursively fills the object matching pattern in the generated code.. That works only for in-out MEP. Anyway what we are planning to generate with WSDL2C tool is not much complicated as that. I wish we could have used the Ruby script, the only problem with that is we have to assume users would have Ruby. This would specially be problematic with Windows users :( Hi, I don't think we should use the Ruby Script as a kind of recommended way to generate demos.. As Zhang suggested what we are lacking is a demo client that has /*Todo */ spaces to write clients logic. That kind of thing can be easily generated from the WSDL2C tool itself. And we can use the ruby script as an optional thing. Thanks Dimuthu Samisa... - 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] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Questions/suggestions on WSDL2C
Thanks Mark, I will check it out. :) Dimuthu On Feb 1, 2008 2:49 AM, Mark Nüßler [EMAIL PROTECTED] wrote: hello users, share ? sure ;-) at the moment i am very busy - sorry, i will have time - let me say next week wednesday, to work on this issue. to have a look at my generating process, you can download a zip at [1] to get an idea how its works. at the moment nearly everthing is hardcoded, so it won't work on other maschines, there was no need to took the long way, everything is quick and dirty ;-) the gen.bat is how i generate java-wsdl and wsdl-java, the both folders are for the vs studio generation, to start and deploy the generated service. mfg derMark [1] www.9elements.com/dermark/axis2_vs_gen.zip Dimuthu Gamage schrieb: On Jan 31, 2008 12:10 PM, Mark Nüßler [EMAIL PROTECTED] wrote: hello users, just to let you know - i have java classes, that generates visual studio project files 4 vs2003 and vs2005 - so that you just generate your code. deployment und running simple_http_sever is done by compiling - just press play button ;-) Wow, is that something you like to share with us:). i think its better to have these kind of tools in java, so there is no need to have a third language like ruby - i know that ruby is much more intuitve to build this kind of skripts. Yea sure, It is better if we can limit users to use only (at most) two languages. Thanks Dimuthu mfg derMark Dimuthu Gamage schrieb: On Jan 31, 2008 9:19 AM, Samisa Abeysinghe [EMAIL PROTECTED] wrote: Dimuthu Gamage wrote: Please see my inline comment. On Jan 31, 2008 8:07 AM, Samisa Abeysinghe [EMAIL PROTECTED] wrote: Dimuthu Gamage wrote: Hi Zhang, Thanks for your suggestions. 1). In fact generating a demo client is a good idea. I will look in to that. For the time being, I'm using a ruby script to generate simple demonstrations for stub and skels (it automatically generates simple logic with adb), if you find useful you can check it from http://people.apache.org/~dimuthu/leisure/23_oct/generate_demos.rb. When there are so many operations, with complex params, how are we supposed to generate a demo client? I think what we can provide is empty functions (with empty logic) as in server side. The adb object manipulation should be anyway done by the user. so we don't need to worry about complex types in the demo client.. That indeed should be done by the user. BTW the ruby script I mentioned there, recursively fills the object matching pattern in the generated code.. That works only for in-out MEP. Anyway what we are planning to generate with WSDL2C tool is not much complicated as that. I wish we could have used the Ruby script, the only problem with that is we have to assume users would have Ruby. This would specially be problematic with Windows users :( Hi, I don't think we should use the Ruby Script as a kind of recommended way to generate demos.. As Zhang suggested what we are lacking is a demo client that has /*Todo */ spaces to write clients logic. That kind of thing can be easily generated from the WSDL2C tool itself. And we can use the ruby script as an optional thing. Thanks Dimuthu Samisa... - 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] - 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: Questions/suggestions on WSDL2C
Hi Zhang, Please see my inline comment to the code.. On Feb 1, 2008 1:30 AM, Zhang, Wayne (IT) [EMAIL PROTECTED] wrote: Hi, Thanks to all for your quick responses. I think a simple demo client (with useful inlined comments explaining what a user should do) will fit my need. WRT makefile generation, I understand it's hard to auto-generate one that works perfectly in _all_ projects, but it might be helpful to create a makefile.template kind of thing to set up all the basic stuff (required defines, libs, include paths, libpaths, etc) and let the users add their stuff on top of it. Now back to the problems I encountered with the client. (I apologize for the following long copy-and-paste text, please tell me the proper way if this is not recommended). WSDL2C generates the following header code but I'm not sure what to do with each function (see my inlined questions): /* function prototypes - for header file */ /** * axis2_stub_create_CalculatorService * Create and return the stub with services populated * @param env Environment ( mandatory) * @param client_home Axis2/C home ( mandatory ) * @param endpoint_uri Service endpoint uri( optional ) - if NULL default picked from WSDL used * @return Newly created stub object */ axis2_stub_t* axis2_stub_create_CalculatorService(const axutil_env_t *env, axis2_char_t *client_home, axis2_char_t *endpoint_uri); // wz: I looked at the math example source and thought // this function should correspond to axis2_math_stub.c's axis2_math_stub_create_with_endpoint_uri_and_client_home()? Yea, It is exactly the same.. /** * axis2_stub_populate_services_for_CalculatorService * populate the svc in stub with the service and operations * @param stub The stub * @param env environment ( mandatory) */ void axis2_stub_populate_services_for_CalculatorService( axis2_stub_t *stub, const axutil_env_t *env); // wz: implement it a la axis2_math_stub.c's axis2_populate_axis_service()? Yea that also do the same functionality. /** * axis2_stub_get_endpoint_uri_of_CalculatorService * Return the endpoint URI picked from WSDL * @param env environment ( mandatory) * @return The endpoint picked from WSDL */ axis2_char_t * axis2_stub_get_endpoint_uri_of_CalculatorService(const axutil_env_t *env); // wz: no question here /** * Auto generated function declaration * for Arithmetic|http://xml.ms.com/ns/msjava/cxfutils/examples/calculator; operation. * @param stub The stub (axis2_stub_t) * @param env environment ( mandatory) * @param _arithmetic * return adb_ArithmeticResponse_t* */ adb_ArithmeticResponse_t* axis2_stub_op_CalculatorService_Arithmetic( axis2_stub_t *stub, const axutil_env_t *env, adb_Arithmetic_t* _arithmetic); // wz: how should this function extract input parameters from _arithmetic and send them to the server? HI I suppose you have adb_Arithemetic.h/.c is generated with you.. If not you may have missed the -u in code generation. i.e. retry with WSD2C.sh -uri your.wsdl -u. Then the adb_Arithetic.h will have create function and several setters and getters. You can use these functions to feed data to adb_Arithematic object. The same with adb_Arithematic_Response I.e. your code will look something like adb_Arithematic_t * ar; adb_Arithematic_Response_t * ares; ar = adb_Arithematic_set_someVar(ar, env, 5); //here someVar should be replaced with actual fields ares = axis2_stub_op_CalculatorService_Arithmetic(stuv, env, ar); int i = adb_Arithematic_Response_get_anotherVar(ares, env); You can have a good idea on how to manipulate these adb object from the samples/codegen/client/calculator/test_calculator.c sample in the axis2/c pack. /** * Auto generated function declaration * for Arithmetic|http://xml.ms.com/ns/msjava/cxfutils/examples/calculator; operation. * @param stub The stub * @param env environment ( mandatory) * @param _arithmetic * @param user_data user data to be accessed by the callbacks * @param on_complete callback to handle on complete * @param on_error callback to handle on error */ void axis2_stub_start_op_CalculatorService_Arithmetic( axis2_stub_t *stub, const axutil_env_t *env, adb_Arithmetic_t* _arithmetic, void *user_data, axis2_status_t ( AXIS2_CALL *on_complete ) (const axutil_env_t *, adb_ArithmeticResponse_t* _arithmeticResponse, void *data) , axis2_status_t ( AXIS2_CALL *on_error ) (const axutil_env_t *, int exception, void *data) ); // wz: is this the asynchronous version of axis2_stub_op_CalculatorService_Arithmetic()? What do I do with data? Oops! we have missed to mention this is async in the doc comment. (anway it is mentioned in the corrosponding .c file). I will correct that in the template. Yea this is async. The data is
Re: Defining minOccur and maxOccur
Deepal jayasinghe ha scritto: At the moment what you can do is , generate a wsdl using Java2wsdl , then modified that to have minOccurs=1 and then put that into META-INF directory of your service archive , then Axis2 will shows up the wsdl correctly. However the long term solution would be to create a JIRA so that we will try to come up with some kind of way to specify those. There's already a JIRA that highlights an aspect of this problem... https://issues.apache.org/jira/browse/AXIS2-3300 However, a new more specific report to ask to add support for a way to specify this kind of information would be useful, I think. -- Mauro Molinari Software Developer [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
mistake in this simple wsdl
Hello I am generating with Generator Wizard Guide for Eclipse Plug-in 1.3 from this simple wsdl a service. When i invoke service with the soap client tool, client becomes an error, that requestMsg cannot be null! Is there any mistake in my WSDL or is another issue?? Thanks for your help wsdl--- ?xml version=1.0 encoding=UTF-8? wsdl:definitions name=tmService targetNamespace=http://ms/service; xmlns:soap=http://schemas.xmlsoap.org/wsdl/soap/; xmlns:tns=http://ms/service; xmlns:wsdl=http://schemas.xmlsoap.org/wsdl/; xmlns:xsd=http://www.w3.org/2001/XMLSchema; xmlns:http=http://schemas.xmlsoap.org/wsdl/http/; xmlns:data=http://sm/xsd/tm; wsdl:types xsd:schema xmlns:xsd=http://www.w3.org/2001/XMLSchema; xsd:import namespace=http://sm/xsd/tm; schemaLocation=tm.xsd /xsd:import /xsd:schema /wsdl:types wsdl:message name=fromClientReqMsg wsdl:part element=data:fromClientRequest name=reqPart / /wsdl:message wsdl:message name=fromtmRespMsg wsdl:part element=data:fromtmResponse name=respPart / /wsdl:message wsdl:portType name=tmServicePortType wsdl:operation name=tmOperation wsdl:input message=tns:fromClientReqMsg / wsdl:output message=tns:fromtmRespMsg / /wsdl:operation /wsdl:portType wsdl:binding name=tmServiceBinding type=tns:tmServicePortType soap:binding style=document transport=http://schemas.xmlsoap.org/soap/http; / wsdl:operation name=tmOperation soap:operation soapAction=urn:tmOperation style=document / wsdl:input soap:body use=literal / /wsdl:input wsdl:output soap:body use=literal / /wsdl:output /wsdl:operation /wsdl:binding wsdl:service name=tmService wsdl:port binding=tns:tmServiceBinding name=tmServicePort soap:address location=http://localhost:8080/SB/services/tmService; / /wsdl:port /wsdl:service /wsdl:definitions --scema--- ?xml version=1.0 encoding=UTF-8? xsd:schema targetNamespace=http://sm/xsd/tm; xmlns:xsd=http://www.w3.org/2001/XMLSchema; xmlns:tns=http://sm/xsd/tm; elementFormDefault=qualified attributeFormDefault=qualified xsd:element name=fromClientRequest type=tns:from/ xsd:complexType name=from xsd:sequence xsd:element name=requestMsg type=xsd:string/ /xsd:sequence /xsd:complexType xsd:element name=fromtmResponse type=tns:to/ xsd:complexType name=to xsd:sequence xsd:element name=responseMsg type=xsd:string/ /xsd:sequence /xsd:complexType /xsd:schema - Lesen Sie Ihre E-Mails jetzt einfach von unterwegs..
are there any error in my binding file?
hi,all. i had write a simple webservice using jibx databind. this is my code listed below: package net.asd.test.mockservice.service; import net.asd.test.mockservice.service.vo.Credit; public interface Authorize { public boolean authorize(Credit credit); } = package net.asd.test.mockservice.service; public class MockAuthorize implements Authorize { public boolean authorize(Credit credit) { if (null == credit) return false; if (credit.getId() == null) return false; if (credit.getName() == null) return false; if (credit.getPasswd() == null) return false; if (credit.getType() == null) return false; return true; } } === package net.asd.test.mockservice.service.vo; public class Credit { private String id; private String name; private String passwd; private String type; private String descript; private String greeting; private boolean passed; public String getId() { return id; } public void setId(String id) { this.id = id; } public String getName() { return name; } public void setName(String name) { this.name = name; } public String getPasswd() { return passwd; } public void setPasswd(String passwd) { this.passwd = passwd; } public String getType() { return type; } public void setType(String type) { this.type = type; } public String getDescript() { return descript; } public void setDescript(String descript) { this.descript = descript; } public boolean isPassed() { return passed; } public void setPassed(boolean passed) { this.passed = passed; } public String getGreeting() { return greeting; } public void setGreeting(String greeting) { this.greeting = greeting; } } as you saw,all is very simpl. then i ran cmd as belw: === %AXIS2_HOME%/bin/java2wsdl -cp . -cn net.asd.test.mockservice.service.impl.MockAuthorize -of MockAuthorize.wsdl it is ok. then i create a databing file named aaa.xml as blow: ?xml version=1.0 encoding=UTF-8? binding namespace uri=http://vo.service.mockservice.test.asd.net/xsd; default=element/ mapping name=Credit class=net.asd.test.mockservice.service.vo.Credit value name=descript field=descript/ value name=greeting field=greeting/ value name=id field=id/ value name=name field=name/ value name=passed field=passed/ value name=passwd field=passwd/ value name=type field=type/ /mapping /binding == then,i ran : = %AXIS2_HOME%/bin/wsdl2java -uri MockAuthorize.wsdl -p net.asd.test.mockservice.service.impl.stub -d jibx -s -ss -sd -ssi -uw -o ..\src -Ebindingfile .\aaa.xml === some exception occure: === Exception in thread main org.apache.axis2.wsdl.codegen.CodeGenerationException: java.lang.RuntimeE xception: Cannot unwrap element {http://impl.service.mockservice.test.asd.net}authorize: no abstract mapping definition found for type {http://vo.service.mockservice.test.asd.net/xsd}Credit (used by e lement {http://impl.service.mockservice.test.asd.net}credit) === i traced this exception,i fund when: ==pseudocode= bindingElement = BindingElement.engage(); =pseudocode=== = bindingElement.childset().size()==0! == i searched within jibx.sourceforge.net,i can not found the source code about org.jibx.binding.model.JiBX_bindingFactory. the trace was interrupted. i am an newbie to jibx,i don`t found what wrong with my aaa.xml which take the bindelement`s children is empty set. who could help me?any advice will be appreciated!. best regards. murphy - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: externalMapping to reuse types
Hi Mauro Thanks for you tips. After banging my head against a wall with the externalMappings option I think you're right I should build all the classes and just throw away the duplicated ones. Your point about namespace-packages is good too. Actually, I try not to inline datatypes in wsdl anyway, I prefer to include/import seperate xsds that model all the data types in their own namespace. So, just to give a bit of feed back (to you but mainly to anyone who might have a similar problem who reads this thread later). One way to manage the namespace to package mapping is through the namespaceURIs option of wsdl2code - note the documentation on the website is wrong here you have to define them with an element called packageName not package. BUT... much better is to use the xsdconfig option. Of course there's no documentation on how to use this with wsdl2code- though the documentation about it on the xmlbeans pages is useful. To use it you need to add in your configuration something like options property namexc/name valuesrc/main/resources/xsdconfig/config.xsdconfig/value /property /options where the value points to an xsdconfig file. (for example see http://dev2dev.bea.com/pub/a/2004/11/Configuring_XMLBeans.html ). NOTE.. you have to use xc as the parameter name, the long form, xsdconfig, doesn't seem to work. The advantage of the .xsdconfig file is you can set both namespace mappings and qname to java class mappings. I think this might actually be what the external-mapping option is supposed to be for too - I've taken the liberty of cc-ing the author of that so maybe they could shed a bit more light on it. So, for example I have the namespace to package mapping xb:namespace uri=http://www.opengis.net/gml; xb:packagenet.opengis.gml/xb:package /xb:namespace and, an element to java class mapping xb:qname name=gml:posList javaname=DirectPositionList / which is similar to what I think you were trying to achieve before too. Cheers Alistair Mauro Molinari wrote: Hai Alistair, I also posted a question about external mapping some time ago but never got an anwser. For what I could understand by my own, that file is aumatically compiled when there are globally defined types in schemas. Maybe you can also edit it by hand, but I can't say what it could be really useful for... From my own personal experience, I try to share schema files in this way: - shared types are defined in their own namespace, so that WSDL2Java generates classes in the own (shared) packages - every time I do a WSDL2Java for a WSDL that uses shared schemas, I throw away the newly generated classes for the shared types and I use the previously generated ones, which actually are the same classes If I could understand your situation well, I think that the key to solve your problem is to carefully choose namespaces (i.e.: Java packages!) for both WSDLs inline schemas and shared XSD schemas. I hope this helps a bit... - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Regarding Axis serialization of user-defined object containing array of objects
Hi Everybody, I was able to solve my problem of serialization. The solution is as follows: I had to mark every member variable of my user-defined object public. Also I had to make a few modifications in my deployment descriptor. I got this info from http://www.javaranch.com/journal/200603/WSComplexTypes.html Now I'm facing a problem with deserializing the object on client side. My Object contains a 2D Array of objects of type java.lang.Object, 2 int values and 1 String object. While deserializing I'm getting the following error: Caused by: org.xml.sax.SAXException: No object was found for class type int at org.apache.axis.encoding.ConstructorTarget.set(ConstructorTarget.java:97) at org.apache.axis.encoding.DeserializerImpl.valueComplete(DeserializerImpl.java:249) at org.apache.axis.encoding.ser.ArrayDeserializer.valueComplete(ArrayDeserializer.java:583) at org.apache.axis.encoding.DeserializerImpl.endElement(DeserializerImpl.java:509) at org.apache.axis.encoding.DeserializationContext.endElement(DeserializationContext.java:1087) at org.apache.axis.message.SAX2EventRecorder.replay(SAX2EventRecorder.java:171) at org.apache.axis.message.MessageElement.publishToHandler(MessageElement.java:1141) at org.apache.axis.encoding.DeserializerImpl.startElement(DeserializerImpl.java:369) at org.apache.axis.encoding.ser.BeanDeserializer.startElement(BeanDeserializer.java:154) at org.apache.axis.encoding.DeserializationContext.startElement(DeserializationContext.java:1048) at org.apache.axis.message.SAX2EventRecorder.replay(SAX2EventRecorder.java:165) at org.apache.axis.message.MessageElement.publishToHandler(MessageElement.java:1141) at org.apache.axis.message.RPCElement.deserialize(RPCElement.java:345) at org.apache.axis.message.RPCElement.getParams(RPCElement.java:384) at org.apache.axis.client.Call.invoke(Call.java:2467) I'm attaching my server-config.wsdd and my client-side program. Can anyone help me here? Thanks, Pratiksha On Tue, 2008-01-29 at 12:25 +0530, Pratiksha Powar wrote: Hi Everybody, I'm trying to return a user-defined object which contains two primitives namely : int and Java String and a 2D array of objects of type :java.lang.Object Can you tell how should I map these objects in the server-config.wsdd file so that axis produces the correct wsdl ? I'm attaching my copy of server-config.wsdd. Also is it possible to write your own wsdl and make axis point to it? Thanks, Pratiksha == DISCLAIMER: The information in this message is confidential and may be legally privileged. It is intended solely for the addressee. Access to this message by anyone else is unauthorized. If you are not the intended recipient, any disclosure, copying, or distribution of the message, or any action or omission taken by you in reliance on it, is prohibited and may be unlawful. Please immediately contact the sender if you have received this message in error. Further, this e-mail may contain viruses and all reasonable precaution to minimize the risk arising there from is taken by OnMobile. OnMobile is not liable for any damage sustained by you as a result of any virus in this e-mail. All applicable virus checks should be carried out by you before opening this e-mail or any attachment thereto. Thank you - OnMobile Global Limited. == - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] package db; import java.net.MalformedURLException; import java.rmi.RemoteException; import javax.xml.rpc.ServiceException; import javax.xml.namespace.QName; import org.apache.axis.client.Call; import org.apache.axis.client.Service; import org.apache.axis.encoding.ser.BeanSerializerFactory; import org.apache.axis.encoding.ser.BeanDeserializerFactory; import org.apache.axis.encoding.ser.ArraySerializerFactory; import org.apache.axis.encoding.ser.ArrayDeserializerFactory; import content.OnMobileResultSet; public class DBManager { private static final String CLASS_NAME = DBManager; //pratiksha: have to obtain endpoint from SPInteractor in DBUtils.java //use the following endpoint while going via tcpMon to connect to Axis private String endpoint = http://127.0.0.1:1234/DBAccess/servlet/AxisServlet;; //private String endpoint = http://172.16.27.23:8010/DBAccess/servlet/AxisServlet;; private Service service ; private String cdNameSpc = BeanOnMobileResultSet; private Class cdClass = OnMobileResultSet.class; private String cdClassName = OnMobileResultSet; private String caNameSpc = BeanOnMobileResultSet; private Class caClass = Object[][].class; private String caClassName =ArrayOf_Content; private QName cdQName = null; private QName caQName = null; public DBManager() { service = new Service(); cdQName = new QName(cdNameSpc, cdClassName); caQName = new
Re: externalMapping to reuse types
I just realised - most of what I said in the last mail is only relevant if you're using the maven plugin for axis2 to build your service (i.e. http://ws.apache.org/axis2/tools/1_2/maven-plugins/maven-wsdl2code-plugin.html) Alistair Edwardes wrote: Hi Mauro Thanks for you tips. After banging my head against a wall with the externalMappings option I think you're right I should build all the classes and just throw away the duplicated ones. Your point about namespace-packages is good too. Actually, I try not to inline datatypes in wsdl anyway, I prefer to include/import seperate xsds that model all the data types in their own namespace. So, just to give a bit of feed back (to you but mainly to anyone who might have a similar problem who reads this thread later). One way to manage the namespace to package mapping is through the namespaceURIs option of wsdl2code - note the documentation on the website is wrong here you have to define them with an element called packageName not package. BUT... much better is to use the xsdconfig option. Of course there's no documentation on how to use this with wsdl2code- though the documentation about it on the xmlbeans pages is useful. To use it you need to add in your configuration something like options property namexc/name valuesrc/main/resources/xsdconfig/config.xsdconfig/value /property /options where the value points to an xsdconfig file. (for example see http://dev2dev.bea.com/pub/a/2004/11/Configuring_XMLBeans.html ). NOTE.. you have to use xc as the parameter name, the long form, xsdconfig, doesn't seem to work. The advantage of the .xsdconfig file is you can set both namespace mappings and qname to java class mappings. I think this might actually be what the external-mapping option is supposed to be for too - I've taken the liberty of cc-ing the author of that so maybe they could shed a bit more light on it. So, for example I have the namespace to package mapping xb:namespace uri=http://www.opengis.net/gml; xb:packagenet.opengis.gml/xb:package /xb:namespace and, an element to java class mapping xb:qname name=gml:posList javaname=DirectPositionList / which is similar to what I think you were trying to achieve before too. Cheers Alistair Mauro Molinari wrote: Hai Alistair, I also posted a question about external mapping some time ago but never got an anwser. For what I could understand by my own, that file is aumatically compiled when there are globally defined types in schemas. Maybe you can also edit it by hand, but I can't say what it could be really useful for... From my own personal experience, I try to share schema files in this way: - shared types are defined in their own namespace, so that WSDL2Java generates classes in the own (shared) packages - every time I do a WSDL2Java for a WSDL that uses shared schemas, I throw away the newly generated classes for the shared types and I use the previously generated ones, which actually are the same classes If I could understand your situation well, I think that the key to solve your problem is to carefully choose namespaces (i.e.: Java packages!) for both WSDLs inline schemas and shared XSD schemas. I hope this helps a bit... - 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: externalMapping to reuse types
Alistair Edwardes ha scritto: which is similar to what I think you were trying to achieve before too. Hi Alistair, actually I'm using ADB and I'm following the approach to carefully choose namespaces so that the automatically mapped package names of the generated class files are the ones I want to be. Moreover, I know WSDL2Java has -ns2p option that can help to map namespaces to Java packages, although I didn't need to use it. Anyway, thank you for sharing your results with XMLBeans with us, they can surely be very useful to many people. Unfortunately, Axis2 official documentation is really poor about this kind of information :-( -- Mauro Molinari Software Developer [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Axis2 IIS
Hi, i installed Axis2 on tomcat working only like servlet container behind = IIS. I can see the file wsdl by url but i can connect by client!!? Are ther= e any problem to use Axis2 and IIS ?? do i need to set a particular configu= ration?? thanks in advance Tiscali Voce 8 Mega: Telefono + Adsl a soli € 4,95 al mese.http://abbonati.tiscali.it/promo/mail/
Re: Java2WSDL
Simone I'm afraid I don't understand the first problem. Maybe you could explain once more As for getting nice names in the WSDL you can 1) Make sure you compile with javac -g which adds the names into the class file 2) Make sure you use classes not interfaces as interfaces don't retain the parameter names. Paul On Jan 31, 2008 12:30 PM, Simone Maletta [EMAIL PROTECTED] wrote: Hi guys, I'm an Italian student involved in my master thesis and I'm using Java2WSDL tool in my thesis. I automatically generate an enterprise java bean from a graphic description, then using the tool I create the wsdl file for the bean and develope it on JBoss. Now I want that a BPEL process developed in ODE can access with a synchronous invoke to my beans; this the most important think in my project. While compiling my BPEL process it find a bug into the code: wsdl:operation name=cccheck wsdl:input xmlns:wsaw=http://www.w3.org/2006/05/addressing/wsdl wsaw:Action=urn:cccheck message=axis2:cccheckMessage /wsdl:input wsdl:output message=axis2:cccheckResponseMessage wsaw:Action=urn:cccheck /wsdl:output /wsdl:operation in fact it ca be able to parse this because in the wsdl:output tag it can found a reference to wsaw uri. The only way to solve this problem I found is to put manually the URI just like an attribute in the definition tag. Now, I ask: may fix this using input parameters or I have to work into your code? Please send me a response. Another question: may I choose the mapping parameter into the translation? There is, if my cean method take a parameter named CCNum, why into the translate it is called param0? May I cahnge this and getting a direct mapping using class input parameters? Thank you for time you spend reanding this mail, regards Simone -- Paul Fremantle Co-Founder and VP of Technical Sales, WSO2 OASIS WS-RX TC Co-chair blog: http://pzf.fremantle.org [EMAIL PROTECTED] Oxygenating the Web Service Platform, www.wso2.com - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: mistake in this simple wsdl
I did some kind of test and i found that the wsdl and xsd file are conformed. But the service skeleton generated with the wsdl2java tool is not properly and because of That axis get the error (error = property can not be null ) I change generated skeleton so that I removed whole code and implemented Service operation myself so that the little method return what it gets from client back to client and the service works fine!! I assume that wsdl2java code can not qualified my wsdl or my xsd file and produces some improperly code! Could somebody verify if my assuming is right!? If so, what is wrong in these files, that tool is not able to generate a properly working code? - Jetzt Mails schnell in einem Vorschaufenster überfliegen. Dies und viel mehr bietet das neue Yahoo! Mail.
Re: Java2WSDL
Hy Paul, thank you for your solution. trying to compile the code using bpelc from ODE it gives me the fllowing error: The prefix wsaw for attribute wsaw:Action associated with an element type wsdl:output is not bound. I resolve this problem manually putting wsaw URI in the definition tag with other ones. Because my thesis have to generate, compile and deploy automatically web-services using both BPEL and Session Bean, I can't modify manually each WSDL in the deploy process. I ask if there is a way to fix this bug using scrpt's input parameters, perhaps simply introducing another URI in the head, or I have to modify the class code. This is all, I hope I was more clear then before. Thank you and regards, Simone - Original Message - From: Paul Fremantle [EMAIL PROTECTED] To: axis-user@ws.apache.org Sent: Thursday, January 31, 2008 2:22 PM Subject: Re: Java2WSDL Simone I'm afraid I don't understand the first problem. Maybe you could explain once more As for getting nice names in the WSDL you can 1) Make sure you compile with javac -g which adds the names into the class file 2) Make sure you use classes not interfaces as interfaces don't retain the parameter names. Paul On Jan 31, 2008 12:30 PM, Simone Maletta [EMAIL PROTECTED] wrote: Hi guys, I'm an Italian student involved in my master thesis and I'm using Java2WSDL tool in my thesis. I automatically generate an enterprise java bean from a graphic description, then using the tool I create the wsdl file for the bean and develope it on JBoss. Now I want that a BPEL process developed in ODE can access with a synchronous invoke to my beans; this the most important think in my project. While compiling my BPEL process it find a bug into the code: wsdl:operation name=cccheck wsdl:input xmlns:wsaw=http://www.w3.org/2006/05/addressing/wsdl wsaw:Action=urn:cccheck message=axis2:cccheckMessage /wsdl:input wsdl:output message=axis2:cccheckResponseMessage wsaw:Action=urn:cccheck /wsdl:output /wsdl:operation in fact it ca be able to parse this because in the wsdl:output tag it can found a reference to wsaw uri. The only way to solve this problem I found is to put manually the URI just like an attribute in the definition tag. Now, I ask: may fix this using input parameters or I have to work into your code? Please send me a response. Another question: may I choose the mapping parameter into the translation? There is, if my cean method take a parameter named CCNum, why into the translate it is called param0? May I cahnge this and getting a direct mapping using class input parameters? Thank you for time you spend reanding this mail, regards Simone -- Paul Fremantle Co-Founder and VP of Technical Sales, WSO2 OASIS WS-RX TC Co-chair blog: http://pzf.fremantle.org [EMAIL PROTECTED] Oxygenating the Web Service Platform, www.wso2.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: Java2WSDL
Simone Please raise a JIRA and attach the WSDL as produced by Java2WSDL. If I understand you correctly, it is using the wsaw namespace without including it in the XML NS declarations. That is a bug. We need to fix it. Thanks Paul On Jan 31, 2008 1:47 PM, Simone Maletta [EMAIL PROTECTED] wrote: Hy Paul, thank you for your solution. trying to compile the code using bpelc from ODE it gives me the fllowing error: The prefix wsaw for attribute wsaw:Action associated with an element type wsdl:output is not bound. I resolve this problem manually putting wsaw URI in the definition tag with other ones. Because my thesis have to generate, compile and deploy automatically web-services using both BPEL and Session Bean, I can't modify manually each WSDL in the deploy process. I ask if there is a way to fix this bug using scrpt's input parameters, perhaps simply introducing another URI in the head, or I have to modify the class code. This is all, I hope I was more clear then before. Thank you and regards, Simone - Original Message - From: Paul Fremantle [EMAIL PROTECTED] To: axis-user@ws.apache.org Sent: Thursday, January 31, 2008 2:22 PM Subject: Re: Java2WSDL Simone I'm afraid I don't understand the first problem. Maybe you could explain once more As for getting nice names in the WSDL you can 1) Make sure you compile with javac -g which adds the names into the class file 2) Make sure you use classes not interfaces as interfaces don't retain the parameter names. Paul On Jan 31, 2008 12:30 PM, Simone Maletta [EMAIL PROTECTED] wrote: Hi guys, I'm an Italian student involved in my master thesis and I'm using Java2WSDL tool in my thesis. I automatically generate an enterprise java bean from a graphic description, then using the tool I create the wsdl file for the bean and develope it on JBoss. Now I want that a BPEL process developed in ODE can access with a synchronous invoke to my beans; this the most important think in my project. While compiling my BPEL process it find a bug into the code: wsdl:operation name=cccheck wsdl:input xmlns:wsaw=http://www.w3.org/2006/05/addressing/wsdl wsaw:Action=urn:cccheck message=axis2:cccheckMessage /wsdl:input wsdl:output message=axis2:cccheckResponseMessage wsaw:Action=urn:cccheck /wsdl:output /wsdl:operation in fact it ca be able to parse this because in the wsdl:output tag it can found a reference to wsaw uri. The only way to solve this problem I found is to put manually the URI just like an attribute in the definition tag. Now, I ask: may fix this using input parameters or I have to work into your code? Please send me a response. Another question: may I choose the mapping parameter into the translation? There is, if my cean method take a parameter named CCNum, why into the translate it is called param0? May I cahnge this and getting a direct mapping using class input parameters? Thank you for time you spend reanding this mail, regards Simone -- Paul Fremantle Co-Founder and VP of Technical Sales, WSO2 OASIS WS-RX TC Co-chair blog: http://pzf.fremantle.org [EMAIL PROTECTED] Oxygenating the Web Service Platform, www.wso2.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] -- Paul Fremantle Co-Founder and VP of Technical Sales, WSO2 OASIS WS-RX TC Co-chair blog: http://pzf.fremantle.org [EMAIL PROTECTED] Oxygenating the Web Service Platform, www.wso2.com - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
internal server error with tomcat/ubuntu/axis2
Hi list, I'm trying to deploy axis2 in tomcat and I can't manage to make it work. Note: I've tried with axis2 1.3 and with the latest nightly build and I get the same result. I'm using Tomcat 5.5.25-1ubuntu1 (the latest package available for Ubuntu 7.10). Here is what I did: * unzip axis2-xxx.zip * run ant create.war * copy dist/axis2.war to /var/lib/tomcat/webapps * restart tomcat When I try to load http://localhost:8180/axis2/ (the default port on Ubuntu is 8180...) I get the axis welcome page (fine). But when I click on one of the links (Services, Validate, Administration), I get a page with the Apache feather and the axis logo on the top, saying Internal server error... and there's nothing in /var/log/tomcat5.5 !!! Can anybody help me? I'm not sure if it's an axis2 bug or a misconfiguration problem. Are there some other place where I should look for logs? (I tried find /var/lib/tomcat/webapps/axis2|grep -i log just in case, but there's nothing relevant) Cheers, Olivier -- - *Olivier RICORDEAU* - [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: internal server error with tomcat/ubuntu/axis2
Remark: The tomcat sample application runs fine on my server. http://tomcat.apache.org/tomcat-5.5-doc/appdev/sample/ O. Olivier Ricordeau a écrit : Hi list, I'm trying to deploy axis2 in tomcat and I can't manage to make it work. Note: I've tried with axis2 1.3 and with the latest nightly build and I get the same result. I'm using Tomcat 5.5.25-1ubuntu1 (the latest package available for Ubuntu 7.10). Here is what I did: * unzip axis2-xxx.zip * run ant create.war * copy dist/axis2.war to /var/lib/tomcat/webapps * restart tomcat When I try to load http://localhost:8180/axis2/ (the default port on Ubuntu is 8180...) I get the axis welcome page (fine). But when I click on one of the links (Services, Validate, Administration), I get a page with the Apache feather and the axis logo on the top, saying Internal server error... and there's nothing in /var/log/tomcat5.5 !!! Can anybody help me? I'm not sure if it's an axis2 bug or a misconfiguration problem. Are there some other place where I should look for logs? (I tried find /var/lib/tomcat/webapps/axis2|grep -i log just in case, but there's nothing relevant) Cheers, Olivier -- - *Olivier RICORDEAU* - [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Java2WSDL
Hi Martin, you can't find in my code the namespace xmlns:axis2=http://quickstart.samples/; because I customize it, and it became: xmlns:axis2=http://localhost:8080/CCCheck . Now I will send again my code, I recompiled using -g option. I compile the system using the default namespace too but nothing changes. Thank you for your interest, Regards Simone - Original Message - From: Martin Gainty [EMAIL PROTECTED] To: axis-user@ws.apache.org Sent: Thursday, January 31, 2008 4:47 PM Subject: Re: Java2WSDL Hello Simone- One Quick note: I didnt see your namespace declaration for axis2 specifically xmlns:axis2=http://quickstart.samples/; Please touch base with us when you have the chance to recompile with debugging with javac -g M- - Original Message - From: Paul Fremantle [EMAIL PROTECTED] To: axis-user@ws.apache.org Sent: Thursday, January 31, 2008 8:22 AM Subject: Re: Java2WSDL Simone I'm afraid I don't understand the first problem. Maybe you could explain once more As for getting nice names in the WSDL you can 1) Make sure you compile with javac -g which adds the names into the class file 2) Make sure you use classes not interfaces as interfaces don't retain the parameter names. Paul On Jan 31, 2008 12:30 PM, Simone Maletta [EMAIL PROTECTED] wrote: Hi guys, I'm an Italian student involved in my master thesis and I'm using Java2WSDL tool in my thesis. I automatically generate an enterprise java bean from a graphic description, then using the tool I create the wsdl file for the bean and develope it on JBoss. Now I want that a BPEL process developed in ODE can access with a synchronous invoke to my beans; this the most important think in my project. While compiling my BPEL process it find a bug into the code: wsdl:operation name=cccheck wsdl:input xmlns:wsaw=http://www.w3.org/2006/05/addressing/wsdl wsaw:Action=urn:cccheck message=axis2:cccheckMessage /wsdl:input wsdl:output message=axis2:cccheckResponseMessage wsaw:Action=urn:cccheck /wsdl:output /wsdl:operation in fact it ca be able to parse this because in the wsdl:output tag it can found a reference to wsaw uri. The only way to solve this problem I found is to put manually the URI just like an attribute in the definition tag. Now, I ask: may fix this using input parameters or I have to work into your code? Please send me a response. Another question: may I choose the mapping parameter into the translation? There is, if my cean method take a parameter named CCNum, why into the translate it is called param0? May I cahnge this and getting a direct mapping using class input parameters? Thank you for time you spend reanding this mail, regards Simone -- Paul Fremantle Co-Founder and VP of Technical Sales, WSO2 OASIS WS-RX TC Co-chair blog: http://pzf.fremantle.org [EMAIL PROTECTED] Oxygenating the Web Service Platform, www.wso2.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] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
[axis2] SimpleHTTPServer as transport listener causes too many connections to stay in TIME_WAIT state
Hello everybody, I'm facing a serious problem with too many connections left in TIME_WAIT state, causing my system to hang. Since on the server side I run some ServiceClient instances as well I wasn't sure about the root of my problem, but after some investigations I've found out that the responsible for this is the SimpleHTTPServer used as transport receiver for incoming http requests. Given that the NIO listener/sender are not stable (see the JIRAs below) I have to stick with these. Is there anything I can do? Is there any way to inject a custom http connection manager and manually clean up the unused connections? Thanks in advance, Michele [1] https://issues.apache.org/jira/browse/AXIS2-3473 [2] http://www.mail-archive.com/axis-user@ws.apache.org/msg37314.html [3] https://issues.apache.org/jira/browse/AXIS2-3428 - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
[Axis2] Auto-generated return element
Hi, I implemented a simple web service using Eclipse and WTP and deployed the service as an AAR (including the WSDL) to the Tomcat (5.5.23) based Axis2 (1.3) runtime environment. Calling the service runs fine but in the generated answer always contains an additional return element (the WSDL doesn't contain this element). Is there a way to avoid generation of this element ? Thank you very much Matthias - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Pass through Web Service
Hello, I am curious about how to create a web-service when the payloads it delivers could have un-anticipated elements. That is, the xsd for the payloads would have to leave open the possibility of potentially random elements being included. In this case, only the outermost tag would be known as well as a few other elements. However, its complexType declaration would also have an xsd:any element.Because of the unknown elements, there seems to be no good way to characterize such messages in a corresponding Java class. So, I don't expect the code generation tools to be of any use here. The alternative would be to design the web-service so that it is able to put an arbitrary XML message into a payload. Could you help me start researching how to implement such a service? This is a more general question than this message about RDF (http://marc.info/?i=418E552C.2020002%20()%20hp%20!%20com), but I think that they would have similar solutions. (NOTE: I realize that this violates SOA principles because of the looseness in what the service is delivering. However, this is for a demo, rather than a final version and the finished product will have a tighter schema.) Thank you, JC - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: [axis2] SimpleHTTPServer as transport listener causes too many connections to stay in TIME_WAIT state
Hello again, I've tried to write a TransportListener which uses Jetty as http server -- but I had no success: when requests come I get the following error ?xml version='1.0' encoding='utf-8'?soapenv:Envelope xmlns:soapenv=http://schemas.xmlsoap.org/soap/envelope/; xmlns:wsa=http://www.w3.org/2005/08/addressing;soapenv:Headerwsa:Actionhttp://www.w3.org/2005/08/addressing/soap/fault/wsa:Action/soapenv:Headersoapenv:Bodysoapenv:Faultfaultcodesoapenv:Server/faultcodefaultstringjava.lang.NullPointerException/faultstringdetailExceptionorg.apache.axis2.AxisFault: java.lang.NullPointerException at org.apache.axis2.transport.http.AxisServlet.doPost(AxisServlet.java:182) at javax.servlet.http.HttpServlet.service(HttpServlet.java:709) at javax.servlet.http.HttpServlet.service(HttpServlet.java:802) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:252) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173) at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:213) at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:178) at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:126) at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:105) at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:107) at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:148) at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:869) at org.apache.coyote.http11.Http11BaseProtocol $Http11ConnectionHandler.processConnection(Http11BaseProtocol.java:664) at org.apache.tomcat.util.net.PoolTcpEndpoint.processSocket(PoolTcpEndpoint.java:527) at org.apache.tomcat.util.net.LeaderFollowerWorkerThread.runIt(LeaderFollowerWorkerThread.java:80) at org.apache.tomcat.util.threads.ThreadPool $ControlRunnable.run(ThreadPool.java:684) at java.lang.Thread.run(Thread.java:595) Caused by: java.lang.NullPointerException at ncl.qosp.modules.manager.RouterDispatcher.isFault(RouterDispatcher.java:230) at ncl.qosp.modules.manager.RouterDispatcher.invoke(RouterDispatcher.java:267) at org.apache.axis2.engine.Phase.invoke(Phase.java:292) at org.apache.axis2.engine.AxisEngine.invoke(AxisEngine.java:212) at org.apache.axis2.engine.AxisEngine.receive(AxisEngine.java:132) at org.apache.axis2.transport.http.HTTPTransportUtils.processHTTPPostRequest(HTTPTransportUtils.java:275) at org.apache.axis2.transport.http.AxisServlet.doPost(AxisServlet.java:120) ... 16 more I'm attaching my implementation. Any help is appreciated, Michele On Thu, 2008-01-31 at 19:47 +, Michele Mazzucco wrote: Hello everybody, I'm facing a serious problem with too many connections left in TIME_WAIT state, causing my system to hang. Since on the server side I run some ServiceClient instances as well I wasn't sure about the root of my problem, but after some investigations I've found out that the responsible for this is the SimpleHTTPServer used as transport receiver for incoming http requests. Given that the NIO listener/sender are not stable (see the JIRAs below) I have to stick with these. Is there anything I can do? Is there any way to inject a custom http connection manager and manually clean up the unused connections? Thanks in advance, Michele [1] https://issues.apache.org/jira/browse/AXIS2-3473 [2] http://www.mail-archive.com/axis-user@ws.apache.org/msg37314.html [3] https://issues.apache.org/jira/browse/AXIS2-3428 - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] package ncl.qosp.server.http; import java.lang.management.ManagementFactory; import java.net.SocketException; import java.util.concurrent.atomic.AtomicLong; import javax.management.MBeanServer; import javax.management.MalformedObjectNameException; import javax.management.ObjectName; import org.apache.axis2.AxisFault; import org.apache.axis2.addressing.EndpointReference; import org.apache.axis2.context.ConfigurationContext; import org.apache.axis2.context.MessageContext; import org.apache.axis2.context.SessionContext; import org.apache.axis2.description.Parameter; import org.apache.axis2.description.TransportInDescription; import org.apache.axis2.transport.TransportListener; import org.apache.axis2.transport.http.server.HttpUtils; import org.mortbay.jetty.Server; /** * @author a href=[EMAIL PROTECTED]Michele Mazzucco/a */ public class JettyServer implements TransportListener, JettyServerMBean { private ConfigurationContext configurationContext; private int port = -1; private String hostAddress;
Re: [Axis2] Webservices - 100% Memory and CPU usage (OutOfMemoryError) on API call
Still not sure whether you expirience the exception on client or server side. However: 300.000 longs do seem like a lot of elements to transport at once. I would not be surprised if such a huge array simply leads to memory problems during wrapping/unwrapping. Best solution (if that is indeed the problem) would be to split the one huge invocation into a number of smaller ones (or increasing the heap size to avoid memory problems, but that's probably just a temporary fix). 100% CPU does not seem very uncommon to me - I have seen similar behavior during wrapping/unwrapping of big SOAP messages. XML processing is expensive in terms of CPU cycles. /philipp Raghu Upadhyayula schrieb: Hi Phillip, I think there were around 300,000 elements in the long[] when I ran into this issue. I suppose, the exception happens in the app logic, I haven't tried it on my local machine yet (the error happened on one of our QA servers). In the application logic, what I do is, execute a query, loop through the result set, store the results in a ListLong as I don't know how many rows are in the result set, and then loop through the ListLong and store then in the long[] and return the long[] back to the client. Thanks Raghu -Original Message- From: Philipp Leitner [mailto:[EMAIL PROTECTED] Sent: Thursday, January 31, 2008 5:05 AM To: axis-user@ws.apache.org Subject: Re: [Axis2] Webservices - 100% Memory and CPU usage (OutOfMemoryError) on API call How many elements are there in your long[] when you run out of memory? When exactly does the exception happen (in your app logic, during wrapping, during transmission, on client side?). /philipp Raghu Upadhyayula schrieb: Hi, I have a webservice API call which is using 100% of Memory CPU and throwing an OutOfMemoryError (I'm using Axis2 1.3). My webservice call returns a long array. Here is the signature of my webservice API. *public long[] getIds(Calendar startDate, Calendar endDate) throws Exception; * Based on the given startDate endDate, I retrieve the corresponding records from the database and store the ids in a long array and return the long array to the client. If the number of records is more, I'm having the issue of 100% memory / CPU usage or OutOfMemoryError. Does anyone of you have any ideas on how to overcome this issue? Thanks Raghu - 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]
Getting FaultString from SOAP message on Client
Hi, I am having some problems getting the FaultString out of the SOAP message returned to me from a service. I have generated my stubs using WSDL2Java from version 1.3 of Axis2. The following is the SOAP message returned : soapenv:Envelope xmlns:soapenv=http://schemas.xmlsoap.org/soap/envelope/; xmlns:soapenc=http://schemas.xmlsoap.org/soap/encoding/; xmlns:xsd=http://www.w3.org/2001/XMLSchema; xmlns:xsi=http://www.w3.org/2001/XMLSchema-instance; soapenv:Header/ soapenv:Body soapenv:Fault faultcode xmlns:p773= http://exception.enterpriseservice.mincom.com p773:EnterpriseServiceConnectionException/faultcode faultstring![CDATA[com.mincom.enterpriseservice.exception.EnterpriseServiceConnectionException: CTG9631E: Error occurred during interaction with CICS. Error Code=ECI_ERR_NO_CICS, error code: -3]]/faultstring detail encodingStyle= p773:EnterpriseServiceConnectionException xmlns:p773= http://exception.enterpriseservice.mincom.com; p773:ellipseConnectionManagerLogonResultDTO xsi:nil=true/ /p773:EnterpriseServiceConnectionException /detail /soapenv:Fault /soapenv:Body /soapenv:Envelope However, the stub throws an EnterpriseServiceConnectionException which contains a null ellipseConnectionManagerLogonResultDTO (which I guess makes sense from the result). I want to know if the faultstring is made available to the client stubs(as this is what holds the meaningful message in this case), and if so, how? Thanks Julie -- This transmission is for the intended addressee only and is confidential information. If you have received this transmission in error, please notify the sender and delete the transmission. The contents of this e-mail are the opinion of the writer only and are not endorsed by the Mincom Group of companies unless expressly stated otherwise. --
Problem: DomException NAMESPACE_ERR
Hello, I'm a newbie to the whole web services and Axis arena... I've been trying to work with some really basic web services and can't get past this particular hurdle. I've deployed the web service on to Axis successfully and can call it through a soap client without problems. In sending the request to the server though, I get the following dialog box: HTTP error: could not POST file '/axis/services/... on server 'localhost' (500) followed by another dialog box Error sending soap data The soap body returned is as follows: soapenv:Body soapenv:Fault faultcodesoapenv:Server.userException/faultcode faultstringjava.rmi.RemoteException: NAMESPACE_ERR: An attempt is made to create or change an object in a way which is incorrect with regard to namespaces.; nested exception is: org.w3c.dom.DOMException: NAMESPACE_ERR: An attempt is made to create or change an object in a way which is incorrect with regard to namespaces./faultstring detail ns1:hostname xmlns:ns1=http://xml.apache.org/axis/;.../ns1:hostname /detail /soapenv:Fault /soapenv:Body I've spent almost two days searching for a solution, trying out various java libraries, and nothing seems to work. I'm sure it's something really minor that I'm missing somewhere. Any and all help will be greatly appreciated. Thanks! - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
BeanUtil.deserialize problem
I have the following xml that is being returned from a DB. I have checked the xml and it is well formed: absMet:GetLinkDataRspPayloadType xmlns:absMet=http://webservices.elsevier.com/schemas/metadata/abstracts/types/v7; absMet:citedLinkDataList absMet:citedLinkData linkData inputKey eid2-s2.0-19744366850/eid /inputKey eid2-s2.0-19744366850/eid doi10.1016/j.snb.2004.09.044/doi refKey FirstAuthorSurnameRothschild/FirstAuthorSurname YearOfPublication2005/YearOfPublication FirstPageNumber223/FirstPageNumber LastPageNumber230/LastPageNumber FirstInitialFirstAuthorA/FirstInitialFirstAuthor /refKey ivip ISSN09254005/ISSN Volume108/Volume Issue1-2/Issue Page223/Page /ivip dbnamescopusbase/dbname /linkData recordTypec/recordType citedByCount0/citedByCount /absMet:citedLinkData /absMet:citedLinkDataList /absMet:GetLinkDataRspPayloadType The GetLinkDataRspPayloadType is a java object generated with WSDL2Java with ADB data binding. I have been trying to deserialize the xml into the java object but can't seem to get it to work. I get no errors but I get no values in the object. I am using the following to get the xml string into an OMElement which appears to work fine as a toString on the created OMElement displays the results with the values. try { OMElement ele = org.apache.axiom.om.impl.llom.util.AXIOMUtil.stringToOM(xml); I have tried a couple of the BeanUtil.deserialize methods. returnValue = (GetLinkDataRspPayloadType)BeanUtil.deserialize(GetLinkDataRspPayloadType.class, ele, new DefaultObjectSupplier(), null); I have tried the above deserialize method and it appears to generate the correct object, however it is not filling in the values. I also tried the deserialize method that takes a MultirefHelper but this method did not generate a proper object. Obviously I have missed something with doing this. Any help or pointers would be appreciated. Regards, Bill
RE: [Axis2] Webservices - 100% Memory and CPU usage (OutOfMemoryError) on API call
Hi Phillip, I'm experiencing this on the server side when executing my query storing the results in the long[]. As you said one of the solution could be to split one huge invocation into a number of smaller ones, can you explain that a bit. Are you saying that I need to restrict the number of elements returned in the long[] to a smaller number. Thanks Raghu -Original Message- From: Philipp Leitner [mailto:[EMAIL PROTECTED] Sent: Thursday, January 31, 2008 2:27 PM To: axis-user@ws.apache.org Subject: Re: [Axis2] Webservices - 100% Memory and CPU usage (OutOfMemoryError) on API call Still not sure whether you expirience the exception on client or server side. However: 300.000 longs do seem like a lot of elements to transport at once. I would not be surprised if such a huge array simply leads to memory problems during wrapping/unwrapping. Best solution (if that is indeed the problem) would be to split the one huge invocation into a number of smaller ones (or increasing the heap size to avoid memory problems, but that's probably just a temporary fix). 100% CPU does not seem very uncommon to me - I have seen similar behavior during wrapping/unwrapping of big SOAP messages. XML processing is expensive in terms of CPU cycles. /philipp Raghu Upadhyayula schrieb: Hi Phillip, I think there were around 300,000 elements in the long[] when I ran into this issue. I suppose, the exception happens in the app logic, I haven't tried it on my local machine yet (the error happened on one of our QA servers). In the application logic, what I do is, execute a query, loop through the result set, store the results in a ListLong as I don't know how many rows are in the result set, and then loop through the ListLong and store then in the long[] and return the long[] back to the client. Thanks Raghu -Original Message- From: Philipp Leitner [mailto:[EMAIL PROTECTED] Sent: Thursday, January 31, 2008 5:05 AM To: axis-user@ws.apache.org Subject: Re: [Axis2] Webservices - 100% Memory and CPU usage (OutOfMemoryError) on API call How many elements are there in your long[] when you run out of memory? When exactly does the exception happen (in your app logic, during wrapping, during transmission, on client side?). /philipp Raghu Upadhyayula schrieb: Hi, I have a webservice API call which is using 100% of Memory CPU and throwing an OutOfMemoryError (I'm using Axis2 1.3). My webservice call returns a long array. Here is the signature of my webservice API. *public long[] getIds(Calendar startDate, Calendar endDate) throws Exception; * Based on the given startDate endDate, I retrieve the corresponding records from the database and store the ids in a long array and return the long array to the client. If the number of records is more, I'm having the issue of 100% memory / CPU usage or OutOfMemoryError. Does anyone of you have any ideas on how to overcome this issue? Thanks Raghu - 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: [Axis2] Webservices - 100% Memory and CPU usage (OutOfMemoryError) on API call
if you transferring heavy data oevr the wire, consider using mtom. On 31/01/2008, Philipp Leitner [EMAIL PROTECTED] wrote: Still not sure whether you expirience the exception on client or server side. However: 300.000 longs do seem like a lot of elements to transport at once. I would not be surprised if such a huge array simply leads to memory problems during wrapping/unwrapping. Best solution (if that is indeed the problem) would be to split the one huge invocation into a number of smaller ones (or increasing the heap size to avoid memory problems, but that's probably just a temporary fix). 100% CPU does not seem very uncommon to me - I have seen similar behavior during wrapping/unwrapping of big SOAP messages. XML processing is expensive in terms of CPU cycles. /philipp Raghu Upadhyayula schrieb: Hi Phillip, I think there were around 300,000 elements in the long[] when I ran into this issue. I suppose, the exception happens in the app logic, I haven't tried it on my local machine yet (the error happened on one of our QA servers). In the application logic, what I do is, execute a query, loop through the result set, store the results in a ListLong as I don't know how many rows are in the result set, and then loop through the ListLong and store then in the long[] and return the long[] back to the client. Thanks Raghu -Original Message- From: Philipp Leitner [mailto:[EMAIL PROTECTED] Sent: Thursday, January 31, 2008 5:05 AM To: axis-user@ws.apache.org Subject: Re: [Axis2] Webservices - 100% Memory and CPU usage (OutOfMemoryError) on API call How many elements are there in your long[] when you run out of memory? When exactly does the exception happen (in your app logic, during wrapping, during transmission, on client side?). /philipp Raghu Upadhyayula schrieb: Hi, I have a webservice API call which is using 100% of Memory CPU and throwing an OutOfMemoryError (I'm using Axis2 1.3). My webservice call returns a long array. Here is the signature of my webservice API. *public long[] getIds(Calendar startDate, Calendar endDate) throws Exception; * Based on the given startDate endDate, I retrieve the corresponding records from the database and store the ids in a long array and return the long array to the client. If the number of records is more, I'm having the issue of 100% memory / CPU usage or OutOfMemoryError. Does anyone of you have any ideas on how to overcome this issue? Thanks Raghu - 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: [Axis2] Webservices - 100% Memory and CPU usage (OutOfMemoryError) on API call
Thanks for your reply Narayan. So, if I have to use mtom then I need to change my method to return the attachment (xsd:base64binary) instead of returning the long[] right? Thanks Raghu From: Narayan S Dhillon [mailto:[EMAIL PROTECTED] Sent: Thursday, January 31, 2008 3:11 PM To: axis-user@ws.apache.org Subject: Re: [Axis2] Webservices - 100% Memory and CPU usage (OutOfMemoryError) on API call if you transferring heavy data oevr the wire, consider using mtom. On 31/01/2008, Philipp Leitner [EMAIL PROTECTED] wrote: Still not sure whether you expirience the exception on client or server side. However: 300.000 longs do seem like a lot of elements to transport at once. I would not be surprised if such a huge array simply leads to memory problems during wrapping/unwrapping. Best solution (if that is indeed the problem) would be to split the one huge invocation into a number of smaller ones (or increasing the heap size to avoid memory problems, but that's probably just a temporary fix). 100% CPU does not seem very uncommon to me - I have seen similar behavior during wrapping/unwrapping of big SOAP messages. XML processing is expensive in terms of CPU cycles. /philipp Raghu Upadhyayula schrieb: Hi Phillip, I think there were around 300,000 elements in the long[] when I ran into this issue. I suppose, the exception happens in the app logic, I haven't tried it on my local machine yet (the error happened on one of our QA servers). In the application logic, what I do is, execute a query, loop through the result set, store the results in a ListLong as I don't know how many rows are in the result set, and then loop through the ListLong and store then in the long[] and return the long[] back to the client. Thanks Raghu -Original Message- From: Philipp Leitner [mailto:[EMAIL PROTECTED] Sent: Thursday, January 31, 2008 5:05 AM To: axis-user@ws.apache.org Subject: Re: [Axis2] Webservices - 100% Memory and CPU usage (OutOfMemoryError) on API call How many elements are there in your long[] when you run out of memory? When exactly does the exception happen (in your app logic, during wrapping, during transmission, on client side?). /philipp Raghu Upadhyayula schrieb: Hi, I have a webservice API call which is using 100% of Memory CPU and throwing an OutOfMemoryError (I'm using Axis2 1.3). My webservice call returns a long array. Here is the signature of my webservice API. *public long[] getIds(Calendar startDate, Calendar endDate) throws Exception; * Based on the given startDate endDate, I retrieve the corresponding records from the database and store the ids in a long array and return the long array to the client. If the number of records is more, I'm having the issue of 100% memory / CPU usage or OutOfMemoryError. Does anyone of you have any ideas on how to overcome this issue? Thanks Raghu - 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: [Axis2] Webservices - 100% Memory and CPU usage (OutOfMemoryError) on API call
Thats alot of longs! Take a look at implementing a binding depending on returned datatype..fastest processing for returning voids, interface objects works best with JAXB returning Strings and doubles use ADB http://wso2.org/library/588#resources HTH M- - Original Message - From: Philipp Leitner [EMAIL PROTECTED] To: axis-user@ws.apache.org Sent: Thursday, January 31, 2008 5:26 PM Subject: Re: [Axis2] Webservices - 100% Memory and CPU usage (OutOfMemoryError) on API call Still not sure whether you expirience the exception on client or server side. However: 300.000 longs do seem like a lot of elements to transport at once. I would not be surprised if such a huge array simply leads to memory problems during wrapping/unwrapping. Best solution (if that is indeed the problem) would be to split the one huge invocation into a number of smaller ones (or increasing the heap size to avoid memory problems, but that's probably just a temporary fix). 100% CPU does not seem very uncommon to me - I have seen similar behavior during wrapping/unwrapping of big SOAP messages. XML processing is expensive in terms of CPU cycles. /philipp Raghu Upadhyayula schrieb: Hi Phillip, I think there were around 300,000 elements in the long[] when I ran into this issue. I suppose, the exception happens in the app logic, I haven't tried it on my local machine yet (the error happened on one of our QA servers). In the application logic, what I do is, execute a query, loop through the result set, store the results in a ListLong as I don't know how many rows are in the result set, and then loop through the ListLong and store then in the long[] and return the long[] back to the client. Thanks Raghu -Original Message- From: Philipp Leitner [mailto:[EMAIL PROTECTED] Sent: Thursday, January 31, 2008 5:05 AM To: axis-user@ws.apache.org Subject: Re: [Axis2] Webservices - 100% Memory and CPU usage (OutOfMemoryError) on API call How many elements are there in your long[] when you run out of memory? When exactly does the exception happen (in your app logic, during wrapping, during transmission, on client side?). /philipp Raghu Upadhyayula schrieb: Hi, I have a webservice API call which is using 100% of Memory CPU and throwing an OutOfMemoryError (I'm using Axis2 1.3). My webservice call returns a long array. Here is the signature of my webservice API. *public long[] getIds(Calendar startDate, Calendar endDate) throws Exception; * Based on the given startDate endDate, I retrieve the corresponding records from the database and store the ids in a long array and return the long array to the client. If the number of records is more, I'm having the issue of 100% memory / CPU usage or OutOfMemoryError. Does anyone of you have any ideas on how to overcome this issue? Thanks Raghu - 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: [Axis2] Webservices - 100% Memory and CPU usage (OutOfMemoryError) on API call
Hi Martin, I am using ADB data binding. Thanks Raghu -Original Message- From: Martin Gainty [mailto:[EMAIL PROTECTED] Sent: Thursday, January 31, 2008 4:03 PM To: axis-user@ws.apache.org Subject: Re: [Axis2] Webservices - 100% Memory and CPU usage (OutOfMemoryError) on API call Thats alot of longs! Take a look at implementing a binding depending on returned datatype..fastest processing for returning voids, interface objects works best with JAXB returning Strings and doubles use ADB http://wso2.org/library/588#resources HTH M- - Original Message - From: Philipp Leitner [EMAIL PROTECTED] To: axis-user@ws.apache.org Sent: Thursday, January 31, 2008 5:26 PM Subject: Re: [Axis2] Webservices - 100% Memory and CPU usage (OutOfMemoryError) on API call Still not sure whether you expirience the exception on client or server side. However: 300.000 longs do seem like a lot of elements to transport at once. I would not be surprised if such a huge array simply leads to memory problems during wrapping/unwrapping. Best solution (if that is indeed the problem) would be to split the one huge invocation into a number of smaller ones (or increasing the heap size to avoid memory problems, but that's probably just a temporary fix). 100% CPU does not seem very uncommon to me - I have seen similar behavior during wrapping/unwrapping of big SOAP messages. XML processing is expensive in terms of CPU cycles. /philipp Raghu Upadhyayula schrieb: Hi Phillip, I think there were around 300,000 elements in the long[] when I ran into this issue. I suppose, the exception happens in the app logic, I haven't tried it on my local machine yet (the error happened on one of our QA servers). In the application logic, what I do is, execute a query, loop through the result set, store the results in a ListLong as I don't know how many rows are in the result set, and then loop through the ListLong and store then in the long[] and return the long[] back to the client. Thanks Raghu -Original Message- From: Philipp Leitner [mailto:[EMAIL PROTECTED] Sent: Thursday, January 31, 2008 5:05 AM To: axis-user@ws.apache.org Subject: Re: [Axis2] Webservices - 100% Memory and CPU usage (OutOfMemoryError) on API call How many elements are there in your long[] when you run out of memory? When exactly does the exception happen (in your app logic, during wrapping, during transmission, on client side?). /philipp Raghu Upadhyayula schrieb: Hi, I have a webservice API call which is using 100% of Memory CPU and throwing an OutOfMemoryError (I'm using Axis2 1.3). My webservice call returns a long array. Here is the signature of my webservice API. *public long[] getIds(Calendar startDate, Calendar endDate) throws Exception; * Based on the given startDate endDate, I retrieve the corresponding records from the database and store the ids in a long array and return the long array to the client. If the number of records is more, I'm having the issue of 100% memory / CPU usage or OutOfMemoryError. Does anyone of you have any ideas on how to overcome this issue? Thanks Raghu - 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] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: mistake in this simple wsdl
Without seeing all the code generated and how it links together I'd take a stab in the dark and say that you're not setting an object in the request. Since your wsdl does not appear to have any nillable/minOccurs=0 elements I would suggest that you are not populating one of the parent objects correctly. Eg not putting the responseMsg into the to and then that into the fromtmResponse object correctly. David Meiklejohn -- Product Developer iseek Communications Pty Ltd Excellence in business data solutions ph 1300 661 668 fax 1300 661 540 www.iseek.com.auhttp://www.iseek.com.au - This email is intended for the recipients only. If you have received this email by mistake, please notify the sender by reply email, and then delete it without reading, storing, forwarding or disclosing its contents. The contents of this message and any attachments may be confidential. There is no warranty that this email is free of errors or viruses. It may be a private communication, and if so, does not represent the views of iseek Communications Pty Ltd. All contents of this email and any attachments are subject to copyright. From: mpas mpas [mailto:[EMAIL PROTECTED] Sent: Thursday, 31 January 2008 11:36 PM To: axis-user@ws.apache.org Subject: RE: mistake in this simple wsdl I did some kind of test and i found that the wsdl and xsd file are conformed. But the service skeleton generated with the wsdl2java tool is not properly and because of That axis get the error (error = property can not be null ) I change generated skeleton so that I removed whole code and implemented Service operation myself so that the little method return what it gets from client back to client and the service works fine!! I assume that wsdl2java code can not qualified my wsdl or my xsd file and produces some improperly code! Could somebody verify if my assuming is right!? If so, what is wrong in these files, that tool is not able to generate a properly working code? Jetzt Mails schnell in einem Vorschaufenster überfliegen. Dies und viel mehr bietet das neue Yahoo! Mailhttp://de.rd.yahoo.com/evt=40590/*http:/de.docs.yahoo.com/ymail/landing.html.
Re: Getting FaultString from SOAP message on Client
Thanks for your feedback, however, the exception that is thrown is a EnterpriseServiceConnectionException Exception. This does not have a 'getFaultString' method, it only has a 'getFaultMessage' which returns the null ellipseConnectionManagerLogonResultDTO. Does this mean that the EnterpriseServiceConnectionException has been defined incorrectly in the WSDL? Thanks Julie You can get faultString etc. like in the catch block, exception.getFaultString() Upul On Feb 1, 2008 3:38 AM, [EMAIL PROTECTED] wrote: Hi, I am having some problems getting the FaultString out of the SOAP message returned to me from a service. I have generated my stubs using WSDL2Java from version 1.3 of Axis2. The following is the SOAP message returned : soapenv:Envelope xmlns:soapenv=http://schemas.xmlsoap.org/soap/envelope/; xmlns:soapenc=http://schemas.xmlsoap.org/soap/encoding/; xmlns:xsd=http://www.w3.org/2001/XMLSchema; xmlns:xsi=http://www.w3.org/2001/XMLSchema-instance; soapenv:Header/ soapenv:Body soapenv:Fault faultcode xmlns:p773= http://exception.enterpriseservice.mincom.com p773:EnterpriseServiceConnectionException/faultcode faultstring![CDATA[com.mincom.enterpriseservice.exception.EnterpriseServiceConnectionException: CTG9631E: Error occurred during interaction with CICS. Error Code=ECI_ERR_NO_CICS, error code: -3]]/faultstring detail encodingStyle= p773:EnterpriseServiceConnectionException xmlns:p773= http://exception.enterpriseservice.mincom.com; p773:ellipseConnectionManagerLogonResultDTO xsi:nil=true/ /p773:EnterpriseServiceConnectionException /detail /soapenv:Fault /soapenv:Body /soapenv:Envelope However, the stub throws an EnterpriseServiceConnectionException which contains a null ellipseConnectionManagerLogonResultDTO (which I guess makes sense from the result). I want to know if the faultstring is made available to the client stubs(as this is what holds the meaningful message in this case), and if so, how? Thanks Julie -- This transmission is for the intended addressee only and is confidential information. If you have received this transmission in error, please notify the sender and delete the transmission. The contents of this e-mail are the opinion of the writer only and are not endorsed by the Mincom Group of companies unless expressly stated otherwise. --
Re: [axis2] SimpleHTTPServer as transport listener causes too many connections to stay in TIME_WAIT state
Me == clueless . Just some general advice though. Have you thought about submitting patches to fix the NIO issues? I notice that someone from the synapse team (IIRC), three weeks ago, asked you to submit a test case for your failure in one of the jira's you posted. As I've said before Michele, you easily have some of the most complex and long going use cases for axis2 as a non-committer. Your involvement via patches certainly have a better chance of getting developer attention. In respect to this issue, I can at least try to be a bit helpful: 1) Have you tried running your code on anything else besides OSX to see if these socket issues are OS related? I've run into several socket and nio issues specific to linux for example. 2) Have you tried running http 1.0 instead of 1.1 ? 3) SimpleHTTPServer has never been meant for production use, so stop trying to use it like that. Fixing the nio issues seem to me to be the better path. My understanding of TIME_WAIT, via an old usenet post of mine, was best explained to me this way: After the connection is closed, there might still be some stray packets that were delayed and could still arrive. The TIME_WAIT status retains a record of a recent connection, so that the system can recognize these as delay packets. Are these connections going from CLOSE_WAIT to TIME_WAIT? Can you do a 'netstat -anp' and show the transition states? What issue do you have with TIME_WAIT exactly? Anyways, since SimpleHTTPServer is deep involved into the several hundred unit / integration tests, I don't see major changes happening at this point. 4) Obviously try the latest axis2 nightlies and post questions to the http commons / reactor list. Its possible the latest snapshot of reactor fixes your issue and can be promoted to the upcomming axis2 1.4 . HTH, Robert On Jan 31, 2008 7:48 PM, Michele Mazzucco [EMAIL PROTECTED] wrote: Hello again, I've tried to write a TransportListener which uses Jetty as http server -- but I had no success: when requests come I get the following error ?xml version='1.0' encoding='utf-8'?soapenv:Envelope xmlns:soapenv=http://schemas.xmlsoap.org/soap/envelope/; xmlns:wsa=http://www.w3.org/2005/08/addressing;soapenv:Headerwsa:Actionhttp://www.w3.org/2005/08/addressing/soap/fault/wsa:Action/soapenv:Headersoapenv:Bodysoapenv:Faultfaultcodesoapenv:Server/faultcodefaultstringjava.lang.NullPointerException/faultstringdetailExceptionorg.apache.axis2.AxisFault: java.lang.NullPointerException at org.apache.axis2.transport.http.AxisServlet.doPost(AxisServlet.java:182) at javax.servlet.http.HttpServlet.service(HttpServlet.java:709) at javax.servlet.http.HttpServlet.service(HttpServlet.java:802) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:252) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173) at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:213) at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:178) at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:126) at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:105) at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:107) at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:148) at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:869) at org.apache.coyote.http11.Http11BaseProtocol $Http11ConnectionHandler.processConnection(Http11BaseProtocol.java:664) at org.apache.tomcat.util.net.PoolTcpEndpoint.processSocket(PoolTcpEndpoint.java:527) at org.apache.tomcat.util.net.LeaderFollowerWorkerThread.runIt(LeaderFollowerWorkerThread.java:80) at org.apache.tomcat.util.threads.ThreadPool $ControlRunnable.run(ThreadPool.java:684) at java.lang.Thread.run(Thread.java:595) Caused by: java.lang.NullPointerException at ncl.qosp.modules.manager.RouterDispatcher.isFault(RouterDispatcher.java:230) at ncl.qosp.modules.manager.RouterDispatcher.invoke(RouterDispatcher.java:267) at org.apache.axis2.engine.Phase.invoke(Phase.java:292) at org.apache.axis2.engine.AxisEngine.invoke(AxisEngine.java:212) at org.apache.axis2.engine.AxisEngine.receive(AxisEngine.java:132) at org.apache.axis2.transport.http.HTTPTransportUtils.processHTTPPostRequest(HTTPTransportUtils.java:275) at org.apache.axis2.transport.http.AxisServlet.doPost(AxisServlet.java:120) ... 16 more I'm attaching my implementation. Any help is appreciated, Michele On Thu, 2008-01-31 at 19:47 +, Michele Mazzucco wrote: Hello everybody, I'm facing a serious problem with too many connections left in TIME_WAIT state, causing my system to hang.
Re: Getting FaultString from SOAP message on Client
Sorry, You can get the last envelope like this. And traverse the OMElement. There should be better solutions. org.apache.axiom.soap.SOAPEnvelope soap = stub._getServiceClient().getLastOperationContext().getMessageContext( org.apache.axis2.wsdl.WSDLConstants.MESSAGE_LABEL_IN_VALUE ).getEnvelope(); Upul On Feb 1, 2008 7:42 AM, [EMAIL PROTECTED] wrote: Thanks for your feedback, however, the exception that is thrown is a EnterpriseServiceConnectionException Exception. This does not have a 'getFaultString' method, it only has a 'getFaultMessage' which returns the null ellipseConnectionManagerLogonResultDTO. Does this mean that the EnterpriseServiceConnectionException has been defined incorrectly in the WSDL? Thanks Julie You can get faultString etc. like in the catch block, exception.getFaultString() Upul On Feb 1, 2008 3:38 AM, [EMAIL PROTECTED][EMAIL PROTECTED] wrote: Hi, I am having some problems getting the FaultString out of the SOAP message returned to me from a service. I have generated my stubs using WSDL2Java from version 1.3 of Axis2. The following is the SOAP message returned : soapenv:Envelope xmlns:soapenv=*http://schemas.xmlsoap.org/soap/envelope/*http://schemas.xmlsoap.org/soap/envelope/ xmlns:soapenc=*http://schemas.xmlsoap.org/soap/encoding/*http://schemas.xmlsoap.org/soap/encoding/ xmlns:xsd=*http://www.w3.org/2001/XMLSchema*http://www.w3.org/2001/XMLSchema xmlns:xsi=*http://www.w3.org/2001/XMLSchema-instance*http://www.w3.org/2001/XMLSchema-instance soapenv:Header/ soapenv:Body soapenv:Fault faultcode xmlns:p773=* http://exception.enterpriseservice.mincom.com*http://exception.enterpriseservice.mincom.com/ p773:EnterpriseServiceConnectionException/faultcode faultstring![CDATA[ com.mincom.enterpriseservice.exception.EnterpriseServiceConnectionException: CTG9631E: Error occurred during interaction with CICS. Error Code=ECI_ERR_NO_CICS, error code: -3]]/faultstring detail encodingStyle= p773:EnterpriseServiceConnectionException xmlns:p773=* http://exception.enterpriseservice.mincom.com*http://exception.enterpriseservice.mincom.com/ p773:ellipseConnectionManagerLogonResultDTO xsi:nil=true/ /p773:EnterpriseServiceConnectionException /detail /soapenv:Fault /soapenv:Body /soapenv:Envelope However, the stub throws an EnterpriseServiceConnectionException which contains a null ellipseConnectionManagerLogonResultDTO (which I guess makes sense from the result). I want to know if the faultstring is made available to the client stubs(as this is what holds the meaningful message in this case), and if so, how? Thanks Julie -- This transmission is for the intended addressee only and is confidential information. If you have received this transmission in error, please notify the sender and delete the transmission. The contents of this e-mail are the opinion of the writer only and are not endorsed by the Mincom Group of companies unless expressly stated otherwise. --
Re: Accessing properties in an aar archive.
Hello, Thanks alot for your help. So MessageContext is a static object that doesnt need to be initialized, what would happen if MessageContext.getCurrentMessageContext() was ran by a normal class that wasn't being run by the axis2 server. Also is this anywhere in the documentation on the site. As I dont see this as an obivious way to add properties to a web service (which is probably a really common thing). On Jan 30, 2008 10:42 PM, Deepal jayasinghe [EMAIL PROTECTED] wrote: Hello, I've find a similar post that suggests: The correct way is get the ServiceDescription from , MessageContxt and then you can get the correct classloader for that service (which has all you lib files) from serviceDescription ClassLoader cl = sd.getClassLoader(); However, I'm not sure how to even get at the ServiceDescription or Message Context objects. MessgeContext.getCurrentMessageContext(); For example, how would I get the ServiceDescription object in the getProvIdentityDD Function: public class LocationLookupService{ public OMElement getProvIdentityDD(OMElement objLatLongitude) {} } the .properties file is in ca/gc/agr/locationlookup/connection.properties file inside the aar file. - 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] -- Steve Zimmer aka steveZ1337 founder of: www.ninjacomputing.com - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: mistake in this simple wsdl
On Feb 1, 2008 5:46 AM, David Meiklejohn [EMAIL PROTECTED] wrote: Without seeing all the code generated and how it links together I'd take a stab in the dark and say that you're not setting an object in the request. Since your wsdl does not appear to have any nillable/minOccurs=0 elements I would suggest that you are not populating one of the parent objects correctly. Eg not putting the responseMsg into the to and then that into the fromtmResponse object correctly. I guess this should be the reason. try with -Eosv option. thanks, Amila. David Meiklejohn -- Product Developer iseek Communications Pty Ltd Excellence in business data solutions ph 1300 661 668 fax 1300 661 540 www.iseek.com.au - This email is intended for the recipients only. If you have received this email by mistake, please notify the sender by reply email, and then delete it without reading, storing, forwarding or disclosing its contents. The contents of this message and any attachments may be confidential. There is no warranty that this email is free of errors or viruses. It may be a private communication, and if so, does not represent the views of iseek Communications Pty Ltd. All contents of this email and any attachments are subject to copyright. *From:* mpas mpas [mailto:[EMAIL PROTECTED] *Sent:* Thursday, 31 January 2008 11:36 PM *To:* axis-user@ws.apache.org *Subject:* RE: mistake in this simple wsdl I did some kind of test and i found that the wsdl and xsd file are conformed. But the service skeleton generated with the wsdl2java tool is not properly and because of That axis get the error (error = property can not be null ) I change generated skeleton so that I removed whole code and implemented Service operation myself so that the little method return what it gets from client back to client and the service works fine!! I assume that wsdl2java code can not qualified my wsdl or my xsd file and produces some improperly code! Could somebody verify if my assuming is right!? If so, what is wrong in these files, that tool is not able to generate a properly working code? -- Jetzt Mails schnell in einem Vorschaufenster überfliegen. Dies und viel mehr bietet das neue Yahoo! Mailhttp://de.rd.yahoo.com/evt=40590/*http:/de.docs.yahoo.com/ymail/landing.html. -- Amila Suriarachchi, WSO2 Inc.
Re: BeanUtil.deserialize problem
hi Virtual , Could you please send (or create a JIRA) us your java class and necessary classes so that we can see what actually happening Thanks Deepal I have the following xml that is being returned from a DB. I have checked the xml and it is well formed: absMet:GetLinkDataRspPayloadType xmlns:absMet=http://webservices.elsevier.com/schemas/metadata/abstracts/types/v7; absMet:citedLinkDataList absMet:citedLinkData linkData inputKey eid2-s2.0-19744366850/eid /inputKey eid2-s2.0-19744366850/eid doi10.1016/j.snb.2004.09.044/doi refKey FirstAuthorSurnameRothschild/FirstAuthorSurname YearOfPublication2005/YearOfPublication FirstPageNumber223/FirstPageNumber LastPageNumber230/LastPageNumber FirstInitialFirstAuthorA/FirstInitialFirstAuthor /refKey ivip ISSN09254005/ISSN Volume108/Volume Issue1-2/Issue Page223/Page /ivip dbnamescopusbase/dbname /linkData recordTypec/recordType citedByCount0/citedByCount /absMet:citedLinkData /absMet:citedLinkDataList /absMet:GetLinkDataRspPayloadType The GetLinkDataRspPayloadType is a java object generated with WSDL2Java with ADB data binding. I have been trying to deserialize the xml into the java object but can't seem to get it to work. I get no errors but I get no values in the object. I am using the following to get the xml string into an OMElement which appears to work fine as a toString on the created OMElement displays the results with the values. try { OMElement ele = org.apache.axiom.om.impl.llom.util.AXIOMUtil.stringToOM(xml); I have tried a couple of the BeanUtil.deserialize methods. returnValue = (GetLinkDataRspPayloadType)BeanUtil.deserialize(GetLinkDataRspPayloadType.class, ele, new DefaultObjectSupplier(), null); I have tried the above deserialize method and it appears to generate the correct object, however it is not filling in the values. I also tried the deserialize method that takes a MultirefHelper but this method did not generate a proper object. Obviously I have missed something with doing this. Any help or pointers would be appreciated. Regards, Bill - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Pass through Web Service
Hello, I am curious about how to create a web-service when the payloads it delivers could have un-anticipated elements. That is, the xsd for the payloads would have to leave open the possibility of potentially random elements being included. In this case, only the outermost tag would be known as well as a few other elements. However, its complexType declaration would also have an xsd:any element.Because of the unknown elements, there seems to be no good way to characterize such messages in a corresponding Java class. So, I don't expect the code generation tools to be of any use here. The alternative would be to design the web-service so that it is able to put an arbitrary XML message into a payload. Could you help me start researching how to implement such a service? This is a more general question than this message about RDF In Axis2 you can write your service impl class with Axiom and get this working. I mean you can write your service impl class as below class MyService { public OMElement getData(OMElement value){ // do the processing here } } Thanks Deepal - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: internal server error with tomcat/ubuntu/axis2
Can you try by downloading tomcat directly. it worked fined for me with tomcat 5.5.20 thanks, Amila. On Jan 31, 2008 9:14 PM, Olivier Ricordeau [EMAIL PROTECTED] wrote: Remark: The tomcat sample application runs fine on my server. http://tomcat.apache.org/tomcat-5.5-doc/appdev/sample/ O. Olivier Ricordeau a écrit : Hi list, I'm trying to deploy axis2 in tomcat and I can't manage to make it work. Note: I've tried with axis2 1.3 and with the latest nightly build and I get the same result. I'm using Tomcat 5.5.25-1ubuntu1 (the latest package available for Ubuntu 7.10). Here is what I did: * unzip axis2-xxx.zip * run ant create.war * copy dist/axis2.war to /var/lib/tomcat/webapps * restart tomcat When I try to load http://localhost:8180/axis2/ (the default port on Ubuntu is 8180...) I get the axis welcome page (fine). But when I click on one of the links (Services, Validate, Administration), I get a page with the Apache feather and the axis logo on the top, saying Internal server error... and there's nothing in /var/log/tomcat5.5 !!! Can anybody help me? I'm not sure if it's an axis2 bug or a misconfiguration problem. Are there some other place where I should look for logs? (I tried find /var/lib/tomcat/webapps/axis2|grep -i log just in case, but there's nothing relevant) Cheers, Olivier -- - *Olivier RICORDEAU* - [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] -- Amila Suriarachchi, WSO2 Inc.
Re: Axis2 IIS
As far as IIS forward the http request to tomcat server correctly this should not be a problem. But I think Apache httpd and tomcat using jks connector is a much tested configuration. thanks, Amila. On Jan 31, 2008 5:29 PM, [EMAIL PROTECTED] [EMAIL PROTECTED] wrote: Hi, i installed Axis2 on tomcat working only like servlet container behind = IIS. I can see the file wsdl by url but i can connect by client!!? Are ther= e any problem to use Axis2 and IIS ?? do i need to set a particular configu= ration?? thanks in advance Tiscali Voce 8 Mega: Telefono + Adsl a soli € 4,95 al mese. http://abbonati.tiscali.it/promo/mail/ -- Amila Suriarachchi, WSO2 Inc.
Re: externalMapping to reuse types
hi, The external mapping option was there from lot of time and there were not request for this feature. So I have not done much testing with it and I'll have a look at onit once have a time. For Xmlbeans you can use the -Ewdc option. This basically generates some dummy classes for the element refer from the wsdl. So what you can do is to First generate the code with this option and then delete the dummy classes. Then generate the Xmlbeans classes using the scomp command comes with the Xmlbeans distribution. Then add those classes to class path. thanks, Amila. On Jan 31, 2008 4:52 PM, Mauro Molinari [EMAIL PROTECTED] wrote: Alistair Edwardes ha scritto: which is similar to what I think you were trying to achieve before too. Hi Alistair, actually I'm using ADB and I'm following the approach to carefully choose namespaces so that the automatically mapped package names of the generated class files are the ones I want to be. Moreover, I know WSDL2Java has -ns2p option that can help to map namespaces to Java packages, although I didn't need to use it. Anyway, thank you for sharing your results with XMLBeans with us, they can surely be very useful to many people. Unfortunately, Axis2 official documentation is really poor about this kind of information :-( -- Mauro Molinari Software Developer [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] -- Amila Suriarachchi, WSO2 Inc.
Re: Getting FaultString from SOAP message on Client
Hi Upul Thanks very much for this. It worked a treat. You're right though, it does seem to be a complicated way to get the fault data Regards Julie Sorry, You can get the last envelope like this. And traverse the OMElement. There should be better solutions. org.apache.axiom.soap.SOAPEnvelope soap = stub._getServiceClient().getLastOperationContext().getMessageContext(org.apache.axis2.wsdl.WSDLConstants.MESSAGE_LABEL_IN_VALUE ).getEnvelope(); Upul On Feb 1, 2008 7:42 AM, [EMAIL PROTECTED] wrote: Thanks for your feedback, however, the exception that is thrown is a EnterpriseServiceConnectionException Exception. This does not have a 'getFaultString' method, it only has a 'getFaultMessage' which returns the null ellipseConnectionManagerLogonResultDTO. Does this mean that the EnterpriseServiceConnectionException has been defined incorrectly in the WSDL? Thanks Julie You can get faultString etc. like in the catch block, exception.getFaultString() Upul On Feb 1, 2008 3:38 AM, [EMAIL PROTECTED] wrote: Hi, I am having some problems getting the FaultString out of the SOAP message returned to me from a service. I have generated my stubs using WSDL2Java from version 1.3 of Axis2. The following is the SOAP message returned : soapenv:Envelope xmlns:soapenv=http://schemas.xmlsoap.org/soap/envelope/; xmlns:soapenc=http://schemas.xmlsoap.org/soap/encoding/; xmlns:xsd=http://www.w3.org/2001/XMLSchema; xmlns:xsi=http://www.w3.org/2001/XMLSchema-instance; soapenv:Header/ soapenv:Body soapenv:Fault faultcode xmlns:p773=http://exception.enterpriseservice.mincom.com p773:EnterpriseServiceConnectionException/faultcode faultstring![CDATA[com.mincom.enterpriseservice.exception.EnterpriseServiceConnectionException: CTG9631E: Error occurred during interaction with CICS. Error Code=ECI_ERR_NO_CICS, error code: -3]]/faultstring detail encodingStyle= p773:EnterpriseServiceConnectionException xmlns:p773= http://exception.enterpriseservice.mincom.com; p773:ellipseConnectionManagerLogonResultDTO xsi:nil=true/ /p773:EnterpriseServiceConnectionException /detail /soapenv:Fault /soapenv:Body /soapenv:Envelope However, the stub throws an EnterpriseServiceConnectionException which contains a null ellipseConnectionManagerLogonResultDTO (which I guess makes sense from the result). I want to know if the faultstring is made available to the client stubs(as this is what holds the meaningful message in this case), and if so, how? Thanks Julie -- This transmission is for the intended addressee only and is confidential information. If you have received this transmission in error, please notify the sender and delete the transmission. The contents of this e-mail are the opinion of the writer only and are not endorsed by the Mincom Group of companies unless expressly stated otherwise. --
Re: [Axis2] xsi:type support with JAXB databinding?
On Jan 30, 2008 8:58 PM, [EMAIL PROTECTED] wrote: Hello axis users, I have a web service client (which I can't modify) which sends requests using xsi:type attributes: EQUIPEMENT xmlns=http://www.almerys.com/schemas/requeteOPTOAMC/2.6.0; xsi:type=LUNETTETYPE [] /EQUIPEMENT After generating sources from the wsdl using jaxb2 databinding, I got the following classes: EQUIPEMENTTYPE.java and LUNETTETYPE.java During Axis2 request treatmeent I receive an InstantiationException (the detail is the the linked file) : Unable to create an instance of com.almerys.schemas.requeteoptoamc._2_6.EQUIPEMENTTYPE If I send a request without xsi:type : LUNETTETYPE xmlns=http://www.almerys.com/schemas/requeteOPTOAMC/2.6.0; [] /LUNETTETYPE It works perfectly. So my question: Does Axis2 support xsi:type attribute? On the website , I saw this article, about adb : http://ws.apache.org/axis2/1_0/adb/adb-howto.html telling that it is not supported. Have you written the service using the ADB. This is an Axis21.0 article. With Axis2 1.2 and onwards it supports the xsi:type. Use -g option when generating the code. thanks, Amila. Does anybody knows what to do? Thanks in advance, Pierre - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] -- Amila Suriarachchi, WSO2 Inc.
Re: [Axis2] WSDL2Java Service side generation does not match web documentation
On Jan 23, 2008 12:14 PM, Serwei Lee [EMAIL PROTECTED] wrote: Hi, There is no *Skeleton.java generated as described in http://ws.apache.org/axis2/1_3/userguide-buildingservices.html#deployrun And the 4 classes contain some deprecated super classes… Erm so where to get the updated WSDL2Java? you can get a nighly build . make sure you use -ss option. Thanks NOTICE - This message and any attached files may contain information that is confidential and/or subject of legal privilege intended only for use by the intended recipient. If you are not the intended recipient or the person responsible for delivering the message to the intended recipient, be advised that you have received this message in error and that any dissemination, copying or use of this message or attachment is strictly forbidden, as is the disclosure of the information therein. If you have received this message in error please notify the sender immediately and delete the message. -- Amila Suriarachchi, WSO2 Inc.
Re: ABD Problem resolving attributeGroup ref=... when referencing schema shares target namespace with the referenced attributeGroup
On Jan 22, 2008 2:54 PM, Jakob Færch [EMAIL PROTECTED] wrote: I'm using ADB databinding to generate client- and serverside code for a fairly complex collection of wsdl's and xsd's. I have run into a problem with constructions like the following (using […] for abbreviations added by me): File TLS_Sektion.xsd: schema xmlns:tls=http://rep.oio.dk/tinglysning.dk/xml.schema/2008.01.01/; targetNamespace= http://rep.oio.dk/tinglysning.dk/xml.schema/2008.01.01/; […] include schemaLocation=TLS_BrugerformularAnvendelseAttributGruppe.xsd/ complexType name=Sektion […] attributeGroup ref=tls:BrugerformularAnvendelseAttributGruppe/ /complexType /schema File TLS_BrugerformularAnvendelseAttributGruppe.xsd: schema xmlns:tls=http://rep.oio.dk/tinglysning.dk/xml.schema/2008.01.01/; targetNamespace= http://rep.oio.dk/tinglysning.dk/xml.schema/2008.01.01/; […] include schemaLocation=TLS_FastVariabelKode.xsd/ attributeGroup name=BrugerformularAnvendelseAttributGruppe attribute name=brugerformularAnvendelse type=tls:FastVariabelKodeType use=optional/ /attributeGroup /schema Similar constructs where the targetnamespace of the refering schema is /not/ the same as the refered attributeGroup seems to work all right. When I generate code for this, a CodeGenerationException is thrown indicating that the tls:BrugerformularAnvendelseAttributGruppe can not be dereferenced. I have debugged the code and found, that in org.apache.axis2.schema.SchemaCompiler#processAttributeGroupReference, the call to getXmlSchemaAttributeGroup doesn't seem to follow the include. I am running Axis2 1.3 under a jdk 1.4.2. could you please try with a nighly build. I changed the schema resolution logic . so that every one use the same logic. thanks, Amila. Does anyone have a suggestion for a workaround or af fix? Could this be a bug? Kindly, Jakob Færch -- Amila Suriarachchi, WSO2 Inc.
web service development using Axis 2
Hi Group, I want to know is if there is anything fundamentally different in steps while developing web services using axis2 I have developed some web services using axis 1.4 migrate to axis 2. The approach I have followed is to start with interface use javatowsdl wsdltojava for generation of client-side server-side code. Also, I want to know the list of MIN jar files required as the axis 2 download comes with lot of jar files. Thanks Ajit DISCLAIMER: This message contains privileged and confidential information and is intended only for an individual named. If you are not the intended recipient, you should not disseminate, distribute, store, print, copy or deliver this message. Please notify the sender immediately by e-mail if you have received this e-mail by mistake and delete this e-mail from your system. E-mail transmission cannot be guaranteed to be secure or error-free as information could be intercepted, corrupted, lost, destroyed, arrive late or incomplete or contain viruses. The sender, therefore, does not accept liability for any errors or omissions in the contents of this message which arise as a result of e-mail transmission. If verification is required, please request a hard-copy version.
Re: web service development using Axis 2
See comments inline: On Fri, Feb 1, 2008 at 11:05 AM, [EMAIL PROTECTED] wrote: Hi Group, I want to know is if there is anything fundamentally different in steps while developing web services using axis2 I have developed some web services using axis 1.4 migrate to axis 2. This http://wso2.org/project/wsas/java/2.2/docs/user_guide.html#Deploy may help you to gradually migrate from Axis1 services to Axis2 services. The approach I have followed is to start with interface use javatowsdl wsdltojava for generation of client-side server-side code. Also, I want to know the list of MIN jar files required as the axis 2 download comes with lot of jar files. See http://wso2.org/blog/afkham-azeez/3081 to get a set of minimal jars Thanks Ajit -- Thanks Afkham Azeez http://azeez78.blogspot.com http://www.wso2.org GPG Fingerprint: 643F C2AF EB78 F886 40C9 B2A2 4AE2 C887 665E 0760