Re: Urgent Help - disable xsd validation in axis 1.4
I am not sure there is much axis framework can help you with this , probably you will have to write custom servlet filter(assuming http) and modify the request to set the mandatory fields in xml (just an idea ) Ramkumar Menon wrote: Resending - Please let me know how to disable schema validation for axis 1.4. ram On 1/14/08, Ramkumar Menon [EMAIL PROTECTED] wrote: Hi Gurus, I am struggling with a specific issue described below in brief. I have a doc/literal Web Service that accepts a Customer element in its request and response. The customer element is defined in an XML Schema imported into the service WSDL.The customer element has a set of child elements,none of which are defined as optional within the schema. [i.e. all mandatory]. I have the client generated using wsdl2java, and am populating the Customer object and then invoking the web service at its mentioned port. For e.g. customer.setName(asdsas); customer.setCity(asdasd). customer.setCountry(US). .. invokeService(customer); The axis layer naturally throws an exception while it tries to serialize the java objects into XML, complaining that customerId, which is a mandatory field is null. In fact, customerId is populated as a part of the response of the invocation, and is never available prior to the invocation. Is there a way to avoid this error altogether - assuming the following constraints. a) Calling program cannot do call a set API on all mandatory fields with a dummy value to work around this error. b) The Schema cannot be changed to ensure that these elements are optional. So, the axis layer just needs to ignore the fact that though customerId is mandatory, it just needs to continue processing even through the caller did not set the customerId on the customer object. -- Shift to the left, shift to the right! Pop up, push down, byte, byte, byte! -Ramkumar Menon A typical Macroprocessor - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Axis timeout
Hello If your are using axis2 generated stubs , you can try the following * stub._getServiceClient().getOptions().setTimeOutInMilliSeconds(1000);* Check out http://ws.apache.org/axis2/1_3/api/org/apache/axis2/client/Options.html#setTimeOutInMilliSeconds(long)http://ws.apache.org/axis2/1_3/api/org/apache/axis2/client/Options.html#setTimeOutInMilliSeconds%28long%29 for axis 1 binding.setTimeout(1000); Thanks Gaurav On Jan 17, 2008 10:41 AM, Noé Amorim [EMAIL PROTECTED] wrote: Hello. I have a webservice that can be running for long periods of time, i found out that my Client App (Axis 1.4) times out after 10 minutes. The webservice keeps running and finishes his job well, but the client can no longer get the response. AxisFault faultCode: { http://schemas.xmlsoap.org/soap/envelope/}Server.userExceptionhttp://schemas.xmlsoap.org/soap/envelope/%7DServer.userException faultSubcode: faultString: java.net.SocketTimeoutException: Read timed out faultActor: faultNode: faultDetail: { http://xml.apache.org/axis/}stackTrace:java.net.SocketTimeoutExceptionhttp://xml.apache.org/axis/%7DstackTrace:java.net.SocketTimeoutException : Read timed out at java.net.SocketInputStream.socketRead0(Native Method) at java.net.SocketInputStream.read(SocketInputStream.java:129) at java.io.BufferedInputStream.fill(BufferedInputStream.java:218) at java.io.BufferedInputStream.read(BufferedInputStream.java:235) .. What can i do keep this connection alive no mather the time needed? Thanks. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: [Axis2] No xsi:type in the response elements
Thanks Amila and Anne I tried the combination of the generated code with axis2 1.3 , it work only if I use the axiom latest snapshot, as such the generated code does not work wirh axis2 1-3. So I am thinking of going with this combination until the new version of axis2 is released. Anne Thanks for pointing out the encoding in the wsdl and schema. I will take a look at the schema Thanks for your help Gaurav On Jan 12, 2008 8:48 PM, Amila Suriarachchi [EMAIL PROTECTED] wrote: On Jan 12, 2008 5:47 PM, Gaurav Lall [EMAIL PROTECTED] wrote: Gaurav Lall wrote: I tried with wsdl2java from the nightly build and am getting the response close to what I had in axis 1, I modified the generated code in the receiver to set xmlOptions.setSaveAggressiveNamespaces() in the receiver class to group the namespaces used to single one. I am not sure as to why the xsi:type is not coming same as what it was coming from the axis1 response. Thanks Amila for pointing this out . As you have done you have to generate the code. if you go through the code you can see that earlier xmlbeans framework provides the getPullParser to Axiom framework and then Axiom creates an Axiom object and serialize it. So I believe this problem is related either axiom build or serialization. But now as you can see Axiom directly calls the Xmlbeans serializer using OMDataSource Element. So it serializes correctly. What you can try is to run the generated code with the nightly build using the Axis2 1.3 release. thanks, Amila. I have question is if we need to use xml bean serilazion in axis2, what is the suggested way of going about it as this feature is not part of axis2 formal release till now ? Please let me know Thanks Anne Thanks for replying Please find attached the wsdl file, the wsdl does include lot of schemas(which are not public )which I can not include, Please let me know what you think If you think I need to provide the schema's too then I will work on creating an example for that Thanks Gaurav Anne Thomas Manes wrote: Can you provide the WSDL? On Jan 11, 2008 1:27 PM, gaurav lall [EMAIL PROTECTED] [EMAIL PROTECTED] wrote: I tried it with nightly build , I still get the same problem . Please let me kniow if I need to run the wsdl2java again (did not do that ) Also to give u some more context for axis 1 (though i was not involved) there was some code added to update the namespace mapping in the SOAP envelopeSOAPEnvelope responseEnvelope = msgContext.getResponseMessage().getSOAPEnvelope(); // Update Name Space Mappings NSStack nss = new NSStack();nss.add( http://ei.com/schemas/entities/v3_1; http://ei.com/schemas/entities/v3_1, ent);nss.add(http://ei.com/schemas/envelope/v3_0; http://ei.com/schemas/envelope/v3_0 , tns); responseEnvelope.setNSMappings(nss.cloneFrame()); As per my understanding this causes the axis 1 to send desired response . Is there something which can be done with Axis 2. Also if you note below in Axis2 response its using default namespaces we would want the response to be same as axis1 , is there something similar in axis 2 specificaly with regards to org.apache.axiom.soap.SOAPEnvelope ? Thanks Gaurav On 1/10/08, Gaurav Lall [EMAIL PROTECTED] [EMAIL PROTECTED] wrote: Hi Amila Thanks will try with nightly build and let you know. Just want to check with you not sure how the nightly works should i be taking the build which is out there with modified date 10-Jan-2008 11:50 (http://people.apache.org/dist/axis2/nightly/) or do i need to wait for the build to happen Thanks Gaurav Amila Suriarachchi wrote: can you please try with a nighly build. Now axis2 directly use the xmlbeans serialization. thanks, Amila. On Jan 9, 2008 1:16 PM, Gaurav Lall [EMAIL PROTECTED] wrote: Hi all , We are doing migration to axis2 from axis1, we are using xmlnbeans as data binding. mechanism.I am using axis 2 version 1.3 We are observing difference in the responses there is no xsi:type coming out for the response Also the namespaces are coming for each element in axis 2 response ? I would idealy like to use the prefixes to reduce the size of the payload Is there a configuration parameter which controls the emission of xsi:type Any direction or pointers would be of great help ? ---AXIS 1 off:productCategory off:controlTypemultiSelect/off:controlType off:categoryType xsi:type=xs:stringalaCarteResidential.alaCarteResidential /off:categoryType off:categoryNameODUSelection.ODUSelection/off:categoryName ent:description xsi:type=xs:stringODU Selection /ent:description Axis2 productCategory xmlns= http://ei.com/schemas/wsdl/orderServices/v3_0
Re: Serialization of XML includes an abstract elemt and not one of the possible substitutions
Hi Mads - Axis2 nightly build has changes in the way which serialization is done in axis2 ,it uses the xml bean serialization instead of axion, you might want to try generating the wsdl2code using the latest nightly build. Thanks Gaurav On Jan 17, 2008 7:09 AM, Mads Falkenberg Brenøe [EMAIL PROTECTED] wrote: Hi There, I'm having a problem, that I need your help on. Using Axis2 1.3 I have generated java classes from a WSDL file. The data binding framework used is XMLBeans (the structure of the wsdl and xsd files is very complex, so we decided on XMLBeans instead of ADB, hoping that would result in more correct generated code). The Web Service server is the Exchange Web Service interface that is a part of Microsoft Exchange 2007, so we have no way of changing the server side. We have downloaded the WSDL from the Exchange server (and added a service tag, as this was not included). The WSDL refers to two xsd files, one that defines Message stuff (error codes as ENUM and different basic stuff) and one that defines the different types and elements. Here is a small abstract of the XML Schema is appended: === START OF SCHEMA === xs:schema id=types elementFormDefault=qualified version=Exchange2007_SP1 xmlns:t= http://schemas.microsoft.com/exchange/services/2006/types; targetNamespace= http://schemas.microsoft.com/exchange/services/2006/types; xmlns:tns= http://schemas.microsoft.com/exchange/services/2006/types; xmlns:xs=http://www.w3.org/2001/XMLSchema; xs:element name=Path abstract=true type=t:BasePathToElementType/ xs:element name=FieldURI type=t:PathToUnindexedFieldType substitutionGroup=t:Path/ xs:element name=IndexedFieldURI type=t:PathToIndexedFieldType substitutionGroup=t:Path / xs:element name=ExtendedFieldURI type=t:PathToExtendedFieldType substitutionGroup=t:Path/ xs:complexType name=TwoOperandExpressionType abstract=true xs:complexContent xs:extension base=t:SearchExpressionType xs:sequence xs:element ref=t:Path/ xs:element name=FieldURIOrConstant type=t:FieldURIOrConstantType/ /xs:sequence /xs:extension /xs:complexContent /xs:complexType xs:complexType name=FieldURIOrConstantType xs:choice xs:element ref=t:Path/ xs:element name=Constant type=t:ConstantValueType / /xs:choice /xs:complexType xs:complexType name=ConstantValueType xs:attribute name=Value type=xs:string use=required / /xs:complexType xs:complexType name=IsEqualToType xs:complexContent xs:extension base=t:TwoOperandExpressionType/ /xs:complexContent /xs:complexType xs:element name=IsEqualTo type=t:IsEqualToType substitutionGroup =t:SearchExpression/ === END OF SCHEMA === As I understand this schema. When I create a IsEqualTo element, I should be able to add either FieldURI, IndexedFieldURI, or ExtendedFieldURI element. However the generated code has a method called setPath(BasePathToElementType), and regardless what I do the request being sent to the server contains a Path element instead of one of the possible substitutes. The following classes are created: PathDocument FieldURIDocument IndexedFieldURIDocument ExtendedFieldURIDocument I would expect the PathDocument to be an abstract class which each of the three substitution types extends; but the PathDocument class is in fact not abstract, and objects can be created. If I call the method xmlText() on each of the three classes: FieldURIDocument, IndexedFieldURIDocument, and ExtendedFieldURIDocument, correct XML is returned (e.g. FieldURI FieldURI=item:ItemClass xmlns= http://schemas.microsoft.com/exchange/services/2006/types/). The ultimate goal is to produce this XML: typ:IsEqualTo xmlns:typ= http://schemas.microsoft.com/exchange/services/2006/types; FieldURI FieldURI=item:ItemClass xmlns= http://schemas.microsoft.com/exchange/services/2006/types; / typ:FieldURIOrConstant typ:Constant Value=IPM.Note / /typ:FieldURIOrConstant /typ:IsEqualTo But what the axis generated classes produce is this (see the path element): typ:IsEqualTo xmlns:typ= http://schemas.microsoft.com/exchange/services/2006/types; typ:Path FieldURI=item:ItemClass xsi:type=typ:PathToUnindexedFieldTypexmlns:xsi= http://www.w3.org/2001/XMLSchema-instance; / typ:FieldURIOrConstant typ:Constant Value=IPM.Note / /typ:FieldURIOrConstant /typ:IsEqualTo Anyone out there who can point/push me in the right direction? Any help is greatly appreciated. Or is this simply related to a bug in the code generation? For now, we have extended the generated code with methods for adding each of the three type, but in the long run, that's not a suitable solution. Regards Mads
Re: [Axis2] No xsi:type in the response elements
Gaurav Lall wrote: I tried with wsdl2java from the nightly build and am getting the response close to what I had in axis 1, I modified the generated code in the receiver to set xmlOptions.setSaveAggressiveNamespaces() in the receiver class to group the namespaces used to single one. I am not sure as to why the xsi:type is not coming same as what it was coming from the axis1 response. Thanks Amila for pointing this out . I have question is if we need to use xml bean serilazion in axis2, what is the suggested way of going about it as this feature is not part of axis2 formal release till now ? Please let me know Thanks Anne Thanks for replying Please find attached the wsdl file, the wsdl does include lot of schemas(which are not public )which I can not include, Please let me know what you think If you think I need to provide the schema's too then I will work on creating an example for that Thanks Gaurav Anne Thomas Manes wrote: Can you provide the WSDL? On Jan 11, 2008 1:27 PM, gaurav lall [EMAIL PROTECTED] wrote: I tried it with nightly build , I still get the same problem . Please let me kniow if I need to run the wsdl2java again (did not do that ) Also to give u some more context for axis 1 (though i was not involved) there was some code added to update the namespace mapping in the SOAP envelopeSOAPEnvelope responseEnvelope = msgContext.getResponseMessage().getSOAPEnvelope(); // Update Name Space Mappings NSStack nss = new NSStack(); nss.add( http://ei.com/schemas/entities/v3_1;, ent); nss.add(http://ei.com/schemas/envelope/v3_0; , tns); responseEnvelope.setNSMappings(nss.cloneFrame()); As per my understanding this causes the axis 1 to send desired response . Is there something which can be done with Axis 2. Also if you note below in Axis2 response its using default namespaces we would want the response to be same as axis1 , is there something similar in axis 2 specificaly with regards to org.apache.axiom.soap.SOAPEnvelope ? Thanks Gaurav On 1/10/08, Gaurav Lall [EMAIL PROTECTED] wrote: Hi Amila Thanks will try with nightly build and let you know. Just want to check with you not sure how the nightly works should i be taking the build which is out there with modified date 10-Jan-2008 11:50 ( http://people.apache.org/dist/axis2/nightly/) or do i need to wait for the build to happen Thanks Gaurav Amila Suriarachchi wrote: can you please try with a nighly build. Now axis2 directly use the xmlbeans serialization. thanks, Amila. On Jan 9, 2008 1:16 PM, Gaurav Lall [EMAIL PROTECTED] wrote: Hi all , We are doing migration to axis2 from axis1, we are using xmlnbeans as data binding. mechanism.I am using axis 2 version 1.3 We are observing difference in the responses there is no xsi:type coming out for the response Also the namespaces are coming for each element in axis 2 response ? I would idealy like to use the prefixes to reduce the size of the payload Is there a configuration parameter which controls the emission of xsi:type Any direction or pointers would be of great help ? ---AXIS 1 off:productCategory off:controlTypemultiSelect/off:controlType off:categoryType xsi:type=xs:stringalaCarteResidential.alaCarteResidential /off:categoryType off:categoryNameODUSelection.ODUSelection/off:categoryName ent:description xsi:type=xs:stringODU Selection /ent:description Axis2 productCategory xmlns= http://ei.com/schemas/wsdl/orderServices/v3_0/offer; controlType xmlns= http://ei.com/schemas/wsdl/orderServices/v3_0/offer;multiSelect/controlType categoryType xmlns= http://ei.com/schemas/wsdl/orderServices/v3_0/offer;alaCarteResidential.alaCarteResidential/categoryType categoryName xmlns= http://ei.com/schemas/wsdl/orderServices/v3_0/offer;ODUSelection.ODUSelectionl/categoryName description xmlns= http://ei.com/schemas/entities/v3_1;A La Carte Programming/description Thanks for the help Gaurav -- Amila Suriarachchi, WSO2 Inc. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: [Axis2] No xsi:type in the response elements
I tried it with nightly build , I still get the same problem . Please let me kniow if I need to run the wsdl2java again (did not do that ) Also to give u some more context for axis 1 (though i was not involved) there was some code added to update the namespace mapping in the SOAP envelopeSOAPEnvelope responseEnvelope = msgContext.getResponseMessage().getSOAPEnvelope(); // Update Name Space Mappings NSStack nss = new NSStack(); nss.add(http://ei.com/schemas/entities/v3_1;http://ei.com/schemas/entities/v3_1, ent); nss.add(http://ei.com/schemas/envelope/v3_0;http://ei.com/schemas/envelope/v3_0, tns); responseEnvelope.setNSMappings(nss.cloneFrame()); As per my understanding this causes the axis 1 to send desired response . Is there something which can be done with Axis 2. Also if you note below in Axis2 response its using default namespaces we would want the response to be same as axis1 , is there something similar in axis 2 specificaly with regards to org.apache.axiom.soap.SOAPEnvelope? Thanks Gaurav On 1/10/08, Gaurav Lall [EMAIL PROTECTED] wrote: Hi Amila Thanks will try with nightly build and let you know. Just want to check with you not sure how the nightly works should i be taking the build which is out there with modified date 10-Jan-2008 11:50 ( http://people.apache.org/dist/axis2/nightly/) or do i need to wait for the build to happen Thanks Gaurav Amila Suriarachchi wrote: can you please try with a nighly build. Now axis2 directly use the xmlbeans serialization. thanks, Amila. On Jan 9, 2008 1:16 PM, Gaurav Lall [EMAIL PROTECTED] wrote: Hi all , We are doing migration to axis2 from axis1, we are using xmlnbeans as data binding. mechanism.I am using axis 2 version 1.3 We are observing difference in the responses 1. there is no xsi:type coming out for the response 2. Also the namespaces are coming for each element in axis 2 response ? I would idealy like to use the prefixes to reduce the size of the payload 3. Is there a configuration parameter which controls the emission of xsi:type Any direction or pointers would be of great help ? ---AXIS 1 off:productCategory off:controlTypemultiSelect/off:controlType off:categoryType xsi:type=*xs:string* alaCarteResidential.alaCarteResidential/off:categoryType off:categoryNameODUSelection.ODUSelection/off:categoryName ent:description xsi:type=*xs:string*ODU Selection/ ent:description Axis2 productCategory xmlns= http://ei.com/schemas/wsdl/orderServices/v3_0/offer;http://ei.com/schemas/wsdl/orderServices/v3_0/offer controlType xmlns= http://ei.com/schemas/wsdl/orderServices/v3_0/offer;http://ei.com/schemas/wsdl/orderServices/v3_0/offermultiSelect/controlType categoryType xmlns= http://ei.com/schemas/wsdl/orderServices/v3_0/offer;http://ei.com/schemas/wsdl/orderServices/v3_0/offer alaCarteResidential.alaCarteResidential/categoryType categoryName xmlns= http://ei.com/schemas/wsdl/orderServices/v3_0/offer;http://ei.com/schemas/wsdl/orderServices/v3_0/offer ODUSelection.ODUSelectionl/categoryName description xmlns=http://ei.com/schemas/entities/v3_1;http://ei.com/schemas/entities/v3_1A La Carte Programming/description Thanks for the help Gaurav -- Amila Suriarachchi, WSO2 Inc.
Re: [Axis2] No xsi:type in the response elements
Hi Anne Thanks for replying Please find attached the wsdl file, the wsdl does include lot of schemas(which are not public )which I can not include, Please let me know what you think If you think I need to provide the schema's too then I will work on creating an example for that Thanks Gaurav Anne Thomas Manes wrote: Can you provide the WSDL? On Jan 11, 2008 1:27 PM, gaurav lall [EMAIL PROTECTED] wrote: I tried it with nightly build , I still get the same problem . Please let me kniow if I need to run the wsdl2java again (did not do that ) Also to give u some more context for axis 1 (though i was not involved) there was some code added to update the namespace mapping in the SOAP envelopeSOAPEnvelope responseEnvelope = msgContext.getResponseMessage().getSOAPEnvelope(); // Update Name Space Mappings NSStack nss = new NSStack(); nss.add( http://ei.com/schemas/entities/v3_1;, ent); nss.add(http://ei.com/schemas/envelope/v3_0; , tns); responseEnvelope.setNSMappings(nss.cloneFrame()); As per my understanding this causes the axis 1 to send desired response . Is there something which can be done with Axis 2. Also if you note below in Axis2 response its using default namespaces we would want the response to be same as axis1 , is there something similar in axis 2 specificaly with regards to org.apache.axiom.soap.SOAPEnvelope ? Thanks Gaurav On 1/10/08, Gaurav Lall [EMAIL PROTECTED] wrote: Hi Amila Thanks will try with nightly build and let you know. Just want to check with you not sure how the nightly works should i be taking the build which is out there with modified date 10-Jan-2008 11:50 ( http://people.apache.org/dist/axis2/nightly/) or do i need to wait for the build to happen Thanks Gaurav Amila Suriarachchi wrote: can you please try with a nighly build. Now axis2 directly use the xmlbeans serialization. thanks, Amila. On Jan 9, 2008 1:16 PM, Gaurav Lall [EMAIL PROTECTED] wrote: Hi all , We are doing migration to axis2 from axis1, we are using xmlnbeans as data binding. mechanism.I am using axis 2 version 1.3 We are observing difference in the responses there is no xsi:type coming out for the response Also the namespaces are coming for each element in axis 2 response ? I would idealy like to use the prefixes to reduce the size of the payload Is there a configuration parameter which controls the emission of xsi:type Any direction or pointers would be of great help ? ---AXIS 1 off:productCategory off:controlTypemultiSelect/off:controlType off:categoryType xsi:type=xs:stringalaCarteResidential.alaCarteResidential /off:categoryType off:categoryNameODUSelection.ODUSelection/off:categoryName ent:description xsi:type=xs:stringODU Selection /ent:description Axis2 productCategory xmlns= http://ei.com/schemas/wsdl/orderServices/v3_0/offer; controlType xmlns= http://ei.com/schemas/wsdl/orderServices/v3_0/offer;multiSelect/controlType categoryType xmlns= http://ei.com/schemas/wsdl/orderServices/v3_0/offer;alaCarteResidential.alaCarteResidential/categoryType categoryName xmlns= http://ei.com/schemas/wsdl/orderServices/v3_0/offer;ODUSelection.ODUSelectionl/categoryName description xmlns= http://ei.com/schemas/entities/v3_1;A La Carte Programming/description Thanks for the help Gaurav -- Amila Suriarachchi, WSO2 Inc. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] ?xml version=1.0 encoding=UTF-8? wsdl:definitions xmlns:tns=http://ei.com/schemas/envelope/v3_0; xmlns:ent=http://ei.com/schemas/entities/v3_1; xmlns:svc=http://ei.com/schemas/wsdl/orderServices/v3_0/generateBOMC3; xmlns:wsdl=http://schemas.xmlsoap.org/wsdl/; xmlns:http=http://schemas.xmlsoap.org/wsdl/http/; xmlns:soap=http://schemas.xmlsoap.org/wsdl/soap/; xmlns:xs=http://www.w3.org/2001/XMLSchema; xmlns:soapenc=http://schemas.xmlsoap.org/soap/encoding/; xmlns:tm=http://microsoft.com/wsdl/mime/textMatching/; xmlns:mime=http://schemas.xmlsoap.org/wsdl/mime/; xmlns=http://schemas.xmlsoap.org/wsdl/; xmlns:off=http://ei.com/schemas/wsdl/orderServices/v3_0/offer; targetNamespace=http://ei.com/schemas/envelope/v3_0; xmlns:cb=http://ei.com/schemas/wsdl/orderServices/v3_0/bom; name=OfferServicesC3 wsdl:types xs:schema targetNamespace=http://ei.com/schemas/envelope/v3_0; elementFormDefault=qualified !-- Include Envelope to get the basic EI Envelope structure. SOAP Structure will look very similar (use the same header, etc) -- xs:include schemaLocation=../../../envelope/v3.0/Envelope.xsd
Re: [Axis2] No xsi:type in the response elements
Hi Amila Thanks will try with nightly build and let you know. Just want to check with you not sure how the nightly works should i be taking the build which is out there with modified date 10-Jan-2008 11:50 (http://people.apache.org/dist/axis2/nightly/) or do i need to wait for the build to happen Thanks Gaurav Amila Suriarachchi wrote: can you please try with a nighly build. Now axis2 directly use the xmlbeans serialization. thanks, Amila. On Jan 9, 2008 1:16 PM, Gaurav Lall [EMAIL PROTECTED] mailto:[EMAIL PROTECTED] wrote: Hi all , We are doing migration to axis2 from axis1, we are using xmlnbeans as data binding. mechanism.I am using axis 2 version 1.3 We are observing difference in the responses 1. there is no xsi:type coming out for the response 2. Also the namespaces are coming for each element in axis 2 response ? I would idealy like to use the prefixes to reduce the size of the payload 3. Is there a configuration parameter which controls the emission of xsi:type Any direction or pointers would be of great help ? ---AXIS 1 off:productCategory off:controlTypemultiSelect/off:controlType off:categoryType xsi:type=*xs:string*alaCarteResidential.alaCarteResidential/off:categoryType off:categoryNameODUSelection.ODUSelection/off:categoryName ent:description xsi:type=*xs:string*ODU Selection/ent:description Axis2 productCategory xmlns=http://ei.com/schemas/wsdl/orderServices/v3_0/offer; http://ei.com/schemas/wsdl/orderServices/v3_0/offer controlType xmlns=http://ei.com/schemas/wsdl/orderServices/v3_0/offer; http://ei.com/schemas/wsdl/orderServices/v3_0/offermultiSelect/controlType categoryType xmlns=http://ei.com/schemas/wsdl/orderServices/v3_0/offer; http://ei.com/schemas/wsdl/orderServices/v3_0/offeralaCarteResidential.alaCarteResidential/categoryType categoryName xmlns=http://ei.com/schemas/wsdl/orderServices/v3_0/offer; http://ei.com/schemas/wsdl/orderServices/v3_0/offerODUSelection.ODUSelectionl/categoryName description xmlns=http://ei.com/schemas/entities/v3_1; http://ei.com/schemas/entities/v3_1A La Carte Programming/description Thanks for the help Gaurav -- Amila Suriarachchi, WSO2 Inc.
Re: [General] Advantages of Axis2 over Axis1
This might be helpful http://wiki.apache.org/ws/StackComparison Subir S wrote: Thanks for the replies Martin and Gaurav. Does any one know if Axis2 has full support for JAX-WS 2.0 and the latest JAXB spec? Infact it was mentioned in one of the performance benchmark article that JAXB is only experimental in Axis2? Why has Axis2 relied on ADB, when there are these other standard data bindings available. Especially i think JAXB should be a widely accepted one!! Any thoughts? Some links which throw some light on this? Subir On 1/7/08, *gaurav lall* [EMAIL PROTECTED] mailto:[EMAIL PROTECTED] wrote: What I like about Axis2 is the Simplicity of API in terms of invoking the service and writing the service code Support for different data binding technologies Thanks Gaurav On Jan 6, 2008 9:15 AM, Martin Gainty [EMAIL PROTECTED] mailto:[EMAIL PROTECTED] wrote: Good Point The main feature of Axis2 is an architectural re-design to truly implement AOP features which would be shared by multiple services are refactored to modules The modules then are engaged to the implemented service another improvement is asynchronous method invocation http://ws.apache.org/axis2/1_3/migration.html http://ws.apache.org/axis2/1_3/migration.html Included are transport independence so converting from HTTP to FTP is achieved declaratively instead of programmatic The Axis1 engine was essentially a SAX parser ..AXIS2 is essentially a Stax parser Anyone else? Martin __ Disclaimer and confidentiality note Everything in this e-mail and any attachments relates to the official business of Sender. This transmission is of a confidential nature and Sender does not endorse distribution to any party other than intended recipient. Sender does not necessarily endorse content contained within this transmission. Date: Sun, 6 Jan 2008 11:39:06 +0200 From: [EMAIL PROTECTED] mailto:[EMAIL PROTECTED] To: axis-user@ws.apache.org mailto:axis-user@ws.apache.org Subject: [General] Advantages of Axis2 over Axis1 Hi All, Any help or advise is appreciated. I want to convince our project to move from Axis1 rpc-enc WS to Axis2 (either rpc-lit / doc-lit). Also i am preparing a document to highlight them. My initial study from various internet resources have told me about these a.) more performance for Axis2. (Benchmark results between Apache Axis1 and Apache Axis2 http://wso2.org/library/91 http://wso2.org/library/91) b.) considerable performance over other WS applications (Benchmark results between Apache Axis2 and Codehaus XFire http://wso2.org/library/588 ) c.) Another stuff we use rpc-encoded services. But this I can change in Axis1 also to doc-lit or rpc-lit to make it inline with WS-I basic profile. I also saw various WS-* specification support that Axis2 has. But is there some thing much more significant in Axis2 which has a cutting edge over Axis1. Some reference to such comparisons over the web would be higly helpful. Thanks in advance. Regards Subir Get the power of Windows + Web with the new Windows Live. Get it now! http://www.windowslive.com/?ocid=TXT_TAGHM_Wave2_powerofwindows_012008
[Axis2] No xsi:type in the response elements
Hi all , We are doing migration to axis2 from axis1, we are using xmlnbeans as data binding. mechanism.I am using axis 2 version 1.3 We are observing difference in the responses 1. there is no xsi:type coming out for the response 2. Also the namespaces are coming for each element in axis 2 response ? I would idealy like to use the prefixes to reduce the size of the payload 3. Is there a configuration parameter which controls the emission of xsi:type Any direction or pointers would be of great help ? ---AXIS 1 off:productCategory off:controlTypemultiSelect/off:controlType off:categoryType xsi:type=*xs:string*alaCarteResidential.alaCarteResidential/off:categoryType off:categoryNameODUSelection.ODUSelection/off:categoryName ent:description xsi:type=*xs:string*ODU Selection/ent:description Axis2 productCategory xmlns=http://ei.com/schemas/wsdl/orderServices/v3_0/offer; controlType xmlns=http://ei.com/schemas/wsdl/orderServices/v3_0/offer;multiSelect/controlType categoryType xmlns=http://ei.com/schemas/wsdl/orderServices/v3_0/offer;alaCarteResidential.alaCarteResidential/categoryType categoryName xmlns=http://ei.com/schemas/wsdl/orderServices/v3_0/offer;ODUSelection.ODUSelectionl/categoryName description xmlns=http://ei.com/schemas/entities/v3_1;A La Carte Programming/description Thanks for the help Gaurav
Re: [General] Advantages of Axis2 over Axis1
What I like about Axis2 is the Simplicity of API in terms of invoking the service and writing the service code Support for different data binding technologies Thanks Gaurav On Jan 6, 2008 9:15 AM, Martin Gainty [EMAIL PROTECTED] wrote: Good Point The main feature of Axis2 is an architectural re-design to truly implement AOP features which would be shared by multiple services are refactored to modules The modules then are engaged to the implemented service another improvement is asynchronous method invocation http://ws.apache.org/axis2/1_3/migration.html Included are transport independence so converting from HTTP to FTP is achieved declaratively instead of programmatic The Axis1 engine was essentially a SAX parser ..AXIS2 is essentially a Stax parser Anyone else? Martin __ Disclaimer and confidentiality note Everything in this e-mail and any attachments relates to the official business of Sender. This transmission is of a confidential nature and Sender does not endorse distribution to any party other than intended recipient. Sender does not necessarily endorse content contained within this transmission. -- Date: Sun, 6 Jan 2008 11:39:06 +0200 From: [EMAIL PROTECTED] To: axis-user@ws.apache.org Subject: [General] Advantages of Axis2 over Axis1 Hi All, Any help or advise is appreciated. I want to convince our project to move from Axis1 rpc-enc WS to Axis2 (either rpc-lit / doc-lit). Also i am preparing a document to highlight them. My initial study from various internet resources have told me about these a.) more performance for Axis2. (Benchmark results between Apache Axis1 and Apache Axis2 http://wso2.org/library/91 ) b.) considerable performance over other WS applications (Benchmark results between Apache Axis2 and Codehaus XFire http://wso2.org/library/588 ) c.) Another stuff we use rpc-encoded services. But this I can change in Axis1 also to doc-lit or rpc-lit to make it inline with WS-I basic profile. I also saw various WS-* specification support that Axis2 has. But is there some thing much more significant in Axis2 which has a cutting edge over Axis1. Some reference to such comparisons over the web would be higly helpful. Thanks in advance. Regards Subir -- Get the power of Windows + Web with the new Windows Live. Get it now!http://www.windowslive.com?ocid=TXT_TAGHM_Wave2_powerofwindows_012008
Re: Question regarding deploying Axis Services
Pls check if you have axiom-impl-1.2.5.jar in the lib. On Jan 4, 2008 1:40 PM, [EMAIL PROTECTED] wrote: Hi all, Is there any consequence of not bundling Service classes in .aar instead putting them in WEB-INF/lib where all other axis jars are located. I am getting ClassDefNotFound : org/apache/axiom/soap/impl/llom/soap11/SOAP11HeaderBlockImpl error* only when I am calling another webservice (on different host) from within our axis service.* *Please share your thoughts.* *Thanks,* *Tushar* Visit our website at http://www.ubs.com This message contains confidential information and is intended only for the individual named. If you are not the named addressee you should not disseminate, distribute or copy this e-mail. 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-mails are not encrypted and 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. This message is provided for informational purposes and should not be construed as a solicitation or offer to buy or sell any securities or related financial instruments. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: [Axis2] trimming down the xml in axis2 1.3
Hello I have tried using this option with xmlbeans as databinding and its not working . Does this option work with xmlbeans ? Thanks Gaurav On Dec 13, 2007 11:37 AM, samir shaikh [EMAIL PROTECTED] wrote: Raghu, I use the default databinding i.e. ADB. I typically build a service and expose it and let Axis2 generate my wsdl for me. This is actually working back. I'll try it and let you know... Thanks a lot! Samir --- Raghu Upadhyayula [EMAIL PROTECTED] wrote: Samir, Yes, it worked for me. I used the WSDL2Java with -sp option to generate the server code. What data binding are you using? If you are using ADB, then you have to replace all the request response classes. Thanks Raghu -Original Message- From: samir shaikh [mailto:[EMAIL PROTECTED] Sent: Thursday, December 13, 2007 10:50 AM To: axis-user@ws.apache.org Subject: RE: [Axis2] trimming down the xml in axis2 1.3 Raghu, I see in the archives that you ran into the same problem as this. Did wsdl2java with -sp work for you? Samir --- Raghu Upadhyayula [EMAIL PROTECTED] wrote: Samir, WSDL2Java can also be used to generate serverside code. Check WSDL2Java options, to create serverside code you need to specify the options -ss -sd -ssi (check the description for these options in WSDL2Java) You can use -sp option with WSDL2Java when you generate the serverside code in which case the namespace is suppressed on the serverside. Thanks Raghu -Original Message- From: samir shaikh [mailto: [EMAIL PROTECTED] Sent: Wednesday, December 12, 2007 5:31 PM To: axis-user@ws.apache.org Subject: Re: [Axis2] trimming down the xml in axis2 1.3 Martin, You mean using QName in the client code? I'm trying to tune my server to not send back excessive xml. I cannot change the xml I send back to my clients. the extra ns: is causing me trouble after upgrading from axis2 1.1.1 to axis2 1.3 e.g. ns:fieldName0/ns:fieldName. My clients expect fieldName0/fieldName. Samir --- Martin Gainty [EMAIL PROTECTED] wrote: you can always use null..e.g. QName paramQName = new QName(, paramName); M-- - Original Message - From: samir shaikh [EMAIL PROTECTED] To: axis-user@ws.apache.org Sent: Wednesday, December 12, 2007 7:20 PM Subject: RE: [Axis2] trimming down the xml in axis2 1.3 Raghu, Thanks for your help. I tried that out but I want to suppress it on the server. I think WSDL2Java is for generating a client, right? I'm hoping to find some configuration in services.xml or axis2.xml... any idea? Samir --- Raghu Upadhyayula [EMAIL PROTECTED] wrote: Samir, Try WSDL2Java with -sp option to suppress the namespace prefix. Thanks Raghu -Original Message- From: samir shaikh [mailto:[EMAIL PROTECTED] Sent: Wednesday, December 12, 2007 2:20 PM To: axis-user@ws.apache.org Subject: [Axis2] trimming down the xml in axis2 1.3 Hi, I'm trying to trim down the xml exchanged when using a axis2 client and server. Is there a way I can configure the serializer to not prefix namespace with every element e.g. ns:errorCode0/ns:errorCode can just be errorCode0errorCode. Also not send back the additional headers and field types with each call. I was able to do that in Axis1.3 with the wsdd file. Can someone point me to where that is done in Axis2. Thanks a lot. Samir Be a better friend, newshound, and know-it-all with Yahoo! Mobile. Try it now. http://mobile.yahoo.com/;_ylt=Ahu06i62sR8HDtDypao8Wcj9tAcJ - 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] === message truncated === Never miss a thing. Make Yahoo your home page. http://www.yahoo.com/r/hs - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: [Axis2] Server response message headers
I am assuming that you are writing the code as described below in the skeleton classes. This will not work as the generated SkeletonInterface/MessageReceiever responsibilty is to invoke the business logic (skelton class) and construct the soap envelope [ As per my understanding the assumption here is that skelton classes will never change headers, as the subsequent generated code calls the method toEnvelope which has the following org.apache.axiom.soap.SOAPEnvelope envelope = factory.getDefaultEnvelope(); if (param != null) { envelope.getBody().addChild(toOM(param, optimizeContent)); } } ] So the generated code does not give flexibility to provider of the service to change header at this point in the flow. This leads to the question as to how can the service provider provide a custom header at this point using the generated code. There are few things which you can try is 1.change the generated class (recieverinout ) class so you construct the header and envelope. 2. The second option which is more logical to me seems to be adding an handler class which add the header after the business logic has been done . Refer http://ws.apache.org/axis2/1_3/modules.html. http://ws.apache.org/axis2/1_3/modules.html Actually I am in the same boat trying to figure out how we can send the custom header in the response. On Dec 10, 2007 2:30 PM, Alastair Fettes [EMAIL PROTECTED] wrote: We are using WSDL-2-Code generated SkeletonInterface/MessageReceiverInOut classes in our Apache Axis2 v1.3 doc/lit SOAP 1.2 based web service. We are attempting to set headers for the response message that will be used for traceability within our SOA system. From what I can see there is nowhere for us to set headers that will actually be retained in the response SOAP message. For example, let me show the simple case of copying input headers to the output message. snippet MessageContext inMessageContext = MessageContext.getCurrentMessageContext(); OperationContext operationContext = inMessageContext.getOperationContext(); MessageContext outMessageContext = operationContext.getMessageContext( WSDLConstants.MESSAGE_LABEL_OUT_VALUE); org.apache.axis2.description.AxisMessage inMessage = inMessageContext.getAxisMessage(); org.apache.axis2.description.AxisMessage outMessage = outMessageContext.getAxisMessage(); for (Iterator it = inMessage.get; it.hasNext();) { SOAPHeaderMessage header = (SOAPHeaderMessage )it.next(); outMessage.addSoapHeader(header); } /snippet This code does not seem to work. Also, if I simply add new SOAPHeaderMessage objects that I create manually I can set their qname, etc but how do I set the _contents_ of this header? Example header: soapenv:Header Server xmlns=foo.orgbar.server.com/Server /soapenv:Header Thanks in advance. Alastair Fettes MacDonald, Dettwiler and Associates afettes at mdacorporation dot com This e-mail and any attachments are intended solely for the use of the intended recipient(s) and may contain legally privileged, proprietary and/or confidential information. Any use, disclosure, dissemination, distribution or copying of this e-mail and any attachments for any purposes that have not been specifically authorized by the sender is strictly prohibited. If you are not the intended recipient, please immediately notify the sender by reply e-mail and permanently delete all copies and attachments. The entire content of this e-mail is for information purposes only and should not be relied upon by the recipient in any way unless otherwise confirmed in writing by way of letter or facsimile.
Re: [Axis2] Server response message headers
This links confirms that for the synchronous header you need to write your own message reciever or add your own handler http://marc.info/?l=axis-userm=118701968113313w=2 Thanks Gaurav On Dec 27, 2007 1:55 AM, gaurav lall [EMAIL PROTECTED] wrote: I am assuming that you are writing the code as described below in the skeleton classes. This will not work as the generated SkeletonInterface/MessageReceiever responsibilty is to invoke the business logic (skelton class) and construct the soap envelope [ As per my understanding the assumption here is that skelton classes will never change headers, as the subsequent generated code calls the method toEnvelope which has the following org.apache.axiom.soap.SOAPEnvelope envelope = factory.getDefaultEnvelope (); if (param != null) { envelope.getBody().addChild(toOM(param, optimizeContent)); } } ] So the generated code does not give flexibility to provider of the service to change header at this point in the flow. This leads to the question as to how can the service provider provide a custom header at this point using the generated code. There are few things which you can try is 1.change the generated class (recieverinout ) class so you construct the header and envelope. 2. The second option which is more logical to me seems to be adding an handler class which add the header after the business logic has been done . Refer http://ws.apache.org/axis2/1_3/modules.html. http://ws.apache.org/axis2/1_3/modules.html Actually I am in the same boat trying to figure out how we can send the custom header in the response. On Dec 10, 2007 2:30 PM, Alastair Fettes [EMAIL PROTECTED] wrote: We are using WSDL-2-Code generated SkeletonInterface/MessageReceiverInOut classes in our Apache Axis2 v1.3doc/lit SOAP 1.2 based web service. We are attempting to set headers for the response message that will be used for traceability within our SOA system. From what I can see there is nowhere for us to set headers that will actually be retained in the response SOAP message. For example, let me show the simple case of copying input headers to the output message. snippet MessageContext inMessageContext = MessageContext.getCurrentMessageContext(); OperationContext operationContext = inMessageContext.getOperationContext(); MessageContext outMessageContext = operationContext.getMessageContext( WSDLConstants.MESSAGE_LABEL_OUT_VALUE); org.apache.axis2.description.AxisMessage inMessage = inMessageContext.getAxisMessage(); org.apache.axis2.description.AxisMessage outMessage = outMessageContext.getAxisMessage(); for (Iterator it = inMessage.get; it.hasNext();) { SOAPHeaderMessage header = (SOAPHeaderMessage )it.next(); outMessage.addSoapHeader(header); } /snippet This code does not seem to work. Also, if I simply add new SOAPHeaderMessage objects that I create manually I can set their qname, etc but how do I set the _contents_ of this header? Example header: soapenv:Header Server xmlns=foo.orgbar.server.com/Server /soapenv:Header Thanks in advance. Alastair Fettes MacDonald, Dettwiler and Associates afettes at mdacorporation dot com This e-mail and any attachments are intended solely for the use of the intended recipient(s) and may contain legally privileged, proprietary and/or confidential information. Any use, disclosure, dissemination, distribution or copying of this e-mail and any attachments for any purposes that have not been specifically authorized by the sender is strictly prohibited. If you are not the intended recipient, please immediately notify the sender by reply e-mail and permanently delete all copies and attachments. The entire content of this e-mail is for information purposes only and should not be relied upon by the recipient in any way unless otherwise confirmed in writing by way of letter or facsimile.