org.apache.axis2.AxisFault: The input stream for an incoming message is null
Hi, I'm using version 1.3 of Axis2 to generate a java client (using wsdl2java tool) from wsdl(which is written in .net /C#). It is working fine if the size of the input is small. But get following error once the message size is bigger. org.apache.axis2.AxisFault: The input stream for an incoming message is null. at org.apache.axis2.transport.TransportUtils.createSOAPMessage(TransportUti ls.java:71) at org.apache.axis2.description.OutInAxisOperationClient.handleResponse(Out InAxisOperation.java:326) at org.apache.axis2.description.OutInAxisOperationClient.send(OutInAxisOper ation.java:389) at org.apache.axis2.description.OutInAxisOperationClient.executeImpl(OutInA xisOperation.java:211) at org.apache.axis2.client.OperationClient.execute(OperationClient.java:163 ) at sophis.client.scenariorequestservice.ScenarioRequestServiceStub.Scenario ApiRequest(ScenarioRequestServiceStub.java:486) I'll give and example. The object I'm sending to the service is a Job. It contains number of job items. If the number of job items exceeds 100, I'm getting the above error. I suspect something to do with SOAP message size. But I did not figure out anything to set to Options to fix the size of SOAP message. Any help will be appreciated. Regards, Anil From: sean.flann...@jwt.com [mailto:sean.flann...@jwt.com] Sent: Friday, August 28, 2009 3:44 PM To: axis-user@ws.apache.org Subject: Re: send soap attachment via AXIS2 What do you mean by 1. Come on man, I don't want to sound like a troll, but this is the whole problem with AXIS2. I'm not a lazy programmer. I gave you a very specific question. My problem is, all the documentation --including 1 on this page-- has such concise snippets, it assumes I know how to load the implied objects, that I don't. Am I asking a question that's more complex than I realize? I just want the code snippet for sending an attachment, but I feel like every time I see such info online (including your 1) it's a three line snapshot of a huge program that seems to have nothing in common with my code (e.g. its always some heavy awt client preparing stuff; why can't I just find how to send a jpg or text file via AXIS2?). I don't feel I know enough about AXIS2 to realize the pertinent parts about 1. And, by the way, I saw 1 when I did a google search. Are there no new users to AXIS2? prabath prab...@wso2.com 08/27/2009 09:42 PM Please respond to axis-user@ws.apache.org To axis-user@ws.apache.org cc Subject Re: send soap attachment via AXIS2 Please have a look at [1]. Thanks regards. -Prabath [1]:https://svn.apache.org/repos/asf/webservices/axis2/site/1_1/mtom-gui de.html sean.flann...@jwt.com wrote: Hello, I'm struggling to send a soap attachment with AXIS2. Most of the documentation I'm finding online is on receiving, rather than sending attachments. Here's the closest I've gathered to what the code should sort of look like (which is surely wrong): stub._getServiceClient().getOptions().setProperty(Constants.Configuratio n.ENABLE_MTOM, Constants.VALUE_TRUE); FileDataSource dataSource = new FileDataSource(c:\\myImageAttachment.jpg); DataHandler dataHandler = new DataHandler(dataSource); MessageContext.getCurrentMessageContext().addAttachment(dataHandler); stub.CreateIncident(); But that code does not work since getCurrentMessageContext returns null. Outside of attachments, the rest of the functionality works fine. It looks, to me, like the old version of Axis had an addAttachment method on the stub API, but I don't see anything comparable in 2. Any help would be appreciated. Thanks. Sean This transmission is intended solely for the person or organization to whom it is addressed and it may contain privileged and cofidential information. If you are not the intended recipient you should not copy, distribute or take any action in reliance on it. If you believe you received this transmission in error please notify the sender. 222 Merchandise Mart Plaza, Suite 250, Chicago, IL 60654, USA This transmission is intended solely for the person or organization to whom it is addressed and it may contain privileged and cofidential information. If you are not the intended recipient you should not copy, distribute or take any action in reliance on it. If you believe you received this transmission in error please notify the sender. 222 Merchandise Mart Plaza, Suite 250, Chicago, IL 60654, USA This email and any attachments are confidential and may also be privileged. If you are not the addressee, do not disclose, copy, circulate or in any other way use or rely on the information contained in this email or any attachments. If received in error, notify the sender immediately and delete this email and any attachments from your system
RE: org.apache.axis2.AxisFault: The input stream for an incoming message is null
Thanks for the help But the request is not reaching to service provider. It is throwing exception while calling the service. ___ Anil Kumar Saha Solution Delivery, Financial Markets Systems Development Standard Chartered Bank Phone: +65 6427 9173 Fax: +65 6336 0283 Email: anil-kumar.s...@sc.com Address: 180 Clemenceau Ave, Haw Par Centre Level 3, Singapore 239922 Website: http://www.standardchartered.com http://www.standardchartered.com/ ___ From: Amila Suriarachchi [mailto:amilasuriarach...@gmail.com] Sent: Friday, August 28, 2009 6:54 PM To: axis-user@ws.apache.org Subject: Re: org.apache.axis2.AxisFault: The input stream for an incoming message is null On Fri, Aug 28, 2009 at 1:18 PM, Saha, Anil Kumar anil-kumar.s...@sc.com wrote: Hi, I'm using version 1.3 of Axis2 to generate a java client (using wsdl2java tool) from wsdl(which is written in .net /C#). It is working fine if the size of the input is small. But get following error once the message size is bigger. org.apache.axis2.AxisFault: The input stream for an incoming message is null. at org.apache.axis2.transport.TransportUtils.createSOAPMessage(TransportUti ls.java:71) at org.apache.axis2.description.OutInAxisOperationClient.handleResponse(Out InAxisOperation.java:326) at org.apache.axis2.description.OutInAxisOperationClient.send(OutInAxisOper ation.java:389) at org.apache.axis2.description.OutInAxisOperationClient.executeImpl(OutInA xisOperation.java:211) at org.apache.axis2.client.OperationClient.execute(OperationClient.java:163 ) at sophis.client.scenariorequestservice.ScenarioRequestServiceStub.Scenario ApiRequest(ScenarioRequestServiceStub.java:486) I'll give and example. The object I'm sending to the service is a Job. It contains number of job items. If the number of job items exceeds 100, I'm getting the above error. I suspect something to do with SOAP message size. But I did not figure out anything to set to Options to fix the size of SOAP message. Any help will be appreciated. Can you check with a tcpmon the actual response you get from the server. It seems you get the 202 Accepted as the response. And also try with Axis2 1.5. thanks, Amila. Regards, Anil -- Amila Suriarachchi WSO2 Inc. blog: http://amilachinthaka.blogspot.com/ This email and any attachments are confidential and may also be privileged. If you are not the addressee, do not disclose, copy, circulate or in any other way use or rely on the information contained in this email or any attachments. If received in error, notify the sender immediately and delete this email and any attachments from your system. Emails cannot be guaranteed to be secure or error free as the message and any attachments could be intercepted, corrupted, lost, delayed, incomplete or amended. Standard Chartered PLC and its subsidiaries do not accept liability for damage caused by this email or any attachments and may monitor email traffic. Standard Chartered PLC is incorporated in England with limited liability under company number 966425 and has its registered office at 1 Aldermanbury Square, London, EC2V 7SB. Standard Chartered Bank (SCB) is incorporated in England with limited liability by Royal Charter 1853, under reference ZC18. The Principal Office of SCB is situated in England at 1 Aldermanbury Square, London EC2V 7SB. In the United Kingdom, SCB is authorised and regulated by the Financial Services Authority under FSA register number 114276. If you are receiving this email from SCB outside the UK, please click http://www.standardchartered.com/global/email_disclaimer.html to refer to the information on other jurisdictions.
Re: WSDL2C exception
thanks alot Dimuthu On Sun, Apr 5, 2009 at 6:18 PM, Dimuthu Gamage dimut...@gmail.com wrote: Hi Anil, You wsdl should have external wsdls or/and schemas that are imported or included. In that case you need to be online when running the tool. That is not a requirement of the tool. Thanks Dimuthu On Sun, Apr 5, 2009 at 10:06 AM, Anil anil.pund...@gmail.com wrote: I was trying to generate skelton and stub code from a wsdl file using WSDL2C.(axis2-1.4.1). It works fine when i am connected to internet. But throws exception when i am offline. Is it mandatory to be connected to internet when running WSDL2C? or am i missing any of the option in WSDL2C?? Please guide/coorect me if i am wrong. -- Regards, -Anil -- Thanks, Dimuthu Gamage http://www.dimuthu.org http://www.wso2.org -- Cheers, -Anil
WSDL2C exception
I was trying to generate skelton and stub code from a wsdl file using WSDL2C.(axis2-1.4.1). It works fine when i am connected to internet. But throws exception when i am offline. Is it mandatory to be connected to internet when running WSDL2C? or am i missing any of the option in WSDL2C?? Please guide/coorect me if i am wrong. -- Regards, -Anil
CallbackHandler not called Axis Exception : Unsupported SignedSupportingToken
Hi, I used the following policy file for the client and got the Axis Exception : Unsupported SignedSupportingToken exception , so I changed the policy file to include sp:SupportingTokens for secureconversation token and ran the client , this time it does not call the handle method on the CallbackHandler. What am I missing here. Any pointers appreciated. wsp:Policy wsu:Id=SecureConversation_UserNameOverTransport xmlns:wsu=http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssec urity-utility-1.0.xsd xmlns:wsp=http://schemas.xmlsoap.org/ws/2004/09/policy; xmlns:wsa=http://schemas.xmlsoap.org/ws/2004/08/addressing; xmlns:sp=http://schemas.xmlsoap.org/ws/2005/07/securitypolicy; wsp:ExactlyOne wsp:All sp:TransportBinding wsp:Policy sp:TransportToken wsp:Policy sp:HttpsToken RequireClientCertificate=false/ /wsp:Policy /sp:TransportToken sp:AlgorithmSuite wsp:Policy sp:Basic256/ /wsp:Policy /sp:AlgorithmSuite sp:Layout wsp:Policy sp:Lax/ /wsp:Policy /sp:Layout sp:IncludeTimestamp/ /wsp:Policy /sp:TransportBinding sp:SignedSupportingTokens wsp:Policy sp:SecureConversationToken sp:IncludeToken=http://schemas.xmlsoap.org/ws/2005/07/securitypolicy/In cludeToken/AlwaysToRecipient wsp:Policy sp:BootstrapPolicy wsp:Policy sp:TransportBinding wsp:Policy sp:TransportToken wsp:Policy sp:HttpsToken RequireClientCertificate=false/ /wsp:Policy /sp:TransportToken sp:AlgorithmSuite wsp:Policy sp:Basic256/ /wsp:Policy /sp:AlgorithmSuite sp:Layout wsp:Policy sp:Lax/ /wsp:Policy /sp:Layout sp:IncludeTimestamp/ /wsp:Policy /sp:TransportBinding sp:SignedSupportingTokens wsp:Policy sp:UsernameToken sp:IncludeToken=http://schemas.xmlsoap.org/ws/2005/07/securitypolicy/In cludeToken/AlwaysToRecipient wsp:Policy sp:WssUsernameToken10/ /wsp:Policy /sp:UsernameToken /wsp:Policy /sp:SignedSupportingTokens /wsp:Policy /sp:BootstrapPolicy /wsp:Policy /sp:SecureConversationToken /wsp:Policy /sp:SignedSupportingTokens /wsp:All /wsp:ExactlyOne /wsp:Policy Thanks, -Anil
getting Axis Exception : WSDoAllReceiver: security processing failed (actions mismatch)
Hi , I am getting the following exception when running my client. The services.xml has the action mapping as bellow: operation name=myAction mep=http://www.w3.org/ns/wsdl/in-out; actionMappingurn:myAction/actionMapping outputActionMappinghttp:///myActionResponse/outputActionMapping /operation In the client code I am setting the action as Following: options.setAction(urn:myAction); what am I doing wrong to get this exception : [java] Axis Exception : WSDoAllReceiver: security processing failed (actions mismatch) [java] org.apache.axis2.AxisFault: WSDoAllReceiver: security processing fai led (actions mismatch) [java] at org.apache.axis2.util.Utils.getInboundFaultFromMessageContext (Utils.java:486) [java] at org.apache.axis2.description.OutInAxisOperationClient.handleR esponse(OutInAxisOperation.java:343) [java] at org.apache.axis2.description.OutInAxisOperationClient.send(Ou tInAxisOperation.java:389) [java] at org.apache.axis2.description.OutInAxisOperationClient.execute Impl(OutInAxisOperation.java:211) [java] at org.apache.axis2.client.OperationClient.execute(OperationClie nt.java:163) [java] at org.apache.axis2.client.ServiceClient.sendReceive(ServiceClie nt.java:528) [java] at org.apache.axis2.client.ServiceClient.sendReceive(ServiceClie nt.java:508) [java] at com.arccorp.iar.util.ws.XmlLoadClient2.main(XmlLoadClient2.ja va:112) Any pointers please. Your help is appreciated. Thanks, -Anil
client for a secure conversation
Hi, I would like to get a reference to writing a client for a secure conversation using the rampart module, I saw the sample 4 in the samples with the rampart module and it does not help me show how to send multiple messages in a single secure conversation. If anyone has implemented such a fashion, please let me know how to go about writing a client that can send multiple messages using the STC (security token). Thanks, -Anil
Ws-secureconversation rampart samples
Hi, I have the same requirement and I see no reply to the question below, if some has a sample please let me know. Thanks, -Anil Misra Hi Ruchith, Do you have please sample configuration where the base token in RST is usernametoken instead of x509? Thank you, Elena - Original Message From: Ruchith Fernando [EMAIL PROTECTED] To: axis-user@ws.apache.org Sent: Tuesday, February 13, 2007 9:25:28 AM Subject: Re: Ws-secureconversation rampart samples Hi Elena, Please have a look at policy/sample04 in the samples directory of the rampart-1.1 release. Thanks, Ruchith On 2/11/07, Elena Neroslavskaya [EMAIL PROTECTED] wrote: Hello, I'm looking to implement an axis client establishing and canceling security context with ws-secureconversation protocol. Do you have a code sample sending RST, using context and cancelling it in Rampart? Any tutorial or sample will be very helpful, thank you in advance, Elena
[Axis2] Question about interactiving with different Axis2 versions
Hi, We use Axis2 for the WebServices and ADB for the code generation. Currently, the Server side uses Axis2 1.1.1 version and Client uses Axis2 1.2 version for code generation (stubs etc). Is this type of set-up okay? or will there be any problem with different versions. Can Client version be different from the Server and vice versa? Which layer (server/client) can have upper version? Thanks. -- View this message in context: http://www.nabble.com/-Axis2--Question-about-interactiving-with-different-Axis2-versions-tp14406286p14406286.html Sent from the Axis - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Error when using XPath to parse element...
Disregard please.. Got it working with the following: String xpathString = //u:providerInfoRequest/u:consumerId; AXIOMXPath xpathExpression = new AXIOMXPath(xpathString); xpathExpression.addNamespace(u, urn:my:schema:messages:2007-01-01); String consumerIdValue = xpathExpression.stringValueOf(request); Where request is the inbound SOAP Request (OMElement) Regards, - Anil -Original Message- Sent: Saturday, October 06, 2007 9:49 PM I currently have the following SOAP request being sent to an Axis2 service: soapenv:Envelope xmlns:soapenv=http://schemas.xmlsoap.org/soap/envelope/; xmlns:urn=urn:my:schema:messages:2007-01-01 soapenv:Header/ soapenv:Body urn:providerInfoRequest urn:consumerIdSomeValue/urn:consumerId /urn:providerInfoRequest /soapenv:Body /soapenv:Envelope On the service side, I am trying to parse out the value of consumerId. I am using the following code and am getting a SOAP fault: String xpathString = /s:Envelope/s:Body/u:providerInfoRequest/u:consumerId; AXIOMXPath xpathExpression = new AXIOMXPath(xpathString); xpathExpression.addNamespace(u, urn:my:schema:messages:2007-01-01); xpathExpression.addNamespace(s, http://schemas.xmlsoap.org/soap/envelope/;); OMElement consumerId = (OMElement) xpathExpression.selectSingleNode(element); String idValue = consumerId.toString(); I am a newbie to using XPath with AXIOM and am more than likely doing something wrong here.. Would appreciate some help in troubleshooting. Regards, - Anil - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Error when using XPath to parse element...
I currently have the following SOAP request being sent to an Axis2 service: soapenv:Envelope xmlns:soapenv=http://schemas.xmlsoap.org/soap/envelope/; xmlns:urn=urn:my:schema:messages:2007-01-01 soapenv:Header/ soapenv:Body urn:providerInfoRequest urn:consumerIdSomeValue/urn:consumerId /urn:providerInfoRequest /soapenv:Body /soapenv:Envelope On the service side, I am trying to parse out the value of consumerId. I am using the following code and am getting a SOAP fault: String xpathString = /s:Envelope/s:Body/u:providerInfoRequest/u:consumerId; AXIOMXPath xpathExpression = new AXIOMXPath(xpathString); xpathExpression.addNamespace(u, urn:my:schema:messages:2007-01-01); xpathExpression.addNamespace(s, http://schemas.xmlsoap.org/soap/envelope/;); OMElement consumerId = (OMElement) xpathExpression.selectSingleNode(element); String idValue = consumerId.toString(); I am a newbie to using XPath with AXIOM and am more than likely doing something wrong here.. Would appreciate some help in troubleshooting. Regards, - Anil - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Developing doc/lit Axis service
Hi, I need assistance - documentation to start with - to develop a doc/lit Axis SOAP service (using custom serializer/deserializers). Can someone please point to an appropriate resource? Thanks, Anil _ From: Anil Kumar Tappetla [mailto:[EMAIL PROTECTED] Sent: Saturday, July 28, 2007 11:50 AM To: axis-user@ws.apache.org Subject: Documentation on customization Hi, I am faced with developing an Axis 1.2 service that requires custom deserialization/serialization. There does not seem to be an available documentation on developing such services, or is there? Can someone please point me to an appropriate resource in this respect? Regards, Anil
RE: how to tell if axis 1.4 is using http persistent connections or not?
Does anyone know? -Original Message- From: Anil Philip [mailto:[EMAIL PROTECTED] Sent: Thursday, August 02, 2007 12:08 PM To: axis Subject: how to tell if axis 1.4 is using http persistent connections or not? Hello, how to tell if axis 1.4 is using http persistent connections or not? And how to configure it. thanks much, Anil Moody friends. Drama queens. Your life? Nope! - their life, your story. Play Sims Stories at Yahoo! Games. http://sims.yahoo.com/ - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
how to tell if axis 1.4 is using http persistent connections or not?
Hello, how to tell if axis 1.4 is using http persistent connections or not? And how to configure it. thanks much, Anil Moody friends. Drama queens. Your life? Nope! - their life, your story. Play Sims Stories at Yahoo! Games. http://sims.yahoo.com/ - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
basic qs. axis and closing connections
Hello, Can anyone confirm - an axis client does not need to close its connection to the server after a call? thanks, Anil Take the Internet to Go: Yahoo!Go puts the Internet in your pocket: mail, news, photos more. http://mobile.yahoo.com/go?refer=1GNXIC - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Documentation on customization
Hi, I am faced with developing an Axis 1.2 service that requires custom deserialization/serialization. There does not seem to be an available documentation on developing such services, or is there? Can someone please point me to an appropriate resource in this respect? Regards, Anil
RE: [Axis2] Problems with Statefull WebService and .NET client
WSE 3.0 is fully supported with .NET 2.0. You can find out more about it @ http://msdn2.microsoft.com/en-us/webservices/aa740663.aspx There is a link to download it from the link above. There are also links to hands on labs on the page above that should hopefully provide you with what you need. Just as an FYI, in the following article @ http://msdn2.microsoft.com/en-us/library/ms977317.aspx ... there is a section on Stateful sessions. Please note that I have not delved into this any great detail and am not sure if what Axis2 is calling a stateful web services is the same as what .NET 2.0 + WSE is calling a stateful web service. Regards, - Anil -Original Message- From: Walker, Jeff [mailto:[EMAIL PROTECTED] Sent: Thursday, July 05, 2007 9:55 AM To: axis-user@ws.apache.org Subject: RE: [Axis2] Problems with Statefull WebService and .NET client I'm no .Net expert, but I think WS-Addressing is only supported in WSE 3.0. http://msdn2.microsoft.com/en-us/library/aa529362.aspx Which is a kind of add-on support library that you need to download for free from the Microsoft website. I don't know what is included in .NET 2.0. (Probably not WS-Addressing support, according to the info you supplied). Now, in theory, if you can't get WSE 3.0 to work in your .NET 2.0 environment, you could attempt to write your own message handlers to handle WS-Addressing headers. But that would be a complex task, I think. But, in general, this page should help, for soap header manipulation in .NET (at least the basics, anyway). http://msdn2.microsoft.com/en-us/library/whew6x7f.aspx -jeff -Original Message- From: Jochen Zink [mailto:[EMAIL PROTECTED] Sent: Wednesday, July 04, 2007 5:38 AM To: axis-user@ws.apache.org Subject: [Axis2] Problems with Statefull WebService and .NET client Hello, I have a StateFull WebService written with Axis2 1.1.1 with scope=soapsession. Know I want to develop a .NET client to test interoperability. It works well, I can call every Service Method. But the client ignores WS-Addressing information's. The ServiceGroupID is not sended back to the WebService. I know this is not a axis2 question, but I hope anybody here has written a .net 2.0 client, to consume a statefull webservice. With the wsdl.exe tool, I have generate a Proxy class. I can't access to the soap header (or I don't know how), to read the servicegroupID by hand and send it back. Does anyone know how does this work or where I can find information's about that? I try to search MSDN and google. Without useful results. Thanks a lot! _ Der WEB.DE SmartSurfer hilft bis zu 70% Ihrer Onlinekosten zu sparen! http://smartsurfer.web.de/?mc=100071distributionid=0066 - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
[axis2] Where can i get the latest version of nightly builds
Hi Where can i get the latest version of the nightly builds. If this is not possible do i have to use svn to get the source and build it on my box. Thanks Anil
[axis2] Generated wsdl contains exception fault element after every response
Hi I have deployed my application as a war file by modifying the axis2 service, when i use the http://localhost:8080/axis2/services/rwb?wsdl; i get the wsdl withe an exception fault element after every service. Is there any way i can see to it that the Exception fault element does not reappear after every method name as when i am trying to use a .NET client to access the service it is unable to create a proxy with that element. xs:element name=ListAllProjectsResponse xs:complexType xs:sequence xs:element maxOccurs=unbounded name=return nillable=true type=ns3:Project / /xs:sequence /xs:complexType /xs:element xs:element name=ExceptionFault xs:complexType xs:sequence xs:element name=Exception nillable=true type=xs:anyType / /xs:sequence /xs:complexType Thanks Anil
[axis2] When and why do we get the ExceptionFault element in the wsdl returned by an axis2 application
Hi When and why do we get the ExceptionFault element in the wsdl returned by an axis2 application. The below element shows up as the first element of my wsdl. If this has already been discussed can you point me to a thread that contains this information. xs:element name=ExceptionFault xs:complexType xs:sequence xs:element name=Exception nillable=true type=xs:anyType/ /xs:sequence /xs:complexType /xs:element Thanks Anil
Re: [axis2] Generated wsdl contains exception fault element after every response
Hi I have observed that it is not after very element though, it is typically after functions that throw an Exception. I just wan to make sure before i submit a JIRA as you already seem to have fixed one https://issues.apache.org/jira/browse/AXIS2-2759; Thanks Anil On 6/28/07, Davanum Srinivas [EMAIL PROTECTED] wrote: Please create a JIRA issue and upload your service sample etc.. thanks, dims On 6/28/07, Anil Chukkapalli [EMAIL PROTECTED] wrote: Hi I have deployed my application as a war file by modifying the axis2 service, when i use the http://localhost:8080/axis2/services/rwb?wsdl; i get the wsdl withe an exception fault element after every service. Is there any way i can see to it that the Exception fault element does not reappear after every method name as when i am trying to use a .NET client to access the service it is unable to create a proxy with that element. xs:element name=ListAllProjectsResponse xs:complexType xs:sequence xs:element maxOccurs=unbounded name=return nillable=true type=ns3:Project / /xs:sequence /xs:complexType /xs:element xs:element name=ExceptionFault xs:complexType xs:sequence xs:element name=Exception nillable=true type=xs:anyType / /xs:sequence /xs:complexType Thanks Anil -- Davanum Srinivas :: http://davanum.wordpress.com - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: [axis2] Deployment of an axis2 and struts appplication
Hi Raghu Can you tell me the exploded approach that you used as that seems a good alternative to all this. The application was previously deployed as war file and it is an Axis1 application. I dont have a conf directory with axis2.xmlas a part of it. What could be the contents of axis2.xml . Do we need a wsdl file for our service to be present along with services.xml. Thanks Anil On 6/20/07, Raghu Upadhyayula [EMAIL PROTECTED] wrote: Hi Anil, I'm not sure what's happening in your case, but I've tried both approaches, the aar file also the exploded approach. Here's my deployment structure. tomcat/webapps webservices WEB-INF web.xml classes com abccorp xyz conf axis2.xml lib all required jars modules addressing-1.2.mar soapmonitor-1.2.mar services MyService META-INF MyService.wsdl services.xml Thanks Raghu -- *From:* Anil Chukkapalli [mailto:[EMAIL PROTECTED] *Sent:* Tuesday, June 19, 2007 4:33 PM *To:* axis-user@ws.apache.org *Subject:* Re: [axis2] Deployment of an axis2 and struts appplication Raghu Yes I did, is there any other place the services.xml file sis supposed to be present. Thanks Anil On 6/19/07, *Raghu Upadhyayula* [EMAIL PROTECTED] wrote: Anil, Did you try putting your services.xml file in an aar file and put the aar file under WEB-INF/services folder? Thanks Raghu -- *From:* Anil Chukkapalli [mailto:[EMAIL PROTECTED] *Sent:* Tuesday, June 19, 2007 4:17 PM *To:* axis-user@ws.apache.org *Subject:* Re: [axis2] Deployment of an axis2 and struts appplication Hi I am trying to deploy an axis2 application and i received and exception stating that services.xml is not found, below is my deployment hierarchy Appname - css - images - jsp - lib - WEB-INF - services - ServiceName - META-INF - services.xml - com (class files containing compiled source) - abccorp - xyz - script I am trying to place services.xml in most of the place hoping that Axis2 can pick it up but it still fails to do so. Is there any other deployment mechanism for my application org.apache.axis2.deployment.DeploymentException: services.xml not found for service 'C:\Program Files\Apache Software Foundation\Tomcat 5.5\webapps\axis2\WEB-INF\services\rwb.aar'; nested exception is: org.apache.axis2.deployment.DeploymentException: services.xml not found for service 'C:\Program Files\Apache Software Foundation\Tomcat 5.5\webapps\axis2\WEB-INF\services\rwb.aar' at] Thanks Anil On 6/19/07, *Anil Chukkapalli* [EMAIL PROTECTED] wrote: Hi Raghu Still unable to delpoy the service, i tried both methods of deployment and all it says is that it is a faulty service. I need to show a working prototype before testing this application. Thank you Anil On 6/15/07, *Raghu Upadhyayula* [EMAIL PROTECTED] wrote: Hi Anil, Your services.xml is in wrong location according to what I read from http://ws.apache.org/axis2/1_2/quickstartguide.html#services In the samples mentioned at the above mentioned link, the example of a StockQuoteService looks like shown below. This is structure should be under WEB-INF/services - StockQuoteService - META-INF - services.xml - lib - samples - quickstart - service - pojo - StockQuoteService.class So in your case, your application structure should look like this. Appname - css - images - jsp - lib - WEB-INF - services - ServiceName - META-INF - services.xml - com (class files containing compiled source) - abccorp - xyz - script *OR* Appname - css - images - jsp - lib - WEB-INF - classes - com (class files containing compiled source) - abccorp - xyz - services - ServiceName - META-INF - services.xml - script Thanks Raghu -- *From:* Anil Chukkapalli [mailto: [EMAIL PROTECTED] *Sent:* Friday, June 15, 2007 12:12 PM *To:* axis-user@ws.apache.org *Subject:* Re: [axis2] Deployment of an axis2 and struts appplication Hi Raghu Appname CSS IMAGES JSP LIB WEB-INF services.xml META-INF SCRIPT com (class files containing compiled source) abccorp xyz Thanks Anil On 6/15/07, *Raghu Upadhyayula* [EMAIL PROTECTED] wrote: Hi Anil
Re: [axis2] Deployment of an axis2 and struts appplication
Hi Raghu It was a Axis1 application that I ported over to axis2. It was previously deployed as an Axis application.I am trying to deploy the application ideally as a war file ideally and if not possible deploy it as an aar file. [i accidentally wrote that it is an Axis1 application but it was an Axis1 and currently is an Axis 2 application] Thanks Anil On 6/20/07, Anil Chukkapalli [EMAIL PROTECTED] wrote: Hi Raghu Can you tell me the exploded approach that you used as that seems a good alternative to all this. The application was previously deployed as war file and it is an Axis1 application. I dont have a conf directory with axis2.xml as a part of it. What could be the contents of axis2.xml . Do we need a wsdl file for our service to be present along with services.xml. Thanks Anil On 6/20/07, Raghu Upadhyayula [EMAIL PROTECTED] wrote: Hi Anil, I'm not sure what's happening in your case, but I've tried both approaches, the aar file also the exploded approach. Here's my deployment structure. tomcat/webapps webservices WEB-INF web.xml classes com abccorp xyz conf axis2.xml lib all required jars modules addressing-1.2.mar soapmonitor-1.2.mar services MyService META-INF MyService.wsdl services.xml Thanks Raghu -- *From:* Anil Chukkapalli [mailto:[EMAIL PROTECTED] *Sent:* Tuesday, June 19, 2007 4:33 PM *To:* axis-user@ws.apache.org *Subject:* Re: [axis2] Deployment of an axis2 and struts appplication Raghu Yes I did, is there any other place the services.xml file sis supposed to be present. Thanks Anil On 6/19/07, *Raghu Upadhyayula* [EMAIL PROTECTED] wrote: Anil, Did you try putting your services.xml file in an aar file and put the aar file under WEB-INF/services folder? Thanks Raghu -- *From:* Anil Chukkapalli [mailto: [EMAIL PROTECTED] *Sent:* Tuesday, June 19, 2007 4:17 PM *To:* axis-user@ws.apache.org *Subject:* Re: [axis2] Deployment of an axis2 and struts appplication Hi I am trying to deploy an axis2 application and i received and exception stating that services.xml is not found, below is my deployment hierarchy Appname - css - images - jsp - lib - WEB-INF - services - ServiceName - META-INF - services.xml - com (class files containing compiled source) - abccorp - xyz - script I am trying to place services.xml in most of the place hoping that Axis2 can pick it up but it still fails to do so. Is there any other deployment mechanism for my application org.apache.axis2.deployment.DeploymentException: services.xml not found for service 'C:\Program Files\Apache Software Foundation\Tomcat 5.5\webapps\axis2\WEB-INF\services\rwb.aar'; nested exception is: org.apache.axis2.deployment.DeploymentException: services.xml not found for service 'C:\Program Files\Apache Software Foundation\Tomcat 5.5\webapps\axis2\WEB-INF\services\rwb.aar' at] Thanks Anil On 6/19/07, *Anil Chukkapalli* [EMAIL PROTECTED] wrote: Hi Raghu Still unable to delpoy the service, i tried both methods of deployment and all it says is that it is a faulty service. I need to show a working prototype before testing this application. Thank you Anil On 6/15/07, *Raghu Upadhyayula* [EMAIL PROTECTED] wrote: Hi Anil, Your services.xml is in wrong location according to what I read from http://ws.apache.org/axis2/1_2/quickstartguide.html#services In the samples mentioned at the above mentioned link, the example of a StockQuoteService looks like shown below. This is structure should be under WEB-INF/services - StockQuoteService - META-INF - services.xml - lib - samples - quickstart - service - pojo - StockQuoteService.class So in your case, your application structure should look like this. Appname - css - images - jsp - lib - WEB-INF - services - ServiceName - META-INF - services.xml - com (class files containing compiled source) - abccorp - xyz - script *OR* Appname - css - images - jsp - lib - WEB-INF - classes - com (class files containing compiled source) - abccorp - xyz - services - ServiceName - META-INF - services.xml - script Thanks Raghu
[axis2] Can you deploy an axis2 application using a war file
Hi Can you deploy an axis2 application as a war file. Can you deploy an axis2 application as an ear file. if so how is it possible (are there any changtes fromt he way you deploy a regular war application or structure it). Thanks Anil
Re: [axis2] Can you deploy an axis2 application using a war file
Hi Oops,I meant my application that uses Axis2 to publish web services not the axis application as a war file, my previous message was kind of misleading. I am using tomcat not was to deploy my app. I just want ot know if it possible to deploy my app as a independent war file instead of an aar file. Thanks Anil On 6/20/07, Chad DeBauch [EMAIL PROTECTED] wrote: You can download it as war distribution right off the Axis2 web site. http://ws.apache.org/axis2/download/1_2/download.cgi I use it as a war or an ear in WAS 6.1. Chad On 6/20/07, Anil Chukkapalli [EMAIL PROTECTED] wrote: Hi Can you deploy an axis2 application as a war file. Can you deploy an axis2 application as an ear file. if so how is it possible (are there any changtes fromt he way you deploy a regular war application or structure it). Thanks Anil
Re: [axis2] Deployment of an axis2 and struts appplication
Hi Raghu Still unable to delpoy the service, i tried both methods of deployment and all it says is that it is a faulty service. I need to show a working prototype before testing this application. Thank you Anil On 6/15/07, Raghu Upadhyayula [EMAIL PROTECTED] wrote: Hi Anil, Your services.xml is in wrong location according to what I read from http://ws.apache.org/axis2/1_2/quickstartguide.html#services In the samples mentioned at the above mentioned link, the example of a StockQuoteService looks like shown below. This is structure should be under WEB-INF/services - StockQuoteService - META-INF - services.xml - lib - samples - quickstart - service - pojo - StockQuoteService.class So in your case, your application structure should look like this. Appname - css - images - jsp - lib - WEB-INF - services - ServiceName - META-INF - services.xml - com (class files containing compiled source) - abccorp - xyz - script *OR* Appname - css - images - jsp - lib - WEB-INF - classes - com (class files containing compiled source) - abccorp - xyz - services - ServiceName - META-INF - services.xml - script Thanks Raghu -- *From:* Anil Chukkapalli [mailto:[EMAIL PROTECTED] *Sent:* Friday, June 15, 2007 12:12 PM *To:* axis-user@ws.apache.org *Subject:* Re: [axis2] Deployment of an axis2 and struts appplication Hi Raghu Appname CSS IMAGES JSP LIB WEB-INF services.xml META-INF SCRIPT com (class files containing compiled source) abccorp xyz Thanks Anil On 6/15/07, *Raghu Upadhyayula* [EMAIL PROTECTED] wrote: Hi Anil, Can you tell how your application structure looks like … something like this … Appname WEB-INF classes Thanks Raghu -- *From:* Anil Chukkapalli [mailto:[EMAIL PROTECTED] *Sent:* Friday, June 15, 2007 10:49 AM *To:* axis-user@ws.apache.org *Subject:* [axis2] Deployment of an axis2 and struts appplication Hi I have a struts application which also exposes Axis 2 web services. The application was deployed using .wsdd file in Axis and i ported it over to Axis2 and packaged the application using an aar file instead of a war file. When i try to deploy it using the deploy utility in Axis2 admin it says the deployed service is faulty. I created the META-INF folder with services.xml and it also has other folders that are used by the struts application. Is there any way i can use the wsdd file in Axis 2 or is there way aar or any other deployment mechanism can handle such a deployment in Tomcat 4.5 Thank you Anil
Re: [axis2] Deployment of an axis2 and struts appplication
Hi I am trying to deploy an axis2 application and i received and exception stating that services.xml is not found, below is my deployment hierarchy Appname - css - images - jsp - lib - WEB-INF - services - ServiceName - META-INF - services.xml - com (class files containing compiled source) - abccorp - xyz - script I am trying to place services.xml in most of the place hoping that Axis2 can pick it up but it still fails to do so. Is there any other deployment mechanism for my application org.apache.axis2.deployment.DeploymentException: services.xml not found for service 'C:\Program Files\Apache Software Foundation\Tomcat 5.5\webapps\axis2\WEB-INF\services\rwb.aar'; nested exception is: org.apache.axis2.deployment.DeploymentException: services.xml not found for service 'C:\Program Files\Apache Software Foundation\Tomcat 5.5\webapps\axis2\WEB-INF\services\rwb.aar' at] Thanks Anil On 6/19/07, Anil Chukkapalli [EMAIL PROTECTED] wrote: Hi Raghu Still unable to delpoy the service, i tried both methods of deployment and all it says is that it is a faulty service. I need to show a working prototype before testing this application. Thank you Anil On 6/15/07, Raghu Upadhyayula [EMAIL PROTECTED] wrote: Hi Anil, Your services.xml is in wrong location according to what I read from http://ws.apache.org/axis2/1_2/quickstartguide.html#services In the samples mentioned at the above mentioned link, the example of a StockQuoteService looks like shown below. This is structure should be under WEB-INF/services - StockQuoteService - META-INF - services.xml - lib - samples - quickstart - service - pojo - StockQuoteService.class So in your case, your application structure should look like this. Appname - css - images - jsp - lib - WEB-INF - services - ServiceName - META-INF - services.xml - com (class files containing compiled source) - abccorp - xyz - script *OR* Appname - css - images - jsp - lib - WEB-INF - classes - com (class files containing compiled source) - abccorp - xyz - services - ServiceName - META-INF - services.xml - script Thanks Raghu -- *From:* Anil Chukkapalli [mailto:[EMAIL PROTECTED] *Sent:* Friday, June 15, 2007 12:12 PM *To:* axis-user@ws.apache.org *Subject:* Re: [axis2] Deployment of an axis2 and struts appplication Hi Raghu Appname CSS IMAGES JSP LIB WEB-INF services.xml META-INF SCRIPT com (class files containing compiled source) abccorp xyz Thanks Anil On 6/15/07, *Raghu Upadhyayula* [EMAIL PROTECTED] wrote: Hi Anil, Can you tell how your application structure looks like … something like this … Appname WEB-INF classes Thanks Raghu -- *From:* Anil Chukkapalli [mailto: [EMAIL PROTECTED] *Sent:* Friday, June 15, 2007 10:49 AM *To:* axis-user@ws.apache.org *Subject:* [axis2] Deployment of an axis2 and struts appplication Hi I have a struts application which also exposes Axis 2 web services. The application was deployed using .wsdd file in Axis and i ported it over to Axis2 and packaged the application using an aar file instead of a war file. When i try to deploy it using the deploy utility in Axis2 admin it says the deployed service is faulty. I created the META-INF folder with services.xml and it also has other folders that are used by the struts application. Is there any way i can use the wsdd file in Axis 2 or is there way aar or any other deployment mechanism can handle such a deployment in Tomcat 4.5 Thank you Anil
Re: [axis2] Deployment of an axis2 and struts appplication
Raghu Yes I did, is there any other place the services.xml file sis supposed to be present. Thanks Anil On 6/19/07, Raghu Upadhyayula [EMAIL PROTECTED] wrote: Anil, Did you try putting your services.xml file in an aar file and put the aar file under WEB-INF/services folder? Thanks Raghu -- *From:* Anil Chukkapalli [mailto:[EMAIL PROTECTED] *Sent:* Tuesday, June 19, 2007 4:17 PM *To:* axis-user@ws.apache.org *Subject:* Re: [axis2] Deployment of an axis2 and struts appplication Hi I am trying to deploy an axis2 application and i received and exception stating that services.xml is not found, below is my deployment hierarchy Appname - css - images - jsp - lib - WEB-INF - services - ServiceName - META-INF - services.xml - com (class files containing compiled source) - abccorp - xyz - script I am trying to place services.xml in most of the place hoping that Axis2 can pick it up but it still fails to do so. Is there any other deployment mechanism for my application org.apache.axis2.deployment.DeploymentException: services.xml not found for service 'C:\Program Files\Apache Software Foundation\Tomcat 5.5\webapps\axis2\WEB-INF\services\rwb.aar'; nested exception is: org.apache.axis2.deployment.DeploymentException: services.xml not found for service 'C:\Program Files\Apache Software Foundation\Tomcat 5.5\webapps\axis2\WEB-INF\services\rwb.aar' at] Thanks Anil On 6/19/07, *Anil Chukkapalli* [EMAIL PROTECTED] wrote: Hi Raghu Still unable to delpoy the service, i tried both methods of deployment and all it says is that it is a faulty service. I need to show a working prototype before testing this application. Thank you Anil On 6/15/07, *Raghu Upadhyayula* [EMAIL PROTECTED] wrote: Hi Anil, Your services.xml is in wrong location according to what I read from http://ws.apache.org/axis2/1_2/quickstartguide.html#services In the samples mentioned at the above mentioned link, the example of a StockQuoteService looks like shown below. This is structure should be under WEB-INF/services - StockQuoteService - META-INF - services.xml - lib - samples - quickstart - service - pojo - StockQuoteService.class So in your case, your application structure should look like this. Appname - css - images - jsp - lib - WEB-INF - services - ServiceName - META-INF - services.xml - com (class files containing compiled source) - abccorp - xyz - script *OR* Appname - css - images - jsp - lib - WEB-INF - classes - com (class files containing compiled source) - abccorp - xyz - services - ServiceName - META-INF - services.xml - script Thanks Raghu -- *From:* Anil Chukkapalli [mailto:[EMAIL PROTECTED] *Sent:* Friday, June 15, 2007 12:12 PM *To:* axis-user@ws.apache.org *Subject:* Re: [axis2] Deployment of an axis2 and struts appplication Hi Raghu Appname CSS IMAGES JSP LIB WEB-INF services.xml META-INF SCRIPT com (class files containing compiled source) abccorp xyz Thanks Anil On 6/15/07, *Raghu Upadhyayula* [EMAIL PROTECTED] wrote: Hi Anil, Can you tell how your application structure looks like … something like this … Appname WEB-INF classes Thanks Raghu -- *From:* Anil Chukkapalli [mailto: [EMAIL PROTECTED] *Sent:* Friday, June 15, 2007 10:49 AM *To:* axis-user@ws.apache.org *Subject:* [axis2] Deployment of an axis2 and struts appplication Hi I have a struts application which also exposes Axis 2 web services. The application was deployed using .wsdd file in Axis and i ported it over to Axis2 and packaged the application using an aar file instead of a war file. When i try to deploy it using the deploy utility in Axis2 admin it says the deployed service is faulty. I created the META-INF folder with services.xml and it also has other folders that are used by the struts application. Is there any way i can use the wsdd file in Axis 2 or is there way aar or any other deployment mechanism can handle such a deployment in Tomcat 4.5 Thank you Anil
[axis2] Deployment of an axis2 and struts appplication
Hi I have a struts application which also exposes Axis 2 web services. The application was deployed using .wsdd file in Axis and i ported it over to Axis2 and packaged the application using an aar file instead of a war file. When i try to deploy it using the deploy utility in Axis2 admin it says the deployed service is faulty. I created the META-INF folder with services.xmland it also has other folders that are used by the struts application. Is there any way i can use the wsdd file in Axis 2 or is there way aar or any other deployment mechanism can handle such a deployment in Tomcat 4.5 Thank you Anil
Re: [axis2] Deployment of an axis2 and struts appplication
Hi Raghu Appname CSS IMAGES JSP LIB WEB-INF services.xml META-INF SCRIPT com (class files containing compiled source) abccorp xyz Thanks Anil On 6/15/07, Raghu Upadhyayula [EMAIL PROTECTED] wrote: Hi Anil, Can you tell how your application structure looks like … something like this … Appname WEB-INF classes Thanks Raghu -- *From:* Anil Chukkapalli [mailto:[EMAIL PROTECTED] *Sent:* Friday, June 15, 2007 10:49 AM *To:* axis-user@ws.apache.org *Subject:* [axis2] Deployment of an axis2 and struts appplication Hi I have a struts application which also exposes Axis 2 web services. The application was deployed using .wsdd file in Axis and i ported it over to Axis2 and packaged the application using an aar file instead of a war file. When i try to deploy it using the deploy utility in Axis2 admin it says the deployed service is faulty. I created the META-INF folder with services.xml and it also has other folders that are used by the struts application. Is there any way i can use the wsdd file in Axis 2 or is there way aar or any other deployment mechanism can handle such a deployment in Tomcat 4.5 Thank you Anil
Re: [axis2] Deployment of an axis2 and struts appplication
Hi Raghu I will change my ant script to build this, will let you if i have any problems or not. Thanks Anil On 6/15/07, Raghu Upadhyayula [EMAIL PROTECTED] wrote: Hi Anil, Your services.xml is in wrong location according to what I read from http://ws.apache.org/axis2/1_2/quickstartguide.html#services In the samples mentioned at the above mentioned link, the example of a StockQuoteService looks like shown below. This is structure should be under WEB-INF/services - StockQuoteService - META-INF - services.xml - lib - samples - quickstart - service - pojo - StockQuoteService.class So in your case, your application structure should look like this. Appname - css - images - jsp - lib - WEB-INF - services - ServiceName - META-INF - services.xml - com (class files containing compiled source) - abccorp - xyz - script *OR* Appname - css - images - jsp - lib - WEB-INF - classes - com (class files containing compiled source) - abccorp - xyz - services - ServiceName - META-INF - services.xml - script Thanks Raghu -- *From:* Anil Chukkapalli [mailto:[EMAIL PROTECTED] *Sent:* Friday, June 15, 2007 12:12 PM *To:* axis-user@ws.apache.org *Subject:* Re: [axis2] Deployment of an axis2 and struts appplication Hi Raghu Appname CSS IMAGES JSP LIB WEB-INF services.xml META-INF SCRIPT com (class files containing compiled source) abccorp xyz Thanks Anil On 6/15/07, *Raghu Upadhyayula* [EMAIL PROTECTED] wrote: Hi Anil, Can you tell how your application structure looks like … something like this … Appname WEB-INF classes Thanks Raghu -- *From:* Anil Chukkapalli [mailto:[EMAIL PROTECTED] *Sent:* Friday, June 15, 2007 10:49 AM *To:* axis-user@ws.apache.org *Subject:* [axis2] Deployment of an axis2 and struts appplication Hi I have a struts application which also exposes Axis 2 web services. The application was deployed using .wsdd file in Axis and i ported it over to Axis2 and packaged the application using an aar file instead of a war file. When i try to deploy it using the deploy utility in Axis2 admin it says the deployed service is faulty. I created the META-INF folder with services.xml and it also has other folders that are used by the struts application. Is there any way i can use the wsdd file in Axis 2 or is there way aar or any other deployment mechanism can handle such a deployment in Tomcat 4.5 Thank you Anil
Re: Curious why .NET's VS stub generation creates an easier to use API than Axis2 ?
hi .NETs usage of web service generation is greatly enhanced by the integration in visual studio, all you need to do in visul studio is to point it to the url of the server and it does the rest. I am sure that if you are trying to do it with any other ide like emacs or notepad you might need to write some NAnt script to generate the stub. Axis API is provided at multiple levels using the stub, service client or operation client which is far more powerful than .NETs API. And ofcourse the minor issue of the billions microsoft spends in developers when compared to Axis :) Cheers anil On 6/14/07, Wade Chandler [EMAIL PROTECTED] wrote: --- Rick Reumann [EMAIL PROTECTED] wrote: On 6/14/07, robert lazarski [EMAIL PROTECTED] wrote: I'm not sure that your example is a good comparison, as the .net example uses a string and the adb example uses a file. I'm confused why it's not a good comparison?. The .NET one is taking a byte[] as a param (which is what I would have expected to be produced for the Axis2 stubs as well). The Axis2 one created the DataHandler - this is why I used a File.. not that I wanted to use a File - I wanted to just use a String - but it seemed sort of silly to have to make a File out of a String just to pass it to the Datasource to then pass to the DataHandler. See ManagedMemoryDataSource which you can use with a stream. You can use it to pass information as anything. You can even use ByteArrayInputStream along with String.getBytes. new ManagedMemoryDataSource( new ByteArrayInputStream(someString.getBytes()), someString.length(), application/octet-stream) ... At least this class was available in AXIS1.4. You can also just as easily make a: public class StringDataSource implements javax.activation.DataSource{ private String data = ; public StringDataSource(String data){ this.data = data; if(this.data==null){ this.data = ; } } public InputStream getInputStream(){ return new ByteArrayInputStream(data.getBytes()); } public OutputStream getOutputStream(){ return null; } public String getName(){ return ; } public String getContentType(){ return application/octet-stream; } } should be roughly all you would need. Then you can basically do what you want really easy and more lightweight than the ManagedMemoryDataSource as it won't be so light weight for what you want to do. Anyways, the above code should be enough to get you roughly started. DataSource is very flexible. Wade == Wade Chandler Software Engineer and Developer Netbeans Community and Dream Team Member: http://wiki.netbeans.org/wiki/view/NetBeansDreamTeam Check out Netbeans at: http://www.netbeans.org - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: InvocationTargetException when calling service. Axis 1.2
I am listing my solution here in case any one runs into the same problem. Gurus: was there a recommended way to do this? Cause: I defined classes to contain data 'structs'. For example: Order. These were being returned from server to client. I generated the wsdl and then from the wsdl, created the stubs and skeletons. However the class Order that was now created, had axis helper methods. The other Order class, did not. Probably during reflection invocation, the server got confused about which Order to use and threw the exception. So I had to delete the old Order, and use the new generated one in its place. Has anyone seen this before? Was this the recommended way to handle it? Thanks, Anil From: Anil Philip [mailto:[EMAIL PROTECTED] Sent: Monday, June 11, 2007 3:44 PM To: axis-user@ws.apache.org Subject: InvocationTargetException when calling service. Axis 1.2 Hi, (Axis 1.2, Java 1.5.09) I am passing in an object containing data, as a parameter in my call: for example MyService service = new MyServiceLocator(); Foo port = service.getFoo(); Order no = new Order(); no.setQuantity(2); port.buy(no); However, I am getting InvocationTargetException Does anyone know why? - thanks, Anil Philip init: deps-jar: Compiling 1 source file to C:\Source\Everest\Nepal\WSClients\build\classes compile: Exception in thread main AxisFault faultCode: {http://schemas.xmlsoap.org/soap/envelope/}Server.userException faultSubcode: faultString: java.lang.reflect.InvocationTargetException faultActor: faultNode: faultDetail: {http://xml.apache.org/axis/}hostname:KTELEWEB01 java.lang.reflect.InvocationTargetException at org.apache.axis.message.SOAPFaultBuilder.createFault(SOAPFaultBuilder.ja va:222) at org.apache.axis.message.SOAPFaultBuilder.endElement(SOAPFaultBuilder.jav a:129) at org.apache.axis.encoding.DeserializationContext.endElement(Deserializati onContext.java:1087) at com.sun.org.apache.xerces.internal.parsers.AbstractSAXParser.endElement( AbstractSAXParser.java:633) at com.sun.org.apache.xerces.internal.impl.XMLNSDocumentScannerImpl.scanEnd Element(XMLNSDocumentScannerImpl.java:719) at com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl$F ragmentContentDispatcher.dispatch(XMLDocumentFragmentScannerImpl.java:16 85) at com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl.s canDocument(XMLDocumentFragmentScannerImpl.java:368) at com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse(XML1 1Configuration.java:834) at com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse(XML1 1Configuration.java:764) at com.sun.org.apache.xerces.internal.parsers.XMLParser.parse(XMLParser.jav a:148) at com.sun.org.apache.xerces.internal.parsers.AbstractSAXParser.parse(Abstr actSAXParser.java:1242) at javax.xml.parsers.SAXParser.parse(SAXParser.java:375) at org.apache.axis.encoding.DeserializationContext.parse(DeserializationCon text.java:227) at org.apache.axis.SOAPPart.getAsSOAPEnvelope(SOAPPart.java:696) at org.apache.axis.Message.getSOAPEnvelope(Message.java:435) at org.apache.axis.handlers.soap.MustUnderstandChecker.invoke(MustUnderstan dChecker.java:62) at org.apache.axis.client.AxisClient.invoke(AxisClient.java:206) at org.apache.axis.client.Call.invokeEngine(Call.java:2784) at org.apache.axis.client.Call.invoke(Call.java:2767) at org.apache.axis.client.Call.invoke(Call.java:2443) at org.apache.axis.client.Call.invoke(Call.java:2366) at org.apache.axis.client.Call.invoke(Call.java:1812)
[axis2] SimpleUUIDGen
Hi Do we have a mechanism similar to the one provided by org.apache.axis.components.uuid.SimpleUUIDGen in Axis2. Can anyone help me or point me to a thread that contains the related information. Thank you Anil
RE: 401 error - where to enter userid, password when calling a client stub from Java?
Thanks for replying! (I read the post on your blog on XML Namespaces) The link you provides says: Axis does not yet implement these, but we do support XML signatures via a sister project. Specifically, I am looking for a call to set the cachedUsername, cachedPassword From my generated stubs: protected org.apache.axis.client.Call createCall() throws java.rmi.RemoteException { try { org.apache.axis.client.Call _call = super._createCall(); if (super.maintainSessionSet) { _call.setMaintainSession(super.maintainSession); } if (super.cachedUsername != null) { _call.setUsername(super.cachedUsername); } if (super.cachedPassword != null) { _call.setPassword(super.cachedPassword); } How is super.cachedPassword and super.cachedUsername set? Thanks, Anil -Original Message- From: Anne Thomas Manes [mailto:[EMAIL PROTECTED] Sent: Saturday, June 09, 2007 11:33 AM To: axis-user@ws.apache.org Subject: Re: 401 error - where to enter userid, password when calling a client stub from Java? See http://ws.apache.org/axis/java/security.html. Axis relies on HTTPClient (http://jakarta.apache.org/commons/httpclient/). Anne On 6/8/07, Anil Philip [EMAIL PROTECTED] wrote: I am trying to call a service, and get the following 401 error. The stubs are generated using Axis 1.4 WSDL2Java. How do I pass in userid-password? - thanks, Anil faultDetail: {}:return code: 401 lt;htmlgt;lt;headgt;lt;titlegt;Apache Tomcat/5.5.20 - Error reportlt;/titlegt;lt;stylegt;lt;!--H1 {font-family:Tahoma,Arial,sans-serif;color:white;background-color:#525D7 6;font-size:22px;} H2 {font-family:Tahoma,Arial,sans-serif;color:white;background-color:#525D7 6;font-size:16px;} H3 {font-family:Tahoma,Arial,sans-serif;color:white;background-color:#525D7 6;font-size:14px;} BODY {font-family:Tahoma,Arial,sans-serif;color:black;background-color:white; } B {font-family:Tahoma,Arial,sans-serif;color:white;background-color:#525D7 6;} P {font-family:Tahoma,Arial,sans-serif;background:white;color:black;font-s ize:12px;}A {color : black;}A.name {color : black;}HR {color : #525D76;}--gt;lt;/stylegt; lt;/headgt;lt;bodygt;lt;h1gt;HTTP Status 401 - lt;/h1gt;lt;HR size=quot;1quot; noshade=quot;noshadequot;gt;lt;pgt;lt;bgt;typelt;/bgt; Status reportlt;/pgt;lt;pgt;lt;bgt;messagelt;/bgt; lt;ugt;lt;/ugt;lt;/pgt;lt;pgt;lt;bgt;descriptionlt;/bgt; lt;ugt;This request requires HTTP authentication ().lt;/ugt;lt;/pgt;lt;HR size=quot;1quot; noshade=quot;noshadequot;gt;lt;h3gt;Apache Tomcat/5.5.20lt;/h3gt;lt;/bodygt;lt;/htmlgt; {http://xml.apache.org/axis/}HttpErrorCode:401 (401)Unauthorized at org.apache.axis - 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: 401 error - where to enter userid, password when calling a client stub from Java?
I got it after reading the Stub javadocs. You have to cast it ((org.apache.axis.client.Stub) port).setUsername(foo); ((org.apache.axis.client.Stub) port).setPassword(bar); Thanks, Anil -Original Message- From: Anil Philip [mailto:[EMAIL PROTECTED] Sent: Monday, June 11, 2007 2:14 PM To: axis-user@ws.apache.org Cc: [EMAIL PROTECTED] Subject: RE: 401 error - where to enter userid, password when calling a client stub from Java? Thanks for replying! (I read the post on your blog on XML Namespaces) The link you provides says: Axis does not yet implement these, but we do support XML signatures via a sister project. Specifically, I am looking for a call to set the cachedUsername, cachedPassword From my generated stubs: protected org.apache.axis.client.Call createCall() throws java.rmi.RemoteException { try { org.apache.axis.client.Call _call = super._createCall(); if (super.maintainSessionSet) { _call.setMaintainSession(super.maintainSession); } if (super.cachedUsername != null) { _call.setUsername(super.cachedUsername); } if (super.cachedPassword != null) { _call.setPassword(super.cachedPassword); } How is super.cachedPassword and super.cachedUsername set? Thanks, Anil -Original Message- From: Anne Thomas Manes [mailto:[EMAIL PROTECTED] Sent: Saturday, June 09, 2007 11:33 AM To: axis-user@ws.apache.org Subject: Re: 401 error - where to enter userid, password when calling a client stub from Java? See http://ws.apache.org/axis/java/security.html. Axis relies on HTTPClient (http://jakarta.apache.org/commons/httpclient/). Anne On 6/8/07, Anil Philip [EMAIL PROTECTED] wrote: I am trying to call a service, and get the following 401 error. The stubs are generated using Axis 1.4 WSDL2Java. How do I pass in userid-password? - thanks, Anil faultDetail: {}:return code: 401 lt;htmlgt;lt;headgt;lt;titlegt;Apache Tomcat/5.5.20 - Error reportlt;/titlegt;lt;stylegt;lt;!--H1 {font-family:Tahoma,Arial,sans-serif;color:white;background-color:#525D7 6;font-size:22px;} H2 {font-family:Tahoma,Arial,sans-serif;color:white;background-color:#525D7 6;font-size:16px;} H3 {font-family:Tahoma,Arial,sans-serif;color:white;background-color:#525D7 6;font-size:14px;} BODY {font-family:Tahoma,Arial,sans-serif;color:black;background-color:white; } B {font-family:Tahoma,Arial,sans-serif;color:white;background-color:#525D7 6;} P {font-family:Tahoma,Arial,sans-serif;background:white;color:black;font-s ize:12px;}A {color : black;}A.name {color : black;}HR {color : #525D76;}--gt;lt;/stylegt; lt;/headgt;lt;bodygt;lt;h1gt;HTTP Status 401 - lt;/h1gt;lt;HR size=quot;1quot; noshade=quot;noshadequot;gt;lt;pgt;lt;bgt;typelt;/bgt; Status reportlt;/pgt;lt;pgt;lt;bgt;messagelt;/bgt; lt;ugt;lt;/ugt;lt;/pgt;lt;pgt;lt;bgt;descriptionlt;/bgt; lt;ugt;This request requires HTTP authentication ().lt;/ugt;lt;/pgt;lt;HR size=quot;1quot; noshade=quot;noshadequot;gt;lt;h3gt;Apache Tomcat/5.5.20lt;/h3gt;lt;/bodygt;lt;/htmlgt; {http://xml.apache.org/axis/}HttpErrorCode:401 (401)Unauthorized at org.apache.axis - 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]
InvocationTargetException when calling service. Axis 1.2
Hi, (Axis 1.2, Java 1.5.09) I am passing in an object containing data, as a parameter in my call: for example MyService service = new MyServiceLocator(); Foo port = service.getFoo(); Order no = new Order(); no.setQuantity(2); port.buy(no); However, I am getting InvocationTargetException Does anyone know why? - thanks, Anil Philip init: deps-jar: Compiling 1 source file to C:\Source\Everest\Nepal\WSClients\build\classes compile: Exception in thread main AxisFault faultCode: {http://schemas.xmlsoap.org/soap/envelope/}Server.userException faultSubcode: faultString: java.lang.reflect.InvocationTargetException faultActor: faultNode: faultDetail: {http://xml.apache.org/axis/}hostname:KTELEWEB01 java.lang.reflect.InvocationTargetException at org.apache.axis.message.SOAPFaultBuilder.createFault(SOAPFaultBuilder.ja va:222) at org.apache.axis.message.SOAPFaultBuilder.endElement(SOAPFaultBuilder.jav a:129) at org.apache.axis.encoding.DeserializationContext.endElement(Deserializati onContext.java:1087) at com.sun.org.apache.xerces.internal.parsers.AbstractSAXParser.endElement( AbstractSAXParser.java:633) at com.sun.org.apache.xerces.internal.impl.XMLNSDocumentScannerImpl.scanEnd Element(XMLNSDocumentScannerImpl.java:719) at com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl$F ragmentContentDispatcher.dispatch(XMLDocumentFragmentScannerImpl.java:16 85) at com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl.s canDocument(XMLDocumentFragmentScannerImpl.java:368) at com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse(XML1 1Configuration.java:834) at com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse(XML1 1Configuration.java:764) at com.sun.org.apache.xerces.internal.parsers.XMLParser.parse(XMLParser.jav a:148) at com.sun.org.apache.xerces.internal.parsers.AbstractSAXParser.parse(Abstr actSAXParser.java:1242) at javax.xml.parsers.SAXParser.parse(SAXParser.java:375) at org.apache.axis.encoding.DeserializationContext.parse(DeserializationCon text.java:227) at org.apache.axis.SOAPPart.getAsSOAPEnvelope(SOAPPart.java:696) at org.apache.axis.Message.getSOAPEnvelope(Message.java:435) at org.apache.axis.handlers.soap.MustUnderstandChecker.invoke(MustUnderstan dChecker.java:62) at org.apache.axis.client.AxisClient.invoke(AxisClient.java:206) at org.apache.axis.client.Call.invokeEngine(Call.java:2784) at org.apache.axis.client.Call.invoke(Call.java:2767) at org.apache.axis.client.Call.invoke(Call.java:2443) at org.apache.axis.client.Call.invoke(Call.java:2366) at org.apache.axis.client.Call.invoke(Call.java:1812)
[axis2] mtom client sending data to an mtom server
Hi How can an MTOM client send data to an MTOM server, is there a tutorial that explains how to do this. I can send a data from an MTOM server to an MTOM client but i am not able to figure out how to do it the other way around, do we need to send an OMElement as an argument and does axis2 understands this to be an attachment? If you are unable to answer this question can you please point me to a tutorial or another question. Thank you Anil
Re: [axis2] mtom client sending data to an mtom server
Hi Thilana In the example is Attachment request an Axis2 type or a user defined type, and i used a operation client instead of a generated stub. How does axis2 determine that the input arguments need to be transferred using MTOM? is it by sendding the argument of type OMElement. Thank you Anil On 6/8/07, Thilina Gunarathne [EMAIL PROTECTED] wrote: Anil, You can also have a look at the MTOM sample bundled with the Axis2 distribution.. In there we have a MTOM client sending data to an axis2 server... Thanks, Thilina On 6/8/07, Paul Fremantle [EMAIL PROTECTED] wrote: Anil http://ws.apache.org/axis2/1_2/mtom-guide.html Can you explain whether you are using the ServiceClient or a generated stub. That would help us explain. Paul On 6/8/07, Anil Chukkapalli [EMAIL PROTECTED] wrote: Hi How can an MTOM client send data to an MTOM server, is there a tutorial that explains how to do this. I can send a data from an MTOM server to an MTOM client but i am not able to figure out how to do it the other way around, do we need to send an OMElement as an argument and does axis2 understands this to be an attachment? If you are unable to answer this question can you please point me to a tutorial or another question. Thank you Anil -- Paul Fremantle Co-Founder and VP of Technical Sales, WSO2 OASIS WS-RX TC Co-chair blog: http://pzf.fremantle.org [EMAIL PROTECTED] Oxygenating the Web Service Platform, www.wso2.com - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] -- Thilina Gunarathne - http://www.wso2.com - http://thilinag.blogspot.com - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: [axis2] mtom client sending data to an mtom server
Hi Paul I am using an operation client Thank you Anil On 6/8/07, Paul Fremantle [EMAIL PROTECTED] wrote: Anil http://ws.apache.org/axis2/1_2/mtom-guide.html Can you explain whether you are using the ServiceClient or a generated stub. That would help us explain. Paul On 6/8/07, Anil Chukkapalli [EMAIL PROTECTED] wrote: Hi How can an MTOM client send data to an MTOM server, is there a tutorial that explains how to do this. I can send a data from an MTOM server to an MTOM client but i am not able to figure out how to do it the other way around, do we need to send an OMElement as an argument and does axis2 understands this to be an attachment? If you are unable to answer this question can you please point me to a tutorial or another question. Thank you Anil -- Paul Fremantle Co-Founder and VP of Technical Sales, WSO2 OASIS WS-RX TC Co-chair blog: http://pzf.fremantle.org [EMAIL PROTECTED] Oxygenating the Web Service Platform, www.wso2.com - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: [axis2] mtom client sending data to an mtom server
Paul I need the operation client cause i need to maintain session between a .NET client and Java service and vice versa (it was discussed in previous threads and we could find no other way except using an operation client). I was not able to accomplish this using either the generated stub or the service client. The issue now that I have is that the since my .NET client sends the binary data as a byte array, .NET understands this and optimizes it to MTOM, i am not entirely sure that the java service can understand this xml and decipher the input argument which is OMElement. - *Service* public class MTOMService { public void uploadFileUsingMTOM(OMElement element) throws Exception { ... ... } } .Client OMElement result = sender.sendReceive(payload); The tutorial that you pointed out shows the above code, is payload of type OMElement. Thank you Anil On 6/8/07, Paul Fremantle [EMAIL PROTECTED] wrote: Anil The OperationClient is designed for pretty complex needs. Its not recommended except for Axis2 gurus. Most users can support their needs using ServiceClient. How does axis2 determine that the input arguments need to be transferred using MTOM? is it by sendding the argument of type OMElement. No! OMElement is the Axis2 representation of any XML. When you send binary data in XML it is logically a text node in the XML tree. If you are using OMElement to create the XML body of the request you need to do this. // create a text node to hold the data javax.activation.DataHandler dataHandler = new javax.activation.DataHandler(new FileDataSource(SomeFile)); OMText textData = omFactory.createText(dataHandler, true); someElement.addChild(textData); serviceClient().getOptions().setProperty(enableMTOM,true); Paul On 6/8/07, Anil Chukkapalli [EMAIL PROTECTED] wrote: Hi Paul I am using an operation client Thank you Anil On 6/8/07, Paul Fremantle [EMAIL PROTECTED] wrote: Anil http://ws.apache.org/axis2/1_2/mtom-guide.html Can you explain whether you are using the ServiceClient or a generated stub. That would help us explain. Paul On 6/8/07, Anil Chukkapalli [EMAIL PROTECTED] wrote: Hi How can an MTOM client send data to an MTOM server, is there a tutorial that explains how to do this. I can send a data from an MTOM server to an MTOM client but i am not able to figure out how to do it the other way around, do we need to send an OMElement as an argument and does axis2 understands this to be an attachment? If you are unable to answer this question can you please point me to a tutorial or another question. Thank you Anil -- Paul Fremantle Co-Founder and VP of Technical Sales, WSO2 OASIS WS-RX TC Co-chair blog: http://pzf.fremantle.org [EMAIL PROTECTED] Oxygenating the Web Service Platform, www.wso2.com - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] -- Paul Fremantle Co-Founder and VP of Technical Sales, WSO2 OASIS WS-RX TC Co-chair blog: http://pzf.fremantle.org [EMAIL PROTECTED] Oxygenating the Web Service Platform, www.wso2.com - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: [axis2] mtom client sending data to an mtom server
Paul I do have wsdl for this service, i used it before when i used the wsdl2java tool to create a stub to test my service. Thanks Anil On 6/8/07, Paul Fremantle [EMAIL PROTECTED] wrote: Anil Do you have a WSDL for this service? Paul On 6/8/07, Anil Chukkapalli [EMAIL PROTECTED] wrote: Paul I need the operation client cause i need to maintain session between a .NET client and Java service and vice versa (it was discussed in previous threads and we could find no other way except using an operation client). I was not able to accomplish this using either the generated stub or the service client. The issue now that I have is that the since my .NET client sends the binary data as a byte array, .NET understands this and optimizes it to MTOM, i am not entirely sure that the java service can understand this xml and decipher the input argument which is OMElement. Service public class MTOMService { public void uploadFileUsingMTOM(OMElement element) throws Exception { ... ... } } .Client OMElement result = sender.sendReceive(payload); The tutorial that you pointed out shows the above code, is payload of type OMElement. Thank you Anil On 6/8/07, Paul Fremantle [EMAIL PROTECTED] wrote: Anil The OperationClient is designed for pretty complex needs. Its not recommended except for Axis2 gurus. Most users can support their needs using ServiceClient. How does axis2 determine that the input arguments need to be transferred using MTOM? is it by sendding the argument of type OMElement. No! OMElement is the Axis2 representation of any XML. When you send binary data in XML it is logically a text node in the XML tree. If you are using OMElement to create the XML body of the request you need to do this. // create a text node to hold the data javax.activation.DataHandler dataHandler = new javax.activation.DataHandler (new FileDataSource(SomeFile)); OMText textData = omFactory.createText(dataHandler, true); someElement.addChild(textData); serviceClient().getOptions().setProperty(enableMTOM,true); Paul On 6/8/07, Anil Chukkapalli [EMAIL PROTECTED] wrote: Hi Paul I am using an operation client Thank you Anil On 6/8/07, Paul Fremantle [EMAIL PROTECTED] wrote: Anil http://ws.apache.org/axis2/1_2/mtom-guide.html Can you explain whether you are using the ServiceClient or a generated stub. That would help us explain. Paul On 6/8/07, Anil Chukkapalli [EMAIL PROTECTED] wrote: Hi How can an MTOM client send data to an MTOM server, is there a tutorial that explains how to do this. I can send a data from an MTOM server to an MTOM client but i am not able to figure out how to do it the other way around, do we need to send an OMElement as an argument and does axis2 understands this to be an attachment? If you are unable to answer this question can you please point me to a tutorial or another question. Thank you Anil -- Paul Fremantle Co-Founder and VP of Technical Sales, WSO2 OASIS WS-RX TC Co-chair blog: http://pzf.fremantle.org [EMAIL PROTECTED] Oxygenating the Web Service Platform, www.wso2.com - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] -- Paul Fremantle Co-Founder and VP of Technical Sales, WSO2 OASIS WS-RX TC Co-chair blog: http://pzf.fremantle.org [EMAIL PROTECTED] Oxygenating the Web Service Platform, www.wso2.com - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] -- Paul Fremantle Co-Founder and VP of Technical Sales, WSO2 OASIS WS-RX TC Co-chair blog: http://pzf.fremantle.org [EMAIL PROTECTED] Oxygenating the Web Service Platform, www.wso2.com - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
401 error - where to enter userid, password when calling a client stub from Java?
I am trying to call a service, and get the following 401 error. The stubs are generated using Axis 1.4 WSDL2Java. How do I pass in userid-password? - thanks, Anil faultDetail: {}:return code: 401 lt;htmlgt;lt;headgt;lt;titlegt;Apache Tomcat/5.5.20 - Error reportlt;/titlegt;lt;stylegt;lt;!--H1 {font-family:Tahoma,Arial,sans-serif;color:white;background-color:#525D7 6;font-size:22px;} H2 {font-family:Tahoma,Arial,sans-serif;color:white;background-color:#525D7 6;font-size:16px;} H3 {font-family:Tahoma,Arial,sans-serif;color:white;background-color:#525D7 6;font-size:14px;} BODY {font-family:Tahoma,Arial,sans-serif;color:black;background-color:white; } B {font-family:Tahoma,Arial,sans-serif;color:white;background-color:#525D7 6;} P {font-family:Tahoma,Arial,sans-serif;background:white;color:black;font-s ize:12px;}A {color : black;}A.name {color : black;}HR {color : #525D76;}--gt;lt;/stylegt; lt;/headgt;lt;bodygt;lt;h1gt;HTTP Status 401 - lt;/h1gt;lt;HR size=quot;1quot; noshade=quot;noshadequot;gt;lt;pgt;lt;bgt;typelt;/bgt; Status reportlt;/pgt;lt;pgt;lt;bgt;messagelt;/bgt; lt;ugt;lt;/ugt;lt;/pgt;lt;pgt;lt;bgt;descriptionlt;/bgt; lt;ugt;This request requires HTTP authentication ().lt;/ugt;lt;/pgt;lt;HR size=quot;1quot; noshade=quot;noshadequot;gt;lt;h3gt;Apache Tomcat/5.5.20lt;/h3gt;lt;/bodygt;lt;/htmlgt; {http://xml.apache.org/axis/}HttpErrorCode:401 (401)Unauthorized at org.apache.axis
[axis2] Axis2 Service and .NET client using MTOM
Hi Is it possible to use a Axis2 MTOM service and a .NET MTOM client. Is there a tutorial to use on this particular combination of a client and server or any other thread that deals with this. Thank you Anil
[axis2] Creating OMText response using MTOM
Hi I want to create an OMText child for an reponse object of type OMElement byte[] filecontents = contains the file contents; ... OMElement resp = fac.createOMElement(response, ns); OMText binaryFileContents = ? OMText binaryFileName = ? resp.addChild(fileName); resp.addChild(fileContents); - How can I create OMText nodes once we have the byte array. Also i looked at the tutorial and would like to know in which package is the class ByteArrayOutputStream located. Thank you Anil
Re: [axis2] Creating OMText response using MTOM
Hi The documentation points me to * org.apache.axis2.attachments.ByteArrayDataSource* but i am unable to find it in any of the jars packaged with Axis1.2 can anyone help me and point me to the jar file that contains this class. Thanks Anil On 6/7/07, Anil Chukkapalli [EMAIL PROTECTED] wrote: Hi I want to create an OMText child for an reponse object of type OMElement byte[] filecontents = contains the file contents; ... OMElement resp = fac.createOMElement (response, ns); OMText binaryFileContents = ? OMText binaryFileName = ? resp.addChild(fileName); resp.addChild(fileContents); - How can I create OMText nodes once we have the byte array. Also i looked at the tutorial and would like to know in which package is the class ByteArrayOutputStream located. Thank you Anil
Re: [axis2] Creating OMText response using MTOM
David It is in there. Thanks Anil On 6/7/07, Kraus, David [EMAIL PROTECTED] wrote: Try axiom-api-1.2.4.jar. -- *From:* Anil Chukkapalli [mailto:[EMAIL PROTECTED] *Sent:* Thursday, June 07, 2007 2:55 PM *To:* axis-user@ws.apache.org *Subject:* Re: [axis2] Creating OMText response using MTOM Hi The documentation points me to * org.apache.axis2.attachments.ByteArrayDataSource* but i am unable to find it in any of the jars packaged with Axis1.2 can anyone help me and point me to the jar file that contains this class. Thanks Anil On 6/7/07, *Anil Chukkapalli* [EMAIL PROTECTED] wrote: Hi I want to create an OMText child for an reponse object of type OMElement byte[] filecontents = contains the file contents; ... OMElement resp = fac.createOMElement (response, ns); OMText binaryFileContents = ? OMText binaryFileName = ? resp.addChild(fileName); resp.addChild(fileContents); - How can I create OMText nodes once we have the byte array. Also i looked at the tutorial and would like to know in which package is the class ByteArrayOutputStream located. Thank you Anil
Re: [Axis2] Can WSDL have multiple operations
I'm experiencing trouble having multiple ports (wsdl:portType) with its own binding (wsdl:binding) but only one service tag in a WSDL file. Here is the error, Operation Not found EPR is http://127.0.0.1:7001/abcService and WSA Action = urn:Operation2 Anne Thomas Manes wrote: Although the schema says it's legal, that doesn't mean that products necessarily support it. I would avoid defining multiple services in a single WSDL file. Note that a single service can expose any number of ports, and each port can implement a different binding, exposing different portType operations. WSDL 2.0 imposed (IMO) an unreasonable restriction of one interface (the replacement for portType) per service. Anne On 5/16/07, Glen Mazza [EMAIL PROTECTED] wrote: Ouch. I misread the schema. Thanks/Sorry. Glen Am Donnerstag, den 17.05.2007, 08:10 +1200 schrieb Dennis Sosnoski: Actually it's unbounded: complexType name=definitionsType complexContent extension base=wsdl:documented sequence element ref=wsdl:import minOccurs=0 maxOccurs=unbounded/ element ref=wsdl:types minOccurs=0/ element ref=wsdl:message minOccurs=0 maxOccurs=unbounded/ element ref=wsdl:portType minOccurs=0 maxOccurs=unbounded/ element ref=wsdl:binding minOccurs=0 maxOccurs=unbounded/ element ref=wsdl:service minOccurs=0 maxOccurs=unbounded/ any namespace=##other minOccurs=0 maxOccurs=unbounded annotation documentationto support extensibility elements /documentation /annotation /any /sequence attribute name=targetNamespace type=uriReference use=optional/ attribute name=name type=NMTOKEN use=optional/ /extension /complexContent /complexType So the answer is yes, the WSDL can contain multiple instances of anything except the wsdl:types element. Note that the repeated elements need to be in the correct order, though - the types element, then all the messages, then all the portTypes, etc. I've seen some schema that had repeated elements all jumbled together, and these are invalid. - Dennis Dennis M. Sosnoski SOA and Web Services in Java Axis2 Training and Consulting http://www.sosnoski.com - http://www.sosnoski.co.nz Seattle, WA +1-425-939-0576 - Wellington, NZ +64-4-298-6117 Glen Mazza wrote: No, according to the schema[1], the maxOccurs of wsdl:service is 1. Glen [1] http://www.w3.org/TR/wsdl#A4.1 Am Mittwoch, den 16.05.2007, 08:33 -0700 schrieb Anil VVNN: Hi, Can one WSDL file contain multiple operations i.e. multiple wsdl:service tags with each having its own port and binding information. Thanks. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] -- View this message in context: http://www.nabble.com/-Axis2--Can-WSDL-have-multiple-operations-tf3765319.html#a10667088 Sent from the Axis - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
[Axis2] A hello World Example for Axis2 deployment
Hi I am an newbie in Axis2 deployment. Can anyone provide me with a hello world example for deploying an Axis2 web service in Java. Thanks Anil
Re: [Axis2] A hello World Example for Axis2 deployment
Hi Another newbie question. In the tutorial http://wso2.org/library/95; . The axis2-std-SNAPSHOT-bin distribution comes with a bin directory which contains a Linux shell script and a Windows batch file to start the SimpleHTTPServer: http-server.sh and http-server.bat Start the server pointing to my-axis2-repo directory: where can i find axis2-std-SNAPSHOT-bin or the batch file htp-server.bat. The intention is to Start the server pointing to my-axis2-repo directory. if I can get the batch file then i can deploy the service and test out my Client. Thanks Anil On 5/17/07, Glen Mazza [EMAIL PROTECTED] wrote: Quite Literally: http://wso2.org/library/95 Also, here's my attempt: http://www.jroller.com/page/gmazza?entry=creating_a_web_service_with For more articles, check the library at WS02 (http://wso2.org/library) and the Axis knowledge base (http://ws.apache.org/axis2/articles.html). Glen Am Donnerstag, den 17.05.2007, 10:22 -0700 schrieb Anil Chukkapalli: Hi I am an newbie in Axis2 deployment. Can anyone provide me with a hello world example for deploying an Axis2 web service in Java. Thanks Anil - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: [Axis2] A hello World Example for Axis2 deployment
Hi I am using the tomcat to deploy my web service,i placed the axis2.war file in the webapps folder. Then i placed the .aar file in Tomcat 5.5\webapps\axis2\WEB-INF\services. The problem is that I am getting this error message when i try to see the wsdl http://localhost:8080/axis2/services/HelloWorld?wsdl; i get the below error. I just followed the tutorial buti want toknow if i want to know where to include third part jar files. The tutorial never talks about where to place the WSDL file? org.apache.axis2.AxisFault: null; nested exception is: java.lang.NullPointerException org.apache.axis2.description.AxisService.getWSDL(AxisService.java:732) org.apache.axis2.description.AxisService.printWSDL(AxisService.java:597) org.apache.axis2.transport.http.ListingAgent.processListService(ListingAgent.java:186) org.apache.axis2.transport.http.AxisServlet.doGet(AxisServlet.java:181) javax.servlet.http.HttpServlet.service(HttpServlet.java:690) javax.servlet.http.HttpServlet.service(HttpServlet.java:803) *note* *The full stack trace of the root cause is available in the Apache Tomcat/5.5.23 logs.* The stack trace shows May 17, 2007 1:18:02 PM org.apache.catalina.core.StandardWrapperValve invoke SEVERE: Servlet.service() for servlet AxisServlet threw exception org.apache.axis2.AxisFault: null; nested exception is: java.lang.NullPointerException at org.apache.axis2.description.AxisService.getWSDL(AxisService.java :732) at org.apache.axis2.description.AxisService.printWSDL(AxisService.java :597) at org.apache.axis2.transport.http.ListingAgent.processListService( ListingAgent.java:186) at org.apache.axis2.transport.http.AxisServlet.doGet(AxisServlet.java :181) at javax.servlet.http.HttpServlet.service(HttpServlet.java:690) at javax.servlet.http.HttpServlet.service(HttpServlet.java:803) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter( ApplicationFilterChain.java:269) at org.apache.catalina.core.ApplicationFilterChain.doFilter( ApplicationFilterChain.java:188) at org.apache.catalina.core.StandardWrapperValve.invoke( StandardWrapperValve.java:210) at org.apache.catalina.core.StandardContextValve.invoke( StandardContextValve.java:174) at org.apache.catalina.core.StandardHostValve.invoke( StandardHostValve.java:127) at org.apache.catalina.valves.ErrorReportValve.invoke( ErrorReportValve.java:117) at org.apache.catalina.core.StandardEngineValve.invoke( StandardEngineValve.java:108) at org.apache.catalina.connector.CoyoteAdapter.service( CoyoteAdapter.java:151) at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java :870) at org.apache.coyote.http11.Http11BaseProtocol$Http11ConnectionHandler.processConnection (Http11BaseProtocol.java:665) at org.apache.tomcat.util.net.PoolTcpEndpoint.processSocket( PoolTcpEndpoint.java:528) at org.apache.tomcat.util.net.LeaderFollowerWorkerThread.runIt( LeaderFollowerWorkerThread.java:81) at org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run( ThreadPool.java:685) at java.lang.Thread.run(Unknown Source) Caused by: java.lang.NullPointerException at org.apache.axis2.description.AxisService2OM.generateOM( AxisService2OM.java:128) at org.apache.axis2.description.AxisService.getWSDL(AxisService.java :727) ... 19 more Thanks Anil On 5/17/07, Glen Mazza [EMAIL PROTECTED] wrote: Sorry, I've never used SimpleHTTPServer before, so I'm unsure. I would recommend getting the AXIS2.WAR file from the downloads, and installing it on Tomcat instead of using SimpleHTTPServer. Then install your web services within the Axis2 web application. If you don't know how to use Tomcat, then you'll need to go to the Tomcat home page for tutorial information. For the most part, you have to know basic Tomcat (or another servlet container) functionality before you can work with Axis2. Glen Anil Chukkapalli escribió: Hi Another newbie question. In the tutorial http://wso2.org/library/95; . The axis2-std-SNAPSHOT-bin distribution comes with a bin directory which contains a Linux shell script and a Windows batch file to start the SimpleHTTPServer: http-server.sh and http-server.bat Start the server pointing to my-axis2-repo directory: where can i find axis2-std-SNAPSHOT-bin or the batch file htp-server.bat. The intention is to Start the server pointing to my-axis2-repo directory. if I can get the batch file then i can deploy the service and test out my Client. Thanks Anil On 5/17/07, * Glen Mazza* [EMAIL PROTECTED] mailto:[EMAIL PROTECTED] wrote: Quite Literally: http://wso2.org/library/95 Also, here's my attempt: http://www.jroller.com/page/gmazza?entry=creating_a_web_service_with http://www.jroller.com/page/gmazza?entry=creating_a_web_service_with For more articles, check the library at WS02 ( http://wso2.org/library) and the Axis knowledge base (http://ws.apache.org
Re: [Axis2] A hello World Example for Axis2 deployment
Hi the code for HelloWorld.java is shown below package org.HelloWorld; public class HelloWorld { /*This echo metod is going to be exposed as a web service */ public String echo(String val){ return val; } } the services.xml file is also shown below ?xml version=1.0 encoding=UTF-8? service parameter name=HelloWorld locked=false HelloWorld /parameter operation name=echo messageReceiver class= org.apache.axis2.rpc.receivers.RPCMessageReceiver / /operation /service i placed services.xml in META-INF file and followed the steps in the http://wso2.org/library/95; tutorial for Axis2 Thanks Anil On 5/17/07, Anil Chukkapalli [EMAIL PROTECTED] wrote: Hi I am using the tomcat to deploy my web service,i placed the axis2.warfile in the webapps folder. Then i placed the .aar file in Tomcat 5.5\webapps\axis2\WEB-INF\services. The problem is that I am getting this error message when i try to see the wsdl http://localhost:8080/axis2/services/HelloWorld?wsdl; i get the below error. I just followed the tutorial buti want toknow if i want to know where to include third part jar files. The tutorial never talks about where to place the WSDL file? org.apache.axis2.AxisFault: null; nested exception is: java.lang.NullPointerException org.apache.axis2.description.AxisService.getWSDL(AxisService.java:732) org.apache.axis2.description.AxisService.printWSDL (AxisService.java:597) org.apache.axis2.transport.http.ListingAgent.processListService(ListingAgent.java:186) org.apache.axis2.transport.http.AxisServlet.doGet(AxisServlet.java:181) javax.servlet.http.HttpServlet.service (HttpServlet.java:690) javax.servlet.http.HttpServlet.service(HttpServlet.java:803) *note* *The full stack trace of the root cause is available in the Apache Tomcat/5.5.23 logs.* The stack trace shows May 17, 2007 1:18:02 PM org.apache.catalina.core.StandardWrapperValve invoke SEVERE: Servlet.service() for servlet AxisServlet threw exception org.apache.axis2.AxisFault: null; nested exception is: java.lang.NullPointerException at org.apache.axis2.description.AxisService.getWSDL(AxisService.java :732) at org.apache.axis2.description.AxisService.printWSDL(AxisService.java :597) at org.apache.axis2.transport.http.ListingAgent.processListService ( ListingAgent.java:186) at org.apache.axis2.transport.http.AxisServlet.doGet(AxisServlet.java :181) at javax.servlet.http.HttpServlet.service(HttpServlet.java:690) at javax.servlet.http.HttpServlet.service (HttpServlet.java:803) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter( ApplicationFilterChain.java:269) at org.apache.catalina.core.ApplicationFilterChain.doFilter( ApplicationFilterChain.java :188) at org.apache.catalina.core.StandardWrapperValve.invoke( StandardWrapperValve.java:210) at org.apache.catalina.core.StandardContextValve.invoke( StandardContextValve.java:174) at org.apache.catalina.core.StandardHostValve.invoke ( StandardHostValve.java:127) at org.apache.catalina.valves.ErrorReportValve.invoke( ErrorReportValve.java:117) at org.apache.catalina.core.StandardEngineValve.invoke( StandardEngineValve.java:108) at org.apache.catalina.connector.CoyoteAdapter.service ( CoyoteAdapter.java:151) at org.apache.coyote.http11.Http11Processor.process( Http11Processor.java:870) at org.apache.coyote.http11.Http11BaseProtocol$Http11ConnectionHandler.processConnection (Http11BaseProtocol.java :665) at org.apache.tomcat.util.net.PoolTcpEndpoint.processSocket( PoolTcpEndpoint.java:528) at org.apache.tomcat.util.net.LeaderFollowerWorkerThread.runIt( LeaderFollowerWorkerThread.java:81) at org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run ( ThreadPool.java:685) at java.lang.Thread.run(Unknown Source) Caused by: java.lang.NullPointerException at org.apache.axis2.description.AxisService2OM.generateOM( AxisService2OM.java:128) at org.apache.axis2.description.AxisService.getWSDL (AxisService.java :727) ... 19 more Thanks Anil On 5/17/07, Glen Mazza [EMAIL PROTECTED] wrote: Sorry, I've never used SimpleHTTPServer before, so I'm unsure. I would recommend getting the AXIS2.WAR file from the downloads, and installing it on Tomcat instead of using SimpleHTTPServer. Then install your web services within the Axis2 web application. If you don't know how to use Tomcat, then you'll need to go to the Tomcat home page for tutorial information. For the most part, you have to know basic Tomcat (or another servlet container) functionality before you can work with Axis2. Glen Anil Chukkapalli escribió: Hi Another newbie question. In the tutorial http://wso2.org/library/95; . The axis2-std-SNAPSHOT-bin distribution comes with a bin directory which contains a Linux shell script and a Windows batch file to start the SimpleHTTPServer: http-server.sh and http
Re: [Axis2] A hello World Example for Axis2 deployment
Glen Thanks for taking time out to explain everything. I did validate the tomcat install before and executed the sample JSP applications. I am using Tomcat 5.5 instead of Tomcat 6.X as that is present on my deployment box. Can this be an issue. Thanks Anil On 5/17/07, Glen Mazza [EMAIL PROTECTED] wrote: Anil, Sorry you're having so many difficulties. Perhaps the tutorial you are using--and I had previously suggested, alas--isn't very good, as you are having too many problems getting it to work. A newbie-level tutorial should not be causing that much difficulty--it should be making things easy for you. There are more tutorial options--just by looking at the list I had given you, or googling axis tutorial, may help. But what I'm also seeing is that more detective work is needed. What we first need to know is: Does your Tomcat servlet container work properly? Forget about the AXIS WAR file--first run the Tomcat servlet and JSP samples installed by default (at http://localhost:8080)--are you getting the same/similar errors below, or is everything running fine? If the former, forget about Axis and go to the Tomcat user list until the Tomcat samples are working. If the latter, then the problem is with the tutorial you are using, again you may need to switch to another, or read three or four tutorials until you can get things working. Keep working at it. Yet another option for you might be the quickstart guide: http://ws.apache.org/axis2/1_2/quickstartguide.html. Finally, if you ever figure out what the problem was with the WSO2 article--assuming there was a problem with it--please email the author privately letting him/her know so the tutorial can be fixed. This way future newbies won't have to experience the same troubles. HTH, Glen Am Donnerstag, den 17.05.2007, 14:53 -0700 schrieb Anil Chukkapalli: Hi the code for HelloWorld.java is shown below package org.HelloWorld; public class HelloWorld { /*This echo metod is going to be exposed as a web service */ public String echo(String val){ return val; } } the services.xml file is also shown below ?xml version=1.0 encoding=UTF-8? service parameter name=HelloWorld locked=false HelloWorld /parameter operation name=echo messageReceiver class=org.apache.axis2.rpc.receivers.RPCMessageReceiver / /operation /service i placed services.xml in META-INF file and followed the steps in the http://wso2.org/library/95; tutorial for Axis2 Thanks Anil On 5/17/07, Anil Chukkapalli [EMAIL PROTECTED] wrote: Hi I am using the tomcat to deploy my web service,i placed the axis2.war file in the webapps folder. Then i placed the .aar file in Tomcat 5.5\webapps\axis2\WEB-INF\services. The problem is that I am getting this error message when i try to see the wsdl http://localhost:8080/axis2/services/HelloWorld?wsdl; i get the below error. I just followed the tutorial buti want toknow if i want to know where to include third part jar files. The tutorial never talks about where to place the WSDL file? org.apache.axis2.AxisFault: null; nested exception is: java.lang.NullPointerException org.apache.axis2.description.AxisService.getWSDL( AxisService.java:732) org.apache.axis2.description.AxisService.printWSDL (AxisService.java:597) org.apache.axis2.transport.http.ListingAgent.processListService( ListingAgent.java:186) org.apache.axis2.transport.http.AxisServlet.doGet( AxisServlet.java:181) javax.servlet.http.HttpServlet.service (HttpServlet.java:690) javax.servlet.http.HttpServlet.service(HttpServlet.java :803) note The full stack trace of the root cause is available in the Apache Tomcat/5.5.23 logs. The stack trace shows May 17, 2007 1:18:02 PM org.apache.catalina.core.StandardWrapperValve invoke SEVERE: Servlet.service() for servlet AxisServlet threw exception org.apache.axis2.AxisFault: null; nested exception is: java.lang.NullPointerException at org.apache.axis2.description.AxisService.getWSDL( AxisService.java:732) at org.apache.axis2.description.AxisService.printWSDL( AxisService.java:597) at org.apache.axis2.transport.http.ListingAgent.processListService( ListingAgent.java:186) at org.apache.axis2.transport.http.AxisServlet.doGet( AxisServlet.java:181) at javax.servlet.http.HttpServlet.service(HttpServlet.java:690) at javax.servlet.http.HttpServlet.service (HttpServlet.java:803) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter (ApplicationFilterChain.java:269
[Axis2] Can WSDL have multiple operations
Hi, Can one WSDL file contain multiple operations i.e. multiple wsdl:service tags with each having its own port and binding information. Thanks. -- View this message in context: http://www.nabble.com/-Axis2--Can-WSDL-have-multiple-operations-tf3765319.html#a10644233 Sent from the Axis - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Deploying Axis 2 using WSDD from Axis 1
Hi Is it possible to deploy Axis 2 using WSDD from Axis 1? I am migrating my axis1 service to axis2 service and would like to know if i can use the axis1 web services, deploy.wsdd file, in axis2. Thanks Anil
Change Email Address
Change email address to [EMAIL PROTECTED]
Re: [Axis2] How to get result after calling OperationClient.execute(true)
Hi Deepal What i meant was after you get result how do we extract the result from Soap Envelope. The data is in the form of a byte[] in result in one of the elements. How do we know what is the element, i used tcpmon to find out my element was CheckOutItemResult but is there a standard way to extract the file as i can see it enclosed in the element (SerivceName+Result). It would be great if i can get a code snippet of a standard way of extracting the MTOM byte array from the SOAPEnvelope SOAPEnvelope response = inMsgtCtx.getEnvelope(); Thanks Anil On 4/26/07, Deepal Jayasinghe [EMAIL PROTECTED] wrote: Hi Anil, You get get the OperationContext from the operation client and from that you can get the response message context. Once you have the message context , you can get the SOAPEnvelop from the MC. Have a look at Working with OperationClient section in the following article for more infor. http://today.java.net/pub/a/today/2006/12/13/invoking-web-services-using-apache-axis2.html Thanks Deepal hi I am using Axis2 OperationClient API with MTOM. I got the result back as i can see using TCPMon is there a standard way to access the result after we get the message context and the SOAP envelope. Thanks Anil -- 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]
Re: [Axis2] How to get result after calling OperationClient.execute(true)
See the Accessing Element Information in the XML past of this [1] article to figure out how to traverse the OM Tree.. I think you missed the hyperlink and have the [1] instead, can you update the actual hyperlink Thanks Anil On 4/27/07, Thilina Gunarathne [EMAIL PROTECTED] wrote: It would be great if i can get a code snippet of a standard way of extracting the MTOM byte array from the SOAPEnvelope You will need to navigate to the element containing the binary data, and then to the OMText child of that element..You can use the axiom API's for that.. See the Accessing Element Information in the XML past of this [1] article to figure out how to traverse the OM Tree.. You can use the OMText.getDataHandler() on the above OMText object to access the binary data... Thanks, Thilina -- Thilina Gunarathne - http://www.wso2.com - http://thilinag.blogspot.com - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: soapsession with axis2 and vb.net client
Stefan I suggest you look at this thread **Axis2 Manage Session Cookie Manually in the mailing list. Anil On 4/26/07, Stefan Egli [EMAIL PROTECTED] wrote: Hi I'm new to web services and I have some question concerning interoperability and session-handling with axis2 and .NET. I'm using axis2 1.1.1 on server-side for my basic web service. I tried to invoke this service with my client written in VB.NET (using proxy classes generated with wsdl.exe). It worked fine if I use only the application or request scope. But I need to provide a session-handling for this service. So I first wrote a java client which uses WS-Addressing for session-handling. This also worked fine with my web service. Now I need to enable soap session for my .NET client. Is there any know approach using soapsession with a .NET client, does anyone made some experience with this kind of problem? Does someone know where to find documents, tutorials … concerning this problem? I'll appreciate any help. Thanks stefan
[Axis2] How to get result after calling OperationClient.execute(true)
hi I am using Axis2 OperationClient API with MTOM. I got the result back as i can see using TCPMon is there a standard way to access the result after we get the message context and the SOAP envelope. Thanks Anil
Re: Axis2 Manage Session Cookie Manually
Jay I am viewing the HTTP header using tcpmon, i tried using fiddler and it does not show SOAP messages if i am using a web service but shows message in case of it being a web site. In tcpmon i can see the cookie information HTTP/1.1 200 OK Server: Microsoft-IIS/5.1 Date: Wed, 25 Apr 2007 02:26:19 GMT X-Powered-By: ASP.NET X-AspNet-Version: 2.0.50727 Set-Cookie: ASP.NET_SessionId=vgehlgiivvo0gk45vzh50mbt; path=/; HttpOnly Cache-Control: private, max-age=0 Content-Type: text/xml; charset=utf-8 Content-Length: 1123 . I am able to access the SOAP header information but i unable to get access tothe HTTP header or the cookie information. Set-Cookie: ASP.NET_SessionId=vgehlgiivvo0gk45vzh50mbt; path=/; HttpOnly is the cookie information i receive from the http header. Thanks Anil On 4/24/07, James Arbo [EMAIL PROTECTED] wrote: Anil, That probably means there is no Coookie: header in the response. Are you certain that your server is returning a Cookie: header? Did you set the manageTransportSession to true in axis2.xml? Have you ever used a proxy server? I'm using fiddler and it allows me to view the complete http request and response going over the wire. That's how I validated the proper headers were being sent. There is also a way using axis to get to the HTTPResponse object which allows you to view the headers. -Jay -Original Message- *From:* Anil Chukkapalli [mailto:[EMAIL PROTECTED] *Sent:* Tuesday, April 24, 2007 9:41 PM *To:* axis-user@ws.apache.org *Subject:* Re: Axis2 Manage Session Cookie Manually Jay I am getting the message context successfully, i print the but String incomingCookie = (String) inMsgCtx.getServiceContext ().getProperty( HTTPConstants.COOKIE_STRING) is returning me a null. Is there any other way I can access the cookie. Thanks Anil On 4/23/07, *James Arbo* [EMAIL PROTECTED] wrote: I've successfully retrieved and returned http session cookies. Here's a snippet for reading a cookie from an axis2 client: String incomingCookie = (String) inMsgCtx.getServiceContext().getProperty(HTTPConstants.COOKIE_STRING); Here's one for writing a cookie. /* * This is how to add a custom header, such as a cookie */ Header hdr = new Header(Cookie,my_cookie=xyz;); ArrayList headers = new ArrayList(); headers.add(hdr); opts = outMsgCtx.getOptions(); opts.setProperty(HTTPConstants.HTTP_HEADERS,headers); You could do something similar to the above but the easiest way for me to get this working was to set the manageTransportSession=true in axis2.xmland then use the following on the client side: opts.setProperty(HTTPConstants.REUSE_HTTP_CLIENT,true); This tells axis to re-use the httpclient object for second, third, etc.. requests. If this is done, the http-client remembers the JSESSIONID from the first request and sends it back to the server on subsequent requests. -Jay -Original Message- *From:* Anil Chukkapalli [mailto:[EMAIL PROTECTED] ] *Sent:* Monday, April 23, 2007 2:48 PM *To:* axis-user@ws.apache.org *Subject:* Axis2 Manage Session Cookie Manually Hi Is there any way we can manage sessions manually using Axis2, my non java web service maintains session using cookies. Is there a way my Axis2 client can read the soap/http header to extract the session information and use the extracted infromation for further web service calls, example getting the UUID from the header and use the UUID to create a cookie in my Axis2 client using setProperty. I have tried using the set manage session method to true but that does not work. Can you please point me to another thread that answers my question if you are unable to answer this question. Thanks Anil
Re: Axis2 Manage Session Cookie Manually
Jay I am able to maintain session now, the only additional line that i had to add to maintain session is opts.setManageSession(true) I am still not able to access the session id using the header though but I am able to maintain session with the non java web service. Thanks Anil On 4/25/07, Anil Chukkapalli [EMAIL PROTECTED] wrote: Jay I am viewing the HTTP header using tcpmon, i tried using fiddler and it does not show SOAP messages if i am using a web service but shows message in case of it being a web site. In tcpmon i can see the cookie information HTTP/1.1 200 OK Server: Microsoft-IIS/5.1 Date: Wed, 25 Apr 2007 02:26:19 GMT X-Powered-By: ASP.NET X-AspNet-Version: 2.0.50727 Set-Cookie: ASP.NET_SessionId=vgehlgiivvo0gk45vzh50mbt ; path=/; HttpOnly Cache-Control: private, max-age=0 Content-Type: text/xml; charset=utf-8 Content-Length: 1123 . I am able to access the SOAP header information but i unable to get access tothe HTTP header or the cookie information. Set-Cookie: ASP.NET_SessionId=vgehlgiivvo0gk45vzh50mbt; path=/; HttpOnly is the cookie information i receive from the http header. Thanks Anil On 4/24/07, James Arbo [EMAIL PROTECTED] wrote: Anil, That probably means there is no Coookie: header in the response. Are you certain that your server is returning a Cookie: header? Did you set the manageTransportSession to true in axis2.xml? Have you ever used a proxy server? I'm using fiddler and it allows me to view the complete http request and response going over the wire. That's how I validated the proper headers were being sent. There is also a way using axis to get to the HTTPResponse object which allows you to view the headers. -Jay -Original Message- *From:* Anil Chukkapalli [mailto:[EMAIL PROTECTED] *Sent:* Tuesday, April 24, 2007 9:41 PM *To:* axis-user@ws.apache.org *Subject:* Re: Axis2 Manage Session Cookie Manually Jay I am getting the message context successfully, i print the but String incomingCookie = (String) inMsgCtx.getServiceContext ().getProperty( HTTPConstants.COOKIE_STRING) is returning me a null. Is there any other way I can access the cookie. Thanks Anil On 4/23/07, *James Arbo* [EMAIL PROTECTED] wrote: I've successfully retrieved and returned http session cookies. Here's a snippet for reading a cookie from an axis2 client: String incomingCookie = (String) inMsgCtx.getServiceContext().getProperty(HTTPConstants.COOKIE_STRING); Here's one for writing a cookie. /* * This is how to add a custom header, such as a cookie */ Header hdr = new Header(Cookie,my_cookie=xyz;); ArrayList headers = new ArrayList(); headers.add(hdr); opts = outMsgCtx.getOptions(); opts.setProperty(HTTPConstants.HTTP_HEADERS,headers); You could do something similar to the above but the easiest way for me to get this working was to set the manageTransportSession=true in axis2.xml and then use the following on the client side: opts.setProperty(HTTPConstants.REUSE_HTTP_CLIENT,true); This tells axis to re-use the httpclient object for second, third, etc.. requests. If this is done, the http-client remembers the JSESSIONID from the first request and sends it back to the server on subsequent requests. -Jay -Original Message- *From:* Anil Chukkapalli [mailto:[EMAIL PROTECTED] ] *Sent:* Monday, April 23, 2007 2:48 PM *To:* axis-user@ws.apache.org *Subject:* Axis2 Manage Session Cookie Manually Hi Is there any way we can manage sessions manually using Axis2, my non java web service maintains session using cookies. Is there a way my Axis2 client can read the soap/http header to extract the session information and use the extracted infromation for further web service calls, example getting the UUID from the header and use the UUID to create a cookie in my Axis2 client using setProperty. I have tried using the set manage session method to true but that does not work. Can you please point me to another thread that answers my question if you are unable to answer this question. Thanks Anil
Axis2 Primary API example
Hi I am trying to go throught the axis 2 primary API example of echo blocking client http://ws.apache.org/axis2/1_1/dii.html and i cant find from where you got the ClientUtil.getEchoOMElement() function OMElement payload = ClientUtil.getEchoOMElement(); Options options = new Options(); options.setTo(targetEPR); //Blocking invocation ServiceClient sender = new ServiceClient(); sender.setOptions(options); OMElement result = sender.sendReceive(payload); System.out.println(result); If you are unable to hemp me can you point me to a thread that contains this information. Thanks Anil
Re: Axis2 Manage Session Cookie Manually
Jay Thanks for the reply one last question in the line outMsgCtx.setEnvelope (createSOAPEnvelope(Fred)); createSOAPEnvelope is a member of SOAPfactory, which is an interface. Is there a particular implementation of createSOAPEnvelope that you suggest i use. Thanks Anil On 4/24/07, James Arbo [EMAIL PROTECTED] wrote: It's part of axiom axiom-api-1.2.2.jar -Original Message- *From:* James Arbo *Sent:* Monday, April 23, 2007 6:41 PM *To:* axis-user@ws.apache.org *Subject:* RE: Axis2 Manage Session Cookie Manually Anil, Below is the client side code that produces a valid response (MessageContext) from the server: ServiceClient sender = new ServiceClient(); OperationClient opClient = sender.createClient( ServiceClient.ANON_OUT_IN_OP); MessageContext outMsgCtx = new MessageContext(); Options opts = outMsgCtx.getOptions(); opts.setTo(targetEPR); opts.setTransportInProtocol(Constants.TRANSPORT_HTTP); opts.setTimeOutInMilliSeconds(30); opts.setAction(urn:sayHello); opts.setProperty(HTTPConstants.REUSE_HTTP_CLIENT,true); outMsgCtx.setEnvelope(createSOAPEnvelope(Fred)); //now add the outgoing msg context to our client. opClient.addMessageContext(outMsgCtx); //make the call opClient.execute(true); /* * print the calls response */ //retrieve the messageContext for the incoming response. MessageContext inMsgtCtx = opClient.getMessageContext(In); SOAPEnvelope response = inMsgtCtx.getEnvelope(); System.out.println(response); Hope that helps. It took me quite a while to get an example of the http session and another of the soap session working. I find the documentation weak at best. Good luck. -Jay -Original Message- *From:* Anil Chukkapalli [mailto:[EMAIL PROTECTED] *Sent:* Monday, April 23, 2007 6:26 PM *To:* axis-user@ws.apache.org *Subject:* Re: Axis2 Manage Session Cookie Manually Hi The problem that i am having is MessageContext inMsgCtx = MessageContext.getCurrentMessageContext(); is returning me a null, is inMsgCtx a predefined class or an object, when should i call MessageContext.getCurrentMessageContext(), i called it after i got the response. I am using the stub created using wsdl2java tool to create the stub so i had to do something in the effect of xyzStub.OpenDBResponse response = xyzStub.OpenDB(openDB); Thank you Anil On 4/23/07, *James Arbo* [EMAIL PROTECTED] wrote: I've successfully retrieved and returned http session cookies. Here's a snippet for reading a cookie from an axis2 client: String incomingCookie = (String) inMsgCtx.getServiceContext().getProperty(HTTPConstants.COOKIE_STRING); Here's one for writing a cookie. /* * This is how to add a custom header, such as a cookie */ Header hdr = new Header(Cookie,my_cookie=xyz;); ArrayList headers = new ArrayList(); headers.add(hdr); opts = outMsgCtx.getOptions(); opts.setProperty(HTTPConstants.HTTP_HEADERS,headers); You could do something similar to the above but the easiest way for me to get this working was to set the manageTransportSession=true in axis2.xmland then use the following on the client side: opts.setProperty(HTTPConstants.REUSE_HTTP_CLIENT,true); This tells axis to re-use the httpclient object for second, third, etc.. requests. If this is done, the http-client remembers the JSESSIONID from the first request and sends it back to the server on subsequent requests. -Jay -Original Message- *From:* Anil Chukkapalli [mailto:[EMAIL PROTECTED] ] *Sent:* Monday, April 23, 2007 2:48 PM *To:* axis-user@ws.apache.org *Subject:* Axis2 Manage Session Cookie Manually Hi Is there any way we can manage sessions manually using Axis2, my non java web service maintains session using cookies. Is there a way my Axis2 client can read the soap/http header to extract the session information and use the extracted infromation for further web service calls, example getting the UUID from the header and use the UUID to create a cookie in my Axis2 client using setProperty. I have tried using the set manage session method to true but that does not work. Can you please point me to another thread that answers my question if you are unable to answer this question. Thanks Anil
Re: Axis2 Primary API example
(Typo Fixed) Changed Hemp to Help On 4/24/07, Anil Chukkapalli [EMAIL PROTECTED] wrote: Hi I am trying to go throught the axis 2 primary API example of echo blocking client http://ws.apache.org/axis2/1_1/dii.html and i cant find from where you got the ClientUtil.getEchoOMElement() function OMElement payload = ClientUtil.getEchoOMElement(); Options options = new Options(); options.setTo(targetEPR); //Blocking invocation ServiceClient sender = new ServiceClient(); sender.setOptions(options); OMElement result = sender.sendReceive(payload); System.out.println(result); Can you point me to a thread that contains this information if you are unable to help me Thanks Anil
Re: Axis2 Manage Session Cookie Manually
Hi Deepal In your article Invoking Web Services using Axis 2 , in the section Working with operationclient in step6 it is stated that the same method works and you can access the response message context Thanks Anil On 4/23/07, Deepal Jayasinghe [EMAIL PROTECTED] wrote: Hi Anil, Anil Chukkapalli wrote: Hi The problem that i am having is MessageContext inMsgCtx = MessageContext.getCurrentMessageContext(); Yes , at the client side this method return null, and it only work inside the server side. To set the cookie try to do smt like below, (I never tried , but hope it will work) ServiceClient sc= new ServiceClient(); sc.getServiceContext().setProperty(HTTPConstants.COOKIE_STRING ,Cookie Value); is returning me a null, is inMsgCtx a predefined class or an object, when should i call MessageContext.getCurrentMessageContext(), i called it after i got the response. I am using the stub created using wsdl2java tool to create the stub so i had to do something in the effect of xyzStub.OpenDBResponse response = xyzStub.OpenDB(openDB); Thank you Anil On 4/23/07, *James Arbo* [EMAIL PROTECTED] mailto:[EMAIL PROTECTED] wrote: I've successfully retrieved and returned http session cookies. Here's a snippet for reading a cookie from an axis2 client: String incomingCookie = (String) inMsgCtx.getServiceContext().getProperty(HTTPConstants.COOKIE_STRING ); Here's one for writing a cookie. /* * This is how to add a custom header, such as a cookie */ Header hdr = new Header(Cookie,my_cookie=xyz;); ArrayList headers = new ArrayList(); headers.add(hdr); opts = outMsgCtx.getOptions(); opts.setProperty(HTTPConstants.HTTP_HEADERS ,headers); You could do something similar to the above but the easiest way for me to get this working was to set the manageTransportSession=true in axis2.xml and then use the following on the client side: opts.setProperty(HTTPConstants.REUSE_HTTP_CLIENT,true); This tells axis to re-use the httpclient object for second, third, etc.. requests. If this is done, the http-client remembers the JSESSIONID from the first request and sends it back to the server on subsequent requests. -Jay -Original Message- *From:* Anil Chukkapalli [mailto:[EMAIL PROTECTED] mailto:[EMAIL PROTECTED]] *Sent:* Monday, April 23, 2007 2:48 PM *To:* axis-user@ws.apache.org mailto:axis-user@ws.apache.org *Subject:* Axis2 Manage Session Cookie Manually Hi Is there any way we can manage sessions manually using Axis2, my non java web service maintains session using cookies. Is there a way my Axis2 client can read the soap/http header to extract the session information and use the extracted infromation for further web service calls, example getting the UUID from the header and use the UUID to create a cookie in my Axis2 client using setProperty. I have tried using the set manage session method to true but that does not work. Can you please point me to another thread that answers my question if you are unable to answer this question. Thanks Anil - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Axis2 Manage Session Cookie Manually
Jay I am getting the message context successfully, i print the but String incomingCookie = (String) inMsgCtx.getServiceContext ().getProperty( HTTPConstants.COOKIE_STRING) is returning me a null. Is there any other way I can access the cookie. Thanks Anil On 4/23/07, James Arbo [EMAIL PROTECTED] wrote: I've successfully retrieved and returned http session cookies. Here's a snippet for reading a cookie from an axis2 client: String incomingCookie = (String) inMsgCtx.getServiceContext().getProperty(HTTPConstants.COOKIE_STRING); Here's one for writing a cookie. /* * This is how to add a custom header, such as a cookie */ Header hdr = new Header(Cookie,my_cookie=xyz;); ArrayList headers = new ArrayList(); headers.add(hdr); opts = outMsgCtx.getOptions(); opts.setProperty(HTTPConstants.HTTP_HEADERS,headers); You could do something similar to the above but the easiest way for me to get this working was to set the manageTransportSession=true in axis2.xmland then use the following on the client side: opts.setProperty(HTTPConstants.REUSE_HTTP_CLIENT,true); This tells axis to re-use the httpclient object for second, third, etc.. requests. If this is done, the http-client remembers the JSESSIONID from the first request and sends it back to the server on subsequent requests. -Jay -Original Message- *From:* Anil Chukkapalli [mailto:[EMAIL PROTECTED] *Sent:* Monday, April 23, 2007 2:48 PM *To:* axis-user@ws.apache.org *Subject:* Axis2 Manage Session Cookie Manually Hi Is there any way we can manage sessions manually using Axis2, my non java web service maintains session using cookies. Is there a way my Axis2 client can read the soap/http header to extract the session information and use the extracted infromation for further web service calls, example getting the UUID from the header and use the UUID to create a cookie in my Axis2 client using setProperty. I have tried using the set manage session method to true but that does not work. Can you please point me to another thread that answers my question if you are unable to answer this question. Thanks Anil
Axis2 Manage Session Cookie Manually
Hi Is there any way we can manage sessions manually using Axis2, my non java web service maintains session using cookies. Is there a way my Axis2 client can read the soap/http header to extract the session information and use the extracted infromation for further web service calls, example getting the UUID from the header and use the UUID to create a cookie in my Axis2 client using setProperty. I have tried using the set manage session method to true but that does not work. Can you please point me to another thread that answers my question if you are unable to answer this question. Thanks Anil
Re: Axis2 Manage Session Cookie Manually
Hi The problem that i am having is MessageContext inMsgCtx = MessageContext.getCurrentMessageContext(); is returning me a null, is inMsgCtx a predefined class or an object, when should i call MessageContext.getCurrentMessageContext(), i called it after i got the response. I am using the stub created using wsdl2java tool to create the stub so i had to do something in the effect of xyzStub.OpenDBResponse response = xyzStub.OpenDB(openDB); Thank you Anil On 4/23/07, James Arbo [EMAIL PROTECTED] wrote: I've successfully retrieved and returned http session cookies. Here's a snippet for reading a cookie from an axis2 client: String incomingCookie = (String) inMsgCtx.getServiceContext().getProperty(HTTPConstants.COOKIE_STRING); Here's one for writing a cookie. /* * This is how to add a custom header, such as a cookie */ Header hdr = new Header(Cookie,my_cookie=xyz;); ArrayList headers = new ArrayList(); headers.add(hdr); opts = outMsgCtx.getOptions(); opts.setProperty(HTTPConstants.HTTP_HEADERS,headers); You could do something similar to the above but the easiest way for me to get this working was to set the manageTransportSession=true in axis2.xmland then use the following on the client side: opts.setProperty(HTTPConstants.REUSE_HTTP_CLIENT,true); This tells axis to re-use the httpclient object for second, third, etc.. requests. If this is done, the http-client remembers the JSESSIONID from the first request and sends it back to the server on subsequent requests. -Jay -Original Message- *From:* Anil Chukkapalli [mailto:[EMAIL PROTECTED] *Sent:* Monday, April 23, 2007 2:48 PM *To:* axis-user@ws.apache.org *Subject:* Axis2 Manage Session Cookie Manually Hi Is there any way we can manage sessions manually using Axis2, my non java web service maintains session using cookies. Is there a way my Axis2 client can read the soap/http header to extract the session information and use the extracted infromation for further web service calls, example getting the UUID from the header and use the UUID to create a cookie in my Axis2 client using setProperty. I have tried using the set manage session method to true but that does not work. Can you please point me to another thread that answers my question if you are unable to answer this question. Thanks Anil
Re: Axis2 Manage Session Cookie Manually
Jay Thank you for the help, documentation is weak at best. Can you tell me which jar contains the SOAPEnvolope class. I included the jars in the lib directory of th axis2 install. If this works i would be tempted to write an article on interoperability of .NET and Java with session handling using Axis2 :) . Thanks Anil On 4/23/07, James Arbo [EMAIL PROTECTED] wrote: Anil, Below is the client side code that produces a valid response (MessageContext) from the server: ServiceClient sender = new ServiceClient(); OperationClient opClient = sender.createClient( ServiceClient.ANON_OUT_IN_OP); MessageContext outMsgCtx = new MessageContext(); Options opts = outMsgCtx.getOptions(); opts.setTo(targetEPR); opts.setTransportInProtocol(Constants.TRANSPORT_HTTP); opts.setTimeOutInMilliSeconds(30); opts.setAction(urn:sayHello); opts.setProperty(HTTPConstants.REUSE_HTTP_CLIENT,true); outMsgCtx.setEnvelope(createSOAPEnvelope(Fred)); //now add the outgoing msg context to our client. opClient.addMessageContext(outMsgCtx); //make the call opClient.execute(true); /* * print the calls response */ //retrieve the messageContext for the incoming response. MessageContext inMsgtCtx = opClient.getMessageContext(In); SOAPEnvelope response = inMsgtCtx.getEnvelope(); System.out.println(response); Hope that helps. It took me quite a while to get an example of the http session and another of the soap session working. I find the documentation weak at best. Good luck. -Jay -Original Message- *From:* Anil Chukkapalli [mailto:[EMAIL PROTECTED] *Sent:* Monday, April 23, 2007 6:26 PM *To:* axis-user@ws.apache.org *Subject:* Re: Axis2 Manage Session Cookie Manually Hi The problem that i am having is MessageContext inMsgCtx = MessageContext.getCurrentMessageContext(); is returning me a null, is inMsgCtx a predefined class or an object, when should i call MessageContext.getCurrentMessageContext(), i called it after i got the response. I am using the stub created using wsdl2java tool to create the stub so i had to do something in the effect of xyzStub.OpenDBResponse response = xyzStub.OpenDB(openDB); Thank you Anil On 4/23/07, *James Arbo* [EMAIL PROTECTED] wrote: I've successfully retrieved and returned http session cookies. Here's a snippet for reading a cookie from an axis2 client: String incomingCookie = (String) inMsgCtx.getServiceContext().getProperty(HTTPConstants.COOKIE_STRING); Here's one for writing a cookie. /* * This is how to add a custom header, such as a cookie */ Header hdr = new Header(Cookie,my_cookie=xyz;); ArrayList headers = new ArrayList(); headers.add(hdr); opts = outMsgCtx.getOptions(); opts.setProperty(HTTPConstants.HTTP_HEADERS,headers); You could do something similar to the above but the easiest way for me to get this working was to set the manageTransportSession=true in axis2.xmland then use the following on the client side: opts.setProperty(HTTPConstants.REUSE_HTTP_CLIENT,true); This tells axis to re-use the httpclient object for second, third, etc.. requests. If this is done, the http-client remembers the JSESSIONID from the first request and sends it back to the server on subsequent requests. -Jay -Original Message- *From:* Anil Chukkapalli [mailto:[EMAIL PROTECTED] *Sent:* Monday, April 23, 2007 2:48 PM *To:* axis-user@ws.apache.org *Subject:* Axis2 Manage Session Cookie Manually Hi Is there any way we can manage sessions manually using Axis2, my non java web service maintains session using cookies. Is there a way my Axis2 client can read the soap/http header to extract the session information and use the extracted infromation for further web service calls, example getting the UUID from the header and use the UUID to create a cookie in my Axis2 client using setProperty. I have tried using the set manage session method to true but that does not work. Can you please point me to another thread that answers my question if you are unable to answer this question. Thanks Anil
Re: .NET Web Service and Axis2 Client. Session management issues.
Hi Is it advisable as a last resort for me to maintain the session manually using a global singleton object or is there something else that i am missing in order to maintain session. I am using a cookie container in .NET to maintain session is there a similar mechanism in java 1.6. Can anyone help me soon as i need this immediately. Thanks Anil On 4/19/07, Anil Chukkapalli [EMAIL PROTECTED] wrote: Hi I am trying to use an Axis2 client to connect to a .NET web service. The axis2 client is connecting to the web service but it is not able to maintain session information, i did read through the article http://www.developer.com/services/article.php/3620661, and i am still unable to maintain session. I created my stub using the wsdl2java tool available in axis and the stub is xyzStub. 1. xyzStub._getServiceClient().getOptions().setManageSession(true); 2. Options options = xyzStub._getServiceClient().getOptions(); options.setManageSession(true); cStub._getServiceClient().setOptions(options); Can you tell me how to maintain session when connecting to my .NET web service. Thank you Anil
.NET Web Service and Axis2 Client. Session management issues.
Hi I am trying to use an Axis2 client to connect to a .NET web service. The axis2 client is connecting to the web service but it is not able to maintain session information, i did read through the article http://www.developer.com/services/article.php/3620661, and i am still unable to connect to the service. I created my stub using the wsdl2java tool available in axis and the stub is xyzStub. 1. xyzStub._getServiceClient().getOptions().setManageSession(true); 2. Options options = xyzStub._getServiceClient().getOptions(); options.setManageSession(true); cStub._getServiceClient().setOptions(options); Can you tel me how to maintain session when connecting to my .NET web service. Thank you Anil
Re: [Axis2] wsdl2java overriding my files
Hi, Now I understand that editing the generated files from wsdl2java is not a good practice with the exception of skeleton code. Because if you change wsdl in future you got to generate java files (wrapper objects) again which will not contain changes I did manually so I got to put that code manually again and its not a good design practice. So, now I have a design issue, I want to implement Strategy pattern in my service piece .Here is the problem description, 1) My service is using ADB framework and I have a requirement for a client to send POJO to service end. So, here I have an interface and implementation class Transporter (Interface) -- ABCTransporter (Implementation class) under package name service So, class names are com.service.Transporter and com.service.ABCTransporter Basically these classes have getters and setters (i.e. POJO) and I want to pass this object (ABCTransporter) from client (Java SOAP client) to server (webservice). Here is the WSDL code, wsdl:types schema element name=MessageRequest complexType sequence element name=transporter nillable=true type=tns:Transporter/ /sequence /complexType /element complexType abstract=true name=Transporter/ complexType name=ABCTransporter complexContent extension base=tns:Transporter sequence element name=StartDate nillable=true type=xsd:string/ element name=EndDate nillable=true type=xsd:string/ /sequence /extension /complexContent /complexType /schema /wsdl:types wsdl:message name=addRequest wsdl:part name=part1 element=tns:MessageRequest/ /wsdl:message 2) Now WSDL2Java creates wrapper objects on these message transport objects which will create under package called webservice i.e. com.webservice.Transporter and com.webservice.ABCTransporter 3) Now at the service end when the request comes in, it will receive com.webservice.ABCTransporter thats what client is sending com.webservice.Transporter transporter = (com.webservice.Transporter) msgRequest.getTransporter(); //The following condition determines if the request is from ABC or BCD if (transporter instanceof com.webservice.ABCTransporter) { The above line is the problem with if condition, how could I get rid off if and else conditions, can I use Strategy pattern but again I have no control over com.webservice.Transporter com.webservice.ABCTransporter classes as these are generated by wsdl2java tool on top of my domain classes com.service.Transporter com.service.ABCTransporter Any ideas. Thanks. - Anil Anil VVNN wrote: Philipp, Are you referring to arg line=-p com.myprj.webservice/ in my ant script. if so, I removed this line but it is still overriding the files under com.myprj.webservice directory. Observed that it is not overriding code of Stub, Skeleton and MessageReceiverInOut but it is overriding wrapper objects of complex types. What I mean is, here is my wsdl file, element name=MessageRequest complexType sequence element name=transporter nillable=true type=tns:Transporter/ /sequence /complexType /element complexType abstract=true name=Transporter/ complexType name=ABCTransporter complexContent extension base=tns:Transporter sequence element name=StartDate nillable=true type=xsd:string/ element name=EndDate nillable=true type=xsd:string/ /sequence /extension /complexContent /complexType Transporter is an Interface and ABCTransporter implementation class in my object model. But I want to modify corresponding wrapper objects (Transporter and ABCTransporter ) created by wsdl2java, so I did but when I run wsdl2java again, it creates new wrapper objects of Transporter and ABCTransporter and I loose my changes. Any ideas how would I do to not to override these wrapper objects. Thanks. Philipp Leitner-2 wrote: you should pass a target package as argument to wsdl2java to prevent it from overriding existing source files. /philipp Anil VVNN schrieb: Hi, Any option to not to override files if they are already present. As I have modified few classes (wrapper objects of complex types) and skeleton code. Here is my call in ant scripts, java classname=org.apache.axis2.wsdl.WSDL2Java fork=true classpathref=axis.classpath arg line=-uri ./ws/${src.xml.dir}/${wsdl.file}/ arg line=-ss/ arg line=-sd/ arg line=-ssi/ arg line=-d adb/ arg line=-g/ arg line=-p com.myprj.webservice/ arg line=-o ${basedir}/ws
[Axis2] Best way to handle Axis generated code
Hi, Now I understand that editing the generated files from wsdl2java is not a good practice with the exception of skeleton code. Because if you change wsdl in future you got to generate java files (wrapper objects) again which will not contain changes I did manually so I got to put that code manually again and its not a good design practice. So, now I have a design issue, I want to implement Strategy pattern in my service piece .Here is the problem description, 1) My service is using ADB framework and I have a requirement for a client to send POJO to service end. So, here I have an interface and implementation class Transporter (Interface) -- ABCTransporter (Implementation class) under package name service So, class names are com.service.Transporter and com.service.ABCTransporter Basically these classes have getters and setters (i.e. POJO) and I want to pass this object (ABCTransporter) from client (Java SOAP client) to server (webservice). Here is the WSDL code, wsdl:types schema element name=MessageRequest complexType sequence element name=transporter nillable=true type=tns:Transporter/ /sequence /complexType /element complexType abstract=true name=Transporter/ complexType name=ABCTransporter complexContent extension base=tns:Transporter sequence element name=StartDate nillable=true type=xsd:string/ element name=EndDate nillable=true type=xsd:string/ /sequence /extension /complexContent /complexType /schema /wsdl:types wsdl:message name=addRequest wsdl:part name=part1 element=tns:MessageRequest/ /wsdl:message 2) Now WSDL2Java creates wrapper objects on these message transport objects which will create under package called webservice i.e. com.webservice.Transporter and com.webservice.ABCTransporter 3) Now at the service end when the request comes in, it will receive com.webservice.ABCTransporter thats what client is sending com.webservice.Transporter transporter = (com.webservice.Transporter) msgRequest.getTransporter(); //The following condition determines if the request is from ABC or BCD if (transporter instanceof com.webservice.ABCTransporter) { The above line is the problem with if condition, how could I get rid off if and else conditions, can I use Strategy pattern but again I have no control over com.webservice.Transporter com.webservice.ABCTransporter classes as these are generated by wsdl2java tool on top of my domain classes com.service.Transporter com.service.ABCTransporter Any ideas. Thanks. - Anil -- View this message in context: http://www.nabble.com/-Axis2--Best-way-to-handle-Axis-generated-code-tf3566299.html#a9962237 Sent from the Axis - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: [Axis2] wsdl2java overriding my files
I couldn't able to find the solution yet. Could somebody shed light on this. Thanks. Philipp Leitner-2 wrote: Hmm, I might be wrong, but I think that the package that wsdl2java generates the data objects to depend on the namespace of these objects in the WSDL file ... but I am quite sure that there is some way you can overwrite this with a parameter (can't check right now). Best if you dig into the wsdl2java source and look yourself. /philipp Anil VVNN schrieb: Philipp, Unfortunately, this did not work. This is what I did, arg line=-p com.myprj.webservice.generated/ Actually its generating some of the files (Stub, Skeleton and MessageReceiverInOut) to com.myprj.webservice.generated folder but other wrapper objects of complex types are still writing to com.myprj.webservice folder. Did I miss anything. Thanks. Philipp Leitner-2 wrote: The thing is, you should let these files be generated into a /different/ package :-) Try arg line=-p com.myprj.webservice.generated/ This should do the trick. /philipp Anil VVNN schrieb: Philipp, Are you referring to arg line=-p com.myprj.webservice/ in my ant script. if so, I removed this line but it is still overriding the files under com.myprj.webservice directory. Observed that it is not overriding code of Stub, Skeleton and MessageReceiverInOut but it is overriding wrapper objects of complex types. What I mean is, here is my wsdl file, element name=MessageRequest complexType sequence element name=transporter nillable=true type=tns:Transporter/ /sequence /complexType /element complexType abstract=true name=Transporter/ complexType name=ABCTransporter complexContent extension base=tns:Transporter sequence element name=StartDate nillable=true type=xsd:string/ element name=EndDate nillable=true type=xsd:string/ /sequence /extension /complexContent /complexType Transporter is an Interface and ABCTransporter implementation class in my object model. But I want to modify corresponding wrapper objects (Transporter and ABCTransporter ) created by wsdl2java, so I did but when I run wsdl2java again, it creates new wrapper objects of Transporter and ABCTransporter and I loose my changes. Any ideas how would I do to not to override these wrapper objects. Thanks. Philipp Leitner-2 wrote: you should pass a target package as argument to wsdl2java to prevent it from overriding existing source files. /philipp Anil VVNN schrieb: Hi, Any option to not to override files if they are already present. As I have modified few classes (wrapper objects of complex types) and skeleton code. Here is my call in ant scripts, java classname=org.apache.axis2.wsdl.WSDL2Java fork=true classpathref=axis.classpath arg line=-uri ./ws/${src.xml.dir}/${wsdl.file}/ arg line=-ss/ arg line=-sd/ arg line=-ssi/ arg line=-d adb/ arg line=-g/ arg line=-p com.myprj.webservice/ arg line=-o ${basedir}/ws/src/java/ arg line=-S ./ /java Thanks. - 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] -- View this message in context: http://www.nabble.com/-Axis2--wsdl2java-overriding-my-files-tf3553485.html#a9936923 Sent from the Axis - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Validation Error with library.wsdl in Example
Hi, I have a question about WSDL2Java code generation tool, I have a requirement to change the generated files i.e. wrapper objects of complex types and skeleton code. But after modifying the generated files, if I run WSD2Java again it is overriding all the changes except for skeleton code. So, any option to not to override files if the files are already present. Thanks. - Anil david2 wrote: Dennis, Bless you my son for the incredible insight you have provided in this example. I had wrestled with the issue of JiBX mapping for non-trivial types for many hours before I stumbled on your example. I am well on my way now. One thing: Although I can get your example to work, and I have been able to duplicate the approach in my own application, I was not able to get either your WSDL or my similarly constructed WSDL to validate in NetBeans. The error generated is: XML validation started. C:/netBeansWorkspace/Sandbox/library.wsdl:26,12 src-resolve: Cannot resolve the name 'tns:BookInformation' to a(n) 'type definition' component. 1 Error(s), 0 Warning(s). XML validation finished. Any idea what might be going wrong, or is it possibly just a NetBeans issue? -David -- View this message in context: http://www.nabble.com/-Axis2--JiBX-unwrapped-with-Fault-example-tf3017807.html#a9940228 Sent from the Axis - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: [Axis2] wsdl2java overriding my files
Thanks. I even tried putting .overwrite file under base dir and listed all the Java files which I want wsdl2java tool to generate those files only but didn't help either. Philipp Leitner-2 wrote: OK, after your last posting I was finally able to understand what you actually want to do :-) -- you have generated stubs with wsdl2java in the past, changed them and are now re-running wsdl2java, and want to somehow preserve your changes. I am quite sure that this is not possible with Axis or Axis2 - simply because the logic necessary behind such a feature would be tremendious. You would have to know what the file looked like originally, do kind of a 'diff' between the original and the changed version, generate the new stubs and (and this is the really hard part) know where to put the changes so that they are 'semantically equivalent'. I daresay this is in general impossible. /philipp Anil VVNN schrieb: I couldn't able to find the solution yet. Could somebody shed light on this. Thanks. Philipp Leitner-2 wrote: Hmm, I might be wrong, but I think that the package that wsdl2java generates the data objects to depend on the namespace of these objects in the WSDL file ... but I am quite sure that there is some way you can overwrite this with a parameter (can't check right now). Best if you dig into the wsdl2java source and look yourself. /philipp Anil VVNN schrieb: Philipp, Unfortunately, this did not work. This is what I did, arg line=-p com.myprj.webservice.generated/ Actually its generating some of the files (Stub, Skeleton and MessageReceiverInOut) to com.myprj.webservice.generated folder but other wrapper objects of complex types are still writing to com.myprj.webservice folder. Did I miss anything. Thanks. Philipp Leitner-2 wrote: The thing is, you should let these files be generated into a /different/ package :-) Try arg line=-p com.myprj.webservice.generated/ This should do the trick. /philipp Anil VVNN schrieb: Philipp, Are you referring to arg line=-p com.myprj.webservice/ in my ant script. if so, I removed this line but it is still overriding the files under com.myprj.webservice directory. Observed that it is not overriding code of Stub, Skeleton and MessageReceiverInOut but it is overriding wrapper objects of complex types. What I mean is, here is my wsdl file, element name=MessageRequest complexType sequence element name=transporter nillable=true type=tns:Transporter/ /sequence /complexType /element complexType abstract=true name=Transporter/ complexType name=ABCTransporter complexContent extension base=tns:Transporter sequence element name=StartDate nillable=true type=xsd:string/ element name=EndDate nillable=true type=xsd:string/ /sequence /extension /complexContent /complexType Transporter is an Interface and ABCTransporter implementation class in my object model. But I want to modify corresponding wrapper objects (Transporter and ABCTransporter ) created by wsdl2java, so I did but when I run wsdl2java again, it creates new wrapper objects of Transporter and ABCTransporter and I loose my changes. Any ideas how would I do to not to override these wrapper objects. Thanks. Philipp Leitner-2 wrote: you should pass a target package as argument to wsdl2java to prevent it from overriding existing source files. /philipp Anil VVNN schrieb: Hi, Any option to not to override files if they are already present. As I have modified few classes (wrapper objects of complex types) and skeleton code. Here is my call in ant scripts, java classname=org.apache.axis2.wsdl.WSDL2Java fork=true classpathref=axis.classpath arg line=-uri ./ws/${src.xml.dir}/${wsdl.file}/ arg line=-ss/ arg line=-sd/ arg line=-ssi/ arg line=-d adb/ arg line=-g/ arg line=-p com.myprj.webservice/ arg line=-o ${basedir}/ws/src/java/ arg line=-S ./ /java Thanks. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] -- View this message in context: http://www.nabble.com/-Axis2--wsdl2java-overriding-my-files
[Axis2] wsdl2java overriding my files
Hi, Any option to not to override files if they are already present. As I have modified few classes (wrapper objects of complex types) and skeleton code. Here is my call in ant scripts, java classname=org.apache.axis2.wsdl.WSDL2Java fork=true classpathref=axis.classpath arg line=-uri ./ws/${src.xml.dir}/${wsdl.file}/ arg line=-ss/ arg line=-sd/ arg line=-ssi/ arg line=-d adb/ arg line=-g/ arg line=-p com.myprj.webservice/ arg line=-o ${basedir}/ws/src/java/ arg line=-S ./ /java Thanks. -- View this message in context: http://www.nabble.com/-Axis2--wsdl2java-overriding-my-files-tf3553485.html#a9921386 Sent from the Axis - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: [Axis2] wsdl2java overriding my files
Philipp, Are you referring to arg line=-p com.myprj.webservice/ in my ant script. if so, I removed this line but it is still overriding the files under com.myprj.webservice directory. Observed that it is not overriding code of Stub, Skeleton and MessageReceiverInOut but it is overriding wrapper objects of complex types. What I mean is, here is my wsdl file, element name=MessageRequest complexType sequence element name=transporter nillable=true type=tns:Transporter/ /sequence /complexType /element complexType abstract=true name=Transporter/ complexType name=ABCTransporter complexContent extension base=tns:Transporter sequence element name=StartDate nillable=true type=xsd:string/ element name=EndDate nillable=true type=xsd:string/ /sequence /extension /complexContent /complexType Transporter is an Interface and ABCTransporter implementation class in my object model. But I want to modify corresponding wrapper objects (Transporter and ABCTransporter ) created by wsdl2java, so I did but when I run wsdl2java again, it creates new wrapper objects of Transporter and ABCTransporter and I loose my changes. Any ideas how would I do to not to override these wrapper objects. Thanks. Philipp Leitner-2 wrote: you should pass a target package as argument to wsdl2java to prevent it from overriding existing source files. /philipp Anil VVNN schrieb: Hi, Any option to not to override files if they are already present. As I have modified few classes (wrapper objects of complex types) and skeleton code. Here is my call in ant scripts, java classname=org.apache.axis2.wsdl.WSDL2Java fork=true classpathref=axis.classpath arg line=-uri ./ws/${src.xml.dir}/${wsdl.file}/ arg line=-ss/ arg line=-sd/ arg line=-ssi/ arg line=-d adb/ arg line=-g/ arg line=-p com.myprj.webservice/ arg line=-o ${basedir}/ws/src/java/ arg line=-S ./ /java Thanks. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] -- View this message in context: http://www.nabble.com/-Axis2--wsdl2java-overriding-my-files-tf3553485.html#a9921989 Sent from the Axis - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: [Axis2] wsdl2java overriding my files
Philipp, Unfortunately, this did not work. This is what I did, arg line=-p com.myprj.webservice.generated/ Actually its generating some of the files (Stub, Skeleton and MessageReceiverInOut) to com.myprj.webservice.generated folder but other wrapper objects of complex types are still writing to com.myprj.webservice folder. Did I miss anything. Thanks. Philipp Leitner-2 wrote: The thing is, you should let these files be generated into a /different/ package :-) Try arg line=-p com.myprj.webservice.generated/ This should do the trick. /philipp Anil VVNN schrieb: Philipp, Are you referring to arg line=-p com.myprj.webservice/ in my ant script. if so, I removed this line but it is still overriding the files under com.myprj.webservice directory. Observed that it is not overriding code of Stub, Skeleton and MessageReceiverInOut but it is overriding wrapper objects of complex types. What I mean is, here is my wsdl file, element name=MessageRequest complexType sequence element name=transporter nillable=true type=tns:Transporter/ /sequence /complexType /element complexType abstract=true name=Transporter/ complexType name=ABCTransporter complexContent extension base=tns:Transporter sequence element name=StartDate nillable=true type=xsd:string/ element name=EndDate nillable=true type=xsd:string/ /sequence /extension /complexContent /complexType Transporter is an Interface and ABCTransporter implementation class in my object model. But I want to modify corresponding wrapper objects (Transporter and ABCTransporter ) created by wsdl2java, so I did but when I run wsdl2java again, it creates new wrapper objects of Transporter and ABCTransporter and I loose my changes. Any ideas how would I do to not to override these wrapper objects. Thanks. Philipp Leitner-2 wrote: you should pass a target package as argument to wsdl2java to prevent it from overriding existing source files. /philipp Anil VVNN schrieb: Hi, Any option to not to override files if they are already present. As I have modified few classes (wrapper objects of complex types) and skeleton code. Here is my call in ant scripts, java classname=org.apache.axis2.wsdl.WSDL2Java fork=true classpathref=axis.classpath arg line=-uri ./ws/${src.xml.dir}/${wsdl.file}/ arg line=-ss/ arg line=-sd/ arg line=-ssi/ arg line=-d adb/ arg line=-g/ arg line=-p com.myprj.webservice/ arg line=-o ${basedir}/ws/src/java/ arg line=-S ./ /java Thanks. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] -- View this message in context: http://www.nabble.com/-Axis2--wsdl2java-overriding-my-files-tf3553485.html#a9922483 Sent from the Axis - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
[Axis2] wsdl2java Code Generation problem (ADB)
Hi, I'm using Axis2 1.1.1, I have written very simple wsdl wsdl but encountering problem while generating Java classes, could somebody validate the attached wsdl. And here is the error, === org.apache.axis2.wsdl.codegen.CodeGenerationException: apache.axis2.wsdl.databinding.UnmatchedTypeException: No type was mapped to the name setMessage with namespace http://ADBTest/xsd === http://www.nabble.com/file/7486/ADBTest.wsdl ADBTest.wsdl Thanks. Do you need ADBTestSkeleton code too. -- View this message in context: http://www.nabble.com/-Axis2--wsdl2java-Code-Generation-problem-%28ADB%29-tf3481013.html#a9716015 Sent from the Axis - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: [Axis2] wsdl2java Code Generation problem (ADB)
Hi Dims, I think nothing wrong with Axis2 libraries, problem could be with my wsdl file (ADBTest.wsdl attached). Can you please validate. Thanks. - Anil Davanum Srinivas wrote: Please create a JIRA issue and upload the wsdl's. thanks, dims On 3/28/07, Anil VVNN [EMAIL PROTECTED] wrote: Hi, I'm using Axis2 1.1.1, I have written very simple wsdl wsdl but encountering problem while generating Java classes, could somebody validate the attached wsdl. And here is the error, === org.apache.axis2.wsdl.codegen.CodeGenerationException: apache.axis2.wsdl.databinding.UnmatchedTypeException: No type was mapped to the name setMessage with namespace http://ADBTest/xsd === http://www.nabble.com/file/7486/ADBTest.wsdl ADBTest.wsdl Thanks. Do you need ADBTestSkeleton code too. -- View this message in context: http://www.nabble.com/-Axis2--wsdl2java-Code-Generation-problem-%28ADB%29-tf3481013.html#a9716015 Sent from the Axis - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] -- Davanum Srinivas :: http://wso2.org/ :: Oxygen for Web Services Developers - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] -- View this message in context: http://www.nabble.com/-Axis2--wsdl2java-Code-Generation-problem-%28ADB%29-tf3481013.html#a9717631 Sent from the Axis - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: [Axis2] AXIOM or JBIX
Hi Nilesh, Thanks for detailed response. So, the AddressBookService example (at http://people.apache.org/~thilina/axis2/docs/jibx/jibx-unwrapped-example.html) which uses POJO as a data transfer object, can be implemented using any Data binding framework (JIBX or ADB) to create Java classes. What is JiBX binding definition, is this property only applicable to JiBX framework -EbindingFile /resources/jibxbindingFile.xml And also, can we send the client request using SOAP (instead of writing Java Client) and get the response back in SOAP? In which case, this type of scenario comes in. Thanks, Anil Nilesh Ghorpade wrote: Hi Anil, The Data binding frameworks come into picture when you are generating the Java code artifacts from WSDL. If you observe the wsdl2java command there is a command line argument namely -d with which you can specify the Data binding framework which you want to use. In case u want to use JiBX you would be specifying something like $ wsdl2java -o /outputDir -d jibx -EbindingFile /resources/jibxbindingFile.xml -uri MyWebService.wsdl The above command is just for making things more simpler. Also if there are no schema references in the WSDL or if the WSDL is not having any schema types then the Data binding framework would not be coming into picture. (Others Please correct me if I am wrong.) You would just be deciding which Data binding framework you should be using. AXIS 2 would internally be using the same and generating the Java classes for you. Do not get confused by the approach which you are choosing to build the web service and the data binding framework. The data binding framework is just to map the schema which is defined in the WSDL to Java classes. Thats the only purpose of the data binding framework. Using POJO's for web services means you would be writing a POJO class which would be capturing all the information you need for invoking the particular web service operation. For example if you see the AddressBookService in the AXIS 2 samples you can see that the addEntry method takes in a POJO as its input parameter namely Entry. Regarding your second question I am not able to understand it correctly. Also the flow which you have mentioned from the Client to the Service is correct and it would remain the same for any Web service for that matter i.e. not only AXIS 2 but any web service which is developed using any other framework. Hope that answers your queries. Regards Nilesh - Original Message From: Anil VVNN [EMAIL PROTECTED] To: axis-user@ws.apache.org Sent: Monday, March 26, 2007 7:56:35 PM Subject: Re: [Axis2] AXIOM or JBIX Hi Niles, Thanks for answering my questions. As I said I'm a beginner, I have few more questions related to previous one. (1) When exactly do we use Binding frameworks (JIBX, ADB or XMLBeans) ? For instance, the examples given in Axis2 website (i.e. StockQuoteService) referring to simple method call, client calling WS for getPrice/update operations but there's no XSD involved, I think this kind of operations can be easily accomplished using POJO option. But I'm confused when to use POJO or anyother Binding framework(JIBX). (2) What is the difference between XML Processing Model and SOAP Processing Model, when do we use these models independently. To my understanding, this is the typical flow of Axis2 services, Client calls--- Stub (generated by wsdl2java) calls[SOAP request]--- Skeleton Interface (generated by wsdl2java) --Business Logic And this SOAP request can be handled using any transport (eg. TCP, JMS etc.) Please correct me if I'm wrong. Thanks. - Anil Nilesh Ghorpade wrote: Hi, As per my understanding AXIS 2 uses AXIOM API's internally for any XML related activities. Hence as you have mentioned that you are confused to choose between POJO, AXIOM, JIBX, ADB or XMLBeans, the AXIOM is an invalid option here. Secondly in AXIS 2 you can create web services using either the Spring Framework or POJO. JiBX, XMLBeans and ADB are more related to the data binding frameworks which AXIS 2 supports. Hence it depends on your schema on which data binding framework you would want to select. As per my knowledge XMLBeans is the best when it comes to complex schemas. This is because XMLBeans implementation can understand all the XSD (i.e. schema) constructs. To answer your second question, the answer is YES. If you want to use the wsdl2java command from AXIS2 for generating your stubs and skeletons you will need the WSDL. Generating a WSDL is also not a diccficult task. YOu can have your SEI defined i.e. the Service Endpoint Interface with all the method signatures which you want to expose as web service operations. On executing the java2wsdl command from AXIS2 you would be able to get the WSDL. And using this WSDL you can generate the remaining artifacts of your web service. WSDL is nothing
Re: [Axis2] AXIOM or JBIX
Hi Niles, Thanks for answering my questions. As I said I'm a beginner, I have few more questions related to previous one. (1) When exactly do we use Binding frameworks (JIBX, ADB or XMLBeans) ? For instance, the examples given in Axis2 website (i.e. StockQuoteService) referring to simple method call, client calling WS for getPrice/update operations but there's no XSD involved, I think this kind of operations can be easily accomplished using POJO option. But I'm confused when to use POJO or anyother Binding framework(JIBX). (2) What is the difference between XML Processing Model and SOAP Processing Model, when do we use these models independently. To my understanding, this is the typical flow of Axis2 services, Client calls--- Stub (generated by wsdl2java) calls[SOAP request]--- Skeleton Interface (generated by wsdl2java) --Business Logic And this SOAP request can be handled using any transport (eg. TCP, JMS etc.) Please correct me if I'm wrong. Thanks. - Anil Nilesh Ghorpade wrote: Hi, As per my understanding AXIS 2 uses AXIOM API's internally for any XML related activities. Hence as you have mentioned that you are confused to choose between POJO, AXIOM, JIBX, ADB or XMLBeans, the AXIOM is an invalid option here. Secondly in AXIS 2 you can create web services using either the Spring Framework or POJO. JiBX, XMLBeans and ADB are more related to the data binding frameworks which AXIS 2 supports. Hence it depends on your schema on which data binding framework you would want to select. As per my knowledge XMLBeans is the best when it comes to complex schemas. This is because XMLBeans implementation can understand all the XSD (i.e. schema) constructs. To answer your second question, the answer is YES. If you want to use the wsdl2java command from AXIS2 for generating your stubs and skeletons you will need the WSDL. Generating a WSDL is also not a diccficult task. YOu can have your SEI defined i.e. the Service Endpoint Interface with all the method signatures which you want to expose as web service operations. On executing the java2wsdl command from AXIS2 you would be able to get the WSDL. And using this WSDL you can generate the remaining artifacts of your web service. WSDL is nothing but an interface and hence even if you have defined an interface in Java, you can generate a WSDL from it. Hope that answers your queries. Regards Niles - Original Message From: Martin Gainty [EMAIL PROTECTED] To: axis-user@ws.apache.org Sent: Monday, March 26, 2007 3:15:01 AM Subject: Re: [Axis2] AXIOM or JBIX Anil- I found this whitepaper quite informative SAX2 processes fastest..with DOM bein http://www.mail-archive.com/jibx-users@lists.sourceforge.net/msg01044.html FWIW, M-- --- This e-mail message (including attachments, if any) is intended for the use of the individual or entity to which it is addressed and may contain information that is privileged, proprietary , confidential and exempt from disclosure. If you are not the intended recipient, you are notified that any dissemination, distribution or copying of this communication is strictly prohibited. --- Le présent message électronique (y compris les pièces qui y sont annexées, le cas échéant) s'adresse au destinataire indiqué et peut contenir des renseignements de caractère privé ou confidentiel. Si vous n'êtes pas le destinataire de ce document, nous vous signalons qu'il est strictement interdit de le diffuser, de le distribuer ou de le reproduire. - Original Message - From: Anil [EMAIL PROTECTED] To: axis-user@ws.apache.org Sent: Sunday, March 25, 2007 4:37 PM Subject: [Axis2] AXIOM or JBIX Hi, I'm new to Axis2, what is the criteria to choose between POJO, AXIOM, JIBX, ADB or XMLBeans. How do we decide architecture wise. My second question is, is wsdl file mandatory to create stub and skeleton interfaces or can we use just skeleton file to create wsdl file. Thanks. Bored stiff? Loosen up... Download and play hundreds of games for free on Yahoo! Games. http://games.yahoo.com/games/front - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] The fish are biting. Get more visitors on your site using Yahoo! Search Marketing. http://searchmarketing.yahoo.com/arp/sponsoredsearch_v2.php -- View this message in context: http://www.nabble.com/-Axis2--AXIOM-or-JBIX-tf3463792.html#a9674209 Sent from the Axis - User mailing list archive at Nabble.com
[Axis2] AXIOM or JBIX
Hi, I'm new to Axis2, what is the criteria to choose between POJO, AXIOM, JIBX, ADB or XMLBeans. How do we decide architecture wise. My second question is, is wsdl file mandatory to create stub and skeleton interfaces or can we use just skeleton file to create wsdl file. Thanks. Bored stiff? Loosen up... Download and play hundreds of games for free on Yahoo! Games. http://games.yahoo.com/games/front - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
how to set array of String as parameter and return type at the client?
Hello, Can anyone please point me to a sample or example that shows how to write a test client for axis where the method takes in String[] or returns String[]? Specifically, for input params String[], How would I code the call below? call.addParameter( params, XMLType.XSD_STRING, ParameterMode.IN ); thanks, Anil for good news go to http://members.tripod.com/~goodnewsforyou/goodnews.html Yahoo! Music Unlimited Access over 1 million songs. http://music.yahoo.com/unlimited - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: help. newbie error. cannot deploy
Thank you, Yura and Luis. Dropping the log4j.properties into Tomcat5.5.../WEB-INF/classes enabled me to see the real error: bad class version. that was easy to fix - recompile with the correct source level set. thanks, Anil --- Luis Rivera [EMAIL PROTECTED] wrote: Yep, that's what he said and that also works for me :) --Luis R. From: Anil Philip [EMAIL PROTECTED] Reply-To: axis-user@ws.apache.org To: axis-user@ws.apache.org Subject: Re: help. newbie error. cannot deploy Date: Fri, 19 Jan 2007 10:37:30 -0800 (PST) Are you saying I should put the log.properties in C:\Program Files\Apache Software Foundation\Tomcat 5.5\webapps\axis\WEB-INF\classes then bounce the Tomcat server? No editing changes to C:\Program Files\Apache Software Foundation\Tomcat 5.5\conf\logging.properties? thanks, Anil --- Yura Tkachenko [EMAIL PROTECTED] wrote: Hi, 1) it's depend how you configurate filtering by packages - you can turn to use tomcat log or direct it to axis.log file for e.g. 2) you should put log4j.properties in the WEB-INF\classes folder. 2007/1/19, Anil Philip [EMAIL PROTECTED]: Thank you for replying. Sorry, but it is not clear about: 1) Will the error be in the axis log files, or in the Tomcat log files? 2) How do I turn on logging for axis. ie. where should I put the log properties file and will it be automatically picked up? thanks, Anil --- Yura Tkachenko [EMAIL PROTECTED] wrote: Hi, try to specify DEBUG, because even with INFO you can see nothing. You need to have log4j.properties file for Tomcat. Here is example of log4j.properties: # Set root category priority to INFO and its only appender to CONSOLE. log4j.rootCategory=INFO, CONSOLE #log4j.rootCategory=INFO, CONSOLE, LOGFILE # Set the enterprise logger category to FATAL and its only appender to CONSOLE. log4j.logger.org.apache.axis.enterprise=FATAL, CONSOLE # CONSOLE is set to be a ConsoleAppender using a PatternLayout. log4j.appender.CONSOLE=org.apache.log4j.ConsoleAppender log4j.appender.CONSOLE.Threshold=INFO log4j.appender.CONSOLE.layout=org.apache.log4j.PatternLayout log4j.appender.CONSOLE.layout.ConversionPattern=- %m%n # LOGFILE is set to be a File appender using a PatternLayout. log4j.appender.LOGFILE=org.apache.log4j.FileAppender log4j.appender.LOGFILE.File=axis.log log4j.appender.LOGFILE.Append=true log4j.appender.LOGFILE.Threshold=INFO log4j.appender.LOGFILE.layout=org.apache.log4j.PatternLayout log4j.appender.LOGFILE.layout.ConversionPattern=%-4r [%t] %-5p %c %x - %m%n Modify it if you need. 2007/1/19, Anil Philip [EMAIL PROTECTED]: Thank you for replying. I do not see anything in the server logs. I looked at the admin, manager and catalina logs. Are there others, or should the logging granularity be set to Info - but I dont know where to set it. We are using Tomcat 5.5 Any help appreciated. thanks, Anil --- Luis Rivera [EMAIL PROTECTED] wrote: Anil, I do not know what is the exact problem, but I have seen the same exception many times. The server is mapping the original exception to InvocationTargetException. Therefore, I would recommend looking into the server logs to know the original Exception and proceed accordingly. Hope that helps, --Luis R. From: Anil Philip [EMAIL PROTECTED] Reply-To: axis-user@ws.apache.org To: axis-user@ws.apache.org Subject: help. newbie error. cannot deploy Date: Thu, 18 Jan 2007 15:02:54 -0800 (PST) Hello, I am an Axis newbie. Trying to deploy. I receive an error. Nothing in the logs to show more detail: C:\Everest\WebDeployjava -classpath C:\Everest\WebDeploy\axis\axis.jar; C:\Everest\WebDeploy\axis\axis-ant.jar;C:\Everest\WebDeploy\axis\commons- discovery-0.2.jar; C:\Everest\WebDeploy\axis\commons-logging-1.0.4.jar ;C:\Everest\WebDeploy\axis\jaxrpc.jar; C:\Everest\WebDeploy\axis\log4j-1.2.14.jar ;C:\Everest\WebDeploy\axis\saaj.jar; C:\Everest\WebDeploy\axis\wsdl4j-1.5.1.jar ;C:\Everest\WebDeploy\axis\activation.jar; C:\Everest\WebDeploy\axis\mail.jar; org.apache.axis.client.AdminClient C:\Everest\WebDeploy\deploy.wsdd Processing file C:\Everest\WebDeploy\deploy.wsdd
RE: help. newbie error. cannot deploy
Thank you for replying. I do not see anything in the server logs. I looked at the admin, manager and catalina logs. Are there others, or should the logging granularity be set to Info - but I dont know where to set it. We are using Tomcat 5.5 Any help appreciated. thanks, Anil --- Luis Rivera [EMAIL PROTECTED] wrote: Anil, I do not know what is the exact problem, but I have seen the same exception many times. The server is mapping the original exception to InvocationTargetException. Therefore, I would recommend looking into the server logs to know the original Exception and proceed accordingly. Hope that helps, --Luis R. From: Anil Philip [EMAIL PROTECTED] Reply-To: axis-user@ws.apache.org To: axis-user@ws.apache.org Subject: help. newbie error. cannot deploy Date: Thu, 18 Jan 2007 15:02:54 -0800 (PST) Hello, I am an Axis newbie. Trying to deploy. I receive an error. Nothing in the logs to show more detail: C:\Everest\WebDeployjava -classpath C:\Everest\WebDeploy\axis\axis.jar; C:\Everest\WebDeploy\axis\axis-ant.jar;C:\Everest\WebDeploy\axis\commons-discovery-0.2.jar; C:\Everest\WebDeploy\axis\commons-logging-1.0.4.jar;C:\Everest\WebDeploy\axis\jaxrpc.jar; C:\Everest\WebDeploy\axis\log4j-1.2.14.jar;C:\Everest\WebDeploy\axis\saaj.jar; C:\Everest\WebDeploy\axis\wsdl4j-1.5.1.jar;C:\Everest\WebDeploy\axis\activation.jar; C:\Everest\WebDeploy\axis\mail.jar; org.apache.axis.client.AdminClient C:\Everest\WebDeploy\deploy.wsdd Processing file C:\Everest\WebDeploy\deploy.wsdd Exception: AxisFault faultCode: {http://schemas.xmlsoap.org/soap/envelope/}Server.userException faultSubcode: faultString: java.lang.reflect.InvocationTargetException faultActor: faultNode: faultDetail: {http://xml.apache.org/axis/}hostname:ITDMWEB01 Any help appreciated. Thanks, Anil P.S. wsdd is - !-- Use this file to deploy some handlers/chains and services -- !-- Two ways to do this: -- !-- java org.apache.axis.client.AdminClient deploy.wsdd -- !-- after the axis server is running -- !-- or -- !-- java org.apache.axis.utils.Admin client|server deploy.wsdd -- !-- from the same directory that the Axis engine runs -- deployment xmlns=http://xml.apache.org/axis/wsdd/; xmlns:java=http://xml.apache.org/axis/wsdd/providers/java; !-- Services from DonkeyClockService WSDL service -- service name=DonkeyClock provider=java:RPC style=wrapped use=literal parameter name=wsdlTargetNamespace value=urn:donkeyclock.deploy/ parameter name=wsdlServiceElement value=DonkeyClockService/ parameter name=schemaQualified value=urn:donkeyclock.deploy/ parameter name=wsdlServicePort value=DonkeyClock/ parameter name=className value=deploy.donkeyclock.DonkeyClockSoapBindingSkeleton/ parameter name=wsdlPortType value=DonkeyClock/ parameter name=typeMappingVersion value=1.2/ parameter name=allowedMethods value=*/ parameter name=scope value=Session/ typeMapping xmlns:ns=urn:donkeyclock.deploy qname=ns:ATriggerDetail type=java:deploy.donkeyclock.ATriggerDetail serializer=org.apache.axis.encoding.ser.BeanSerializerFactory deserializer=org.apache.axis.encoding.ser.BeanDeserializerFactory encodingStyle= / typeMapping xmlns:ns=urn:donkeyclock.deploy qname=ns:AJobDetail type=java:deploy.donkeyclock.AJobDetail serializer=org.apache.axis.encoding.ser.BeanSerializerFactory deserializer=org.apache.axis.encoding.ser.BeanDeserializerFactory encodingStyle= / /service /deployment It's here! Your new message! Get new email alerts with the free Yahoo! Toolbar. http://tools.search.yahoo.com/toolbar/features/mail/ - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] _ Valentines Day -- Shop for gifts that spell L-O-V-E at MSN Shopping http://shopping.msn.com/content/shp/?ctId=8323,ptnrid=37,ptnrdata=24095tcode=wlmtagline - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] 8:00? 8:25? 8:40? Find a flick in no time with the Yahoo! Search movie showtime shortcut. http://tools.search.yahoo.com/shortcuts/#news
Re: help. newbie error. cannot deploy
Thank you for replying. Sorry, but it is not clear about: 1) Will the error be in the axis log files, or in the Tomcat log files? 2) How do I turn on logging for axis. ie. where should I put the log properties file and will it be automatically picked up? thanks, Anil --- Yura Tkachenko [EMAIL PROTECTED] wrote: Hi, try to specify DEBUG, because even with INFO you can see nothing. You need to have log4j.properties file for Tomcat. Here is example of log4j.properties: # Set root category priority to INFO and its only appender to CONSOLE. log4j.rootCategory=INFO, CONSOLE #log4j.rootCategory=INFO, CONSOLE, LOGFILE # Set the enterprise logger category to FATAL and its only appender to CONSOLE. log4j.logger.org.apache.axis.enterprise=FATAL, CONSOLE # CONSOLE is set to be a ConsoleAppender using a PatternLayout. log4j.appender.CONSOLE=org.apache.log4j.ConsoleAppender log4j.appender.CONSOLE.Threshold=INFO log4j.appender.CONSOLE.layout=org.apache.log4j.PatternLayout log4j.appender.CONSOLE.layout.ConversionPattern=- %m%n # LOGFILE is set to be a File appender using a PatternLayout. log4j.appender.LOGFILE=org.apache.log4j.FileAppender log4j.appender.LOGFILE.File=axis.log log4j.appender.LOGFILE.Append=true log4j.appender.LOGFILE.Threshold=INFO log4j.appender.LOGFILE.layout=org.apache.log4j.PatternLayout log4j.appender.LOGFILE.layout.ConversionPattern=%-4r [%t] %-5p %c %x - %m%n Modify it if you need. 2007/1/19, Anil Philip [EMAIL PROTECTED]: Thank you for replying. I do not see anything in the server logs. I looked at the admin, manager and catalina logs. Are there others, or should the logging granularity be set to Info - but I dont know where to set it. We are using Tomcat 5.5 Any help appreciated. thanks, Anil --- Luis Rivera [EMAIL PROTECTED] wrote: Anil, I do not know what is the exact problem, but I have seen the same exception many times. The server is mapping the original exception to InvocationTargetException. Therefore, I would recommend looking into the server logs to know the original Exception and proceed accordingly. Hope that helps, --Luis R. From: Anil Philip [EMAIL PROTECTED] Reply-To: axis-user@ws.apache.org To: axis-user@ws.apache.org Subject: help. newbie error. cannot deploy Date: Thu, 18 Jan 2007 15:02:54 -0800 (PST) Hello, I am an Axis newbie. Trying to deploy. I receive an error. Nothing in the logs to show more detail: C:\Everest\WebDeployjava -classpath C:\Everest\WebDeploy\axis\axis.jar; C:\Everest\WebDeploy\axis\axis-ant.jar;C:\Everest\WebDeploy\axis\commons- discovery-0.2.jar; C:\Everest\WebDeploy\axis\commons-logging-1.0.4.jar ;C:\Everest\WebDeploy\axis\jaxrpc.jar; C:\Everest\WebDeploy\axis\log4j-1.2.14.jar ;C:\Everest\WebDeploy\axis\saaj.jar; C:\Everest\WebDeploy\axis\wsdl4j-1.5.1.jar ;C:\Everest\WebDeploy\axis\activation.jar; C:\Everest\WebDeploy\axis\mail.jar; org.apache.axis.client.AdminClient C:\Everest\WebDeploy\deploy.wsdd Processing file C:\Everest\WebDeploy\deploy.wsdd Exception: AxisFault faultCode: {http://schemas.xmlsoap.org/soap/envelope/}Server.userException faultSubcode: faultString: java.lang.reflect.InvocationTargetException faultActor: faultNode: faultDetail: {http://xml.apache.org/axis/}hostname:ITDMWEB01 Any help appreciated. Thanks, Anil P.S. wsdd is - !-- Use this file to deploy some handlers/chains and services -- !-- Two ways to do this: -- !-- java org.apache.axis.client.AdminClient deploy.wsdd -- !-- after the axis server is running -- !-- or -- !-- java org.apache.axis.utils.Admin client|server deploy.wsdd -- !-- from the same directory that the Axis engine runs -- deployment xmlns=http://xml.apache.org/axis/wsdd/; xmlns:java=http://xml.apache.org/axis/wsdd/providers/java; !-- Services from DonkeyClockService WSDL service -- service name=DonkeyClock provider=java:RPC style=wrapped use=literal parameter name=wsdlTargetNamespace value=urn:donkeyclock.deploy/ parameter name=wsdlServiceElement value=DonkeyClockService/ parameter name=schemaQualified value=urn:donkeyclock.deploy/ parameter name=wsdlServicePort value=DonkeyClock/ parameter name=className value=deploy.donkeyclock.DonkeyClockSoapBindingSkeleton/ parameter name=wsdlPortType value=DonkeyClock/ parameter name=typeMappingVersion value=1.2/ parameter name=allowedMethods value
Re: help. newbie error. cannot deploy
Are you saying I should put the log.properties in C:\Program Files\Apache Software Foundation\Tomcat 5.5\webapps\axis\WEB-INF\classes then bounce the Tomcat server? No editing changes to C:\Program Files\Apache Software Foundation\Tomcat 5.5\conf\logging.properties? thanks, Anil --- Yura Tkachenko [EMAIL PROTECTED] wrote: Hi, 1) it's depend how you configurate filtering by packages - you can turn to use tomcat log or direct it to axis.log file for e.g. 2) you should put log4j.properties in the WEB-INF\classes folder. 2007/1/19, Anil Philip [EMAIL PROTECTED]: Thank you for replying. Sorry, but it is not clear about: 1) Will the error be in the axis log files, or in the Tomcat log files? 2) How do I turn on logging for axis. ie. where should I put the log properties file and will it be automatically picked up? thanks, Anil --- Yura Tkachenko [EMAIL PROTECTED] wrote: Hi, try to specify DEBUG, because even with INFO you can see nothing. You need to have log4j.properties file for Tomcat. Here is example of log4j.properties: # Set root category priority to INFO and its only appender to CONSOLE. log4j.rootCategory=INFO, CONSOLE #log4j.rootCategory=INFO, CONSOLE, LOGFILE # Set the enterprise logger category to FATAL and its only appender to CONSOLE. log4j.logger.org.apache.axis.enterprise=FATAL, CONSOLE # CONSOLE is set to be a ConsoleAppender using a PatternLayout. log4j.appender.CONSOLE=org.apache.log4j.ConsoleAppender log4j.appender.CONSOLE.Threshold=INFO log4j.appender.CONSOLE.layout=org.apache.log4j.PatternLayout log4j.appender.CONSOLE.layout.ConversionPattern=- %m%n # LOGFILE is set to be a File appender using a PatternLayout. log4j.appender.LOGFILE=org.apache.log4j.FileAppender log4j.appender.LOGFILE.File=axis.log log4j.appender.LOGFILE.Append=true log4j.appender.LOGFILE.Threshold=INFO log4j.appender.LOGFILE.layout=org.apache.log4j.PatternLayout log4j.appender.LOGFILE.layout.ConversionPattern=%-4r [%t] %-5p %c %x - %m%n Modify it if you need. 2007/1/19, Anil Philip [EMAIL PROTECTED]: Thank you for replying. I do not see anything in the server logs. I looked at the admin, manager and catalina logs. Are there others, or should the logging granularity be set to Info - but I dont know where to set it. We are using Tomcat 5.5 Any help appreciated. thanks, Anil --- Luis Rivera [EMAIL PROTECTED] wrote: Anil, I do not know what is the exact problem, but I have seen the same exception many times. The server is mapping the original exception to InvocationTargetException. Therefore, I would recommend looking into the server logs to know the original Exception and proceed accordingly. Hope that helps, --Luis R. From: Anil Philip [EMAIL PROTECTED] Reply-To: axis-user@ws.apache.org To: axis-user@ws.apache.org Subject: help. newbie error. cannot deploy Date: Thu, 18 Jan 2007 15:02:54 -0800 (PST) Hello, I am an Axis newbie. Trying to deploy. I receive an error. Nothing in the logs to show more detail: C:\Everest\WebDeployjava -classpath C:\Everest\WebDeploy\axis\axis.jar; C:\Everest\WebDeploy\axis\axis-ant.jar;C:\Everest\WebDeploy\axis\commons- discovery-0.2.jar; C:\Everest\WebDeploy\axis\commons-logging-1.0.4.jar ;C:\Everest\WebDeploy\axis\jaxrpc.jar; C:\Everest\WebDeploy\axis\log4j-1.2.14.jar ;C:\Everest\WebDeploy\axis\saaj.jar; C:\Everest\WebDeploy\axis\wsdl4j-1.5.1.jar ;C:\Everest\WebDeploy\axis\activation.jar; C:\Everest\WebDeploy\axis\mail.jar; org.apache.axis.client.AdminClient C:\Everest\WebDeploy\deploy.wsdd Processing file C:\Everest\WebDeploy\deploy.wsdd Exception: AxisFault faultCode: {http://schemas.xmlsoap.org/soap/envelope/}Server.userException faultSubcode: faultString: java.lang.reflect.InvocationTargetException faultActor: faultNode: faultDetail: {http://xml.apache.org/axis/}hostname:ITDMWEB01 Any help appreciated. Thanks, Anil P.S. wsdd is - !-- Use this file to deploy some handlers/chains and services -- !-- Two ways to do this: -- !-- java org.apache.axis.client.AdminClient deploy.wsdd -- !-- after the axis server is running -- !-- or -- !-- java org.apache.axis.utils.Admin
help. newbie error. cannot deploy
Hello, I am an Axis newbie. Trying to deploy. I receive an error. Nothing in the logs to show more detail: C:\Everest\WebDeployjava -classpath C:\Everest\WebDeploy\axis\axis.jar; C:\Everest\WebDeploy\axis\axis-ant.jar;C:\Everest\WebDeploy\axis\commons-discovery-0.2.jar; C:\Everest\WebDeploy\axis\commons-logging-1.0.4.jar;C:\Everest\WebDeploy\axis\jaxrpc.jar; C:\Everest\WebDeploy\axis\log4j-1.2.14.jar;C:\Everest\WebDeploy\axis\saaj.jar; C:\Everest\WebDeploy\axis\wsdl4j-1.5.1.jar;C:\Everest\WebDeploy\axis\activation.jar; C:\Everest\WebDeploy\axis\mail.jar; org.apache.axis.client.AdminClient C:\Everest\WebDeploy\deploy.wsdd Processing file C:\Everest\WebDeploy\deploy.wsdd Exception: AxisFault faultCode: {http://schemas.xmlsoap.org/soap/envelope/}Server.userException faultSubcode: faultString: java.lang.reflect.InvocationTargetException faultActor: faultNode: faultDetail: {http://xml.apache.org/axis/}hostname:ITDMWEB01 Any help appreciated. Thanks, Anil P.S. wsdd is - !-- Use this file to deploy some handlers/chains and services -- !-- Two ways to do this: -- !-- java org.apache.axis.client.AdminClient deploy.wsdd -- !-- after the axis server is running -- !-- or -- !-- java org.apache.axis.utils.Admin client|server deploy.wsdd -- !-- from the same directory that the Axis engine runs -- deployment xmlns=http://xml.apache.org/axis/wsdd/; xmlns:java=http://xml.apache.org/axis/wsdd/providers/java; !-- Services from DonkeyClockService WSDL service -- service name=DonkeyClock provider=java:RPC style=wrapped use=literal parameter name=wsdlTargetNamespace value=urn:donkeyclock.deploy/ parameter name=wsdlServiceElement value=DonkeyClockService/ parameter name=schemaQualified value=urn:donkeyclock.deploy/ parameter name=wsdlServicePort value=DonkeyClock/ parameter name=className value=deploy.donkeyclock.DonkeyClockSoapBindingSkeleton/ parameter name=wsdlPortType value=DonkeyClock/ parameter name=typeMappingVersion value=1.2/ parameter name=allowedMethods value=*/ parameter name=scope value=Session/ typeMapping xmlns:ns=urn:donkeyclock.deploy qname=ns:ATriggerDetail type=java:deploy.donkeyclock.ATriggerDetail serializer=org.apache.axis.encoding.ser.BeanSerializerFactory deserializer=org.apache.axis.encoding.ser.BeanDeserializerFactory encodingStyle= / typeMapping xmlns:ns=urn:donkeyclock.deploy qname=ns:AJobDetail type=java:deploy.donkeyclock.AJobDetail serializer=org.apache.axis.encoding.ser.BeanSerializerFactory deserializer=org.apache.axis.encoding.ser.BeanDeserializerFactory encodingStyle= / /service /deployment It's here! Your new message! Get new email alerts with the free Yahoo! Toolbar. http://tools.search.yahoo.com/toolbar/features/mail/ - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Axis 2 issue : Null InputStream is not a valid argument
Hi All. I am runing my application on Tomcat 5.5.9 and I have registered JMX Mbean to get application information while application is running. My application and MBean is working fine. Recently I have added new API to my Mbean which makes WebService call from MBean API. I wrote Client program using AXIS2 WSDL2Java utility. Now when I invoke this WebService call I am getting following exception: java.lang.IllegalArgumentException: Null InputStream is not a valid argument at com.ctc.wstx.stax.WstxInputFactory.createSR(WstxInputFactory.java :599) at com.ctc.wstx.stax.WstxInputFactory.createXMLStreamReader( WstxInputFactory.java:305) at org.apache.axiom.om.util.StAXUtils.createXMLStreamReader( StAXUtils.java:68) at org.apache.axis2.deployment.DescriptionBuilder.buildOM( DescriptionBuilder.java:86) at org.apache.axis2.deployment.AxisConfigBuilder.populateConfig( AxisConfigBuilder.java:58) at org.apache.axis2.deployment.DeploymentEngine.populateAxisConfiguration( DeploymentEngine.java:690) at org.apache.axis2.deployment.FileSystemConfigurator.getAxisConfiguration( FileSystemConfigurator.java:109) at org.apache.axis2.context.ConfigurationContextFactory.createConfigurationContext (ConfigurationContextFactory.java:61) at org.apache.axis2.context.ConfigurationContextFactory. createConfigurationContextFromFileSystem(ConfigurationContextFactory.java :180) at org.apache.axis2.client.ServiceClient.initializeTransports( ServiceClient.java:189) I am passing null configurationCentext, so Axis tries to create AXIS context from file system. It is not able to load org\apache\axis2\deployment\axis2_default.xml which is part of axis2-kernel-1.1.jar. I have included al axis related files into my WEB-INF/lib directory. So how at run time it doesn't find the jar files and throws Null InputStream is not a valid argument Does any one came across this issue. Any pointer is appreciated. Thanks Anil S. Ranka
Re: Axis 2 issue : Null InputStream is not a valid argument
Deepla, Thanks for reply, I am new to axis user group. What do u mean by JIRA issue. How to create it. Do u mean it is bug and I have to log bug. Please clarify. Anil S. Ranka On 12/18/06, Deepal Jayasinghe [EMAIL PROTECTED] wrote: Hi Ranka; Pls create a JIRA issue, Thanks Deepal Anil Ranka wrote: Hi All. I am runing my application on Tomcat 5.5.9 and I have registered JMX Mbean to get application information while application is running. My application and MBean is working fine. Recently I have added new API to my Mbean which makes WebService call from MBean API. I wrote Client program using AXIS2 WSDL2Java utility. Now when I invoke this WebService call I am getting following exception: java.lang.IllegalArgumentException: Null InputStream is not a valid argument at com.ctc.wstx.stax.WstxInputFactory.createSR(WstxInputFactory.java:599) at com.ctc.wstx.stax.WstxInputFactory.createXMLStreamReader( WstxInputFactory.java:305) at org.apache.axiom.om.util.StAXUtils.createXMLStreamReader(StAXUtils.java :68) at org.apache.axis2.deployment.DescriptionBuilder.buildOM (DescriptionBuilder.java:86) at org.apache.axis2.deployment.AxisConfigBuilder.populateConfig( AxisConfigBuilder.java:58) at org.apache.axis2.deployment.DeploymentEngine.populateAxisConfiguration( DeploymentEngine.java :690) at org.apache.axis2.deployment.FileSystemConfigurator.getAxisConfiguration( FileSystemConfigurator.java:109) at org.apache.axis2.context.ConfigurationContextFactory.createConfigurationContext (ConfigurationContextFactory.java :61) at org.apache.axis2.context.ConfigurationContextFactory.createConfigurationContextFromFileSystem (ConfigurationContextFactory.java:180) at org.apache.axis2.client.ServiceClient.initializeTransports (ServiceClient.java:189) I am passing null configurationCentext, so Axis tries to create AXIS context from file system. It is not able to load org\apache\axis2\deployment\axis2_default.xml which is part of axis2-kernel-1.1.jar . I have included al axis related files into my WEB-INF/lib directory. So how at run time it doesn't find the jar files and throws Null InputStream is not a valid argument Does any one came across this issue. Any pointer is appreciated. Thanks Anil S. Ranka -- 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]
RE: [Axis2] HappyAxis fails: getRequestURL() not found
Greg, Don't know the answer to that one. I've deployed Axis2 only on the Tomcat 5.5 + JDK 1.5 combo. Regards, - Anil From: Greg Wilson [mailto:[EMAIL PROTECTED] Sent: Monday, November 27, 2006 8:48 PM To: axis-user@ws.apache.org Subject: Re: [Axis2] HappyAxis fails: getRequestURL() not found Yep, it works with Tomcat 5.5 + JDK 1.5. I'll eventually need to incorporate Axis2 into our existing web server, which is running Tomcat 3.3. Is that going to be a problem? Greg On 11/27/06, John, Anil [EMAIL PROTECTED] wrote: Greg, Any particular reason you are using Tomcat 3.3? The current version is 5.5.X. Don't know if it will help, but when I went through setting up my dev environment for web service development with Axis, I documented it @ http://www.aniltj.com/blog/2006/02/06/InstallAndConfigureApacheTomcatAxi sForWebServiceDevelopmentOnWindowsXPSP2.aspx I did it on XP SP2. Should be close enough on W2K. No guarantee that this is the best way, but it works for me. Regards, - Anil :- :- Anil John :- Johns Hopkins University - APL :- http://www.jhuapl.edu :- (240) 228-0612 :- :- E-Mail Response Time: 24 hrs :- From: Greg Wilson [mailto:[EMAIL PROTECTED] Sent: Monday, November 27, 2006 6:31 PM To: axis-user@ws.apache.org Subject: [Axis2] HappyAxis fails: getRequestURL() not found I just installed Tomcat 3.3, JDK 1.4.2 and the latest Axis2 on a Windows 2000 machine. Tomcat starts and I can get to the Axis2 home page, but I'm getting an error when clicking on the Validate link (see below). I have ENV vars for AXIS2_HOME (C:\axis2- 1.1), JAVA_HOME (C:\j2sdk1.4.2_13), TOMCAT_HOME (C:\jakarta-tomcat-3.3.2) and CLASSPATH (.;%JAVA_HOME%;%AXIS2_HOME%\lib). Am I missing something? Here's the error message: Location: /axis2/axis2-web/HappyAxis.jsp Internal Servlet Error: org.apache.jasper.JasperException: Unable to compile Note: sun.tools.javac.Main has been deprecated. C:\jakarta-tomcat-3.3.2\work\DEFAULT\axis2\axis2_0002dweb\HappyAxis_1.ja va:528: Method getRequestURL() not found in interface javax.servlet.http.HttpServletRequest. IP = request.getRequestURL().toString(); ^ 1 error, 1 warning at org.apache.tomcat.facade.JasperLiaison.javac (JspInterceptor.java:873) at org.apache.tomcat.facade.JasperLiaison.processJspFile(JspInterceptor.jav a:708) at org.apache.tomcat.facade.JspInterceptor.preInitCheck(JspInterceptor.java :493) at org.apache.tomcat.facade.ServletHandler.service (ServletHandler.java:413) at org.apache.tomcat.core.ContextManager.internalService(ContextManager.jav a:874) at org.apache.tomcat.core.ContextManager.service(ContextManager.java:790) at org.apache.coyote.tomcat3.Tomcat3Adapter.service (Tomcat3Adapter.java:64) at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:79 3) at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.processC onnection(Http11Protocol.java :702) at org.apache.tomcat.util.net.TcpWorkerThread.runIt(PoolTcpEndpoint.java:57 1) at org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool .java:644) at java.lang.Thread.run(Thread.java :534) Thanks for any help, Greg
RE: WSRM simple tutorial between axis2 and WSE 3 RM implementation WSERM
There is a pretty good intro to WS-RM @ InfoQ from Paul. Don't think that you can go wrong with it as he is the OASIS TC Co-Chair for WS-RM as well as the VP of Tech at WSO2 :-) http://www.infoq.com/articles/fremantle-wsrm-introduction Regards, - Anil :- :- Anil John :- Johns Hopkins University - APL :- http://www.jhuapl.edu :- (240) 228-0612 :- :- E-Mail Response Time: 24 hrs :- -Original Message- From: shantanu chawla [mailto:[EMAIL PROTECTED] Sent: Monday, November 27, 2006 5:34 PM To: axis-user@ws.apache.org Subject: WSRM simple tutorial between axis2 and WSE 3 RM implementation WSERM Hi, I am new to Reliable Messaging. Can anyone point me to a link that tries to explain the RM in Sandesha on axis2 and WSE 3.0 RM implementation WseRM in an easy to understand way. If any of you ppl have a working example that hightligh it or pointers please pass it to me. Thanks Shantanu -- Graduate Student Department of Computer Science, San Diego State University - 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] HappyAxis fails: getRequestURL() not found
Greg, Any particular reason you are using Tomcat 3.3? The current version is 5.5.X. Don't know if it will help, but when I went through setting up my dev environment for web service development with Axis, I documented it @ http://www.aniltj.com/blog/2006/02/06/InstallAndConfigureApacheTomcatAxi sForWebServiceDevelopmentOnWindowsXPSP2.aspx I did it on XP SP2. Should be close enough on W2K. No guarantee that this is the best way, but it works for me. Regards, - Anil :- :- Anil John :- Johns Hopkins University - APL :- http://www.jhuapl.edu :- (240) 228-0612 :- :- E-Mail Response Time: 24 hrs :- From: Greg Wilson [mailto:[EMAIL PROTECTED] Sent: Monday, November 27, 2006 6:31 PM To: axis-user@ws.apache.org Subject: [Axis2] HappyAxis fails: getRequestURL() not found I just installed Tomcat 3.3, JDK 1.4.2 and the latest Axis2 on a Windows 2000 machine. Tomcat starts and I can get to the Axis2 home page, but I'm getting an error when clicking on the Validate link (see below). I have ENV vars for AXIS2_HOME (C:\axis2- 1.1), JAVA_HOME (C:\j2sdk1.4.2_13), TOMCAT_HOME (C:\jakarta-tomcat-3.3.2) and CLASSPATH (.;%JAVA_HOME%;%AXIS2_HOME%\lib). Am I missing something? Here's the error message: Location: /axis2/axis2-web/HappyAxis.jsp Internal Servlet Error: org.apache.jasper.JasperException: Unable to compile Note: sun.tools.javac.Main has been deprecated. C:\jakarta-tomcat-3.3.2\work\DEFAULT\axis2\axis2_0002dweb\HappyAxis_1.ja va:528: Method getRequestURL() not found in interface javax.servlet.http.HttpServletRequest. IP = request.getRequestURL().toString(); ^ 1 error, 1 warning at org.apache.tomcat.facade.JasperLiaison.javac (JspInterceptor.java:873) at org.apache.tomcat.facade.JasperLiaison.processJspFile(JspInterceptor.jav a:708) at org.apache.tomcat.facade.JspInterceptor.preInitCheck(JspInterceptor.java :493) at org.apache.tomcat.facade.ServletHandler.service (ServletHandler.java:413) at org.apache.tomcat.core.ContextManager.internalService(ContextManager.jav a:874) at org.apache.tomcat.core.ContextManager.service(ContextManager.java:790) at org.apache.coyote.tomcat3.Tomcat3Adapter.service (Tomcat3Adapter.java:64) at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:79 3) at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.processC onnection(Http11Protocol.java :702) at org.apache.tomcat.util.net.TcpWorkerThread.runIt(PoolTcpEndpoint.java:57 1) at org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool .java:644) at java.lang.Thread.run(Thread.java :534) Thanks for any help, Greg
RE: General approach for xsd:union?
Try xsd:choice instead. Or maybe a substitution group. Support for substitution groups is pretty much of a non-starter in .NET. So if this the service contract (WSDL/Schema etc. etc..) will be shared with anyone using .NET so that they can generated their client proxies from that info, I would recommend xsd:choice instead of substitution groups. Regards, - Anil -Original Message- From: Anne Thomas Manes [mailto:[EMAIL PROTECTED] Sent: Friday, July 07, 2006 12:08 PM To: axis-user@ws.apache.org Subject: Re: General approach for xsd:union? On the other hand, is there a better way entirely? XMLBeans perhaps? Yes. Don't use xsd:union. Try xsd:choice instead. Or maybe a substitution group. Anne On 7/7/06, Nathan Sowatskey [EMAIL PROTECTED] wrote: Hi I guess we all know that xsd:union types are not supported for Axis 1.x, so we need to write our own de/serialisers. Does anyone have any useful guidance on how to do that please? On the other hand, is there a better way entirely? XMLBeans perhaps? Many thanks Nathan Nathan Sowatskey - Technical Leader, NMTG CTO Engineering - +34-638-083-675, +34-91-201-2139 - AIM NathanCisco - [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Bad envelope tag : html
Hi Wade, When i hit the URL (which is https), it pops up two security alerts related to certficates, then when i click 'yes' twice it shows the Hi there, this is an AXIS service! Any ideas? Thanks A On 12/14/05, Wade Chandler [EMAIL PROTECTED] wrote: --- anil kumar [EMAIL PROTECTED] wrote: Hi, I have a service deployed on a secured server. When I make a call to the servcie I get the following error: [12/14/05 8:43:53:948 EST] 615994 SystemErr R AxisFault faultCode: { *http://schemas.xmlsoap.org/soap/envelope/}Server.userException* http://schemas.xmlsoap.org/soap/envelope/%7DServer.userExceptionfaultSubcode: faultString: org.xml.sax.SAXException: Bad envelope tag: HTML faultActor: faultNode: faultDetail: { * http://xml.apache.org/axis/}stackTrace:org.xml.sax.SAXException* http://xml.apache.org/axis/%7DstackTrace:org.xml.sax.SAXException: Bad envelope tag: HTML at org.apache.axis.message.EnvelopeBuilder.startElement (EnvelopeBuilder.java:71) at org.apache.axis.encoding.DeserializationContext.startElement( DeserializationContext.java:1048) atorg.apache.xerces.parsers.AbstractSAXParser.startElement( AbstractSAXParser.java:446) at org.apache.xerces.impl.XMLNamespaceBinder.handleStartElement ( XMLNamespaceBinder.java:835) atorg.apache.xerces.impl.XMLNamespaceBinder.startElement( XMLNamespaceBinder.java:568) at org.apache.xerces.impl.dtd.XMLDTDValidator.startElement(XMLDTDValidator.java:809) atorg.apache.xerces.impl.XMLDocumentFragmentScannerImpl.scanStartElement ( XMLDocumentFragmentScannerImpl.java :752) atorg.apache.xerces.impl.XMLDocumentScannerImpl$ContentDispatcher.scanRootElementHook (XMLDocumentScannerImpl.java:950) atorg.apache.xerces.impl.XMLDocumentFragmentScannerImpl$FragmentContentDispatcher.dispatch ( XMLDocumentFragmentScannerImpl.java:1524) at org.apache.xerces.impl.XMLDocumentFragmentScannerImpl.scanDocument(XMLDocumentFragmentScannerImpl.java:333) atorg.apache.xerces.parsers.StandardParserConfiguration.parse ( StandardParserConfiguration.java :525) atorg.apache.xerces.parsers.StandardParserConfiguration.parse( StandardParserConfiguration.java:581) atorg.apache.xerces.parsers.XMLParser.parse (XMLParser.java:147) at org.apache.xerces.parsers.AbstractSAXParser.parse (AbstractSAXParser.java:1158) at javax.xml.parsers.SAXParser.parse(Unknown Source) atorg.apache.axis.encoding.DeserializationContext.parse ( DeserializationContext.java:227) atorg.apache.axis.SOAPPart.getAsSOAPEnvelope(SOAPPart.java :696) atorg.apache.axis.Message.getSOAPEnvelope(Message.java:435) at org.apache.axis.handlers.soap.MustUnderstandChecker.invoke( MustUnderstandChecker.java:62) at org.apache.axis.client.AxisClient.invoke( AxisClient.java:206) atorg.apache.axis.client.Call.invokeEngine (Call.java:2784) at org.apache.axis.client.Call.invoke(Call.java:2767) at org.apache.axis.client.Call.invoke(Call.java:2443) at org.apache.axis.client.Call.invoke(Call.java:2366) at org.apache.axis.client.Call.invoke(Call.java:1812) atagencyserviceClient.AgencySweepPaymentWebServiceSoapBindingStub.verifySweepPaymentEligibility(Unknown Source) at org.apache.jsp._AgencySweepInput._jspService(_AgencySweepInput.java:99) atcom.ibm.ws.webcontainer.jsp.runtime.HttpJspBase.service(HttpJspBase.java:89) atjavax.servlet.http.HttpServlet.service (HttpServlet.java:853) atcom.ibm.ws.webcontainer.jsp.servlet.JspServlet$JspServletWrapper.service( JspServlet.java :365) atcom.ibm.ws.webcontainer.jsp.servlet.JspServlet.serviceJspFile ( JspServlet.java:715) atcom.ibm.ws.webcontainer.jsp.servlet.JspServlet.service(JspServlet.java:813) atjavax.servlet.http.HttpServlet.service(HttpServlet.java :853) at com.ibm.ws.webcontainer.servlet.StrictServletInstance.doService( StrictServletInstance.java :110) atcom.ibm.ws.webcontainer.servlet.StrictLifecycleServlet._service( StrictLifecycleServlet.java :174) atcom.ibm.ws.webcontainer.servlet.IdleServletState.service ( StrictLifecycleServlet.java:313) atcom.ibm.ws.webcontainer.servlet.StrictLifecycleServlet.service( StrictLifecycleServlet.java :116) atcom.ibm.ws.webcontainer.servlet.ServletInstance.service(ServletInstance.java:283) atcom.ibm.ws.webcontainer.servlet.ValidServletReferenceState.dispatch( ValidServletReferenceState.java :42) atcom.ibm.ws.webcontainer.servlet.ServletInstanceReference.dispatch( ServletInstanceReference.java:40) atcom.ibm.ws.webcontainer.webapp.WebAppRequestDispatcher.handleWebAppDispatch( WebAppRequestDispatcher.java:1073) atcom.ibm.ws.webcontainer.webapp.WebAppRequestDispatcher.dispatch( WebAppRequestDispatcher.java:598) atcom.ibm.ws.webcontainer.webapp.WebAppRequestDispatcher.forward ( WebAppRequestDispatcher.java :206) atcom.ibm.ws.webcontainer.srt.WebAppInvoker.doForward(WebAppInvoker.java:80) atcom.ibm.ws.webcontainer.srt.WebAppInvoker.handleInvocationHook( WebAppInvoker.java:214) atcom.ibm.ws.webcontainer.cache.invocation.CachedInvocation.handleInvocation ( CachedInvocation.java:71) atcom.ibm.ws.webcontainer.cache.invocation.CacheableInvocationContext.invoke
Axis 1.1 Handlers Post Serialization
Hi, all I have built some custom handlers to be invoked before and after the request and response. One of the things we are doing is using some ThreadLocals to handle some basic context info. I want to be able to clean those threadlocals prior to the response being sent to the client. However, I need to be able to do this after the SOAP message has been serialized to the stream. Any ideas on how I could do this? Right now, my only solution would be to implement a servlet filter that does the post request processing. Seems ugly, but thats all I could think of. Thanks, Anil
Serializing schema document
I am using AXIS 1.1 and I am trying to serialize a schema document within my SOAP response XML as so I need to add some schema information to my return XML as so 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:Header ns1:Session xsi:nil=true xmlns:ns1=urn:schemas-microsoft-com:xml-analysis/ /soapenv:Header soapenv:Body DiscoverResponse xmlns=urn:schemas-microsoft-com:xml-analysis return ns2:root xsi:type=ns2:RowResult xmlns:ns2=urn:schemas-microsoft-com:xml-analysis:rowset xsd:schema elementFormDefault=qualified targetNamespace=urn:schemas-microsoft-com:xml-analysis:rowset xmlns:sql=urn:schemas-microsoft-com:xml-sql xsd:element name=root xsd:complexType xsd:sequence maxOccurs=unbounded minOccurs=0 xsd:element name=row type=row/ /xsd:sequence xsd:complexType /xsd:element xsd:complexType name=row xsd:sequence maxOccurs=unbounded minOccurs=0 xsd:element name=CATALOG_NAME sql:field=CATALOG_NAME type=xsd:string/ xsd:element name=DESCRIPTION sql:field=DESCRIPTION type=xsd:string/ /xsd:sequence /xsd:complexType /xsd:schema ns2:row CATALOG_NAMEInterlace/CATALOG_NAME DESCRIPTIONInterlace Catalog/DESCRIPTION /ns2:row /ns2:root /return /DiscoverResponse /soapenv:Body /soapenv:Envelope Since I had predefined xsd files, I figured that the best way would be to get my xsd file, create a Document object using the javax parsers, and then serialize the document using the DocumentSerializer. However, when I do this, I get the following: DiscoverResponse xmlns=urn:schemas-microsoft-com:xml-analysis return ns2:root xsi:type=ns2:RowResult xmlns:ns2=urn:schemas-microsoft-com:xml-analysis:rowset xsd:schema xsd:schema elementFormDefault=qualified targetNamespace=urn:schemas-microsoft-com:xml-analysis:rowset xmlns:sql=urn:schemas-microsoft-com:xml-sql ... /xsd:schema /xsd:schema ... /ns2:root /return /DiscoverResponse Notice that the xsd:schema is embedded within another xsd:schema tag. If I try to call context.writeDOMElement(document.getElement()) directly, I get close to what I want, but it is not merging the namespaces like I would expect. It is taking my xsd file as is. Is there a way I can merge the namespaces with minimal code? Thanks, Anil