problems using getAnyObject() -- please help
Hi all, I have been struggling with this for days. I've finally reached the point where I can't get any further and need to reach out for help. I need to be able to work directly with the XML contents of the SOAP request rather than going through one of the objects created in the server side stubs. The only way I've discovered to be able to do this is by using IWrapperSoapDeSerializer::getAnyObject(). I thought this was the appropriate method because of the comments in the header: Will deserialize the next available SOAP element and all child elements. I will walk through some examples of what I've tried in an attempt to properly explain the issues I am running into. Note that these are just code snippets, I am leaving some of the obvious code out, and you can pretty much assume that I've set things up properly. Here is what I did with my first attempt at printing out the XML: AnyType *pV0 = pIHSDZ-getAnyObject(); for (int i = 0; i pV0-_size; i++) { cout pV0-_array[i]; } This only printed out part of the XML. As such, I realized that I needed to make multiple calls to getAnyObject() in order to get the next elements, so I tried this: AnyType *pV0 = pIHSDZ-getAnyObject(); while (pV0 != NULL) { for (int i = 0; i pV0-_size; i++) { cout pV0-_array[i]; } pV0 = pIHSDZ-getAnyObject(); } This resulted in a segmentation fault, which after reading multiple posts online, I discovered that it was because getAnyObject() will never return NULL, so we end up making calls to it even after no further objects remain, resulting in the segmentation fault. This is where my confusion comes in. If I ended up getting all the XML and then made a call to getAnyObect() and it then seg faulted, I would completely understand. However, it seg faults after I only get part of the XML (leading me to believe that further calls to getAnyObect() actually SHOULD return something). Let me illustrate this with an example. Say the XML contents of the SOAP message is the following: ?xml version=1.0 encoding=UTF-8? mantas:MantasAlertData xmlns:mantas=http://namespaces.mantas.com/MAD; xmlns:action=http://namespaces.mantas.com/MAD/Action; xmlns:xsi=http://www.w3.org/2001/XMLSchema-instance; xsi:schemaLocation=http://namespaces.mantas.com/MAD MantasAlertData.xsd AlertData AlertContext FocusTypeCodeEN/FocusTypeCode /AlertContext Matches MatchInformation MatchedDataRecords MatchedRecord RecordTypeEXTERNAL_ENTITY/RecordType RelationshipMatched/Relationship MatchedData Attribute name=EXTRL_NTITY_TYPE_CD type=stringNM/Attribute /MatchedData /MatchedRecord /MatchedDataRecords /MatchInformation /Matches /AlertData /mantas:MantasAlertData If you run my above code, this is what will get output to the consoled before the segmentation fault: ?xml version=1.0 encoding=UTF-8? mantas:MantasAlertData xmlns:mantas=http://namespaces.mantas.com/MAD; xmlns:action=http://namespaces.mantas.com/MAD/Action; xmlns:xsi=http://www.w3.org/2001/XMLSchema-instance; xsi:schemaLocation=http://namespaces.mantas.com/MAD MantasAlertData.xsd AlertData AlertContext FocusTypeCodeEN/FocusTypeCode /AlertContext Matches MatchInformation MatchedDataRecords MatchedRecord RecordTypeEXTERNAL_ENTITY/RecordType/ RelationshipMatched/Relationship MatchedData Note that there a few things wrong with this. First of all, why doesn't the rest get printed out? If there is more data, why does it seg fault? I even put in a counter to check how many times I go through the loop before it seg faults, and limited the loop to that number...that solves the seg fault issue, but I still don't get all the data. Secondly, the data is somewhat corrupted: I don't know where the extra slashes have come from (e.g. /RecordType/ instead of /RecordType). The same happens with the reverse situation as well. That is, if I try to feed some XML through an AnyType object back into the response, it also gets corrupted. For example, the following code: pIWSSZ-createSoapMethod(PrioritizeAlertResponse,http://namespaces.te ch.com); try { AnyType *pAny = new AnyType(); pAny-_size = 1; pAny-_array = new char*[1]; pAny-_array[0] = AlertData/AlertData; return pIWSSZ-addOutputAnyObject(pAny); } Produces the following response: ?xml version=1.0 encoding=UTF-8?SOAP-ENV:Envelope xmlns:SOAP-ENV=http://schemas.xmlsoap.org/soap/envelope/; xmlns:xsd=http://www.w3.org/2001/XMLSchema; xmlns:xsi=http://www.w3.org/2001/XMLSchema-instance; SOAP-ENV:Body ns1:PrioritizeAlertResponse xmlns:ns1=http://namespaces.mantas.com; AlertData//ns1:PrioritizeAlertResponse /SOAP-ENV:Body
Re: problems using getAnyObject() -- please help
Vineet, First I want to make sure you are using the latest code from SVN and not 1.6b. I have a lot on my plate but I can take a look sometime next week. Assuming you are, and to expedite the debugging I will need to do, please attach a complete simple client examplesince you already showed the a SOAP response I do not need that. Nadir K. Amra Aggarwal, Vineet [EMAIL PROTECTED] wrote on 10/26/2007 09:29:49 AM: Hi all, I have been struggling with this for days. I?ve finally reached the point where I can?t get any further and need to reach out for help. I need to be able to work directly with the XML contents of the SOAP request rather than going through one of the objects created in the server side stubs. The only way I?ve discovered to be able to do this is by using IWrapperSoapDeSerializer::getAnyObject(). I thought this was the appropriate method because of the comments in the header: ?Will deserialize the next available SOAP element and all child elements.? I will walk through some examples of what I?ve tried in an attempt to properly explain the issues I am running into. Note that these are just code snippets, I am leaving some of the obvious code out, and you can pretty much assume that I?ve set things up properly. Here is what I did with my first attempt at printing out the XML: AnyType *pV0 = pIHSDZ-getAnyObject(); for (int i = 0; i pV0-_size; i++) { cout pV0-_array[i]; } This only printed out part of the XML. As such, I realized that I needed to make multiple calls to getAnyObject() in order to get the next elements, so I tried this: AnyType *pV0 = pIHSDZ-getAnyObject(); while (pV0 != NULL) { for (int i = 0; i pV0-_size; i++) { cout pV0-_array[i]; } pV0 = pIHSDZ-getAnyObject(); } This resulted in a segmentation fault, which after reading multiple posts online, I discovered that it was because getAnyObject() will never return NULL, so we end up making calls to it even after no further objects remain, resulting in the segmentation fault. This is where my confusion comes in. If I ended up getting all the XML and then made a call to getAnyObect() and it then seg faulted, I would completely understand. However, it seg faults after I only get part of the XML (leading me to believe that further calls to getAnyObect() actually SHOULD return something). Let me illustrate this with an example. Say the XML contents of the SOAP message is the following: ?xml version=1.0 encoding=UTF-8? mantas:MantasAlertData xmlns:mantas=http://namespaces.mantas.com/MAD; xmlns:action=http://namespaces.mantas.com/MAD/Action; xmlns:xsi=http://www.w3.org/2001/XMLSchema-instance; xsi:schemaLocation=http://namespaces.mantas.com/MAD MantasAlertData.xsd AlertData AlertContext FocusTypeCodeEN/FocusTypeCode /AlertContext Matches MatchInformation MatchedDataRecords MatchedRecord RecordTypeEXTERNAL_ENTITY/RecordType RelationshipMatched/Relationship MatchedData Attribute name=EXTRL_NTITY_TYPE_CD type=stringNM/Attribute /MatchedData /MatchedRecord /MatchedDataRecords /MatchInformation /Matches /AlertData /mantas:MantasAlertData If you run my above code, this is what will get output to the consoled before the segmentation fault: ?xml version=1.0 encoding=UTF-8? mantas:MantasAlertData xmlns:mantas=http://namespaces.mantas.com/MAD; xmlns:action=http://namespaces.mantas.com/MAD/Action; xmlns:xsi=http://www.w3.org/2001/XMLSchema-instance; xsi:schemaLocation=http://namespaces.mantas.com/MAD MantasAlertData.xsd AlertData AlertContext FocusTypeCodeEN/FocusTypeCode /AlertContext Matches MatchInformation MatchedDataRecords MatchedRecord RecordTypeEXTERNAL_ENTITY/RecordType/ RelationshipMatched/Relationship MatchedData Note that there a few things wrong with this. First of all, why doesn?t the rest get printed out? If there is more data, why does it seg fault? I even put in a counter to check how many times I go through the loop before it seg faults, and limited the loop to that number?that solves the seg fault issue, but I still don?t get all the data. Secondly, the data is somewhat corrupted: I don?t know where the extra slashes have come from (e.g. /RecordType/ instead of /RecordType). The same happens with the reverse situation as well. That is, if I try to feed some XML through an AnyType object back into the response, it also gets corrupted. For example, the following code: pIWSSZ-createSoapMethod(PrioritizeAlertResponse,http://namespaces.tech.com ); try { AnyType *pAny = new AnyType(); pAny-_size = 1; pAny-_array = new char*[1]; pAny-_array[0] = AlertData/AlertData;
RE: problems using getAnyObject() -- please help
Nadir, Thanks for your message. I actually am using 1.6b and not the latest code from SVN. Unfortunately, I can't seem to compile a version myself that works, so I've been using the pre-compiled binary for Linux (when I do a build myself, it builds fine, but seg faults when I try to run anything, including just the simple_axis_server). My application is quite large, so I'm not sure I'll be able to build a small program to reproduce the problem, but I will certainly try. Perhaps I can modify the Calculator example to break (it currently works fine for me). What exactly do you need, just the client code, or all the code involved? Thanks again, Vineet -Original Message- From: Nadir Amra [mailto:[EMAIL PROTECTED] Sent: Friday, October 26, 2007 10:48 AM To: Apache AXIS C User List Subject: Re: problems using getAnyObject() -- please help Vineet, First I want to make sure you are using the latest code from SVN and not 1.6b. I have a lot on my plate but I can take a look sometime next week. Assuming you are, and to expedite the debugging I will need to do, please attach a complete simple client examplesince you already showed the a SOAP response I do not need that. Nadir K. Amra Aggarwal, Vineet [EMAIL PROTECTED] wrote on 10/26/2007 09:29:49 AM: Hi all, I have been struggling with this for days. I?ve finally reached the point where I can?t get any further and need to reach out for help. I need to be able to work directly with the XML contents of the SOAP request rather than going through one of the objects created in the server side stubs. The only way I?ve discovered to be able to do this is by using IWrapperSoapDeSerializer::getAnyObject(). I thought this was the appropriate method because of the comments in the header: ?Will deserialize the next available SOAP element and all child elements.? I will walk through some examples of what I?ve tried in an attempt to properly explain the issues I am running into. Note that these are just code snippets, I am leaving some of the obvious code out, and you can pretty much assume that I?ve set things up properly. Here is what I did with my first attempt at printing out the XML: AnyType *pV0 = pIHSDZ-getAnyObject(); for (int i = 0; i pV0-_size; i++) { cout pV0-_array[i]; } This only printed out part of the XML. As such, I realized that I needed to make multiple calls to getAnyObject() in order to get the next elements, so I tried this: AnyType *pV0 = pIHSDZ-getAnyObject(); while (pV0 != NULL) { for (int i = 0; i pV0-_size; i++) { cout pV0-_array[i]; } pV0 = pIHSDZ-getAnyObject(); } This resulted in a segmentation fault, which after reading multiple posts online, I discovered that it was because getAnyObject() will never return NULL, so we end up making calls to it even after no further objects remain, resulting in the segmentation fault. This is where my confusion comes in. If I ended up getting all the XML and then made a call to getAnyObect() and it then seg faulted, I would completely understand. However, it seg faults after I only get part of the XML (leading me to believe that further calls to getAnyObect() actually SHOULD return something). Let me illustrate this with an example. Say the XML contents of the SOAP message is the following: ?xml version=1.0 encoding=UTF-8? mantas:MantasAlertData xmlns:mantas=http://namespaces.mantas.com/MAD; xmlns:action=http://namespaces.mantas.com/MAD/Action; xmlns:xsi=http://www.w3.org/2001/XMLSchema-instance; xsi:schemaLocation=http://namespaces.mantas.com/MAD MantasAlertData.xsd AlertData AlertContext FocusTypeCodeEN/FocusTypeCode /AlertContext Matches MatchInformation MatchedDataRecords MatchedRecord RecordTypeEXTERNAL_ENTITY/RecordType RelationshipMatched/Relationship MatchedData Attribute name=EXTRL_NTITY_TYPE_CD type=stringNM/Attribute /MatchedData /MatchedRecord /MatchedDataRecords /MatchInformation /Matches /AlertData /mantas:MantasAlertData If you run my above code, this is what will get output to the consoled before the segmentation fault: ?xml version=1.0 encoding=UTF-8? mantas:MantasAlertData xmlns:mantas=http://namespaces.mantas.com/MAD; xmlns:action=http://namespaces.mantas.com/MAD/Action; xmlns:xsi=http://www.w3.org/2001/XMLSchema-instance; xsi:schemaLocation=http://namespaces.mantas.com/MAD MantasAlertData.xsd AlertData AlertContext FocusTypeCodeEN/FocusTypeCode /AlertContext Matches MatchInformation MatchedDataRecords MatchedRecord RecordTypeEXTERNAL_ENTITY/RecordType/ RelationshipMatched/Relationship MatchedData Note that there a few things wrong with this. First of all,
Exception after upgrading Axis 1.1 to 1.4
Hi All, I am getting the following error in my application. org.xml.sax.SAXParseException: XML document structures must start and end within the same entity.] AxisFault faultCode: {http://schemas.xmlsoap.org/soap/envelope/}Server.userException faultSubcode: faultString: org.xml.sax.SAXParseException: XML document structures must start and end within the same entity. faultActor: faultNode: faultDetail: {http://xml.apache.org/axis/}stackTrace:org.xml.sax.SAXParseException: XML document structures must start and end within the same entity. The application was working fine with J2sdk 1.4.2_11 and Axis 1.1 , I am getting the above exception after upgrading the JDk to 1.5 and axis to 1.4 versions. Could any one help me in understanding and solving this issue? Thanks in Advance, Kishore Reddy CAUTION - Disclaimer * This e-mail contains PRIVILEGED AND CONFIDENTIAL INFORMATION intended solely for the use of the addressee(s). If you are not the intended recipient, please notify the sender by e-mail and delete the original message. Further, you are not to copy, disclose, or distribute this e-mail or its contents to any other person and any such actions are unlawful. This e-mail may contain viruses. Infosys has taken every reasonable precaution to minimize this risk, but is not liable for any damage you may sustain as a result of any virus in this e-mail. You should carry out your own virus checks before opening the e-mail or attachment. Infosys reserves the right to monitor and review the content of all messages sent to or from this e-mail address. Messages sent to or from this e-mail address may be stored on the Infosys e-mail system. ***INFOSYS End of Disclaimer INFOSYS***
Re: Possible classloader issue - help needed
Well, here the exception is a bit more informative. Looking at the source, the exception is coming from this line(s) in ConfigCatalogRule.begin(): Class clazz = digester.getClassLoader().loadClass(catalogClass); //ClassNotFoundException catalog = (Catalog) clazz.newInstance(); And from the stack trace it is clear that it is Tomcat's webapp classloader that is failing to see the class. Not sure what to make of the [EMAIL PROTECTED] since it is probably the case that the classloader is a subclass of URLClassLoader (super.toString()..?). Try using the Class.getClassLoader.getClass().getName() instead. 1) Create a simple utility method that recurses up the classloading tree using ClassLoader.getParent()--stop when you get a null from this method. Print out the class name of each ClassLoader. 2) Also print out the class name of each ClassLoader for the classes of interest: Digester, CatalogBase (the impl version), ConfigCatalogRule, AgentPlatformServiceMessageReceiverInOut. Don't create a new instance; use a static reference to the class like 'ConfigCatalogRule.class.getClassLoader()'. To be thorough, you should check to see if this is null before doing getClass().getName(). Remember, visibility of a class only goes one direction in a classloading tree: up. It may be the case that the solution might be moving the jars in question to a URL that is loaded by a classloader further up the tree, e.g. WEB-INF/lib. Regards, Brennan - Original Message - From: João Luís Pinto [EMAIL PROTECTED] To: axis-user@ws.apache.org Sent: Thursday, October 25, 2007 7:09 PM Subject: Re: Possible classloader issue - help needed Hello, Here are the results: Code in the MessageReceiver: code log1.debug(Loading + url); //$NON-NLS-1$ log1.debug(AgentPlatformServiceMessageReceiverInOut: //$NON-NLS-1$ + getClass().getClassLoader().toString()); log1.debug(Digester: //$NON-NLS-1$ + new Digester().getClass().getClassLoader().toString()); log1.debug(CatalogBase: //$NON-NLS-1$ + new CatalogBase().getClass() .getClassLoader() .toString()); log1.debug(MessageReceiver CL == Digester CL? //$NON-NLS-1$ + (getClass().getClassLoader() == new Digester().getClass() .getClassLoader() ? true : false)); //$NON-NLS-1$//$NON-NLS-2$ configParser.parse(url); /code Output: [DEBUG] Loading file:/Users/jpinto/Documents/workspace/.metadata/.plugins/org.eclipse.wst.server.core/tmp0/wtpwebapps/Axis2/WEB-INF/services/AgentPlatformService/chain-config.xml [DEBUG] AgentPlatformServiceMessageReceiverInOut: [EMAIL PROTECTED] [DEBUG] Digester: [EMAIL PROTECTED] [DEBUG] CatalogBase: [EMAIL PROTECTED] [DEBUG] MessageReceiver CL == Digester CL? true As for the trace of the VM, aparently both classes from commons-chain and commons-digester are loaded before the exception: (...) [Loaded org.apache.commons.digester.RuleSetBase from file:/Users/jpinto/Documents/workspace/.metadata/.plugins/org.eclipse.wst.server.core/tmp0/wtpwebapps/Axis2/WEB-INF/services/AgentPlatformService/lib/commons-digester-1.8.jar] [Loaded org.apache.commons.chain.config.ConfigRuleSet from file:/Users/jpinto/Documents/workspace/.metadata/.plugins/org.eclipse.wst.server.core/tmp0/wtpwebapps/Axis2/WEB-INF/services/AgentPlatformService/lib/commons-chain-1.1.jar] [Loaded org.apache.commons.chain.config.ConfigCatalogRule from file:/Users/jpinto/Documents/workspace/.metadata/.plugins/org.eclipse.wst.server.core/tmp0/wtpwebapps/Axis2/WEB-INF/services/AgentPlatformService/lib/commons-chain-1.1.jar] [Loaded org.apache.commons.chain.config.ConfigRegisterRule from file:/Users/jpinto/Documents/workspace/.metadata/.plugins/org.eclipse.wst.server.core/tmp0/wtpwebapps/Axis2/WEB-INF/services/AgentPlatformService/lib/commons-chain-1.1.jar] [Loaded org.apache.commons.chain.config.ConfigDefineRule from file:/Users/jpinto/Documents/workspace/.metadata/.plugins/org.eclipse.wst.server.core/tmp0/wtpwebapps/Axis2/WEB-INF/services/AgentPlatformService/lib/commons-chain-1.1.jar] [Loaded org.apache.commons.digester.RulesBase from file:/Users/jpinto/Documents/workspace/.metadata/.plugins/org.eclipse.wst.server.core/tmp0/wtpwebapps/Axis2/WEB-INF/services/AgentPlatformService/lib/commons-digester-1.8.jar] [Loaded org.apache.commons.chain.CatalogFactory from file:/Users/jpinto/Documents/workspace/.metadata/.plugins/org.eclipse.wst.server.core/tmp0/wtpwebapps/Axis2/WEB-INF/services/AgentPlatformService/lib/commons-chain-1.1.jar] [Loaded org.apache.commons.chain.impl.CatalogFactoryBase from file:/Users/jpinto/Documents/workspace/.metadata/.plugins/org.eclipse.wst.server.core/tmp0/wtpwebapps/Axis2/WEB-INF/services/AgentPlatformService/lib/commons-chain-1.1.jar] [Loaded org.apache.log4j.spi.ThrowableInformation from file:/Users/jpinto/Documents/workspace/.metadata/.plugins/org.eclipse.wst.server.core/tmp0/wtpwebapps/Axis2/WEB-INF/lib/log4j-1.2.14.jar] [Loaded org.apache.log4j.spi.VectorWriter from
Re: test asynchronous functions
Huitang Li wrote: Hi, I chose to use asynchronous calls in Axis2 client to transmit soap messages. The test class is generated by wsdl2java. When I tested it, the test did not fail even if the handler is set to fail() in the receiveErrorXXX() which in turn indeed got called. This problem does not happen in synchronous calls. Any solution to test asynchronous calls? Thanks. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] If you want to test Axis2 asynchronus invocation, you can follow the simple scenario given below. It actually verifies the asynchronus invocation (Verifies that the client does not block while invoking a service). - create a service implementation class (a pojo with one method) - Add Thread.sleep(some milli second value); in the service method - Generate a sync client - In the client add system.out(something) after service call; - call the service - You will observe that the client responds only after the service is invoked. Until that, client hangs and stops processing. - Now generate an asynchrouns client and follow the above steps. You will notice that the client responds (you may see the system.out value before getting the service response) before getting the service response. (Client does not block and continues its operation) Hope this helps you. Bye Charitha -- Charitha Kankanamge WSO2 inc. Flower Road, Colombo 07 +94 714268070 A bug in the hand is better than one as yet undetected - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Possible classloader issue - help needed
Oh yes, there is also the /lib folder in the root of the Axis2 install (rather than in the .aar). - Original Message - From: Brennan Spies [EMAIL PROTECTED] To: axis-user@ws.apache.org Sent: Thursday, October 25, 2007 11:46 PM Subject: Re: Possible classloader issue - help needed Well, here the exception is a bit more informative. Looking at the source, the exception is coming from this line(s) in ConfigCatalogRule.begin(): Class clazz = digester.getClassLoader().loadClass(catalogClass); //ClassNotFoundException catalog = (Catalog) clazz.newInstance(); And from the stack trace it is clear that it is Tomcat's webapp classloader that is failing to see the class. Not sure what to make of the [EMAIL PROTECTED] since it is probably the case that the classloader is a subclass of URLClassLoader (super.toString()..?). Try using the Class.getClassLoader.getClass().getName() instead. 1) Create a simple utility method that recurses up the classloading tree using ClassLoader.getParent()--stop when you get a null from this method. Print out the class name of each ClassLoader. 2) Also print out the class name of each ClassLoader for the classes of interest: Digester, CatalogBase (the impl version), ConfigCatalogRule, AgentPlatformServiceMessageReceiverInOut. Don't create a new instance; use a static reference to the class like 'ConfigCatalogRule.class.getClassLoader()'. To be thorough, you should check to see if this is null before doing getClass().getName(). Remember, visibility of a class only goes one direction in a classloading tree: up. It may be the case that the solution might be moving the jars in question to a URL that is loaded by a classloader further up the tree, e.g. WEB-INF/lib. Regards, Brennan - Original Message - From: João Luís Pinto [EMAIL PROTECTED] To: axis-user@ws.apache.org Sent: Thursday, October 25, 2007 7:09 PM Subject: Re: Possible classloader issue - help needed Hello, Here are the results: Code in the MessageReceiver: code log1.debug(Loading + url); //$NON-NLS-1$ log1.debug(AgentPlatformServiceMessageReceiverInOut: //$NON-NLS-1$ + getClass().getClassLoader().toString()); log1.debug(Digester: //$NON-NLS-1$ + new Digester().getClass().getClassLoader().toString()); log1.debug(CatalogBase: //$NON-NLS-1$ + new CatalogBase().getClass() .getClassLoader() .toString()); log1.debug(MessageReceiver CL == Digester CL? //$NON-NLS-1$ + (getClass().getClassLoader() == new Digester().getClass() .getClassLoader() ? true : false)); //$NON-NLS-1$//$NON-NLS-2$ configParser.parse(url); /code Output: [DEBUG] Loading file:/Users/jpinto/Documents/workspace/.metadata/.plugins/org.eclipse.wst.server.core/tmp0/wtpwebapps/Axis2/WEB-INF/services/AgentPlatformService/chain-config.xml [DEBUG] AgentPlatformServiceMessageReceiverInOut: [EMAIL PROTECTED] [DEBUG] Digester: [EMAIL PROTECTED] [DEBUG] CatalogBase: [EMAIL PROTECTED] [DEBUG] MessageReceiver CL == Digester CL? true As for the trace of the VM, aparently both classes from commons-chain and commons-digester are loaded before the exception: (...) [Loaded org.apache.commons.digester.RuleSetBase from file:/Users/jpinto/Documents/workspace/.metadata/.plugins/org.eclipse.wst.server.core/tmp0/wtpwebapps/Axis2/WEB-INF/services/AgentPlatformService/lib/commons-digester-1.8.jar] [Loaded org.apache.commons.chain.config.ConfigRuleSet from file:/Users/jpinto/Documents/workspace/.metadata/.plugins/org.eclipse.wst.server.core/tmp0/wtpwebapps/Axis2/WEB-INF/services/AgentPlatformService/lib/commons-chain-1.1.jar] [Loaded org.apache.commons.chain.config.ConfigCatalogRule from file:/Users/jpinto/Documents/workspace/.metadata/.plugins/org.eclipse.wst.server.core/tmp0/wtpwebapps/Axis2/WEB-INF/services/AgentPlatformService/lib/commons-chain-1.1.jar] [Loaded org.apache.commons.chain.config.ConfigRegisterRule from file:/Users/jpinto/Documents/workspace/.metadata/.plugins/org.eclipse.wst.server.core/tmp0/wtpwebapps/Axis2/WEB-INF/services/AgentPlatformService/lib/commons-chain-1.1.jar] [Loaded org.apache.commons.chain.config.ConfigDefineRule from file:/Users/jpinto/Documents/workspace/.metadata/.plugins/org.eclipse.wst.server.core/tmp0/wtpwebapps/Axis2/WEB-INF/services/AgentPlatformService/lib/commons-chain-1.1.jar] [Loaded org.apache.commons.digester.RulesBase from file:/Users/jpinto/Documents/workspace/.metadata/.plugins/org.eclipse.wst.server.core/tmp0/wtpwebapps/Axis2/WEB-INF/services/AgentPlatformService/lib/commons-digester-1.8.jar] [Loaded org.apache.commons.chain.CatalogFactory from file:/Users/jpinto/Documents/workspace/.metadata/.plugins/org.eclipse.wst.server.core/tmp0/wtpwebapps/Axis2/WEB-INF/services/AgentPlatformService/lib/commons-chain-1.1.jar] [Loaded org.apache.commons.chain.impl.CatalogFactoryBase from
RE: getting following exception in making client connection to the service
This Exception means that the class loader can't find the class javax.jms.ByteMessage. This class is provided by one of the dependencies: geronimo-jms_1.1_spec-1.1.jar, so please check that this file is in your classpath. Regards, Samuel Rossille -Message d'origine- De : Shalab Goel [mailto:[EMAIL PROTECTED] Envoyé : mercredi 24 octobre 2007 19:21 À : axis-user@ws.apache.org Objet : getting following exception in making client connection to the service Appreciate any help on what I might be missing. java.lang.NoClassDefFoundError: javax/jms/BytesMessage at java.lang.Class.getDeclaredConstructors0(Native Method) at java.lang.Class.privateGetDeclaredConstructors(Unknown Source) at java.lang.Class.getConstructor0(Unknown Source) at java.lang.Class.newInstance0(Unknown Source) at java.lang.Class.newInstance(Unknown Source) at org.apache.axis2.deployment.AxisConfigBuilder.processTransportSenders(AxisConfigBuilder.java:516) at org.apache.axis2.deployment.AxisConfigBuilder.populateConfig(AxisConfigBuilder.java:109) at org.apache.axis2.deployment.DeploymentEngine.populateAxisConfiguration(DeploymentEngine.java:640) at org.apache.axis2.deployment.FileSystemConfigurator.getAxisConfiguration(FileSystemConfigurator.java:105) at org.apache.axis2.context.ConfigurationContextFactory.createConfigurationContext(ConfigurationContextFactory.java:60) at org.apache.axis2.context.ConfigurationContextFactory.createConfigurationContextFromFileSystem(ConfigurationContextFactory.java:174) at org.apache.axis2.client.ServiceClient.initializeTransports(ServiceClient.java:211) at org.apache.axis2.client.ServiceClient.configureServiceClient(ServiceClient.java:138) at org.apache.axis2.client.ServiceClient.init(ServiceClient.java:133) ... ... - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: AXIS2 and .NET Interop
Maxim What version of .NET is this? I notice that the SOAP 1.1 calls are all working and SOAP1.2 isn't. Try stub._getServiceClient().getOptions().setSoapVersionURI( org.apache.axis2.namespace.Constants.URI_SOAP11_ENV); Paul On 10/26/07, Maxim Geraskyn [EMAIL PROTECTED] wrote: Is there any error log on the .NET side? Hmm, may be, have to check I can't see anything really wrong with the Axis2 request. How did you generate the client? As I mentioned xml part of request is fine. If I change headers it works perfectly. Client was generated by WSDL2Java target name=testjava java classname=org.apache.axis2.wsdl.WSDL2Java classpathref=compile.classpath fork=true !-- arg value=-d/ arg value=xmlbeans/-- arg value=-uri/ arg value=http://localhost:3353/Service1.asmx?WSDL/ arg value=${work}\test.wsdl/ arg value=-o/ arg file=${src}/ arg value=-f/ arg value=-s/ /java /target - 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
[AXIS2] addHeader problem
Hi, I had a thread going regarding (missing) attributes in a SOAP header block. Now I pinned the problem down to the following: 1) In the generated stub class the Object representing the header block is build in the method org.apache.axiom.om.OMElement toOM(...) The result of this is an element that when printed has the correct structure: metadata xmlns=http://metadata.ntpsoa.nordea.com/object; schemaVersion=1.0 Here the attribute schemaVersion is generated into the XML fragment correctly. 2) After the element is built the header is added to the envelope: addHeader(omElementmetadata1, env); 3) If the header is investigated immediate after this: System.out.println(env.getHeader().toString()); the result is disappointing: soapenv:Header xmlns:soapenv=http://schemas.xmlsoap.org/soap/envelope/;metadata xmlns=http://metadata.ntpsoa.nordea.com/object; soapenv:mustUnderstand=0... So it seams, that the org.apache.axis2.client.Stub.addHeader method overwrites the attributes part of the header block, or? BR Morten - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Min/Max Inclusive
While on the topic of java2wsdl, I have a similar question. I have the following class. public class Result { private boolean success; private String errorMessage; public Result(){} public boolean getSuccess() { return success; } public void setSuccess(boolean success) { this.success = success; } public String getErrorMessage() { return errorMessage; } public void setErrorMessage(String errorMessage) { this.errorMessage = errorMessage; } } In my wsdl i want to define an error message so thats its an enumeration type as follows. xs:simpleType name=ErrorMessage xs:restriction base=xs:string xs:enumeration value=General server failure / xs:enumeration value=Invalid username or password / xs:enumeration value=Invalid session / lots of other errors /xs:restriction /xs:simpleType Currently after running java2wsdl i have to add that block manually into the WSDL file, is there a way this can be done automatically by java2wsdl? I then need to change the Result type to point to the simpleType ErrorMessage as follows. xs:complexType name=Result xs:sequence xs:element name=errorMessage nillable=true type=ns:ErrorMessage / xs:element name=success type=xs:boolean / /xs:sequence /xs:complexType Our SOAP API is currently changing a lot in our project as its early on in the project, everytime it changes i need to regenerate the WSDL and put in a ton of custon tweaks like this (and the min/max inclusive, etc). Is it possible to change my POJO files in a way that this makes its way into the WSDL everytime its generated, i think other SOAP frameworks support this, so i'm hoping axis does also. Thanks. Jon On 10/25/07, Jon Horsman [EMAIL PROTECTED] wrote: Hey, I have some POJO classes that I use java2wsdl to generate a wsdl file for me. I'm curious if there is any syntax that can be used in those java classes that will automatically add min/max inclusive to the generated WSDL? Lets say i have a simple class like public class TestClass { private int testInt; public void setTestInt(int i) { testInt = i; } public int getTestInt() { return 0; } } Say that i want the WSDL to insure that setTestInt only accepts values between 0 and 10, is there a way to make a change in TestClass so that min/max Inclusive gets put into the WSDL or do you have to manually tweak the generated WSDL and add some like the following? xs:minInclusive value=0 / xs:maxInclusive value=10 / Thanks, Jon. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: [AXIS2] addHeader problem
Hi, I found the problem in the org.apache.axis2.client.Stub.addHeader method: Original: protected void addHeader(OMElement omElementToadd, SOAPEnvelope envelop, boolean mustUnderstand) { SOAPHeaderBlock soapHeaderBlock = envelop.getHeader().addHeaderBlock(omElementToadd.getLocalName(),omEleme ntToadd.getNamespace()); soapHeaderBlock.setMustUnderstand(mustUnderstand); OMNode omNode = null; for (Iterator iter = omElementToadd.getChildren(); iter.hasNext();){ omNode = (OMNode) iter.next(); soapHeaderBlock.addChild(omNode); } } I changed this into (overwritten in my own stub class): protected void addHeader(OMElement omElementToadd, SOAPEnvelope envelop, boolean mustUnderstand) { SOAPHeaderBlock soapHeaderBlock = envelop.getHeader().addHeaderBlock(omElementToadd.getLocalName(),omEleme ntToadd.getNamespace()); //soapHeaderBlock.setMustUnderstand(mustUnderstand); OMNode omNode = null; for (Iterator iter = omElementToadd.getChildren(); iter.hasNext();) { omNode = (OMNode) iter.next(); soapHeaderBlock.addChild(omNode); } OMAttribute omAtt = null; for (Iterator i = omElementToadd.getAllAttributes(); i.hasNext(); ) { omAtt = (OMAttribute)i.next(); soapHeaderBlock.addAttribute(omAtt); } } This worked! BR Morten -Original Message- From: Frank, Morten Sent: 26. oktober 2007 12:29 To: axis-user@ws.apache.org Subject: [AXIS2] addHeader problem Hi, I had a thread going regarding (missing) attributes in a SOAP header block. Now I pinned the problem down to the following: 1) In the generated stub class the Object representing the header block is build in the method org.apache.axiom.om.OMElement toOM(...) The result of this is an element that when printed has the correct structure: metadata xmlns=http://metadata.ntpsoa.nordea.com/object; schemaVersion=1.0 Here the attribute schemaVersion is generated into the XML fragment correctly. 2) After the element is built the header is added to the envelope: addHeader(omElementmetadata1, env); 3) If the header is investigated immediate after this: System.out.println(env.getHeader().toString()); the result is disappointing: soapenv:Header xmlns:soapenv=http://schemas.xmlsoap.org/soap/envelope/;metadata xmlns=http://metadata.ntpsoa.nordea.com/object; soapenv:mustUnderstand=0... So it seams, that the org.apache.axis2.client.Stub.addHeader method overwrites the attributes part of the header block, or? BR Morten - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: AXIS2 and .NET Interop
SOAP 1.2 HTTP Binding WCF implements SOAP 1.2 HTTP binding as described in the SOAP 1.2-part 2 (SOAP12Part2) specification with the following clarifications. SOAP 1.2 introduced an optional action parameter for the application/soap+xml media type. This parameter is useful to optimize message dispatch without requiring that the body of the SOAP message be parsed when WS-Addressing is not used. a.. R2221: The application/soap+xml action parameter, when present on a SOAP 1.2 request, must match the soapAction attribute on the wsoap12:operation element inside the corresponding WSDL binding. b.. R: The application/soap+xml action parameter, when present on a SOAP 1.2 message, must match wsa:Action when WS-Addressing 2004/08 or WS-Addressing 1.0 are used. When WS-Addressing is disabled and an incoming request does not contain an action parameter, message Action is considered not specified. You are not using WS-Addressing therefore the wsoap12:operation element of the SOAPAction attribute specified does not match the Action specified http://triniforce.com/soap/sample/getStrings; Assuming you have a properly formed WSDL this Appears to be a bug in WSDL2Java utility Suggest going to JIRA for more info http://issues.apache.org/jira/browse/AXIS2 Anyone else? HTH/ Martin-- Original Message - From: Maxim Geraskyn [EMAIL PROTECTED] To: axis-user@ws.apache.org Sent: Friday, October 26, 2007 5:30 AM Subject: AXIS2 and .NET Interop Problem description -- When I call .NET service ( Visual Studio 2005 ) using Axis2-generated client I got exception: Exception in thread main org.apache.axis2.AxisFault: The input stream for an incoming message is null. at org.apache.axis2.transport.TransportUtils.createSOAPMessage(TransportUtils.j ava:71) at org.apache.axis2.description.OutInAxisOperationClient.handleResponse(OutInAx isOperation.java:326) at org.apache.axis2.description.OutInAxisOperationClient.send(OutInAxisOperatio n.java:389) at org.apache.axis2.description.OutInAxisOperationClient.executeImpl(OutInAxisO peration.java:211) at org.apache.axis2.client.OperationClient.execute(OperationClient.java:163) at com.triniforce.soap.sample.Service1Stub.getStrings(Unknown Source) at inv.CallSoap.main(Unknown Source) Service function declaration --- String[] getString(String []); Schema -- s:element name=getStrings s:complexType s:sequence s:element minOccurs=0 maxOccurs=1 name=arg type=tns:ArrayOfString/ /s:sequence /s:complexType /s:element s:element name=getStringsResponse s:complexType s:sequence s:element minOccurs=0 maxOccurs=1 name=getStringsResult type=tns:ArrayOfString/ /s:sequence /s:complexType /s:element s:complexType name=ArrayOfString s:sequence s:element minOccurs=0 maxOccurs=unbounded name=string nillable=true type=s:string/ /s:sequence /s:complexType Calling code -- Service1Stub stub = new Service1Stub(null, http://localhost:8091/Service1.asmx;); GetStringsResponse res; GetStrings arg = new GetStrings(); ArrayOfString arr1 = new ArrayOfString(); arr1.setString(new String[]{Str1, null, Str2}); arg.setArg(arr1); stub.getStrings(arg); Request data -- POST /Service1.asmx HTTP/1.1 Content-Type: application/soap+xml; charset=UTF-8; action=http://triniforce.com/soap/sample/getStrings; User-Agent: Axis2 Host: localhost:8091 Transfer-Encoding: chunked 158 ?xml version='1.0' encoding='UTF-8'?soapenv:Envelope xmlns:soapenv=http://www.w3.org/2003/05/soap-envelope;soapenv:Bodyns1:g etStrings xmlns:ns1=http://triniforce.com/soap/sample;ns1:argns1:stringStr1/ns1 :stringns1:stringStr/ns1:stringns1:stringStr2/ns1:string/ns1:arg /ns1:getStrings/soapenv:Body/soapenv:Envelope 0 Answer data -- HTTP/1.1 400 Bad Request Server: ASP.NET Development Server/8.0.0.0 Date: Fri, 26 Oct 2007 08:45:01 GMT X-AspNet-Version: 2.0.50727 Cache-Control: private Content-Length: 0 Connection: Close Axis 1.4 -- Axis 1.4 works better Axis 1.4 request data -- POST /Service1.asmx HTTP/1.0 Content-Type: text/xml; charset=utf-8 Accept: application/soap+xml, application/dime, multipart/related, text/* User-Agent: Axis/1.4 Host: localhost:8091 Cache-Control: no-cache Pragma: no-cache SOAPAction: http://triniforce.com/soap/sample/getStrings; Content-Length: 381 Axis 1.4 response data --- HTTP/1.1 200 OK Server: ASP.NET Development Server/8.0.0.0 Date: Fri, 26 Oct 2007 08:54:24 GMT X-AspNet-Version: 2.0.50727 Cache-Control: private,
Re: Possible classloader issue - help needed
Hi, code log1.debug(Loading + url); //$NON-NLS-1$ ClassLoader loader = AgentPlatformServiceMessageReceiverInOut.class.getClassLoader(); if (loader != null) { log1.debug(AgentPlatformServiceMessageReceiverInOut: //$NON-NLS-1$ + loader.getClass().getName()); getParents(AgentPlatformServiceMessageReceiverInOut, loader); //$NON-NLS-1$ } loader = Digester.class.getClassLoader(); if (loader != null) { log1.debug(Digester: //$NON-NLS-1$ + loader.getClass().getName()); getParents(Digester, loader); //$NON-NLS-1$ } loader = CatalogBase.class.getClassLoader(); if (loader != null) { log1.debug(CatalogBase: //$NON-NLS-1$ + loader.getClass().getName()); getParents(CatalogBase, loader); //$NON-NLS-1$ } configParser.parse(url); /code code private void getParents(String string, ClassLoader loader) { ClassLoader classLoader = loader; while ((classLoader = classLoader.getParent()) != null) { log1.debug(Parent( + string + ): + loader.getClass().getName()); //$NON-NLS-1$ //$NON-NLS-2$ } } /code On 10/26/07, Brennan Spies [EMAIL PROTECTED] wrote: 1) Create a simple utility method that recurses up the classloading tree using ClassLoader.getParent()--stop when you get a null from this method. Print out the class name of each ClassLoader. 2) Also print out the class name of each ClassLoader for the classes of interest: Digester, CatalogBase (the impl version), ConfigCatalogRule, AgentPlatformServiceMessageReceiverInOut. Don't create a new instance; use a static reference to the class like 'ConfigCatalogRule.class.getClassLoader()'. To be thorough, you should check to see if this is null before doing getClass().getName(). I get: [DEBUG] Loading file:/Users/jpinto/Documents/workspace/.metadata/.plugins/org.eclipse.wst.server.core/tmp0/wtpwebapps/Axis2/WEB-INF/services/AgentPlatformService/chain-config.xml [DEBUG] AgentPlatformServiceMessageReceiverInOut: java.net.URLClassLoader [DEBUG] Parent(AgentPlatformServiceMessageReceiverInOut): java.net.URLClassLoader [DEBUG] Parent(AgentPlatformServiceMessageReceiverInOut): java.net.URLClassLoader [DEBUG] Parent(AgentPlatformServiceMessageReceiverInOut): java.net.URLClassLoader [DEBUG] Parent(AgentPlatformServiceMessageReceiverInOut): java.net.URLClassLoader [DEBUG] Parent(AgentPlatformServiceMessageReceiverInOut): java.net.URLClassLoader [DEBUG] Parent(AgentPlatformServiceMessageReceiverInOut): java.net.URLClassLoader [DEBUG] Digester: java.net.URLClassLoader [DEBUG] Parent(Digester): java.net.URLClassLoader [DEBUG] Parent(Digester): java.net.URLClassLoader [DEBUG] Parent(Digester): java.net.URLClassLoader [DEBUG] Parent(Digester): java.net.URLClassLoader [DEBUG] Parent(Digester): java.net.URLClassLoader [DEBUG] Parent(Digester): java.net.URLClassLoader [DEBUG] CatalogBase: java.net.URLClassLoader [DEBUG] Parent(CatalogBase): java.net.URLClassLoader [DEBUG] Parent(CatalogBase): java.net.URLClassLoader [DEBUG] Parent(CatalogBase): java.net.URLClassLoader [DEBUG] Parent(CatalogBase): java.net.URLClassLoader [DEBUG] Parent(CatalogBase): java.net.URLClassLoader [DEBUG] Parent(CatalogBase): java.net.URLClassLoader [ERROR] Begin event threw exception java.lang.ClassNotFoundException: org.apache.commons.chain.impl.CatalogBase at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1358) (...) I cannot do it for ConfigCatalogRule, because it has default (not public) visibility [1]. [1] http://commons.apache.org/chain/xref/org/apache/commons/chain/config/ConfigCatalogRule.html Thanks, João - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: AXIS2 and .NET Interop
Martin If you take another look the ;action= parameter is there. It just got split to the next line. Paul On 10/27/00, Martin Gainty [EMAIL PROTECTED] wrote: SOAP 1.2 HTTP Binding WCF implements SOAP 1.2 HTTP binding as described in the SOAP 1.2-part 2 (SOAP12Part2) specification with the following clarifications. SOAP 1.2 introduced an optional action parameter for the application/soap+xml media type. This parameter is useful to optimize message dispatch without requiring that the body of the SOAP message be parsed when WS-Addressing is not used. a.. R2221: The application/soap+xml action parameter, when present on a SOAP 1.2 request, must match the soapAction attribute on the wsoap12:operation element inside the corresponding WSDL binding. b.. R: The application/soap+xml action parameter, when present on a SOAP 1.2 message, must match wsa:Action when WS-Addressing 2004/08 or WS-Addressing 1.0 are used. When WS-Addressing is disabled and an incoming request does not contain an action parameter, message Action is considered not specified. You are not using WS-Addressing therefore the wsoap12:operation element of the SOAPAction attribute specified does not match the Action specified http://triniforce.com/soap/sample/getStrings; Assuming you have a properly formed WSDL this Appears to be a bug in WSDL2Java utility Suggest going to JIRA for more info http://issues.apache.org/jira/browse/AXIS2 Anyone else? HTH/ Martin-- Original Message - From: Maxim Geraskyn [EMAIL PROTECTED] To: axis-user@ws.apache.org Sent: Friday, October 26, 2007 5:30 AM Subject: AXIS2 and .NET Interop Problem description -- When I call .NET service ( Visual Studio 2005 ) using Axis2-generated client I got exception: Exception in thread main org.apache.axis2.AxisFault: The input stream for an incoming message is null. at org.apache.axis2.transport.TransportUtils.createSOAPMessage( TransportUtils.j ava:71) at org.apache.axis2.description.OutInAxisOperationClient.handleResponse (OutInAx isOperation.java:326) at org.apache.axis2.description.OutInAxisOperationClient.send (OutInAxisOperatio n.java:389) at org.apache.axis2.description.OutInAxisOperationClient.executeImpl (OutInAxisO peration.java:211) at org.apache.axis2.client.OperationClient.execute(OperationClient.java:163) at com.triniforce.soap.sample.Service1Stub.getStrings(Unknown Source) at inv.CallSoap.main(Unknown Source) Service function declaration --- String[] getString(String []); Schema -- s:element name=getStrings s:complexType s:sequence s:element minOccurs=0 maxOccurs=1 name=arg type=tns:ArrayOfString/ /s:sequence /s:complexType /s:element s:element name=getStringsResponse s:complexType s:sequence s:element minOccurs=0 maxOccurs=1 name=getStringsResult type=tns:ArrayOfString/ /s:sequence /s:complexType /s:element s:complexType name=ArrayOfString s:sequence s:element minOccurs=0 maxOccurs=unbounded name=string nillable=true type=s:string/ /s:sequence /s:complexType Calling code -- Service1Stub stub = new Service1Stub(null, http://localhost:8091/Service1.asmx;); GetStringsResponse res; GetStrings arg = new GetStrings(); ArrayOfString arr1 = new ArrayOfString(); arr1.setString(new String[]{Str1, null, Str2}); arg.setArg(arr1); stub.getStrings(arg); Request data -- POST /Service1.asmx HTTP/1.1 Content-Type: application/soap+xml; charset=UTF-8; action=http://triniforce.com/soap/sample/getStrings; User-Agent: Axis2 Host: localhost:8091 Transfer-Encoding: chunked 158 ?xml version='1.0' encoding='UTF-8'?soapenv:Envelope xmlns:soapenv=http://www.w3.org/2003/05/soap-envelope soapenv:Bodyns1:g etStrings xmlns:ns1=http://triniforce.com/soap/sample ns1:argns1:stringStr1/ns1 :stringns1:stringStr/ns1:stringns1:stringStr2/ns1:string/ns1:arg /ns1:getStrings/soapenv:Body/soapenv:Envelope 0 Answer data -- HTTP/1.1 400 Bad Request Server: ASP.NET Development Server/8.0.0.0 Date: Fri, 26 Oct 2007 08:45:01 GMT X-AspNet-Version: 2.0.50727 Cache-Control: private Content-Length: 0 Connection: Close Axis 1.4 -- Axis 1.4 works better Axis 1.4 request data -- POST /Service1.asmx HTTP/1.0 Content-Type: text/xml; charset=utf-8 Accept: application/soap+xml, application/dime, multipart/related, text/* User-Agent: Axis/1.4 Host: localhost:8091 Cache-Control: no-cache
Re: Possible classloader issue - help needed
I'm comming late into this thread and don't see the whole problem here, but beyond what Brennan suggested this also works for me: this.getClass().getProtectionDomain().getCodeSource().getLocation()); Where 'this' could be any object reference. Also, don't forget the happy axis page shows the jar locations of everything loaded. HTH, Robert On 10/26/07, João Luís Pinto [EMAIL PROTECTED] wrote: Hi, code log1.debug(Loading + url); //$NON-NLS-1$ ClassLoader loader = AgentPlatformServiceMessageReceiverInOut.class.getClassLoader(); if (loader != null) { log1.debug(AgentPlatformServiceMessageReceiverInOut: //$NON-NLS-1$ + loader.getClass().getName()); getParents(AgentPlatformServiceMessageReceiverInOut, loader); //$NON-NLS-1$ } loader = Digester.class.getClassLoader(); if (loader != null) { log1.debug(Digester: //$NON-NLS-1$ + loader.getClass().getName()); getParents(Digester, loader); //$NON-NLS-1$ } loader = CatalogBase.class.getClassLoader(); if (loader != null) { log1.debug(CatalogBase: //$NON-NLS-1$ + loader.getClass().getName()); getParents(CatalogBase, loader); //$NON-NLS-1$ } configParser.parse(url); /code code private void getParents(String string, ClassLoader loader) { ClassLoader classLoader = loader; while ((classLoader = classLoader.getParent()) != null) { log1.debug(Parent( + string + ): + loader.getClass().getName()); //$NON-NLS-1$ //$NON-NLS-2$ } } /code On 10/26/07, Brennan Spies [EMAIL PROTECTED] wrote: 1) Create a simple utility method that recurses up the classloading tree using ClassLoader.getParent()--stop when you get a null from this method. Print out the class name of each ClassLoader. 2) Also print out the class name of each ClassLoader for the classes of interest: Digester, CatalogBase (the impl version), ConfigCatalogRule, AgentPlatformServiceMessageReceiverInOut. Don't create a new instance; use a static reference to the class like 'ConfigCatalogRule.class.getClassLoader()'. To be thorough, you should check to see if this is null before doing getClass().getName(). I get: [DEBUG] Loading file:/Users/jpinto/Documents/workspace/.metadata/.plugins/org.eclipse.wst.server.core/tmp0/wtpwebapps/Axis2/WEB-INF/services/AgentPlatformService/chain-config.xml [DEBUG] AgentPlatformServiceMessageReceiverInOut: java.net.URLClassLoader [DEBUG] Parent(AgentPlatformServiceMessageReceiverInOut): java.net.URLClassLoader [DEBUG] Parent(AgentPlatformServiceMessageReceiverInOut): java.net.URLClassLoader [DEBUG] Parent(AgentPlatformServiceMessageReceiverInOut): java.net.URLClassLoader [DEBUG] Parent(AgentPlatformServiceMessageReceiverInOut): java.net.URLClassLoader [DEBUG] Parent(AgentPlatformServiceMessageReceiverInOut): java.net.URLClassLoader [DEBUG] Parent(AgentPlatformServiceMessageReceiverInOut): java.net.URLClassLoader [DEBUG] Digester: java.net.URLClassLoader [DEBUG] Parent(Digester): java.net.URLClassLoader [DEBUG] Parent(Digester): java.net.URLClassLoader [DEBUG] Parent(Digester): java.net.URLClassLoader [DEBUG] Parent(Digester): java.net.URLClassLoader [DEBUG] Parent(Digester): java.net.URLClassLoader [DEBUG] Parent(Digester): java.net.URLClassLoader [DEBUG] CatalogBase: java.net.URLClassLoader [DEBUG] Parent(CatalogBase): java.net.URLClassLoader [DEBUG] Parent(CatalogBase): java.net.URLClassLoader [DEBUG] Parent(CatalogBase): java.net.URLClassLoader [DEBUG] Parent(CatalogBase): java.net.URLClassLoader [DEBUG] Parent(CatalogBase): java.net.URLClassLoader [DEBUG] Parent(CatalogBase): java.net.URLClassLoader [ERROR] Begin event threw exception java.lang.ClassNotFoundException: org.apache.commons.chain.impl.CatalogBase at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1358) (...) I cannot do it for ConfigCatalogRule, because it has default (not public) visibility [1]. [1] http://commons.apache.org/chain/xref/org/apache/commons/chain/config/ConfigCatalogRule.html Thanks, João - 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]
wsdl2java mixed=true support?
Hi all, I've got a legacy WSDL that contains a complexType with the parameter mixed=true I've tried generating Java using Axis2, and the generated Java is the same with and without this parameter. My question is: is this parameter supported? What should be generated? Thanks for any info! Julien - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: AXIS2 and .NET Interop
Paul, What version of .NET is this? I'm using Visual Studio 2005, .NET Framework v2.0.50727 Try stub._getServiceClient().getOptions().setSoapVersionURI(org.apache.axis2.namespace.Constants.URI_SOAP11_ENV ); Hmm, same result Request: POST /Service1.asmx HTTP/1.1 Content-Type: text/xml; charset=UTF-8 SOAPAction: http://triniforce.com/soap/sample/getStrings; User-Agent: Axis2 Host: localhost:8091 Transfer-Encoding: chunked 18e ?xml version='1.0' encoding='UTF-8'?soapenv:Envelope xmlns:soapenv=http://schemas.xmlsoap.org/soap/envelope/;soapenv:Bodyns1:getStrings xmlns:ns1=http://triniforce.com/soap/sample;ns1:argns1:stringStr1/ns1:stringns1:string xmlns:xsi=http://www.w3.org/2001/XMLSchema-instance; xsi:nil=1 /ns1:stringStr2/ns1:string/ns1:arg/ns1:getStrings/soapenv:Body/soapenv:Envelope 0 Response: -- HTTP/1.1 400 Bad Request Server: ASP.NET Development Server/8.0.0.0 Date: Fri, 26 Oct 2007 12:59:48 GMT X-AspNet-Version: 2.0.50727 Cache-Control: private Content-Length: 0 Connection: Close Same XML with another headers works perfect --- POST /Service1.asmx HTTP/1.1 Content-Type: text/xml;charset=UTF-8 SOAPAction: http://triniforce.com/soap/sample/getStrings; User-Agent: Jakarta Commons-HttpClient/3.0.1 Host: localhost:8091 Content-Length: 398 ?xml version='1.0' encoding='UTF-8'?soapenv:Envelope xmlns:soapenv=http://schemas.xmlsoap.org/soap/envelope/;soapenv:Bodyns1:getStrings xmlns:ns1=http://triniforce.com/soap/sample;ns1:argns1:stringStr1/ns1:stringns1:string xmlns:xsi=http://www.w3.org/2001/XMLSchema-instance; xsi:nil=1 /ns1:stringStr2/ns1:string/ns1:arg/ns1:getStrings/soapenv:Body/soapenv:Envelope HTTP/1.1 200 OK Server: ASP.NET Development Server/8.0.0.0 Date: Fri, 26 Oct 2007 13:09:39 GMT X-AspNet-Version: 2.0.50727 Cache-Control: private, max-age=0 Content-Type: text/xml; charset=utf-8 Content-Length: 433 Connection: Close ?xml version=1.0 encoding=utf-8?soap:Envelope xmlns:soap=http://schemas.xmlsoap.org/soap/envelope/; xmlns:xsi=http://www.w3.org/2001/XMLSchema-instance; xmlns:xsd=http://www.w3.org/2001/XMLSchema;soap:BodygetStringsResponse xmlns=http://triniforce.com/soap/sample;getStringsResultstringStr1/stringstring xsi:nil=true /stringStr2/string/getStringsResult/getStringsResponse/soap:Body/soap:Envelope - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: AXIS2 and .NET Interop
Maybe its HTTP chunking? I notice that the working versions don't use that. Try turning it off like this: stub.getServiceClient().getOptions().setProperty(org.apache.axis2.transport.http.HTTPConstants.CHUNKED, Boolean.FALSE); Paul On 10/26/07, Maxim Geraskyn [EMAIL PROTECTED] wrote: Paul, What version of .NET is this? I'm using Visual Studio 2005, .NET Framework v2.0.50727 Try stub._getServiceClient().getOptions().setSoapVersionURI( org.apache.axis2.namespace.Constants.URI_SOAP11_ENV ); Hmm, same result Request: POST /Service1.asmx HTTP/1.1 Content-Type: text/xml; charset=UTF-8 SOAPAction: http://triniforce.com/soap/sample/getStrings; User-Agent: Axis2 Host: localhost:8091 Transfer-Encoding: chunked 18e ?xml version='1.0' encoding='UTF-8'?soapenv:Envelope xmlns:soapenv=http://schemas.xmlsoap.org/soap/envelope/ soapenv:Bodyns1:getStrings xmlns:ns1=http://triniforce.com/soap/sample ns1:argns1:stringStr1/ns1:stringns1:string xmlns:xsi=http://www.w3.org/2001/XMLSchema-instance; xsi:nil=1 /ns1:stringStr2/ns1:string/ns1:arg/ns1:getStrings/soapenv:Body/soapenv:Envelope 0 Response: -- HTTP/1.1 400 Bad Request Server: ASP.NET Development Server/8.0.0.0 Date: Fri, 26 Oct 2007 12:59:48 GMT X-AspNet-Version: 2.0.50727 Cache-Control: private Content-Length: 0 Connection: Close Same XML with another headers works perfect --- POST /Service1.asmx HTTP/1.1 Content-Type: text/xml;charset=UTF-8 SOAPAction: http://triniforce.com/soap/sample/getStrings; User-Agent: Jakarta Commons-HttpClient/3.0.1 Host: localhost:8091 Content-Length: 398 ?xml version='1.0' encoding='UTF-8'?soapenv:Envelope xmlns:soapenv=http://schemas.xmlsoap.org/soap/envelope/ soapenv:Bodyns1:getStrings xmlns:ns1=http://triniforce.com/soap/sample ns1:argns1:stringStr1/ns1:stringns1:string xmlns:xsi=http://www.w3.org/2001/XMLSchema-instance; xsi:nil=1 /ns1:stringStr2/ns1:string/ns1:arg/ns1:getStrings/soapenv:Body/soapenv:Envelope HTTP/1.1 200 OK Server: ASP.NET Development Server/8.0.0.0 Date: Fri, 26 Oct 2007 13:09:39 GMT X-AspNet-Version: 2.0.50727 Cache-Control: private, max-age=0 Content-Type: text/xml; charset=utf-8 Content-Length: 433 Connection: Close ?xml version=1.0 encoding=utf-8?soap:Envelope xmlns:soap=http://schemas.xmlsoap.org/soap/envelope/; xmlns:xsi=http://www.w3.org/2001/XMLSchema-instance; xmlns:xsd=http://www.w3.org/2001/XMLSchema soap:BodygetStringsResponse xmlns=http://triniforce.com/soap/sample getStringsResultstringStr1/stringstring xsi:nil=true /stringStr2/string/getStringsResult/getStringsResponse/soap:Body/soap:Envelope - 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
Re: test asynchronous functions
Huitang Li wrote: Hi, I chose to use asynchronous calls in Axis2 client to transmit soap messages. The test class is generated by wsdl2java. When I tested it, the test did not fail even if the handler is set to fail() in the receiveErrorXXX() which in turn indeed got called. This problem does not happen in synchronous calls. Any solution to test asynchronous calls? please have a look at the following http://today.java.net/pub/a/today/2006/12/13/invoking-web-services-using-apache-axis2.html Thanks Deepal - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Axis2 WSDL2Java error during service skeliton/stub generation
Hello All I am getting this error when i try to generate Service Skeleton code from a WSDL file. This is a new service and we are trying to go in WSDL first approach. We need wsdl to be in Document/literal Wrapped style in order to be interoperable with .Net framework. .Net generated client stubs with out any problem but Axis2 WSDL2Java is giving this exception during service skeleton and client generation times. This is pretty simple WSDL file with just two methods in it. We are trying to generate skeleton and clients in UNWrapped mode. C:\Code\Axis14ClientTest\Axis14ClientTest1java.exe -Djava.ext.dirs=C:\Softwares\axis2-1.3-bin\axis2-1.3\lib; org.apache.axis2.wsdl.WSDL2Java -s -ss -uw -sd -dadb -uri PCMConnection.wsdllog4j:WARN No appenders could be found for logger (org.apache.axis2.description.WSDL11ToAllAxisServicesBuilder).log4j:WARN Please initialize the log4j system properly.Exception in thread main org.apache.axis2.wsdl.codegen.CodeGenerationException: org.apache.axis2.wsdl.codegen.CodeGenerationException: Can not determine the schema type for the set_PortalVariableResponseat org.apache.axis2.wsdl.codegen.CodeGenerationEngine.generate(CodeGenerationEngine.java:265) at org.apache.axis2.wsdl.WSDL2Code.main(WSDL2Code.java:35)at org.apache.axis2.wsdl.WSDL2Java.main(WSDL2Java.java:24)Caused by: org.apache.axis2.wsdl.codegen.CodeGenerationException: Can not determine the schema type for the set_PortalVariableResponseat org.apache.axis2.wsdl.codegen.extension.SchemaUnwrapperExtension.walk I have attached WSDL file with this mail. Just to let you know .Net is fine with this WSDL but not Axis2 WSDL2Java tool. Any help is greatly appreciated. Thank you, Kiran _ Peek-a-boo FREE Tricks Treats for You! http://www.reallivemoms.com?ocid=TXT_TAGHMloc=us
Re: Unrecognized elment in response xml (axis 2)
hi harsha, I know the issues and I have encountered the problem a several times , it was mainly due to namespaece context handling in underline xml parser. Can you please find the stax parser you can find in resin. In the meantime please create a JIRA Thanks Deepal Hi I am trying to port web services deployed on resin-2.1.20 (axis2) to resin-3.1.3 server. The response xml file contains some unrecognizable element which gives parse exception. The exception is given below Reference to undeclared namespace prefix: 'xsi'. Error processing resource 'file:///C:/Documents and Settings/harsharaja/De... ?xml version=1.0 encoding=UTF-8?soapenv:Envelope xmlns:soapenv=http://www.w3.org/2003/05/soap-envelope;.. We get some element in the response like ax21:eventDetail xsi:nil=true xmlns:ax21=http://beans.ws30.xora.com/xsd;/ax21:eventDetail but URI is not coming in the xml header. We face problem when the data type is String and the value is null. I am using axis2-1.3 , Resin-3.1.3 server, JDK 1.5 and using SOAP-UI tool for testing. I have attached the wsdl (TimeTrackServices301.xml) and the response xml (Response.xml). Try to open Response.xml in Internet Explorer you will get the above error message. Please help me to solve this problem. With regards Harsha __ Do You Yahoo!? Tired of spam? Yahoo! Mail has the best spam protection around http://mail.yahoo.com - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] -- Thanks, Deepal The highest tower is built one brick at a time - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
FW: Axis2 WSDL2Java error during service skeliton/stub generation
Here is the WSDL file attached with this mail. From: [EMAIL PROTECTED]: [EMAIL PROTECTED]: Axis2 WSDL2Java error during service skeliton/stub generationDate: Fri, 26 Oct 2007 10:34:30 -0400 Hello All I am getting this error when i try to generate Service Skeleton code from a WSDL file. This is a new service and we are trying to go in WSDL first approach. We need wsdl to be in Document/literal Wrapped style in order to be interoperable with .Net framework. .Net generated client stubs with out any problem but Axis2 WSDL2Java is giving this exception during service skeleton and client generation times. This is pretty simple WSDL file with just two methods in it. We are trying to generate skeleton and clients in UNWrapped mode. C:\Code\Axis14ClientTest\Axis14ClientTest1java.exe -Djava.ext.dirs=C:\Softwares\axis2-1.3-bin\axis2-1.3\lib; org.apache.axis2.wsdl.WSDL2Java -s -ss -uw -sd -dadb -uri PCMConnection.wsdllog4j:WARN No appenders could be found for logger (org.apache.axis2.description.WSDL11ToAllAxisServicesBuilder).log4j:WARN Please initialize the log4j system properly.Exception in thread main org.apache.axis2.wsdl.codegen.CodeGenerationException: org.apache.axis2.wsdl.codegen.CodeGenerationException: Can not determine the schema type for the set_PortalVariableResponseat org.apache.axis2.wsdl.codegen.CodeGenerationEngine.generate(CodeGenerationEngine.java:265) at org.apache.axis2.wsdl.WSDL2Code.main(WSDL2Code.java:35)at org.apache.axis2.wsdl.WSDL2Java.main(WSDL2Java.java:24)Caused by: org.apache.axis2.wsdl.codegen.CodeGenerationException: Can not determine the schema type for the set_PortalVariableResponseat org.apache.axis2.wsdl.codegen.extension.SchemaUnwrapperExtension.walk I have attached WSDL file with this mail. Just to let you know .Net is fine with this WSDL but not Axis2 WSDL2Java tool. Any help is greatly appreciated. Thank you, Kiran Peek-a-boo FREE Tricks Treats for You! Get 'em! _ Climb to the top of the charts! Play Star Shuffle: the word scramble challenge with star power. http://club.live.com/star_shuffle.aspx?icid=starshuffle_wlmailtextlink_oct PCMConnection.wsdl Description: application/xml - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: SV: [Axis2] Custom object not returned correctly from webservice
Peter A. Kirk wrote: I can return Strings and even String[] no problem, but not my custom type which after all only contains strings? Is it at all possible to return custom types from a java/axis2 webservice? I have found numerous other questions on the web regarding Yes you can. Thanks Deepal this, but no definitive answer yet. /Peter -Oprindelig meddelelse- Fra: Peter A. Kirk [mailto:[EMAIL PROTECTED] Sendt: 26. oktober 2007 11:43 Til: axis-user@ws.apache.org Emne: [Axis2] Custom object not returned correctly from webservice Hi, I have made a webservice with the following classes. I try to call this webservice from a c#/.net application, but the returned object is filled with nulls - can anyone help me find out why? As far as I can see I set the values in the return object. Do I need to do something to tell Axis2 that the class Employees_WS_ReturnData should be available over a webservice? The c# application does indeed know about this type, and does get an object from the easyData method - this object is just not filled with data. Thanks, Peter // package dk.alphasolutions.niws.employees; import javax.jws.*; @WebService public class Employees_WS { @WebMethod public Employees_WS_ReturnData easyData() { System.out.println(Easy Data); Employees_WS_ReturnData o = new Employees_WS_ReturnData(); o.setEmail(peter); return o; } } // package dk.alphasolutions.niws.employees; public class Employees_WS_ReturnData { private String lastname = a lastname; private String firstname; private String email; private String id; public String getLastname() { return lastname; } public void setLastname(String lastname) { this.lastname = lastname; } public String getFirstname() { return firstname; } public void setFirstname(String firstname) { this.firstname = firstname; } public String getEmail() { return email; } public void setEmail(String email) { this.email = email; } public String getId() { return id; } public void setId(String id) { this.id = id; } } - 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]
Minimal set of jars for deployment of axis2 client app
Does any know what the minimum distribution of jar files is for a client application. We have already found the xalan.jar and xerces.jar file have a conflict with the Preference system in JDK 1.6 and removing them from the classpath enabled both my SOAP functionality to work as well as Preferences. begin:vcard fn:Dennis Urech n:Urech;Dennis org:Behavioral Recognition Systems, Inc.;Development adr:;;2100 West Loop South;Houston;TX;77027;USA email;internet:[EMAIL PROTECTED] title:Technical Lead tel;work:713-590-5177 tel;fax:713-590-5161 tel;cell:832-419-2539 x-mozilla-html:TRUE url:http://www.brslabs.com version:2.1 end:vcard - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
SV: SV: [Axis2] Custom object not returned correctly from webservice
-Oprindelig meddelelse- Fra: Deepal jayasinghe [mailto:[EMAIL PROTECTED] Sendt: 26. oktober 2007 17:34 Til: axis-user@ws.apache.org Emne: Re: SV: [Axis2] Custom object not returned correctly from webservice Peter A. Kirk wrote: I can return Strings and even String[] no problem, but not my custom type which after all only contains strings? Is it at all possible to return custom types from a java/axis2 webservice? I have found numerous other questions on the web regarding Yes you can. Well, thanks. Nice to at least have that confirmed so I'm not completely barking up the wrong tree trying to get this to work. Are there any special annotations or anything else required to enable this? I really can't see why a simple object holding a few strings isn't very simple to return from a webservice. Could there be a problem with the wsdl describing this object? Seems strange though that the c# client knows about the class, but the internal values are sent. /Peter - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Axis stub response to JSP.
Thanks for this info.. My stub do not publish the objects like getEmployees() since I am using Axis Messaging Elements. I am not sure if I need to use stub.getPullParser(QName) and read the XML output. From: Raghu Upadhyayula [mailto:[EMAIL PROTECTED] Sent: Thursday, October 25, 2007 5:09 PM To: axis-user@ws.apache.org Subject: RE: Axis stub response to JSP. I guess, you can directly invoke your webservice from JSP using the stub (I haven't tried it though). For Ex: % String endPointURL = http://localhost/webservices/services/MyService; MyServiceStub stub = new MyServiceStub(endPointURL); Employee[] employees = stub.getEmployees(); // getEmployees is a method in your service // Use this employees array to display the data in the jsp. % From: Martin Gainty [mailto:[EMAIL PROTECTED] Sent: Thursday, October 26, 2000 1:33 PM To: axis-user@ws.apache.org Subject: Re: Axis stub response to JSP. JSP - Servlet(packages WSDLToJava StubClient) including encoding SOAP Request into XML- AxisServlet AxisServlet- XML response back to Servlet - Servlet parses the XML /populates beans/sends textResponse back -JSP (AJAX Div Tag or create ResultsJsp) Im sure there is a simpler solution..Anyone else? M-- - Original Message - From: Ajay Joshi mailto:[EMAIL PROTECTED] To: axis-user@ws.apache.org Sent: Thursday, October 25, 2007 3:32 PM Subject: Axis stub response to JSP. Hi, How Axis stub (generated thru WSDL2Java) can return response to JSP? I can see response in XML format.. response can be print to browser using servlet in text/html format. . But I am not sure how to convert response to Java object than be displayed to JSP. Regards Ajay
RE: [Axis2] Problem with C# client accessing a Web Service
Hi Sudhir, I figured out the problem but don't really know how to solve it. Looks like the wsdl.exe tool I'm using has a bug. It creates a two-dimensional string array if the wsdl has nested elements that contains maxOccurs=unbounded. In my WSDL I have the elements defined as follows. complexType name=RecordData sequence element maxOccurs=unbounded name=fieldNames nillable=true type=xsd:string/ element maxOccurs=unbounded name=records nillable=true type=tns:Record/ /sequence /complexType complexType name=Record sequence element maxOccurs=unbounded name=fieldValues nillable=true type=xsd:string/ /sequence /complexType In the service class, this structure is generated as follows., observe that the records field is created as a string[][] instead or Record[] /// remarks/ [System.CodeDom.Compiler.GeneratedCodeAttribute(wsdl, 2.0.50727.42)] [System.SerializableAttribute()] [System.Diagnostics.DebuggerStepThroughAttribute()] [System.ComponentModel.DesignerCategoryAttribute(code)] [System.Xml.Serialization.XmlTypeAttribute(Namespace=urn:ws.rsys.com)] public partial class RecordData { private string[] fieldNamesField; private string[][] recordsField; /// remarks/ [System.Xml.Serialization.XmlElementAttribute(fieldNames, IsNullable=true)] public string[] fieldNames { get { return this.fieldNamesField; } set { this.fieldNamesField = value; } } /// remarks/ [System.Xml.Serialization.XmlArrayAttribute(IsNullable=true)] [System.Xml.Serialization.XmlArrayItemAttribute(fieldValues, typeof(string))] public string[][] records { get { return this.recordsField; } set { this.recordsField = value; } } } Thanks Raghu From: Sudhir Sharma [mailto:[EMAIL PROTECTED] Sent: Thursday, October 25, 2007 10:06 PM To: axis-user@ws.apache.org Subject: RE: [Axis2] Problem with C# client accessing a Web Service Hi Raghu, Can u put your code (java and C#) here so that we can check and compare them to find out the loop holes. Thanks Best Regards, Sudhir Sharma From: Raghu Upadhyayula [mailto:[EMAIL PROTECTED] Sent: Friday, October 26, 2007 4:09 AM To: axis-user@ws.apache.org Subject: [Axis2] Problem with C# client accessing a Web Service Hi, I have a webservice developed using Axis2 1.3. I wrote a Java client to access this webservice and everything is working fine. Today I started writing a C# client to access the same webservice. I've used the wsdl.exe tool that comes with Microsoft Visual Studio to generate the client code and wrote my own class to access methods in the web service. Now when I try to run the C# client, I'm getting the below exception. at System.Xml.Serialization.Compiler.Compile(Assembly parent, String ns, XmlSerializerCompilerParameters xmlParameters, Evidence evidence) at System.Xml.Serialization.TempAssembly.GenerateAssembly(XmlMapping[] xmlMappings, Type[] types, String defaultNamespace, Evidence evidence, XmlSerializerCompilerParameters parameters, Assembly assembly, Hashtable assemblies) at System.Xml.Serialization.TempAssembly..ctor(XmlMapping[] xmlMappings, Type[] types, String defaultNamespace, String location, Evidence evidence) at System.Xml.Serialization.XmlSerializer.FromMappings(XmlMapping[] mappings, Type type) at System.Web.Services.Protocols.SoapClientType..ctor(Type type) at System.Web.Services.Protocols.SoapHttpClientProtocol..ctor() at WSCSharpClient.ResponsysWSService..ctor() at WSCSharpClient.TestResponsysWS.login() at WSCSharpClient.TestResponsysWS.run() Unable to generate a temporary class (result=1). error CS0030: Cannot convert type 'string[]' to 'string' error CS0029: Cannot implicitly convert type 'string' to 'string[]' Does anyone have an idea what the problem is or am I missing anything else? Thanks in Advance. Raghu
Need help coding web service client with axis, please!!
Hi, My name is Paulo, and i'm from Portugal. I need to make a client to a web service, but i'm still fresh with SOAP/WSDL and Axis. I would appreciate any hel on this. I'm trying to access the services under http://meteo.estg.ipleiria.pt/webservice/service1.asmx The following is a sample SOAP 1.2 request and response example available on that page REQUEST POST /webservice/service1.asmx HTTP/1.1 Host: meteo.estg.ipleiria.pt Content-Type: application/soap+xml; charset=utf-8 Content-Length: length ?xml version=1.0 encoding=utf-8? soap12:Envelope xmlns:xsi=http://www.w3.org/2001/XMLSchema-instance; xmlns:xsd=http://www.w3.org/2001/XMLSchema; xmlns:soap12=http://www.w3.org/2003/05/soap-envelope; soap12:Body ValoresActuais_GetTemperatura xmlns=http://tempuri.org/; / /soap12:Body /soap12:Envelope RESPONSE HTTP/1.1 200 OK Content-Type: application/soap+xml; charset=utf-8 Content-Length: length ?xml version=1.0 encoding=utf-8? soap12:Envelope xmlns:xsi=http://www.w3.org/2001/XMLSchema-instance; xmlns:xsd=http://www.w3.org/2001/XMLSchema; xmlns:soap12=http://www.w3.org/2003/05/soap-envelope; soap12:Body ValoresActuais_GetTemperaturaResponse xmlns=http://tempuri.org/; ValoresActuais_GetTemperaturaResultfloat/ValoresActuais_GetTemperaturaResult /ValoresActuais_GetTemperaturaResponse /soap12:Body /soap12:Envelope --- And here The following is a sample SOAP 1.1 request and response on the same page REQUEST POST /webservice/service1.asmx HTTP/1.1 Host: meteo.estg.ipleiria.pt Content-Type: text/xml; charset=utf-8 Content-Length: length SOAPAction: http://tempuri.org/ValoresActuais_GetTemperatura; ?xml version=1.0 encoding=utf-8? soap:Envelope xmlns:xsi=http://www.w3.org/2001/XMLSchema-instance; xmlns:xsd=http://www.w3.org/2001/XMLSchema; xmlns:soap=http://schemas.xmlsoap.org/soap/envelope/; soap:Body ValoresActuais_GetTemperatura xmlns=http://tempuri.org/; / /soap:Body /soap:Envelope RESPONSE HTTP/1.1 200 OK Content-Type: text/xml; charset=utf-8 Content-Length: length ?xml version=1.0 encoding=utf-8? soap:Envelope xmlns:xsi=http://www.w3.org/2001/XMLSchema-instance; xmlns:xsd=http://www.w3.org/2001/XMLSchema; xmlns:soap=http://schemas.xmlsoap.org/soap/envelope/; soap:Body ValoresActuais_GetTemperaturaResponse xmlns=http://tempuri.org/; ValoresActuais_GetTemperaturaResultfloat/ValoresActuais_GetTemperaturaResult /ValoresActuais_GetTemperaturaResponse /soap:Body /soap:Envelope And here's the code i'm using to request that service public String consume() { try { String endpoint = http://meteo.estg.ipleiria.pt/webservice/service1.asmx;; Service service = new Service(); Call call = (Call) service.createCall(); call.setTargetEndpointAddress( new java.net.URL(endpoint) ); call.setOperationName(new QName(http://tempuri.org/;, ValoresActuais_GetTemperatura)); System.out.print(call.getOperationName()); System.out.print(call.getSOAPActionURI()); String ret = (String) call.invoke(new Object[] { } ); System.out.print(ret); } catch (Exception e) { System.err.println(e.toString()); return e.toString(); } } And i'm always getting the following error: Server did not recognize the value of HTTP Header SOAPAction: . So, what i 'm i doing wrong? Can someone help me on this, please? Thanks Paulo
Axis2 1.2:Caching Last operation
Hi: I see that in the ServiceContext class, there is a method to cache the last operation executed by making a call to 'setCachingOperationContext'. This is in turn being used by OperationClient before making a call to 'setLastOperationContext'. But I don't see any reference to 'getLastOperationContext()' anywhere else. Has this been implemented in the latest 1.3 version or am I missing something ? Thanx!! Santosh
Axis 1.4 and gSoap interoperability problems
I'm trying to get an Axis 1.4 client to communicate with a service implemented using gSoap. The published WSDL has an 'echo' service for debugging communication issues, but the error is a complaint that the 'input' service does not exist. I'm trying to invoke the 'echo' service, but the word 'echo' is not in the soap envelope. The client code is the JUnit code emitted by wsdl2java. The code invoking the SOAP call is simply: String response= binding.echo(foobar/foo); assertEquals(echo test,foobar/foo,response); From tcpmonitor, Client side [note that the word 'echo' is _not_ in the SOAP envelope, and yes its the Axis Java 1.4 libraries, not the 1.3 as listed as the User-Agent] POST / HTTP/1.0 Content-Type: text/xml; charset=utf-8 Accept: application/soap+xml, application/dime, multipart/related, text/* User-Agent: Axis/1.3 Host: development.iscompanies.com:80 Cache-Control: no-cache Pragma: no-cache SOAPAction: Content-Length: 311 Authorization: Basic ZHJnbmEwMDAwMjptYTE1Y2YxNXRnMTM= ?xml version=1.0 encoding=UTF-8?soapenv:Envelope xmlns:soapenv=http://schemas.xmlsoap.org/soap/envelope/; xmlns:xsd=http://www.w3.org/2001/XMLSchema; xmlns:xsi=http://www.w3.org/2001/XMLSchema-instance;soapenv:Bodyinput xmlns=lt;foogt;barlt;/foogt;/input/soapenv:Body/soapenv:Envelope Server Side HTTP/1.1 500 Internal Server Error Server: gSOAP/2.7 Content-Type: text/xml; charset=utf-8 Content-Length: 587 Connection: close ?xml version=1.0 encoding=UTF-8?SOAP-ENV:Envelope xmlns:SOAP-ENV=http://schemas.xmlsoap.org/soap/envelope/; xmlns:SOAP-ENC=http://schemas.xmlsoap.org/soap/encoding/; xmlns:xsi=http://www.w3.org/2001/XMLSchema-instance; xmlns:xsd=http://www.w3.org/2001/XMLSchema; xmlns:ns=urn:is-processSOAP-ENV:Body SOAP-ENV:encodingStyle=http://schemas.xmlsoap.org/soap/encoding/;SOAP-ENV:FaultfaultcodeSOAP-ENV:Client/faultcodefaultstringMethod 'input' not implemented: method name or namespace not recognized/faultstring/SOAP-ENV:Fault/SOAP-ENV:Body/SOAP-ENV:Envelope And the WSDL for folks reading this far: ?xml version=1.0 encoding=UTF-8? definitions name=Service targetNamespace=urn:xtech-process xmlns:tns=urn:xtech-process xmlns:SOAP-ENV=http://schemas.xmlsoap.org/soap/envelope/; xmlns:SOAP-ENC=http://schemas.xmlsoap.org/soap/encoding/; xmlns:xsi=http://www.w3.org/2001/XMLSchema-instance; xmlns:xsd=http://www.w3.org/2001/XMLSchema; xmlns:ns=urn:xtech-process xmlns:SOAP=http://schemas.xmlsoap.org/wsdl/soap/; xmlns:MIME=http://schemas.xmlsoap.org/wsdl/mime/; xmlns:DIME=http://schemas.xmlsoap.org/ws/2002/04/dime/wsdl/; xmlns:WSDL=http://schemas.xmlsoap.org/wsdl/; xmlns=http://schemas.xmlsoap.org/wsdl/; types schema targetNamespace=urn:xtech-process xmlns:SOAP-ENV=http://schemas.xmlsoap.org/soap/envelope/; xmlns:SOAP-ENC=http://schemas.xmlsoap.org/soap/encoding/; xmlns:xsi=http://www.w3.org/2001/XMLSchema-instance; xmlns:xsd=http://www.w3.org/2001/XMLSchema; xmlns:ns=urn:xtech-process xmlns=http://www.w3.org/2001/XMLSchema; elementFormDefault=unqualified attributeFormDefault=unqualified import namespace=http://schemas.xmlsoap.org/soap/encoding// !-- operation request element -- element name=process complexType sequence element name=input type=xsd:string minOccurs=0 maxOccurs=1 nillable=true/ /sequence /complexType /element !-- operation response element -- element name=processResponse complexType sequence element name=output type=xsd:string minOccurs=1 maxOccurs=1/ /sequence /complexType /element !-- operation request element -- element name=echo complexType sequence element name=input type=xsd:string minOccurs=0 maxOccurs=1 nillable=true/ /sequence /complexType /element !-- operation response element -- element name=echoResponse complexType sequence element name=output type=xsd:string minOccurs=1 maxOccurs=1/ /sequence /complexType /element /schema /types message name=processRequest part name=parameters element=ns:process/ /message message name=processResponse part name=parameters element=ns:processResponse/ /message message name=echoRequest part name=parameters element=ns:echo/ /message message name=echoResponse part name=parameters element=ns:echoResponse/ /message portType name=ServicePortType operation name=process documentationService definition of function ns__process/documentation input message=tns:processRequest/ output message=tns:processResponse/ /operation operation name=echo documentationService definition of function ns__echo/documentation input message=tns:echoRequest/ output message=tns:echoResponse/ /operation /portType binding name=Service type=tns:ServicePortType SOAP:binding style=document transport=http://schemas.xmlsoap.org/soap/http/ operation name=process SOAP:operation soapAction=/ input SOAP:body use=literal/ /input output SOAP:body use=literal/ /output /operation operation name=echo SOAP:operation soapAction=/ input
Re: Axis2 1.2:Caching Last operation
Bhojraj, Santosh wrote: Hi: I see that in the ServiceContext class, there is a method to cache the last operation executed by making a call to 'setCachingOperationContext'. This is in turn being used by OperationClient before making a call to 'setLastOperationContext'. But I don't see any reference to 'getLastOperationContext()' anywhere else. Has this been implemented in the latest 1.3 version or am I missing something ? Thanx!! Santosh from serviceClient you can get the last operation context as below getLastOperationContext(); Thanks Deepal - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Name for return parameter
I'm using axis2 1.3 for delivering web services: I've created a class (with the methods to be exposed) and a service descriptor, and then I've created the .aar archive and I've published it on the framework; it works perfectly with the majority of client libraries for many languages, but a couple of tools (such as an older version of Mono and the actual version on Adobe Flex2) gives me some problems, and that's because the return parameter has the word return as the name in the autogenerated wsdl file. Of course, return is a private word in almost every language, and the compilers of those languages complain... so the question is: is there the possibility to change the autogenerated name, without changing dramatically the way of developing my services? Or do I need to abandon the way of creating the class and the xml descriptor and using some other methods of development?
Re: Minimal set of jars for deployment of axis2 client app
Following is a recent discussion happend in the Axis2 Dev list.. http://www.nabble.com/-Axis2--Understanding-Axis2-dependencies-t4622338.html ~Thilina On 10/26/07, Dennis Urech [EMAIL PROTECTED] wrote: Does any know what the minimum distribution of jar files is for a client application. We have already found the xalan.jar and xerces.jar file have a conflict with the Preference system in JDK 1.6 and removing them from the classpath enabled both my SOAP functionality to work as well as Preferences. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] -- Thilina Gunarathne - http://thilinag.blogspot.com - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Axis 1.4 and gSoap interoperability problems
Hi, I experienced a similar problem. The code generators for gsoap and axis generated incompatible implementations, even when I gave each of them the exact same WSDL file. During my debugging I did some packet sniffing. It appeared that they could not agree on where the xmlns attribute should go. I ended up trying csoap ( http://csoap.sourceforge.net/ ). It worked with axis, but I strongly warn against using it. I've discovered nearly 30 buffer overflows and at least 1 memory leak in csoap. The project hasn't had much activity lately and the csoap author didn't respond to the patch I sent him. I've since created a new project cshampoo ( http://cshampoo.sourceforge.net ) to clean up csoap. I should be releasing the first beta in the next week or two. -Tom - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Axis 1.4 and gSoap interoperability problems
Since the libraries at each end are fixed, I was wondering about modifying the wsdl2java generated code in the 'ServiceStub' class [the createCall() method and / or the settings and parameters before the call.invoke() method is performed. I would not like to change the library on the client side, as it is working fine for RPC style calls to several other services [including a .NET service]. On 10/26/07, Cort, Tom [EMAIL PROTECTED] wrote: Hi, I experienced a similar problem. The code generators for gsoap and axis generated incompatible implementations, even when I gave each of them the exact same WSDL file. During my debugging I did some packet sniffing. It appeared that they could not agree on where the xmlns attribute should go. I ended up trying csoap ( http://csoap.sourceforge.net/ ). It worked with axis, but I strongly warn against using it. I've discovered nearly 30 buffer overflows and at least 1 memory leak in csoap. The project hasn't had much activity lately and the csoap author didn't respond to the patch I sent him. I've since created a new project cshampoo ( http://cshampoo.sourceforge.net ) to clean up csoap. I should be releasing the first beta in the next week or two. -Tom - 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 1.3 wsa:To header usage
Hello Erwin, The thing about intermediaries is that they are usually there to hide the address of the of the ultimate receiver ( imagine a gateway server or proxy for instance ). In that case flowing the address of the ultimate receiver across the intermediary would tend to make having the intermediary a bit pointless. Anyone else care to chime in? Cheers Brian DePradine Web Services Development IBM Hursley External +44 (0) 1962 816319 Internal 246319 If you can't find the time to do it right the first time, where will you find the time to do it again? Erwin Reinhoud [EMAIL PROTECTED] wrote on 25/10/2007 15:54:10: Hello all, Don't know if this is the correct location to post this, so please let me know if not. I create a client and want to make a call with WS-Addressing headers. What i noticed is that often there is a strong relation between the wsa:To value and the actual http uri being used to send the message to the next hop. I thought the wsa:To could contain the (logical) value of the end destination. So if there are two intermediairies than the wsa:To can stay the same over all hops. Currently this does not seem to be. Is my perception of the wsa:To wrong? ServiceClient client = new ServiceClient(context,null); Options ops = new Options(); Endpointreference to = new Endpointreference(finalDest); ops.setTo(to); Endpointreference epr = new Endpointreference(http: //localhost/axis2/services/myservice); client.setoptions(ops); client.setTargetEpr(epr); The ops.setTo value will be used to dispatch the message. Kind regards, Erwin - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] Unless stated otherwise above: IBM United Kingdom Limited - Registered in England and Wales with number 741598. Registered office: PO Box 41, North Harbour, Portsmouth, Hampshire PO6 3AU
RE: Problems with Schemas and WSDL in Axis2 (Fixed)
Hello all, Thank you for the help. A couple comments on the solution: 1) Although the wsdl2java converter placed my schema in the resources directory, the Axis2 Service Archiver did not add the schema into the archive web service file (*.aar). I resorted to manually copying the schema into the AAR file (the AAR file is just a ZIP file) each time I ran the archiver wizard. 2) I played around with the various schemaLocation and namespace attributes in my WSDL, but I don't know if this caused any problems in the end. Despite its appearance, the simple namespace HW is a valid URI; it's just a relative one, not absolute. Regards, Matt _ From: Amila Suriarachchi [mailto:[EMAIL PROTECTED] Sent: Friday, October 19, 2007 4:57 AM To: axis-user@ws.apache.org Subject: Re: Problems with Schemas and WSDL in Axis2 Can you have a look at with a nighly build. when generating the code with wsdl2java there is a folder created named as resources. under this folder you should have your wsdl and xsd file. wsdl file should referto the xsd file there. i.e it should have and entry like xs:import namespace=HW schemaLocation=HelloWorldSimple.xsd/ Amila. On 10/19/07, Matthew Fadoul [EMAIL PROTECTED] wrote: Hello all, I'm having trouble using my own schemas in WSDL. Part of it may be related to the Axis2 code generation. So, I've made my own HelloWorld example. Here's my process: 1) Make WSDL file (attached) 2) Process with Axis2 code generation to build client/server code. Fill in a little of the skeleton code. 3) Build inside Eclipse using Ant 4) Package with the Axis2 Service Archiver. I've attached my WSDL and Schema. The schema has little more than a type definition based on xs:string. I've placed my XSD file on a local server. This is reflected in the attached WSDL here: xs:import namespace= HW schemaLocation= http://strawberry/schema/HelloWorldSimple.xsd http://strawberry/schema/HelloWorldSimple.xsd / By the time the service gets placed on the Axis server, the reference to the schema in HelloWorldExternalSchemaService?wsdl becomes: xs:import namespace= HW schemaLocation=HelloWorldExternalSchemaService?xsd= http://strawberry/schema/HelloWorldSimple.xsd; / Unfortunately, Axis can't seem to resolve my schema with the xsd option. Because of this, the schema and all of its types are unresolved. As a side note, I've also toyed with locale schema (i.e. the XSD file is in the same directory as the WSDL file), though I haven't had much success with that route either. Questions. Are there: Any ideas or advice for integrating schemas with WSDL? Any ideas why the code generator is changing the schema location? Any glaring mistakes (e.g. namespace problems or DOC/RPC stuff) in my WSDL/XSD? Thank you! Matt - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] -- Amila Suriarachchi, WSO2 Inc.