Re: writing a client
I like to use an Adapter Class that encapsulates all the creation message logic. This adapter class is used as a simple java object, in other words, the user of this class dont know if it is calling a web service, is calling a database, ... methods of this Adapter Class only receive parameters of Java native API (Integer, String, ...) no XMLBeans or ADB Objects, this objects are used inside the Adapter Class. This approach provide a low coupled Client Application and Web Service Client. If somebody is interesting in this approach I can create a small example and post it here. Bye. 2008/2/15, [EMAIL PROTECTED] [EMAIL PROTECTED]: Hi, Indeed this is the aproach. First genereate client-stub and then create a ServiceClient which calls the stubmethods. See small example voor de client main. *public* *static* *void* main(String[] args) *throws* RemoteException { // *TODO* Auto-generated method stub DemoStub stub = *new* DemoStub(); DemoRequest request = *new* DemoRequest(); InputBean ib = *new* InputBean(); Structure[] ss = *new* Structure[5]; Structure str = *new* Structure(); *for* (*int* i = 0; i 5; i++) { str.setX(100 * (i + 1)); str.setY(200 * (i + 1)); ss[i] = str; } ib.setStruct(ss); request.setInputBean(ib); DemoResponse response = stub.bepaal(request); OutputBean ob = response.getOutputBean(); } regards Dirk -Original Message- *From:* [EMAIL PROTECTED] [mailto: [EMAIL PROTECTED] *Sent:* vrijdag 15 februari 2008 13:12 *To:* axis-user@ws.apache.org *Subject:* writing a client Hi, Could you please let me how to go about writing a client? I mean what is the approach. 1) Generate the client-side stub using wsdltojava call methods on the stub 2) Start from using ServiceClient .. What is the suggested approach? Thanks, Ajit DISCLAIMER: This message contains privileged and confidential information and is intended only for an individual named. If you are not the intended recipient, you should not disseminate, distribute, store, print, copy or deliver this message. Please notify the sender immediately by e-mail if you have received this e-mail by mistake and delete this e-mail from your system. E-mail transmission cannot be guaranteed to be secure or error-free as information could be intercepted, corrupted, lost, destroyed, arrive late or incomplete or contain viruses. The sender, therefore, does not accept liability for any errors or omissions in the contents of this message which arise as a result of e-mail transmission. If verification is required, please request a hard-copy version. The information transmitted via this e-mail is intended only for the person or entity to which it is addressed and may contain confidential and/or privileged material. Any review, retransmission, dissemination or other use of, or taking of any action in reliance upon this information by persons or entities other than the intended recipient is prohibited. If you received this in error, please contact the sender and delete the material from any computer.
Re: writing a client
I trying to use stubs but I am getting erros like InputStream Could not be null, even for out-only methods. What this mean? PS. In the other thread I had Read time out using the ServiceClient approach. On Feb 19, 2008 6:40 AM, Antonio Manuel Muñiz Martín [EMAIL PROTECTED] wrote: I like to use an Adapter Class that encapsulates all the creation message logic. This adapter class is used as a simple java object, in other words, the user of this class dont know if it is calling a web service, is calling a database, ... methods of this Adapter Class only receive parameters of Java native API (Integer, String, ...) no XMLBeans or ADB Objects, this objects are used inside the Adapter Class. This approach provide a low coupled Client Application and Web Service Client. If somebody is interesting in this approach I can create a small example and post it here. Bye. 2008/2/15, [EMAIL PROTECTED] [EMAIL PROTECTED]: Hi, Indeed this is the aproach. First genereate client-stub and then create a ServiceClient which calls the stubmethods. See small example voor de client main. *public* *static* *void* main(String[] args) *throws*RemoteException { // *TODO* Auto-generated method stub DemoStub stub = *new* DemoStub(); DemoRequest request = *new* DemoRequest(); InputBean ib = *new* InputBean(); Structure[] ss = *new* Structure[5]; Structure str = *new* Structure(); *for* (*int* i = 0; i 5; i++) { str.setX(100 * (i + 1)); str.setY(200 * (i + 1)); ss[i] = str; } ib.setStruct(ss); request.setInputBean(ib); DemoResponse response = stub.bepaal(request); OutputBean ob = response.getOutputBean(); } regards Dirk -Original Message- *From:* [EMAIL PROTECTED] [mailto: [EMAIL PROTECTED] *Sent:* vrijdag 15 februari 2008 13:12 *To:* axis-user@ws.apache.org *Subject:* writing a client Hi, Could you please let me how to go about writing a client? I mean what is the approach. 1) Generate the client-side stub using wsdltojava call methods on the stub 2) Start from using ServiceClient .. What is the suggested approach? Thanks, Ajit DISCLAIMER: This message contains privileged and confidential information and is intended only for an individual named. If you are not the intended recipient, you should not disseminate, distribute, store, print, copy or deliver this message. Please notify the sender immediately by e-mail if you have received this e-mail by mistake and delete this e-mail from your system. E-mail transmission cannot be guaranteed to be secure or error-free as information could be intercepted, corrupted, lost, destroyed, arrive late or incomplete or contain viruses. The sender, therefore, does not accept liability for any errors or omissions in the contents of this message which arise as a result of e-mail transmission. If verification is required, please request a hard-copy version. The information transmitted via this e-mail is intended only for the person or entity to which it is addressed and may contain confidential and/or privileged material. Any review, retransmission, dissemination or other use of, or taking of any action in reliance upon this information by persons or entities other than the intended recipient is prohibited. If you received this in error, please contact the sender and delete the material from any computer. -- Wesley Mesquita LIS/IC - UNICAMP [skype: wesley.mesquita]
RE: writing a client
Hi, Indeed this is the aproach. First genereate client-stub and then create a ServiceClient which calls the stubmethods. See small example voor de client main. public static void main(String[] args) throws RemoteException { // TODO Auto-generated method stub DemoStub stub = new DemoStub(); DemoRequest request = new DemoRequest(); InputBean ib = new InputBean(); Structure[] ss = new Structure[5]; Structure str = new Structure(); for (int i = 0; i 5; i++) { str.setX(100 * (i + 1)); str.setY(200 * (i + 1)); ss[i] = str; } ib.setStruct(ss); request.setInputBean(ib); DemoResponse response = stub.bepaal(request); OutputBean ob = response.getOutputBean(); } regards Dirk -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] Sent: vrijdag 15 februari 2008 13:12 To: axis-user@ws.apache.org Subject: writing a client Hi, Could you please let me how to go about writing a client? I mean what is the approach. 1) Generate the client-side stub using wsdltojava call methods on the stub 2) Start from using ServiceClient .. What is the suggested approach? Thanks, Ajit DISCLAIMER: This message contains privileged and confidential information and is intended only for an individual named. If you are not the intended recipient, you should not disseminate, distribute, store, print, copy or deliver this message. Please notify the sender immediately by e-mail if you have received this e-mail by mistake and delete this e-mail from your system. E-mail transmission cannot be guaranteed to be secure or error-free as information could be intercepted, corrupted, lost, destroyed, arrive late or incomplete or contain viruses. The sender, therefore, does not accept liability for any errors or omissions in the contents of this message which arise as a result of e-mail transmission. If verification is required, please request a hard-copy version. The information transmitted via this e-mail is intended only for the person or entity to which it is addressed and may contain confidential and/or privileged material. Any review, retransmission, dissemination or other use of, or taking of any action in reliance upon this information by persons or entities other than the intended recipient is prohibited. If you received this in error, please contact the sender and delete the material from any computer.
RE: writing a client
Generally we are using first approach. From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] Sent: Friday, February 15, 2008 5:42 PM To: axis-user@ws.apache.org Subject: writing a client Hi, Could you please let me how to go about writing a client? I mean what is the approach. 1) Generate the client-side stub using wsdltojava call methods on the stub 2) Start from using ServiceClient .. What is the suggested approach? Thanks, Ajit DISCLAIMER: This message contains privileged and confidential information and is intended only for an individual named. If you are not the intended recipient, you should not disseminate, distribute, store, print, copy or deliver this message. Please notify the sender immediately by e-mail if you have received this e-mail by mistake and delete this e-mail from your system. E-mail transmission cannot be guaranteed to be secure or error-free as information could be intercepted, corrupted, lost, destroyed, arrive late or incomplete or contain viruses. The sender, therefore, does not accept liability for any errors or omissions in the contents of this message which arise as a result of e-mail transmission. If verification is required, please request a hard-copy version. DISCLAIMER: This email may contain confidential or privileged information for the intended recipient(s) and the views expressed in the same are not necessarily the views of Zensar Technologies Ltd. If you are not the intended recipient or have received this e-mail by error, its use is strictly prohibited, please delete the e-mail and notify the sender. Zensar Technologies Ltd. does not accept any liability for virus infected mails.
Help needed in writing a client
Title: Help needed in writing a client I am new to Axis. I have created and deployed a web service onto Tomcat. I am using a tool called SoapScope to invoke my web service and it works great. BUT I wish to write a java class that will invoke the web service. Please can someone help me. I have seen people using different approaches to writing clients and I am more confused than ever. I wish to call the operation getEnterpriseProdGroupReport. This takes in an array of type BranchAccount (complex type). I am using axis version 1.2.1. Please can someone give me some client code to invoke this service. I am using document/literal.whatever that is! I don't know the difference between doc literal and rpc. Someone please explain! Here is my WSDL: ?xml version=1.0 encoding=UTF-8? wsdl:definitions name=CategoryReports targetNamespace=urn:com.aah.CategoryReports xmlns:apachesoap=http://xml.apache.org/xmlsoap xmlns:impl=urn:com.aah.CategoryReports xmlns:intf=urn:com.aah.CategoryReports xmlns:wsdl=http://schemas.xmlsoap.org/wsdl/ xmlns:wsdlsoap=http://schemas.xmlsoap.org/wsdl/soap/ xmlns:xsd=http://www.w3.org/2001/XMLSchema wsdl:types schema targetNamespace=urn:com.aah.CategoryReports xmlns=http://www.w3.org/2001/XMLSchema complexType name=BranchAccount sequence element name=Branch type=xsd:string/ element name=Account type=xsd:string/ /sequence /complexType element name=EnterpriseCatRepInput complexType sequence element maxOccurs=unbounded minOccurs=1 name=item type=impl:BranchAccount/ /sequence /complexType /element complexType name=EnterpriseProductGroup sequence element name=netGP nillable=true type=xsd:string/ element name=reportedSales nillable=true type=xsd:string/ element name=productGroup nillable=true type=xsd:string/ /sequence /complexType complexType name=WSErrorObject sequence element name=errorMessage nillable=true type=xsd:string/ element name=errorCode type=xsd:int/ /sequence /complexType complexType name=EnterpriseProductCategoryReportOutput sequence element maxOccurs=unbounded name=enterpriseProductGroups type=impl:EnterpriseProductGroup/ element name=errorObject nillable=true type=impl:WSErrorObject/ element name=totalAverageReportedSales nillable=true type=xsd:string/ element name=totalAverageNetGP nillable=true type=xsd:string/ /sequence /complexType element name=EnterpriseCategoryReportOutput type=impl:EnterpriseProductCategoryReportOutput/ element name=ProductCatRepInput complexType sequence element maxOccurs=unbounded minOccurs=1 name=item type=impl:BranchAccount/ /sequence /complexType /element complexType name=CategoryItem sequence element name=QFlagcategoryNetProfit nillable=true type=xsd:string/ element name=NFlag type=xsd:boolean/ element name=categoryName nillable=true type=xsd:string/ element name=NFlagcategoryGrossProfit nillable=true type=xsd:string/ element name=categoryID nillable=true type=xsd:string/ element name=QFlagcategoryGrossProfit nillable=true type=xsd:string/ element name=NFlagcategoryNetProfit nillable=true type=xsd:string/ element name=QFlag type=xsd:boolean/ /sequence /complexType complexType name=AAHProductCategoryReportOutput sequence element maxOccurs=unbounded name=categoryItemsArray type=impl:CategoryItem/ element name=errorObject type=impl:WSErrorObject/ element name=totalAverageReportedSales nillable=true type=xsd:string/ element name=totalAverageNetGP nillable=true type=xsd:string/ /sequence /complexType element name=ProductCategoryReportOutput type=impl:AAHProductCategoryReportOutput/ element name=WorkflowCustomerGroupTermsInput type=xsd:int/ element name=WorkflowCustomerGroupTermsOutput type=impl:AAHProductCategoryReportOutput/ element name=WorkflowCustGroupTermsEntInput type=xsd:int/ element name=WorkflowCustGroupTermsEntOutput type=impl:EnterpriseProductCategoryReportOutput/ /schema /wsdl:types wsdl:message name=getEnterpriseProdGroupReportRequest wsdl:part element=impl:EnterpriseCatRepInput name=EnterpriseCatRepInput/ /wsdl:message wsdl:message name=getProductCategoryReportRequest wsdl:part element=impl:ProductCatRepInput name=ProductCatRepInput/ /wsdl:message wsdl:message name=getEnterpriseProdGroupReportResponse wsdl:part element=impl:EnterpriseCategoryReportOutput name=EnterpriseCategoryReportOutput/ /wsdl:message wsdl:message name=getProductCategoryReportResponse wsdl:part element=impl:ProductCategoryReportOutput name=ProductCategoryReportOutput/ /wsdl:message wsdl:message name=getWorkflowCustomerGroupTermsEnterpriseReportResponse wsdl:part element=impl:WorkflowCustGroupTermsEntOutput name=WorkflowCustGroupTermsEntOutput/ /wsdl:message wsdl:message name=getWorkflowCustomerGroupTermsReportResponse wsdl:part element
Re: Help needed in writing a client
There four types of wsdl documents: RPC/encoded RPC/literal Document/Literal Document/Encoded The last one is the less used. RPC/Literal and Document/Literal is WS-I, in short, that means more interoperability. But is also very common to use RPC/Encoded. One of the differences from Document and RPC, is the way that objects get serialized in SOAP messages. The document approach is widely used in .NET clients, hence some problems of clients using document approach with an ws server(axis for example) with rpc/encoded. If you want to write a client to invoke a webservice, use the WSDLToJava command from axis. You can read more about it from apache.axis.org. On 10/19/06, Bassi Gurpiar [EMAIL PROTECTED] wrote: I am new to Axis. I have created and deployed a web service onto Tomcat. I am using a tool called SoapScope to invoke my web service and it works great. BUT I wish to write a java class that will invoke the web service. Please can someone help me. I have seen people using different approaches to writing clients and I am more confused than ever. I wish to call the operation getEnterpriseProdGroupReport. This takes in an array of type BranchAccount (complex type). I am using axis version 1.2.1. Please can someone give me some client code to invoke this service. I am using document/literal.whatever that is! I don't know the difference between doc literal and rpc. Someone please explain! Here is my WSDL: ?xml version=1.0 encoding=UTF-8? wsdl:definitions name=CategoryReports targetNamespace=urn:com.aah.CategoryReports xmlns:apachesoap=http://xml.apache.org/xmlsoap; xmlns:impl=urn:com.aah.CategoryReports xmlns:intf=urn:com.aah.CategoryReports xmlns:wsdl=http://schemas.xmlsoap.org/wsdl/; xmlns:wsdlsoap=http://schemas.xmlsoap.org/wsdl/soap/; xmlns:xsd=http://www.w3.org/2001/XMLSchema; wsdl:types schema targetNamespace=urn:com.aah.CategoryReports xmlns=http://www.w3.org/2001/XMLSchema; complexType name=BranchAccount sequence element name=Branch type=xsd:string/ element name=Account type=xsd:string/ /sequence /complexType element name=EnterpriseCatRepInput complexType sequence element maxOccurs=unbounded minOccurs=1 name=item type=impl:BranchAccount/ /sequence /complexType /element complexType name=EnterpriseProductGroup sequence element name=netGP nillable=true type=xsd:string/ element name=reportedSales nillable=true type=xsd:string/ element name=productGroup nillable=true type=xsd:string/ /sequence /complexType complexType name=WSErrorObject sequence element name=errorMessage nillable=true type=xsd:string/ element name=errorCode type=xsd:int/ /sequence /complexType complexType name=EnterpriseProductCategoryReportOutput sequence element maxOccurs=unbounded name=enterpriseProductGroups type=impl:EnterpriseProductGroup/ element name=errorObject nillable=true type=impl:WSErrorObject/ element name=totalAverageReportedSales nillable=true type=xsd:string/ element name=totalAverageNetGP nillable=true type=xsd:string/ /sequence /complexType element name=EnterpriseCategoryReportOutput type=impl:EnterpriseProductCategoryReportOutput/ element name=ProductCatRepInput complexType sequence element maxOccurs=unbounded minOccurs=1 name=item type=impl:BranchAccount/ /sequence /complexType /element complexType name=CategoryItem sequence element name=QFlagcategoryNetProfit nillable=true type=xsd:string/ element name=NFlag type=xsd:boolean/
RE: [Axis2] Writing Axis2 Client
Hello Thushantha, use ServiceClient instead of the deprecated MessageSender the following way: EndpointReference endpoint = new EndpointReference(http://...;); Options ops = new Options(); op.setTo(endpoint); op.setTransportInProtocol(org.apache.axis2.Constants.TRANSPORT_HTTP); op.setUseSeparateListener(false); ServiceClient sc = new ServiceClient(); sc.setOptions(ops); -- Ted --- Thushantha De Alwis [EMAIL PROTECTED] schrieb: Hi All I have successfully deployed a WebService called Echo So I want to invoke that web service. For that I tried to write a client. When writing it I used the following code sample got from 0.93 release. try{ EndpointReference targetEPR =3D new EndpointReference( http://localhost:8080/axis2/services/StockQuoteService;); // Make the request message OMFactory fac =3D OMAbstractFactory.getOMFactory(); OMNamespace omNs =3D fac.createOMNamespace( http://www.developerworks.com/example;, example); OMElement payload =3D fac.createOMElement(subscribe, omNs); payload.setText(IBM); // Send the request MessageSender msgSender =3D new MessageSender(); msgSender.setTo(targetEPR); msgSender.setSenderTransport(Constants.TRANSPORT_HTTP); msgSender.send(subscribe, payload); }catch (AxisFault axisFault) { axisFault.printStackTrace(); } But Messagesender was depricated. Is there any other way to write a client to invike the service. I went through 0.94 release document also. If some one have very simple code for cient to invike a service please send me. Best Regards Thushantha ___ Telefonate ohne weitere Kosten vom PC zum PC: http://messenger.yahoo.de
[Axis2] Writing Axis2 Client
Hi All When I tried to write a client to invoke axis2 as follows. try{ EndpointReference targetEPR = new EndpointReference(http://localhost:8080/axis2/services/echo/echo;); Options options = new Options(); options.setTo(targetEPR); options.setTransportInProtocol(Constants.TRANSPORT_HTTP); options.setUseSeparateListener(false); ServiceClient serviceClient = new ServiceClient(); serviceClient.setOptions(options); OMFactory fac = OMAbstractFactory.getOMFactory(); OMNamespace omNs = fac.createOMNamespace(http://www.developerworks.com/example;, example); OMElement payload = fac.createOMElement(name, omNs); payload.setText(IBM); OMElement result = serviceClient.sendReceive(payload); System.out.println(After Send); StringWriter writer = new StringWriter(); result.serialize(writer); writer.flush(); }catch(Exception error){ error.printStackTrace(); } I got the following error Module validation failed module.xml not found for the module : addressing; nested exception is: org.apache.axis2.deployment.DeploymentException: module.xml not found for the module : addressing Can Some one help me. Best Regards Thushantha
RE: [Axis2] Writing Axis2 Client
Hi Thushantha, are you using 0.94 release? If yes then create a '.axis2' directory inside your home folder and copy the addressing.mar to a subdirectory called 'modules'. Ted --- Thushantha De Alwis [EMAIL PROTECTED] schrieb: Hi All When I tried to write a client to invoke axis2 as follows. try{ EndpointReference targetEPR = new EndpointReference(http://localhost:8080/axis2/services/echo/echo;); Options options = new Options(); options.setTo(targetEPR); options.setTransportInProtocol(Constants.TRANSPORT_HTTP); options.setUseSeparateListener(false); ServiceClient serviceClient = new ServiceClient(); serviceClient.setOptions(options); OMFactory fac = OMAbstractFactory.getOMFactory(); OMNamespace omNs = fac.createOMNamespace(http://www.developerworks.com/example;, example); OMElement payload = fac.createOMElement(name, omNs); payload.setText(IBM); OMElement result = serviceClient.sendReceive(payload); System.out.println(After Send); StringWriter writer = new StringWriter(); result.serialize(writer); writer.flush(); }catch(Exception error){ error.printStackTrace(); } I got the following error Module validation failed module.xml not found for the module : addressing; nested exception is: org.apache.axis2.deployment.DeploymentException: module.xml not found for the module : addressing Can Some one help me. Best Regards Thushantha ___ Telefonate ohne weitere Kosten vom PC zum PC: http://messenger.yahoo.de
Re: [Axis2] Writing Axis2 Client
On Fri, 2006-02-24 at 05:30 -0500, Thushantha De Alwis wrote: Hi All When I tried to write a client to invoke axis2 as follows. There was a packaging error in the 0.94 distro .. if you go to the download site you'll see instructions on how to fix it. Sanjiva.
[Axis2] Writing Axis2 Client
Hi All I have successfully deployed a WebService called Echo So I want to invoke that web service. For that I tried to write a client. When writing it I used the following code sample got from 0.93 release. try{ EndpointReference targetEPR =3D new EndpointReference( http://localhost:8080/axis2/services/StockQuoteService;); // Make the request message OMFactory fac =3D OMAbstractFactory.getOMFactory(); OMNamespace omNs =3D fac.createOMNamespace( http://www.developerworks.com/example;, example); OMElement payload =3D fac.createOMElement(subscribe, omNs); payload.setText(IBM); // Send the request MessageSender msgSender =3D new MessageSender(); msgSender.setTo(targetEPR); msgSender.setSenderTransport(Constants.TRANSPORT_HTTP); msgSender.send(subscribe, payload); }catch (AxisFault axisFault) { axisFault.printStackTrace(); } But Messagesender was depricated. Is there any other way to write a client to invike the service. I went through 0.94 release document also. If some one have very simple code for cient to invike a service please send me. Best Regards Thushantha
Re: class-cast exception while writing the client for the webservice
Hi krthekeyan, I have transformed files into datasources which further into datahandlers and send them to the webservice .The service directly takes the datahandlers as parameters. In this process i am getting the exception mentioned below. So give me the process how to follow ? Thanks in advance. Thanks, KiranBabu.K It could be that you are setting the file in datasource from client . and might be trying to take it directly from datahandler. Regards, krthekeyan.s karusala kiranbabu wrote: Hi, I have created one webservice and deployed that webservice jar file in AXIS/WEB-INF/lib/ directory. I have accessed the wdsl of the webservice by giving the url for the webservice.here there is no problem. After th at, we have written the client and passing the datahandlers to the webservice . 1.It is not invoking the method of the webservice and it is giving the exception as mentioned below. HOW CAN WE RESOLVE THIS ISSUE? plz help me in this regard, it's very urgent for me. THE EXCEPTION COMING IS: C:\Documents and Settings\Administrator\Desktop\Downloads\webservice\newwebservice_client\clientjavac -d . XSLTClient.java C:\Documents and Settings\Administrator\Desktop\Downloads\webservice\newwebservice_client\clientjava xsltransform/XSLTClient sample.xml sample.xsl the inFileDataHandler [EMAIL PROTECTED] the xslFileDataHandler [EMAIL PROTECTED] AxisFault faultCode: {http://schemas.xmlsoap.org/soap/envelope/}Server.userException faultSubcode: faultString: java.lang.ClassCastException faultActor: faultNode: faultDetail: {http://xml.apache.org/axis/}hostname:SGSC1 java.lang.ClassCastException at org.apache.axis.message.SOAPFaultBuilder.createFault(SOAPFaultBuilder.java:221) at org.apache.axis.message.SOAPFaultBuilder.endElement(SOAPFaultBuilder.java:128) at org.apache.axis.encoding.DeserializationContext.endElement(DeserializationContext.java:1087) at org.apache.xerces.parsers.AbstractSAXParser.endElement(Unknown Source) at org.apache.xerces.impl.XMLNSDocumentScannerImpl.scanEndElement(Unknown Source) at org.apache.xerces.impl.XMLDocumentFragmentScannerImpl$FragmentContentDispatcher.dispatch(Unknown Source) at org.apache.xerces.impl.XMLDocumentFragmentScannerImpl.scanDocument(Unknown Source) at org.apache.xerces.parsers.XML11Configuration.parse(Unknown Source) at org.apache.xerces.parsers.XML11Configuration.parse(Unknown Source) at org.apache.xerces.parsers.XMLParser.parse(Unknown Source) at org.apache.xerces.parsers.AbstractSAXParser.parse(Unknown Source) at javax.xml.parsers.SAXParser.parse(Unknown Source) at org.apache.axis.encoding.DeserializationContext.parse(DeserializationContext.java:227) at org.apache.axis.SOAPPart.getAsSOAPEnvelope(SOAPPart.java:696) at org.apache.axis.Message.getSOAPEnvelope(Message.java:424) at org.apache.axis.handlers.soap.MustUnderstandChecker.invoke(MustUnderstandChecker.java:62) at org.apache.axis.client.AxisClient.invoke(AxisClient.java:206) at org.apache.axis.client.Call.invokeEngine(Call.java:2765) at org.apache.axis.client.Call.invoke(Call.java:2748) at org.apache.axis.client.Call.invoke(Call.java:2424) at org.apache.axis.client.Call.invoke(Call.java:2347) at org.apache.axis.client.Call.invoke(Call.java:1804) at xsltransform.XSLTClient.main(XSLTClient.java:72) C:\Documents and Settings\Administrator\Desktop\Downloads\webservice\newwebservice_client\client __ Yahoo! Mail - PC Magazine Editors' Choice 2005 http://mail.yahoo.com __ Yahoo! for Good Donate to the Hurricane Katrina relief effort. http://store.yahoo.com/redcross-donate3/
class-cast exception while writing the client for the webservice which takes datahandler as input parameters.
Hi, I have created one webservice and deployed that webservice jar file in AXIS/WEB-INF/lib/ directory. I have accessed the wdsl of the webservice by giving the url for the webservice.here there is no problem. After that, we have written the client and passing the datahandlers to the webservice . 1.It is not invoking the method of the webservice and it is giving the exception as mentioned below. HOW CAN WE RESOLVE THIS ISSUE? plz help me in this regard, it's very urgent for me. THE EXCEPTION COMING IS: C:\Documents and Settings\Administrator\Desktop\Downloads\webservice\newwebservice_client\clientjavac -d . XSLTClient.java C:\Documents and Settings\Administrator\Desktop\Downloads\webservice\newwebservice_client\clientjava xsltransform/XSLTClient sample.xml sample.xsl the inFileDataHandler [EMAIL PROTECTED] the xslFileDataHandler [EMAIL PROTECTED] AxisFault faultCode: {http://schemas.xmlsoap.org/soap/envelope/}Server.userException faultSubcode: faultString: java.lang.ClassCastException faultActor: faultNode: faultDetail: {http://xml.apache.org/axis/}hostname:SGSC1 java.lang.ClassCastException at org.apache.axis.message.SOAPFaultBuilder.createFault(SOAPFaultBuilder.java:221) at org.apache.axis.message.SOAPFaultBuilder.endElement(SOAPFaultBuilder.java:128) at org.apache.axis.encoding.DeserializationContext.endElement(DeserializationContext.java:1087) at org.apache.xerces.parsers.AbstractSAXParser.endElement(Unknown Source) at org.apache.xerces.impl.XMLNSDocumentScannerImpl.scanEndElement(Unknown Source) at org.apache.xerces.impl.XMLDocumentFragmentScannerImpl$FragmentContentDispatcher.dispatch(Unknown Source) at org.apache.xerces.impl.XMLDocumentFragmentScannerImpl.scanDocument(Unknown Source) at org.apache.xerces.parsers.XML11Configuration.parse(Unknown Source) at org.apache.xerces.parsers.XML11Configuration.parse(Unknown Source) at org.apache.xerces.parsers.XMLParser.parse(Unknown Source) at org.apache.xerces.parsers.AbstractSAXParser.parse(Unknown Source) at javax.xml.parsers.SAXParser.parse(Unknown Source) at org.apache.axis.encoding.DeserializationContext.parse(DeserializationContext.java:227) at org.apache.axis.SOAPPart.getAsSOAPEnvelope(SOAPPart.java:696) at org.apache.axis.Message.getSOAPEnvelope(Message.java:424) at org.apache.axis.handlers.soap.MustUnderstandChecker.invoke(MustUnderstandChecker.java:62) at org.apache.axis.client.AxisClient.invoke(AxisClient.java:206) at org.apache.axis.client.Call.invokeEngine(Call.java:2765) at org.apache.axis.client.Call.invoke(Call.java:2748) at org.apache.axis.client.Call.invoke(Call.java:2424) at org.apache.axis.client.Call.invoke(Call.java:2347) at org.apache.axis.client.Call.invoke(Call.java:1804) at xsltransform.XSLTClient.main(XSLTClient.java:72) C:\Documents and Settings\Administrator\Desktop\Downloads\webservice\newwebservice_client\client __ Yahoo! Mail - PC Magazine Editors' Choice 2005 http://mail.yahoo.com