How to set Array as Return Type
Hi, I have already dredged through the forums and got some advice there but still not working. I have already got a simple service running OK with return type of String. Now I want to return an array of a particular class 'Provider'. I generated this class with wsdl2java and I have set up the required QNames, for the class and for the array. I also have: // register mapping of object call.registerTypeMapping(Provider.class, qnProv, new org.apache.axis.encoding.ser.BeanSerializerFactory(Provider.class, qnProv), new org.apache.axis.encoding.ser.BeanDeserializerFactory(Provider.class, qnProv)); // register mapping of array call.registerTypeMapping(Provider[].class, qnProvArr, new org.apache.axis.encoding.ser.ArraySerializerFactory(), new org.apache.axis.encoding.ser.ArrayDeserializerFactory()); Prior to the client's to call.setReturnType(). When the client runs the call.invoke() I get: - Exception: org.xml.sax.SAXException: No deserializer for {urn:qh}Provider Any help would be appreciated. Thanks, Simon. Simon McMahon Work: (07) 31311420 Mobile: (043) 2294180 * This email, including any attachments sent with it, is confidential and for the sole use of the intended recipient(s). This confidentiality is not waived or lost, if you receive it and you are not the intended recipient(s), or if it is transmitted/ received in error. Any unauthorised use, alteration, disclosure, distribution or review of this email is strictly prohibited. The information contained in this email, including any attachment sent with it, may be subject to a statutory duty of confidentiality if it relates to health service matters. If you are not the intended recipient(s), or if you have received this email in error, you are asked to immediately notify the sender by telephone collect on Australia +61 1800 198 175 or by return email. You should also delete this email, and any copies, from your computer system network and destroy any hard copies produced. If not an intended recipient of this email, you must not copy, distribute or take any action(s) that relies on it; any form of disclosure, modification, distribution and/or publication of this email is also prohibited. Although Queensland Health takes all reasonable steps to ensure this email does not contain malicious software, Queensland Health does not accept responsibility for the consequences if any person?s computer inadvertently suffers any disruption to services, loss of information, harm or is infected with a virus, other malicious computer programme or code that may occur as a consequence of receiving this email. Unless stated otherwise, this email represents only the views of the sender and not the views of the Queensland Government.
RE:
Please disable the subscription of this axis user group
custom outputstream?
All - By implementing SecureSocketFactory and setting the right axis properties you can go from HTTP connections to HTTPS. Does a similar method exist to manipulate the OutputStream to the socket. For example extending OutputStream and setting an axis property to use my new custom OutputStream? Thanks -- Chris Johnson [EMAIL PROTECTED]
Making a Java RMI call from a ws
I have Axis 1.2.1 running on a Sun server, and it is happy! 8) I need to access the contents of a file on another Sun server on the same network that does not have webserver capability. I have set up an RMI server on the source box, and I can successfully retrieve the contents of the file as a bean. I want to use an Axis ws to retrieve the values and provide the content to the users in an applet. In order to run the RMI client from the command line, I set the java.security.policy value when I call it. In order to make the RMI call from the Axis ws, do I just need to set java.security.policy as a property in the ws code in order for this to work? Jim Azeltine Sr. Software Design Engineer SAIC
Operation not specified in client request
Hi, I am having trouble with my request in that in the SOAP env it does not put the operation. This is what is created. POST /opcxmlda/KEPware.KEPServerEx.V4 HTTP/1.0 Content-Type: text/xml; charset=utf-8 Accept: application/soap+xml, application/dime, multipart/related, text/* User-Agent: Axis/1.2.1 Host: 127.0.0.1:9988 Cache-Control: no-cache Pragma: no-cache SOAPAction: "http://opcfoundation.org/webservices/XMLDA/1.0/Read"; Content-Length: 708 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";> ReturnItemTime="true" ReturnErrorText="true" ReturnDiagnosticInfo="false" ReturnItemPath="false" xmlns="http://opcfoundation.org/webservices/XMLDA/1.0/"/> xmlns="http://opcfoundation.org/webservices/XMLDA/1.0/";> With the following change it works 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";> ReturnItemTime="true" ReturnErrorText="true" ReturnDiagnosticInfo="false" ReturnItemPath="false" xmlns="http://opcfoundation.org/webservices/XMLDA/1.0/"/> xmlns="http://opcfoundation.org/webservices/XMLDA/1.0/";> Note the addition of the and I am not sure why these are not present and what needs to be done to include them. I have attached the WSDL file that was used to generate the java code. TIA --Bill http://schemas.xmlsoap.org/wsdl/http/"; xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/"; xmlns:s="http://www.w3.org/2001/XMLSchema"; xmlns:s0="http://opcfoundation.org/webservices/XMLDA/1.0/"; xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/"; xmlns:tm="http://microsoft.com/wsdl/mime/textMatching/"; xmlns:mime="http://schemas.xmlsoap.org/wsdl/mime/"; targetNamespace="http://opcfoundation.org/webservices/XMLDA/1.0/"; xmlns="http://schemas.xmlsoap.org/wsdl/";> targetNamespace="http://opcfoundation.org/webservices/XMLDA/1.0/";> type="s0:ReplyBase" /> type="s0:ServerStatus" /> /> type="s:string" /> type="s:string" /> name="SupportedLocaleIDs" type="s:string" /> name="SupportedInterfaceVersions" type="s0:interfaceVersion" /> type="s0:RequestOptions" /> type="s0:ReadRequestItemList" /> /> type="s:boolean" /> /> /> /> type="s0:ReadRequestItem" /> type="s0:ReplyBase" /> type="s0:ReplyItemList" /> type="s0:OPCError" /> type="s0:ItemValue" /> type="s:string" /> type="s0:OPCQuality" /> type="s0:qualityBits" /> /> type="s:float" /> type="s:int" /> type="s:unsignedInt" /> type="s:long" /> type="s:unsignedLong" /> type="s:double" /> name="unsignedShort" type="s:unsignedShort" /> type="s:boolean" /> nillable="true" type="s:string" /> type="s:dateTime" /> nillable="true" /> type="s:decimal" /> type="s:byte" /> type="s:short" /> type="s0:RequestOptions" /> type="s0:WriteRequestItemList" /> use="required" /> type="s0:ItemValue" /> type="s0:ReplyBase" />
Exception subclass not being deserialized
I have an exception heirarchy like the following: Exception +--MATEException +--DocumentException +--BadFileAttachmentException I have a method, addDocuments, that throws DocumentException. Inside the class, I create an instance of BadFileAttachmentException and throw it. On the client side, I end up with a DocumentException. The strange thing is that the SOAP message specifies the fault as a BadFileAttachmentException: soapenv:Server.userException com.digilore.mate.engine.exceptions.document.BadFileAttachmentException: Could not get attached files. http://digilore.com/mate/engine/exceptions/document";> http://schemas.xmlsoap.org/soap/encoding/";>Could not get attached files. http://xml.apache.org/axis/";>Matt While the element name is DocumentException, I would have thought that the "type" attribute would create an instance of BadFileAttachmentException, not DocumentException. I'm generating my WSDL file off of my Java interface, and including the BadFileAttachmentException as an extra class, then generating client stubs from the generated WSDL file. Relevant parts of the WSDL file: ... Client side, things seem to be generated ok, except that in the stub, in the addDocuments method where it catches and deserializes the AxisException, there is no mention of the BadFileAttachmentException, just DocumentException: if (axisFaultException.detail != null) { if (axisFaultException.detail instanceof java.rmi.RemoteException) { throw (java.rmi.RemoteException) axisFaultException.detail; } if (axisFaultException.detail instanceof com.digilore.mate.engine.exceptions.document.DocumentException) { throw (com.digilore.mate.engine.exceptions.document.DocumentException) axisFaultException.detail; } } Any ideas why I can't catch the subclassed exception? Thanks Matt
Re: Duplicate operation names
WSDL does require that the operations be differentiate-able -- via unique input and output names in each operation. 2.4.5 Names of Elements within an Operation The name attribute of the input and output elements provides a unique name among all input and output elements within the enclosing port type. In order to avoid having to name each input and output element within an operation, WSDL provides some default values based on the operation name. If the name attribute is not specified on a one-way or notification message, it defaults to the name of the operation. If the name attribute is not specified on the input or output messages of a request-response or solicit-response operation, the name defaults to the name of the operation with "Request"/"Solicit" or "Response" appended, respectively. Therefore, if the WSDL doesn't specify @name attributes on the and definitions, then the WSDL is in error. Anne On 10/11/05, Anne Thomas Manes <[EMAIL PROTECTED]> wrote: It is permitted by the WSDL spec, but it has been outlawed by the WS-I Basic Profile. It's a bad practice that causes a lot of interoperability issues. AnneOn 10/11/05, Chris Mannion < [EMAIL PROTECTED]> wrote: Hi I'm being given an error from axis because the wsdl file of the webservices I'm trying to make calls to defines two different operations with the same name. I've contacted the owners of the webservice and they assure me that it isn't a mistake in their wsdl, the service is designed that way as each of the two operations take different parameters and which is being called is dynamically determined by the server based on the parameters passed. Sadly my code doesn't get as far as making the call as axis seems unhappy with there being two operations with the same name. Does anyone know if the wsdl specification explicitly prohibits operation-name overloading like this or is the object specific to axis? The exception I get is below, as the wsdl contains two operations name CardPaymentRequest (I've masked the portType, it is correct in the original output) javax.xml.rpc.ServiceException: Error processing WSDL document: java.lang.IllegalArgumentException: Duplicate operation with name=CardPaymentRequest, found in portType '{http://xxx.xxx.xxx.uk/}CardPaymentsSoap'. at org.apache.axis.client.Service.initService(Service.java:249) at org.apache.axis.client.Service.(Service.java:164) at org.apache.axis.client.ServiceFactory.createService(ServiceFactory.java:198) at govConnect.WebServiceTools.(WebServiceTools.java:79) at ep.callWS.service(callWS.java:58) at javax.servlet.http.HttpServlet.service(HttpServlet.java:810) at org.apache.catalina.servlets.InvokerServlet.serveRequest(InvokerServlet.java:419) at org.apache.catalina.servlets.InvokerServlet.doPost(InvokerServlet.java:169) at javax.servlet.http.HttpServlet.service(HttpServlet.java:717) at javax.servlet.http.HttpServlet.service(HttpServlet.java:810) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:237) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:157) at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:214) at org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:104) at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:520) at org.apache.catalina.core.StandardContextValve.invokeInternal(StandardContextValve.java:198) at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:152) at org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:104) at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:520) at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:137) at org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:104) at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:117) at org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:102) at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:520) at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109) at org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:104) at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:520) at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:929) at org.apache.coyote.tomcat5.CoyoteAdapter.service(CoyoteAdapter.java:160) at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:793) at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.processConnection(Http11Protocol.java:702) at org.apache.tomcat.util.net.TcpWorkerThread.runIt(PoolTcpEndpoint.java:571) at org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:644) at java.lang.Thread.run(
Re: Duplicate operation names
It is permitted by the WSDL spec, but it has been outlawed by the WS-I Basic Profile. It's a bad practice that causes a lot of interoperability issues. AnneOn 10/11/05, Chris Mannion <[EMAIL PROTECTED]> wrote: Hi I'm being given an error from axis because the wsdl file of the webservices I'm trying to make calls to defines two different operations with the same name. I've contacted the owners of the webservice and they assure me that it isn't a mistake in their wsdl, the service is designed that way as each of the two operations take different parameters and which is being called is dynamically determined by the server based on the parameters passed. Sadly my code doesn't get as far as making the call as axis seems unhappy with there being two operations with the same name. Does anyone know if the wsdl specification explicitly prohibits operation-name overloading like this or is the object specific to axis? The exception I get is below, as the wsdl contains two operations name CardPaymentRequest (I've masked the portType, it is correct in the original output) javax.xml.rpc.ServiceException: Error processing WSDL document: java.lang.IllegalArgumentException: Duplicate operation with name=CardPaymentRequest, found in portType '{http://xxx.xxx.xxx.uk/}CardPaymentsSoap'. at org.apache.axis.client.Service.initService(Service.java:249) at org.apache.axis.client.Service.(Service.java:164) at org.apache.axis.client.ServiceFactory.createService(ServiceFactory.java:198) at govConnect.WebServiceTools.(WebServiceTools.java:79) at ep.callWS.service(callWS.java:58) at javax.servlet.http.HttpServlet.service(HttpServlet.java:810) at org.apache.catalina.servlets.InvokerServlet.serveRequest(InvokerServlet.java:419) at org.apache.catalina.servlets.InvokerServlet.doPost(InvokerServlet.java:169) at javax.servlet.http.HttpServlet.service(HttpServlet.java:717) at javax.servlet.http.HttpServlet.service(HttpServlet.java:810) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:237) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:157) at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:214) at org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:104) at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:520) at org.apache.catalina.core.StandardContextValve.invokeInternal(StandardContextValve.java:198) at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:152) at org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:104) at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:520) at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:137) at org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:104) at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:117) at org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:102) at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:520) at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109) at org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:104) at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:520) at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:929) at org.apache.coyote.tomcat5.CoyoteAdapter.service(CoyoteAdapter.java:160) at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:793) at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.processConnection(Http11Protocol.java:702) at org.apache.tomcat.util.net.TcpWorkerThread.runIt(PoolTcpEndpoint.java:571) at org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:644) at java.lang.Thread.run(Thread.java:536) Chris MannionIT Junction020 8452 4274
[ot] Spring Introducing interfaces into wsdl2java generated code
I am using the WAS5.1 wsdl2java to generate my webservices code. And I am trying to introduce an interface into the generated classes with Spring instead of modifying the generated code, in order to ensure synchronization with the wsdl and my application. So, can someone please help me to understand how to do this? I have an application interface IdKey, that has a Struts ActionForm that implements that interface. Then I have a generated class called IdKeyType that is generated, and should be the same unless the wsdl was changed by another team, and thus not realized by my team. So, I was hoping to introduce IdKey into IdKeyType, but not sure how to go about that. I am also wondering if there is a way to check that the interface is implemented in IdKeyType as initialization time, verse runtime. I.e. container startup. Thank You Mick Knutson Sr. Java/J2EE Consultant BASE logic, inc. (415) 648-1804 (S.F., CA) http://www.BASELogic.com HP Consulting Services (Walnut Creek, CA)
[ot] Spring Introducing interfaces into wsdl2java generated code
I am using the WAS5.1 wsdl2java to generate my webservices code. And I am trying to introduce an interface into the generated classes with Spring instead of modifying the generated code, in order to ensure synchronization with the wsdl and my application. So, can someone please help me to understand how to do this? I have an application interface IdKey, that has a Struts ActionForm that implements that interface. Then I have a generated class called IdKeyType that is generated, and should be the same unless the wsdl was changed by another team, and thus not realized by my team. So, I was hoping to introduce IdKey into IdKeyType, but not sure how to go about that. I am also wondering if there is a way to check that the interface is implemented in IdKeyType as initialization time, verse runtime. I.e. container startup. Thank You Mick Knutson Sr. Java/J2EE Consultant BASE logic, inc. (415) 648-1804 (S.F., CA) http://www.BASELogic.com HP Consulting Services (Walnut Creek, CA)
RE: Changes to SOAPHeader do not seem to have effect on toString and getAsDOM - Workaround
I have to call setRecorder(null) on my envelope in order for the changes to show in my toString and getAsDom methods after I have removed elements from the header. -Bill Kuker > -Original Message- > From: Bill Kuker [mailto:[EMAIL PROTECTED] > Sent: Tuesday, October 11, 2005 11:34 AM > To: axis-user@ws.apache.org > Subject: Changes to SOAPHeader do not seem to have effect on toString and > getAsDOM > > > > When I change the contents of a SOAPHeader, either with > extractHeaderElements() or explicitly removing them with removeChild() > the SOAPEnvelope and SOAPHeader's toString() and getAsDom() functions > return as if the headers were never removed. > > I have verified that the SOAPHeaderElements are removed from the > SOAPHeader by digging through the objects in my debugger. > > I'll guess that the envelope and header objects cache the toString and > gerAsDOM results, and that this is a bug, or is there some kind of > update function I need to call? > > Thanks, > > -Bill Kuker >
Re: [Axis 1.3] wsdl2java error: NoSuchMethodError
you have an old wsdl4j jar in your classpath. -- dims On 10/11/05, Christophe Roudet <[EMAIL PROTECTED]> wrote: > Hi, > > I get an error with this new release when I try to run wsdl2java. > For instance, for the echo example: > > compile: > [wsdl2java] Running Wsdl2javaAntTask with parameters: > [wsdl2java] verbose:false > [wsdl2java] debug:false > [wsdl2java] quiet:false > [wsdl2java] server-side:false > [wsdl2java] skeletonDeploy:false > [wsdl2java] helperGen:false > [wsdl2java] factory:null > [wsdl2java] nsIncludes:[] > [wsdl2java] nsExcludes:[] > [wsdl2java] factoryProps:[] > [wsdl2java] testCase:false > [wsdl2java] noImports:false > [wsdl2java] NStoPkg:{} > [wsdl2java] output:C:\Yo\Tools\Java\axis-1_3\build\work > [wsdl2java] protocolHandlerPkgs: > [wsdl2java] deployScope:session > [wsdl2java] URL:C:\Yo\Tools\Java\axis-1_3/samples/echo/InteropTest.wsdl > [wsdl2java] all:false > [wsdl2java] typeMappingVersion:1.1 > [wsdl2java] timeout:45000 > [wsdl2java] failOnNetworkErrors:false > [wsdl2java] printStackTraceOnFailure:true > [wsdl2java] namespaceMappingFile:null > [wsdl2java] username:null > [wsdl2java] :passwordnull > [wsdl2java] :noWrappedfalse > [wsdl2java] :allowInvalidURLfalse > [wsdl2java] :implementationClassNamenull > [wsdl2java] :classpathnull > [wsdl2java] http.proxyHost=null > [wsdl2java] http.proxyPort=null > [wsdl2java] http.proxyUser=null > [wsdl2java] http.proxyPassword=null > [wsdl2java] socks.proxyHost=null > [wsdl2java] socks.proxyPort=null > [wsdl2java] mapping http://soapinterop.org/ to samples.echo > [wsdl2java] mapping http://soapinterop.org/xsd to samples.echo > [wsdl2java] WSDL2Java > C:\Yo\Tools\Java\axis-1_3/samples/echo/InteropTest.wsdl > [wsdl2java] java.lang.NoSuchMethodError: > javax.xml.namespace.QName.getPrefix()Lj > ava/lang/String; > [wsdl2java] at > org.apache.axis.wsdl.symbolTable.BackslashUtil.getQNameWithDi > fferentLocal(BackslashUtil.java:62) > [wsdl2java] at > org.apache.axis.wsdl.symbolTable.BackslashUtil.getQNameWithBa > ckslashlessLocal(BackslashUtil.java:39) > [wsdl2java] at > org.apache.axis.wsdl.symbolTable.SymbolTable.populateServices > (SymbolTable.java:3078) > [wsdl2java] at > org.apache.axis.wsdl.symbolTable.SymbolTable.populate(SymbolT > able.java:745) > [wsdl2java] at > org.apache.axis.wsdl.symbolTable.SymbolTable.add(SymbolTable. > java:543) > [wsdl2java] at > org.apache.axis.wsdl.symbolTable.SymbolTable.populate(SymbolT > : > > > > > -- Davanum Srinivas : http://wso2.com/blogs/
[Axis 1.3] wsdl2java error: NoSuchMethodError
Hi, I get an error with this new release when I try to run wsdl2java. For instance, for the echo example: compile: [wsdl2java] Running Wsdl2javaAntTask with parameters: [wsdl2java] verbose:false [wsdl2java] debug:false [wsdl2java] quiet:false [wsdl2java] server-side:false [wsdl2java] skeletonDeploy:false [wsdl2java] helperGen:false [wsdl2java] factory:null [wsdl2java] nsIncludes:[] [wsdl2java] nsExcludes:[] [wsdl2java] factoryProps:[] [wsdl2java] testCase:false [wsdl2java] noImports:false [wsdl2java] NStoPkg:{} [wsdl2java] output:C:\Yo\Tools\Java\axis-1_3\build\work [wsdl2java] protocolHandlerPkgs: [wsdl2java] deployScope:session [wsdl2java] URL:C:\Yo\Tools\Java\axis-1_3/samples/echo/InteropTest.wsdl [wsdl2java] all:false [wsdl2java] typeMappingVersion:1.1 [wsdl2java] timeout:45000 [wsdl2java] failOnNetworkErrors:false [wsdl2java] printStackTraceOnFailure:true [wsdl2java] namespaceMappingFile:null [wsdl2java] username:null [wsdl2java] :passwordnull [wsdl2java] :noWrappedfalse [wsdl2java] :allowInvalidURLfalse [wsdl2java] :implementationClassNamenull [wsdl2java] :classpathnull [wsdl2java] http.proxyHost=null [wsdl2java] http.proxyPort=null [wsdl2java] http.proxyUser=null [wsdl2java] http.proxyPassword=null [wsdl2java] socks.proxyHost=null [wsdl2java] socks.proxyPort=null [wsdl2java] mapping http://soapinterop.org/ to samples.echo [wsdl2java] mapping http://soapinterop.org/xsd to samples.echo [wsdl2java] WSDL2Java C:\Yo\Tools\Java\axis-1_3/samples/echo/InteropTest.wsdl [wsdl2java] java.lang.NoSuchMethodError: javax.xml.namespace.QName.getPrefix()Lj ava/lang/String; [wsdl2java] at org.apache.axis.wsdl.symbolTable.BackslashUtil.getQNameWithDi fferentLocal(BackslashUtil.java:62) [wsdl2java] at org.apache.axis.wsdl.symbolTable.BackslashUtil.getQNameWithBa ckslashlessLocal(BackslashUtil.java:39) [wsdl2java] at org.apache.axis.wsdl.symbolTable.SymbolTable.populateServices (SymbolTable.java:3078) [wsdl2java] at org.apache.axis.wsdl.symbolTable.SymbolTable.populate(SymbolT able.java:745) [wsdl2java] at org.apache.axis.wsdl.symbolTable.SymbolTable.add(SymbolTable. java:543) [wsdl2java] at org.apache.axis.wsdl.symbolTable.SymbolTable.populate(SymbolT :
Application hangs on call.invoke(Object[])
I have written an Axis Client with Axis 1.1, which I run on two different machines. On the first machine, with OS Windows ME, it runs fine. On the other machine, with SUSE 9, it seems to hang when I invoke the method invoke(Object[]) on an instance of Call. Because I only have a remote connection to that second machine, i had to locate the point where the application hangs with System.out.println. I get the last message on System.out before invoke(Object[]) gets called, a message a the first line of that method does not appear any more on System.out. Now I am realy puzzled, can anyone give me a hint? Kind regards, Simon
RE: Help with Axis Handlers!!
Well, I could track it down to "Invocation arguments were modified" exception in HandlerChainImpl class. Apparently axis checks to see if the original invocation arguments were modified in the postinvoke( ) method there. So does that mean that altering the SOAPBody in a handler is not allowed?? - Jose From: Mathew, Jose Sent: Tuesday, October 11, 2005 8:53 AMTo: axis-user@ws.apache.orgSubject: RE: Help with Axis Handlers!! Thanks Arun! I have been using Axis' handlers, now I have switched to JAXPRC Handlers like you suggested. One problem, though.. in my scenario, I have just one Handler class, and I make use of the handleRequest (return false) and handleResponse (return true) methods to process my request and response , and completely avoid execution of the actual end point by returning false from handleRequest method. In my handleResponse , I need to set a new message into the messagecontext . I do it like this.. ByteArrayInputStream bis = new ByteArrayInputStream(response.getBytes());InputSource is = new InputSource((java.io.InputStream)bis); SOAPMessage soapMessage= MessageFactory.newInstance().createMessage(); DocumentBuilder parser = DocumentBuilderFactory.newInstance().newDocumentBuilder();Document soapDoc = parser.parse(is); soapMessage.getSOAPPart().getEnvelope().getBody().addDocument(soapDoc); ((SOAPMessageContext)context).setMessage(soapMessage); // Is there a setResponseMessage( ) instead?((SOAPMessageContext)context).getMessage().writeTo(System.out); The handleResponse proceeds with out any errors, but in the response at the client side, i keep getting a "Server Error" SOAP fault message. I am pretty sure that the message I am setting in the SOAPMessageContext is a 'good' SOAP message, since it was working while I was using Axis Handlers.. Any idea what is going wrong? Any help would be greatly appreciated. Thanks again Jose Mathew From: Soactive Inc [mailto:[EMAIL PROTECTED] Sent: Sunday, October 09, 2005 1:04 AMTo: axis-user@ws.apache.orgSubject: Re: Help with Axis Handlers!! You need to return false in the request handling function of the handler that you would like to skip rest of the handlers:public boolean handleRequest(MessageContext mc) { // some logic // once you decide to quit the remainder of the chain, set the appropriate response message and return false context.setResponseMessage(someResponseMessage); return false;}-Arun On 10/7/05, Mathew, Jose <[EMAIL PROTECTED]> wrote: I am using Axis 1.2 As part of something I am trying to do, I would like to break out of a Request handler I have for a service, and return a SOAP response, without going further down the chain (skip deserialization etc) . Is this possible? Can anyone help me with any tips? Thanks. Jose Mathew
Re: Newbie - file upload with axis2?
If you are planing to go with the first option, (MTOM with Axis2) then there is a MTOM/image transfer sample in the Samples module. You will be able to grab few tips from it. Regards, ~Thilina On 10/11/05, Eran Chinthaka <[EMAIL PROTECTED]> wrote: Nice scenario.You have couple of ways to do this.1. You can create an MTOM attachment, which in turn is an OMText, from your zip files and hook that up to the SOAP body. Write your own messagereceiver or if the client needs a feedback, use theRawXMLInOutSyncMessageReceiver. Write your service implementation classto work on OM, which will get the body of the SOAP message. Since OM treats the MTOM attachments as OMText, the service implementation canget the OMText which contains the attachment and using the data handler,you can retrieve the attachment in the server side. Then use your logic of unzipping, saving to db or whatever.2. Create an xml file out of the contents of the zip file you need tosend to the server and hook that bit of XML to the body of the SOAPmessage. Service implementation can get that and save that stuff to the db. 3. If its not a must to use web services, write a simple JSP or aservlet and use commons file upload util to upload the zip to the serverand process it there. This is , without using web services.HTH. ChinthakaAntony Grinyer wrote:>Hi all,>>This is my first mail to the list as I am new to axis2 development. I am>using axis2 and resin 2.1.0, and I have developed a basic web service >which allows me to retrieve information from the database using basic>http parameters as arguments to web service calls e.g.>> http://localhost:8080/axis2/services/myservice/getPerson?db=myDb&personI>D=10>>>I would now like to write a method to upload a zip file from a client to>the server using a web service call convention like: >>http://localhost:8080/axis2/services/myservice/uploadZip?path=c:\data\xm>l.zip>>Which takes the file from the client machine and dumps it on the server. >This file will then be unzipped at the server end and processed to>upload XML to a database.>>I am using AXIOM for my web service methods to process all the web>service calls e.g.> >public OMElement uploadZip(OMElement element)> throws XMLStreamException>{> QName qn = new QName("path");> OMElement e = element.getFirstChildWithName(qn);> String pathToZip = e.getText();>> // missing implementation - what goes here?>}>>...however I am completely mystified how I can implement this service to>actually get the file from the client and put it on the server? i.e. how>can my uploadZip method get the file from the client for the server to>process?>>I can't find any examples anywhere on how to do this, therefore any>help/advice would be gratefully received! >>Many thanks in advance,>Antony>>>-- "May the SourcE be with u" http://thilinagunarathne.blogspot.com/ http://webservices.apache.org/~thilina/
Changes to SOAPHeader do not seem to have effect on toString and getAsDOM
When I change the contents of a SOAPHeader, either with extractHeaderElements() or explicitly removing them with removeChild() the SOAPEnvelope and SOAPHeader's toString() and getAsDom() functions return as if the headers were never removed. I have verified that the SOAPHeaderElements are removed from the SOAPHeader by digging through the objects in my debugger. I'll guess that the envelope and header objects cache the toString and gerAsDOM results, and that this is a bug, or is there some kind of update function I need to call? Thanks, -Bill Kuker
Newbie - About Web Services Call Convention
Hi, I am a new to web service and confused on web services call convention. I can test my web service by typing http://localhost:8080/axis/services/MyService?method=serviceMethod&serviceMethodRequest="123" I am trying to create a web service which should be invoked by typing http:///ServicesName/MethodName?Parameter1=value1&Parameter2=value2 What I get is “AXIS error No service is available at this URL”. How to make this call work? Thanks a lot,
RE: finding client-config.wsdd icw WebStart
Johan; When you create a customized EngineConfiguration, Axis uses it directly to configure the client-side engine and stops looking for a client-config.wsdd file. Tony -Message d'origine- De : Johan Walters [mailto:[EMAIL PROTECTED] Envoyé : mardi 11 octobre 2005 16:57 À : axis-user@ws.apache.org Objet : Re: finding client-config.wsdd icw WebStart Thank you, after trying creating a EngineConfiguration myself I don't get errors anymore so I think the client-config.wsdd file is found. The problem still is, the handlers that are supposed to return SOAP headers with the session ID still do not work. It might even well be the case that my client already found client-config.wsdd before, but I just assumed it didn't because no SOAP session headers appear. Every message from the server does contain a soap header with a new session ID, the client does not include any soap header at all as it should have. So the server keeps sending new ID's every time. Perhaps any ideas why SimpleSessionHandler fails at my client side? Johan Walters 2005/10/11, zze-ELSOKHON Tony RD-BIZZ-ISS <[EMAIL PROTECTED]>: > > John, > > You can still try using an XMLStringProvider. It should work if you figure > out the possible encoding problems. > > You can also include a client-config.wsdd file in one of the jars that are on > the classpath. Axis is able to retrieve it there. > > Even better, you can build programmatically a customized Axis configuration > engine by implementing the interface org.apache.axis.EngineConfiguration. > You can find some sample code here: > http://wiki.apache.org/ws/FrontPage/Axis/AxisClientConfiguration > > Regards, > > Tony ELSOKHON > > -Message d'origine- > De: Johan Walters [mailto:[EMAIL PROTECTED] > Envoyé: mardi 11 octobre 2005 14:18 > À: axis-user@ws.apache.org > Objet: finding client-config.wsdd icw WebStart > > I'm having a strange problem I cannot figure out. > > I am using Axis 1.2. Currently, I have a working webstart application > that uses axis. It is able to communicate succesfully to my server > using soap. Now I would like to implement soap-header based sessions. > In order to do that, I have to supply a client-config.wsdd file to the > client. There are 4 ways to to this: > > 1) Put the client-config.wsdd file in the working directory. Since > webstart only uses weird cache directories, this is no option. > > 2) Put the client-config.wsdd file in the classpath. There is no > option for inlcuding new directories to the classpath once webstart > (and thus the VM) is running, right? So no-go here either. > > 3) Put the client-config.wsdd file somewhere you like and put the > parent directory of the file in a system property called > axis.ClientConfigFile. This gives me the following error (just the > first few lines): > > org.apache.axis.InternalException: > org.apache.axis.ConfigurationException: > org.apache.axis.ConfigurationException: No engine configuration file - > aborting! > org.apache.axis.ConfigurationException: No engine configuration file - abor= > ting! > at org.apache.axis.configuration.FileProvider.configureEngine(FileP= > rovider.java:175) > at org.apache.axis.AxisEngine.init(AxisEngine.java:172) > at org.apache.axis.AxisEngine.(AxisEngine.java:156) > at org.apache.axis.client.AxisClient.(AxisClient.java:52) > at org.apache.axis.client.Service.getAxisClient(Service.java:103) > at org.apache.axis.client.Service.(Service.java:112) > at client.JarDistributionServiceLocator. ... ... > > Somehow, the FileProvider failed to load the file. > > 4) I created a FileProvider myself, and even tried a XMLStringProvider > like this: > > XP =3D new XMLStringProvider(StringContainingClientConfigWSDD) > ... > locator =3D new JarDistributionServiceLocator(); > XP.configureEngine(locator.getEngine()); > > Both the FileProvider and XMLStringProvider give the following error: > > org.apache.axis.InternalException: > org.apache.axis.ConfigurationException: org.xml.sax.SAXException: > Fatal Error: URI=3Dnull Line=3D-1: Premature end of file. > org.xml.sax.SAXException: Fatal Error: URI=3Dnull Line=3D-1: Premature end = > of file. > at org.apache.axis.utils.XMLUtils$ParserErrorHandler.fatalError > (XMLUtils.java:723) > at com.sun.org.apache.xerces.internal.util.ErrorHandlerWrapper.fata= > lError(Unknown > Source) > at com.sun.org.apache.xerces.internal.impl.XMLErrorReporter.reportE= > rror(Unknown > Source) > at com.sun.org.apache.xerces.internal.impl.XMLErrorReporter.reportE= > rror(Unknown > Source) > at com.sun.org.apache.xerces.internal.impl.XMLVersionDetector.deter= > mineDocVersion(Unknown > Source) > at com.sun.org.apache.xerces.internal.parsers.XML11Configuration.pa= > rse(Unknown > Source) > at com.sun.org.apache.xerces.internal.parsers.XML11Configuration.pa= > rse(Unknown > Source) > at com.sun.org.apache.xerces.internal.parsers.XMLParser.parse(Unkno= > wn > Source) >
Re: finding client-config.wsdd icw WebStart
Thank you, after trying creating a EngineConfiguration myself I don't get errors anymore so I think the client-config.wsdd file is found. The problem still is, the handlers that are supposed to return SOAP headers with the session ID still do not work. It might even well be the case that my client already found client-config.wsdd before, but I just assumed it didn't because no SOAP session headers appear. Every message from the server does contain a soap header with a new session ID, the client does not include any soap header at all as it should have. So the server keeps sending new ID's every time. Perhaps any ideas why SimpleSessionHandler fails at my client side? Johan Walters 2005/10/11, zze-ELSOKHON Tony RD-BIZZ-ISS <[EMAIL PROTECTED]>: > > John, > > You can still try using an XMLStringProvider. It should work if you figure > out the possible encoding problems. > > You can also include a client-config.wsdd file in one of the jars that are on > the classpath. Axis is able to retrieve it there. > > Even better, you can build programmatically a customized Axis configuration > engine by implementing the interface org.apache.axis.EngineConfiguration. > You can find some sample code here: > http://wiki.apache.org/ws/FrontPage/Axis/AxisClientConfiguration > > Regards, > > Tony ELSOKHON > > -Message d'origine- > De: Johan Walters [mailto:[EMAIL PROTECTED] > Envoyé: mardi 11 octobre 2005 14:18 > À: axis-user@ws.apache.org > Objet: finding client-config.wsdd icw WebStart > > I'm having a strange problem I cannot figure out. > > I am using Axis 1.2. Currently, I have a working webstart application > that uses axis. It is able to communicate succesfully to my server > using soap. Now I would like to implement soap-header based sessions. > In order to do that, I have to supply a client-config.wsdd file to the > client. There are 4 ways to to this: > > 1) Put the client-config.wsdd file in the working directory. Since > webstart only uses weird cache directories, this is no option. > > 2) Put the client-config.wsdd file in the classpath. There is no > option for inlcuding new directories to the classpath once webstart > (and thus the VM) is running, right? So no-go here either. > > 3) Put the client-config.wsdd file somewhere you like and put the > parent directory of the file in a system property called > axis.ClientConfigFile. This gives me the following error (just the > first few lines): > > org.apache.axis.InternalException: > org.apache.axis.ConfigurationException: > org.apache.axis.ConfigurationException: No engine configuration file - > aborting! > org.apache.axis.ConfigurationException: No engine configuration file - abor= > ting! > at org.apache.axis.configuration.FileProvider.configureEngine(FileP= > rovider.java:175) > at org.apache.axis.AxisEngine.init(AxisEngine.java:172) > at org.apache.axis.AxisEngine.(AxisEngine.java:156) > at org.apache.axis.client.AxisClient.(AxisClient.java:52) > at org.apache.axis.client.Service.getAxisClient(Service.java:103) > at org.apache.axis.client.Service.(Service.java:112) > at client.JarDistributionServiceLocator. ... ... > > Somehow, the FileProvider failed to load the file. > > 4) I created a FileProvider myself, and even tried a XMLStringProvider > like this: > > XP =3D new XMLStringProvider(StringContainingClientConfigWSDD) > ... > locator =3D new JarDistributionServiceLocator(); > XP.configureEngine(locator.getEngine()); > > Both the FileProvider and XMLStringProvider give the following error: > > org.apache.axis.InternalException: > org.apache.axis.ConfigurationException: org.xml.sax.SAXException: > Fatal Error: URI=3Dnull Line=3D-1: Premature end of file. > org.xml.sax.SAXException: Fatal Error: URI=3Dnull Line=3D-1: Premature end = > of file. > at org.apache.axis.utils.XMLUtils$ParserErrorHandler.fatalError > (XMLUtils.java:723) > at com.sun.org.apache.xerces.internal.util.ErrorHandlerWrapper.fata= > lError(Unknown > Source) > at com.sun.org.apache.xerces.internal.impl.XMLErrorReporter.reportE= > rror(Unknown > Source) > at com.sun.org.apache.xerces.internal.impl.XMLErrorReporter.reportE= > rror(Unknown > Source) > at com.sun.org.apache.xerces.internal.impl.XMLVersionDetector.deter= > mineDocVersion(Unknown > Source) > at com.sun.org.apache.xerces.internal.parsers.XML11Configuration.pa= > rse(Unknown > Source) > at com.sun.org.apache.xerces.internal.parsers.XML11Configuration.pa= > rse(Unknown > Source) > at com.sun.org.apache.xerces.internal.parsers.XMLParser.parse(Unkno= > wn > Source) > at com.sun.org.apache.xerces.internal.parsers.DOMParser.parse(Unkno= > wn > Source) > at com.sun.org.apache.xerces.internal.jaxp.DocumentBuilderImpl.pars= > e(Unknown > Source) > at org.apache.axis.utils.XMLUtils.newDocument(XMLUtils.java:369) > at org.apache.axis.utils.XMLUtils.newDocument(XMLUtils.java:388) > at org.apache.axis.config
Re: Newbie - file upload with axis2?
Nice scenario. You have couple of ways to do this. 1. You can create an MTOM attachment, which in turn is an OMText, from your zip files and hook that up to the SOAP body. Write your own message receiver or if the client needs a feedback, use the RawXMLInOutSyncMessageReceiver. Write your service implementation class to work on OM, which will get the body of the SOAP message. Since OM treats the MTOM attachments as OMText, the service implementation can get the OMText which contains the attachment and using the data handler, you can retrieve the attachment in the server side. Then use your logic of unzipping, saving to db or whatever. 2. Create an xml file out of the contents of the zip file you need to send to the server and hook that bit of XML to the body of the SOAP message. Service implementation can get that and save that stuff to the db. 3. If its not a must to use web services, write a simple JSP or a servlet and use commons file upload util to upload the zip to the server and process it there. This is , without using web services. HTH. Chinthaka Antony Grinyer wrote: Hi all, This is my first mail to the list as I am new to axis2 development. I am using axis2 and resin 2.1.0, and I have developed a basic web service which allows me to retrieve information from the database using basic http parameters as arguments to web service calls e.g. http://localhost:8080/axis2/services/myservice/getPerson?db=myDb&personI D=10 I would now like to write a method to upload a zip file from a client to the server using a web service call convention like: http://localhost:8080/axis2/services/myservice/uploadZip?path=c:\data\xm l.zip Which takes the file from the client machine and dumps it on the server. This file will then be unzipped at the server end and processed to upload XML to a database. I am using AXIOM for my web service methods to process all the web service calls e.g. public OMElement uploadZip(OMElement element) throws XMLStreamException { QName qn = new QName("path"); OMElement e = element.getFirstChildWithName(qn); String pathToZip = e.getText(); // missing implementation - what goes here? } ...however I am completely mystified how I can implement this service to actually get the file from the client and put it on the server? i.e. how can my uploadZip method get the file from the client for the server to process? I can't find any examples anywhere on how to do this, therefore any help/advice would be gratefully received! Many thanks in advance, Antony
ClassCastException
Hi, I get the following exception java.lang.ClassCastException: java.lang.String when I invoke a simple Webservice which accepts a string has input parameter Below you'll find the stacktrace. == The WSDL part == soap.snakeoil.com" xmlns="http://schemas.xmlsoap.org/wsdl/" xmlns:apachesoap="http://xml.apache.org/xml-soap" xmlns:impl="urn:soap.snakeoil.com" xmlns:intf="urn:soap.snakeoil.com" xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/" xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/" xmlns:xsd="http://www.w3.org/2001/XMLSchema"> http://schemas.xmlsoap.org/soap/http"/> http://schemas.xmlsoap.org/soap/encoding/" namespace="urn:soap.snakeoil.com" use="encoded"/> http://schemas.xmlsoap.org/soap/encoding/" namespace="urn:soap.snakeoil.com" use="encoded"/> http://localhost:8080/ws/PresentationWeb/LoginFacade"/> == The HTTP SOAP request: == POST http://localhost:8080/ws/PresentationWeb/LoginFacade HTTP/1.0 Accept: */* Accept-Language: fr Referer: http://localhost:8080/ws/Infrastructure/RTInfra/LTR/Framework/Buttons.htm soapaction: "" Content-Type: text/xml; charset=UTF-8 Pragma: no-cache User-Agent: Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; .NET CLR 1.1.4322) Host: localhost:8080 Content-Length: 1673 Proxy-Connection: Keep-Alive Cookie: JSESSIONID=C0FEBB86788FA150BBF483C08E71F2FA http://schemas.xmlsoap.org/soap/encoding/" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:apachesoap="http://xml.apache.org/xml-soap" xmlns:impl="urn:soap.snakeoil.com" xmlns:intf="urn:soap.snakeoil.com" xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/" xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/" xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/" xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"> >40220086789952336812 soap.snakeoil.com" xmlns="">< == StackTrace: == faultDetail: {http://xml.apache.org/axis/}stackTrace:java.lang.ClassCastException: java.lang.String at org.apache.axis.message.EnvelopeBuilder.startElement(EnvelopeBuilder.java:77) at org.apache.axis.encoding.DeserializationContext.startElement(DeserializationContext.java:1048) at com.sun.org.apache.xerces.internal.parsers.AbstractSAXParser.startElement(AbstractSAXParser.java:533) at com.sun.org.apache.xerces.internal.impl.XMLNSDocumentScannerImpl.scanStartElement(XMLNSDocumentScannerImpl.java:330) at com.sun.org.apache.xerces.internal.impl.XMLNSDocumentScannerImpl$NSContentDispatcher.scanRootElementHook(XMLNSDocumentScannerImpl.java:779) at com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl$FragmentContentDispatcher.dispatch(XMLDocumentFragmentScannerImpl.java:1794) at com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl.scanDocument(XMLDocumentFragmentScannerImpl.java:368) at com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse(XML11Configuration.java:834) at com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse(XML11Configuration.java:764) at com.sun.org.apache.xerces.internal.parsers.XMLParser.parse(XMLParser.java:148) at com.sun.org.apache.xerces.internal.parsers.AbstractSAXParser.parse(AbstractSAXParser.java:1242) at javax.xml.parsers.SAXParser.parse(SAXParser.java:375) 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.server.AxisServer.initSOAPConstants(AxisServer.java:345) at org.apache.axis.server.AxisServer.invoke(AxisServer.java:279) at org.apache.axis.transport.http.AxisServlet.doPost(AxisServlet.java:699) at javax.servlet.http.HttpServlet.service(HttpServlet.java:709) at org.apache.axis.transport.http.AxisServletBase.service(AxisServletBase.java:327) at javax.servlet.http.HttpServlet.service(HttpServlet.java:802) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:252) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173) at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:213) at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:178) at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:126) at org.apache.catalina
ANNOUNCE : Axis 1.3 Release
Greetings, Web Services fans. The Axis team is pleased to announce the availability of Axis (Java) version 1.3. This version gives Axis the ability to run inside applets, more efficiently process attachments, and preliminary support for MTOM, not to mention the usual round of bug fixes. More info is available in the changelog.html in the release. You can find the release at: http://www.apache.org/dyn/closer.cgi/ws/axis/1_3/ The Axis webpage (which contains info on mailing lists, bug reports, etc) can be found, as always, at: http://ws.apache.org/axis Thanks, and enjoy! --Glen Daniels on behalf of the Axis team
Re: Newbie - file upload with axis2?
You can use SAAJ and have the client application send the file to the web service as a SOAP attachment and the service will retreive the attachment and store it on the server. >-Original Message->From: Antony Grinyer [mailto:[EMAIL PROTECTED]>Sent: Tuesday, October 11, 2005 05:59 AM>To: axis-user@ws.apache.org>Subject: Newbie - file upload with axis2?>>Hi all,>>This is my first mail to the list as I am new to axis2 development. I am>using axis2 and resin 2.1.0, and I have developed a basic web service>which allows me to retrieve information from the database using basic>http parameters as arguments to web service calls e.g.>>http://localhost:8080/axis2/services/myservice/getPerson?db=myDb&personI>D=10>>>I would now like to write a method to upload a zip file from a client to>the server using a web service call convention like:>>http://localhost:8080/axis2/services/myservice/uploadZip?path=c:\data\xm>l.zip>>Which takes the file from the client machine and dumps it on the server.>This file will then be unzipped at the server end and processed to>upload XML to a database.>>I am using AXIOM for my web service methods to process all the web>service calls e.g.>>public OMElement uploadZip(OMElement element)> throws XMLStreamException>{> QName qn = new QName("path");> OMElement e = element.getFirstChildWithName(qn);> String pathToZip = e.getText();>> // missing implementation - what goes here?>}>>...however I am completely mystified how I can implement this service to>actually get the file from the client and put it on the server? i.e. how>can my uploadZip method get the file from the client for the server to>process?>>I can't find any examples anywhere on how to do this, therefore any>help/advice would be gratefully received!>>Many thanks in advance,>Antony
RE: Help with Axis Handlers!!
Thanks Arun! I have been using Axis' handlers, now I have switched to JAXPRC Handlers like you suggested. One problem, though.. in my scenario, I have just one Handler class, and I make use of the handleRequest (return false) and handleResponse (return true) methods to process my request and response , and completely avoid execution of the actual end point by returning false from handleRequest method. In my handleResponse , I need to set a new message into the messagecontext . I do it like this.. ByteArrayInputStream bis = new ByteArrayInputStream(response.getBytes());InputSource is = new InputSource((java.io.InputStream)bis); SOAPMessage soapMessage= MessageFactory.newInstance().createMessage(); DocumentBuilder parser = DocumentBuilderFactory.newInstance().newDocumentBuilder();Document soapDoc = parser.parse(is); soapMessage.getSOAPPart().getEnvelope().getBody().addDocument(soapDoc); ((SOAPMessageContext)context).setMessage(soapMessage); // Is there a setResponseMessage( ) instead?((SOAPMessageContext)context).getMessage().writeTo(System.out); The handleResponse proceeds with out any errors, but in the response at the client side, i keep getting a "Server Error" SOAP fault message. I am pretty sure that the message I am setting in the SOAPMessageContext is a 'good' SOAP message, since it was working while I was using Axis Handlers.. Any idea what is going wrong? Any help would be greatly appreciated. Thanks again Jose Mathew From: Soactive Inc [mailto:[EMAIL PROTECTED] Sent: Sunday, October 09, 2005 1:04 AMTo: axis-user@ws.apache.orgSubject: Re: Help with Axis Handlers!! You need to return false in the request handling function of the handler that you would like to skip rest of the handlers:public boolean handleRequest(MessageContext mc) { // some logic // once you decide to quit the remainder of the chain, set the appropriate response message and return false context.setResponseMessage(someResponseMessage); return false;}-Arun On 10/7/05, Mathew, Jose <[EMAIL PROTECTED]> wrote: I am using Axis 1.2 As part of something I am trying to do, I would like to break out of a Request handler I have for a service, and return a SOAP response, without going further down the chain (skip deserialization etc) . Is this possible? Can anyone help me with any tips? Thanks. Jose Mathew
Duplicate operation names
Hi I'm being given an error from axis because the wsdl file of the webservices I'm trying to make calls to defines two different operations with the same name. I've contacted the owners of the webservice and they assure me that it isn't a mistake in their wsdl, the service is designed that way as each of the two operations take different parameters and which is being called is dynamically determined by the server based on the parameters passed. Sadly my code doesn't get as far as making the call as axis seems unhappy with there being two operations with the same name. Does anyone know if the wsdl specification explicitly prohibits operation-name overloading like this or is the object specific to axis? The exception I get is below, as the wsdl contains two operations name CardPaymentRequest (I've masked the portType, it is correct in the original output) javax.xml.rpc.ServiceException: Error processing WSDL document: java.lang.IllegalArgumentException: Duplicate operation with name=CardPaymentRequest, found in portType '{http://xxx.xxx.xxx.uk/}CardPaymentsSoap'. at org.apache.axis.client.Service.initService(Service.java:249) at org.apache.axis.client.Service.(Service.java:164) at org.apache.axis.client.ServiceFactory.createService(ServiceFactory.java:198) at govConnect.WebServiceTools.(WebServiceTools.java:79) at ep.callWS.service(callWS.java:58) at javax.servlet.http.HttpServlet.service(HttpServlet.java:810) at org.apache.catalina.servlets.InvokerServlet.serveRequest(InvokerServlet.java:419) at org.apache.catalina.servlets.InvokerServlet.doPost(InvokerServlet.java:169) at javax.servlet.http.HttpServlet.service(HttpServlet.java:717) at javax.servlet.http.HttpServlet.service(HttpServlet.java:810) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:237) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:157) at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:214) at org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:104) at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:520) at org.apache.catalina.core.StandardContextValve.invokeInternal(StandardContextValve.java:198) at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:152) at org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:104) at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:520) at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:137) at org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:104) at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:117) at org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:102) at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:520) at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109) at org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:104) at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:520) at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:929) at org.apache.coyote.tomcat5.CoyoteAdapter.service(CoyoteAdapter.java:160) at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:793) at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.processConnection(Http11Protocol.java:702) at org.apache.tomcat.util.net.TcpWorkerThread.runIt(PoolTcpEndpoint.java:571) at org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:644) at java.lang.Thread.run(Thread.java:536) Chris MannionIT Junction020 8452 4274
Changing namespaces
Hi, I have to port an application which ran on Weblogic server with its webservices framework to tomcat/axis. Later i'll try to run it back on Weblogic with axis. This application uses Microsoft Webservices components (htc). I know it sucks but I can't change it. Of course, I have troubles with htc when the WSDL file hasn't namespaces like they should be (for htc): I get an "invalid port exception" . Actually, I managed to make it work by using the following namespaces: xmlns="http://schemas.xmlsoap.org/wsdl/" and xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/" in the WSDL file instead of xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/" and xmlns:wsdlsoap="http://schemas.xmlsoap.org/wsdl/soap/ " To change the namespaces I manually edited the result of the autogenerated WSDL file and copied it into a file. In the server-config.wsdd i added the following line to use my own WSDL file: /LoginFacade.wsdl Actually I would like to use the WSDL file generated by the server-config.wsdd instead of editing each WSDL file for all my webservices. Is there an option to change the namespaces of the WSDL file in the Webservices descriptor server-config.wsdd ? (I haven't found it) thanks, Luc
RE: finding client-config.wsdd icw WebStart
John, You can still try using an XMLStringProvider. It should work if you figure out the possible encoding problems. You can also include a client-config.wsdd file in one of the jars that are on the classpath. Axis is able to retrieve it there. Even better, you can build programmatically a customized Axis configuration engine by implementing the interface org.apache.axis.EngineConfiguration. You can find some sample code here: http://wiki.apache.org/ws/FrontPage/Axis/AxisClientConfiguration Regards, Tony ELSOKHON -Message d'origine- De : Johan Walters [mailto:[EMAIL PROTECTED] Envoyé : mardi 11 octobre 2005 14:18 À : axis-user@ws.apache.org Objet : finding client-config.wsdd icw WebStart I'm having a strange problem I cannot figure out. I am using Axis 1.2. Currently, I have a working webstart application that uses axis. It is able to communicate succesfully to my server using soap. Now I would like to implement soap-header based sessions. In order to do that, I have to supply a client-config.wsdd file to the client. There are 4 ways to to this: 1) Put the client-config.wsdd file in the working directory. Since webstart only uses weird cache directories, this is no option. 2) Put the client-config.wsdd file in the classpath. There is no option for inlcuding new directories to the classpath once webstart (and thus the VM) is running, right? So no-go here either. 3) Put the client-config.wsdd file somewhere you like and put the parent directory of the file in a system property called axis.ClientConfigFile. This gives me the following error (just the first few lines): org.apache.axis.InternalException: org.apache.axis.ConfigurationException: org.apache.axis.ConfigurationException: No engine configuration file - aborting! org.apache.axis.ConfigurationException: No engine configuration file - abor= ting! at org.apache.axis.configuration.FileProvider.configureEngine(FileP= rovider.java:175) at org.apache.axis.AxisEngine.init(AxisEngine.java:172) at org.apache.axis.AxisEngine.(AxisEngine.java:156) at org.apache.axis.client.AxisClient.(AxisClient.java:52) at org.apache.axis.client.Service.getAxisClient(Service.java:103) at org.apache.axis.client.Service.(Service.java:112) at client.JarDistributionServiceLocator. ... ... Somehow, the FileProvider failed to load the file. 4) I created a FileProvider myself, and even tried a XMLStringProvider like this: XP =3D new XMLStringProvider(StringContainingClientConfigWSDD) ... locator =3D new JarDistributionServiceLocator(); XP.configureEngine(locator.getEngine()); Both the FileProvider and XMLStringProvider give the following error: org.apache.axis.InternalException: org.apache.axis.ConfigurationException: org.xml.sax.SAXException: Fatal Error: URI=3Dnull Line=3D-1: Premature end of file. org.xml.sax.SAXException: Fatal Error: URI=3Dnull Line=3D-1: Premature end = of file. at org.apache.axis.utils.XMLUtils$ParserErrorHandler.fatalError (XMLUtils.java:723) at com.sun.org.apache.xerces.internal.util.ErrorHandlerWrapper.fata= lError(Unknown Source) at com.sun.org.apache.xerces.internal.impl.XMLErrorReporter.reportE= rror(Unknown Source) at com.sun.org.apache.xerces.internal.impl.XMLErrorReporter.reportE= rror(Unknown Source) at com.sun.org.apache.xerces.internal.impl.XMLVersionDetector.deter= mineDocVersion(Unknown Source) at com.sun.org.apache.xerces.internal.parsers.XML11Configuration.pa= rse(Unknown Source) at com.sun.org.apache.xerces.internal.parsers.XML11Configuration.pa= rse(Unknown Source) at com.sun.org.apache.xerces.internal.parsers.XMLParser.parse(Unkno= wn Source) at com.sun.org.apache.xerces.internal.parsers.DOMParser.parse(Unkno= wn Source) at com.sun.org.apache.xerces.internal.jaxp.DocumentBuilderImpl.pars= e(Unknown Source) at org.apache.axis.utils.XMLUtils.newDocument(XMLUtils.java:369) at org.apache.axis.utils.XMLUtils.newDocument(XMLUtils.java:388) at org.apache.axis.configuration.FileProvider.configureEngine(FileP= rovider.java:179) at org.apache.axis.AxisEngine.init(AxisEngine.java:172) at org.apache.axis.AxisEngine.(AxisEngine.java:156) at org.apache.axis.client.AxisClient.(AxisClient.java:52) at org.apache.axis.client.Service.getAxisClient(Service.java:103) at org.apache.axis.client.Service.(Service.java:112) at client.JarDistributionServiceLocator.(JarDistributionServi= ceLocator.java:12) at client.GridClassLoader.init(GridClassLoader.java:81) at client.GridClassLoader.(GridClassLoader.java:51) at client.Client.main(Client.java:97) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source) at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) at java.lang.reflect.Method.invoke(Unknown Source) at netx.jnlp
finding client-config.wsdd icw WebStart
I'm having a strange problem I cannot figure out. I am using Axis 1.2. Currently, I have a working webstart application that uses axis. It is able to communicate succesfully to my server using soap. Now I would like to implement soap-header based sessions. In order to do that, I have to supply a client-config.wsdd file to the client. There are 4 ways to to this: 1) Put the client-config.wsdd file in the working directory. Since webstart only uses weird cache directories, this is no option. 2) Put the client-config.wsdd file in the classpath. There is no option for inlcuding new directories to the classpath once webstart (and thus the VM) is running, right? So no-go here either. 3) Put the client-config.wsdd file somewhere you like and put the parent directory of the file in a system property called axis.ClientConfigFile. This gives me the following error (just the first few lines): org.apache.axis.InternalException: org.apache.axis.ConfigurationException: org.apache.axis.ConfigurationException: No engine configuration file - aborting! org.apache.axis.ConfigurationException: No engine configuration file - abor= ting! at org.apache.axis.configuration.FileProvider.configureEngine(FileP= rovider.java:175) at org.apache.axis.AxisEngine.init(AxisEngine.java:172) at org.apache.axis.AxisEngine.(AxisEngine.java:156) at org.apache.axis.client.AxisClient.(AxisClient.java:52) at org.apache.axis.client.Service.getAxisClient(Service.java:103) at org.apache.axis.client.Service.(Service.java:112) at client.JarDistributionServiceLocator. ... ... Somehow, the FileProvider failed to load the file. 4) I created a FileProvider myself, and even tried a XMLStringProvider like this: XP =3D new XMLStringProvider(StringContainingClientConfigWSDD) ... locator =3D new JarDistributionServiceLocator(); XP.configureEngine(locator.getEngine()); Both the FileProvider and XMLStringProvider give the following error: org.apache.axis.InternalException: org.apache.axis.ConfigurationException: org.xml.sax.SAXException: Fatal Error: URI=3Dnull Line=3D-1: Premature end of file. org.xml.sax.SAXException: Fatal Error: URI=3Dnull Line=3D-1: Premature end = of file. at org.apache.axis.utils.XMLUtils$ParserErrorHandler.fatalError (XMLUtils.java:723) at com.sun.org.apache.xerces.internal.util.ErrorHandlerWrapper.fata= lError(Unknown Source) at com.sun.org.apache.xerces.internal.impl.XMLErrorReporter.reportE= rror(Unknown Source) at com.sun.org.apache.xerces.internal.impl.XMLErrorReporter.reportE= rror(Unknown Source) at com.sun.org.apache.xerces.internal.impl.XMLVersionDetector.deter= mineDocVersion(Unknown Source) at com.sun.org.apache.xerces.internal.parsers.XML11Configuration.pa= rse(Unknown Source) at com.sun.org.apache.xerces.internal.parsers.XML11Configuration.pa= rse(Unknown Source) at com.sun.org.apache.xerces.internal.parsers.XMLParser.parse(Unkno= wn Source) at com.sun.org.apache.xerces.internal.parsers.DOMParser.parse(Unkno= wn Source) at com.sun.org.apache.xerces.internal.jaxp.DocumentBuilderImpl.pars= e(Unknown Source) at org.apache.axis.utils.XMLUtils.newDocument(XMLUtils.java:369) at org.apache.axis.utils.XMLUtils.newDocument(XMLUtils.java:388) at org.apache.axis.configuration.FileProvider.configureEngine(FileP= rovider.java:179) at org.apache.axis.AxisEngine.init(AxisEngine.java:172) at org.apache.axis.AxisEngine.(AxisEngine.java:156) at org.apache.axis.client.AxisClient.(AxisClient.java:52) at org.apache.axis.client.Service.getAxisClient(Service.java:103) at org.apache.axis.client.Service.(Service.java:112) at client.JarDistributionServiceLocator.(JarDistributionServi= ceLocator.java:12) at client.GridClassLoader.init(GridClassLoader.java:81) at client.GridClassLoader.(GridClassLoader.java:51) at client.Client.main(Client.java:97) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source) at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) at java.lang.reflect.Method.invoke(Unknown Source) at netx.jnlp.Launcher.launchApplication(Launcher.java:305) at netx.jnlp.Launcher$TgThread.run(Launcher.java:466) It seems the XML parser crashes instantly. I am out of clues why things are not working as they should! The client-config.wsdd file is generated by axis using "org.apache.axis.utils.Admin client deploy.wsdd" where the handlers are defined in deploy.wsdd. My client-config.wsdd itself looks like this: http://xml.apache.org/axis/wsdd/"; xmlns:java=3D"http://xml.apache.org/axis/wsdd/providers/java";> Is there anyone who knows why the mentioned errors occur? Some clues or solutions? Johan Walters
RE: Newbie - file upload with axis2?
> I would now like to write a method to upload a zip file from a client to > the server using a web service call convention like: > > http://localhost:8080/axis2/services/myservice/uploadZip?path=c:\data\xm > l.zip This is not technically possible as your server will not have access to the client's file system ("c:\data\xml.zip" does not mean anything to your server). This would normally be achieved using SOAP attachments, see the "SAAJ" API (http://java.sun.com/webservices/saaj/index.jsp) which Axis supports. CONFIDENTIALITY & PRIVILEGE NOTICE This e-mail is confidential to its intended recipient. It may also be privileged. Neither the confidentiality nor any privilege attaching to this e-mail is waived lost or destroyed by reason that it has been mistakenly transmitted to a person or entity other than its intended recipient. If you are not the intended recipient please notify us immediately by telephone or fax at the numbers provided above or e-mail by Reply To Author and return the printed e-mail to us by post at our expense. We believe, but do not warrant, that this e-mail and any attachments are virus-free, but you should check. We may monitor traffic data of both business and personal e-mails. We are not liable for any opinions expressed by the sender where this is a non-business e-mail. If you do not receive all the message, or if you have difficulty with the transmission, please telephone us immediately.
Re: Newbie - file upload with axis2?
What you suggest is not a natural use of SOAP and I doubt that Axis supports it. The whole point of SOAP is that everything that sent to the server travels in the SOAP enevlope or as an attachement to it. You shouldn't expect a SOAP-client engine automatically to turn bits of URL into bits of SOAP bdy or into attachments. You could solve this in several ways. 1. Write a document/literal service that loads the contents of the request body into the XML DB. I.e., your client reads the file on the client machine and puts its (XML) contents directly inside the SOAP body request message. You can only put XML in here, not zipped files. 2. Write a service and client that send the zipped file as an attachement to the SOAP message. In this case, the SOAP body of the request message might be empty, as the service need only have the one operation "upload XML document" and that operation wouldn't need parameters to the SOAP part since its sementics would be fixed: "find first attachement, unpack and load into DB". 3. Write a non-SOAP HTTP servlet that goes into your web-app alongside the axis servlet and accepts file upload using HTTP Put. In this case, the path to your upload-servlet can't be http://localhost:8080/axis2/services/myservice/uploadZip?path=... as that clashes with the Axis servlet, but you could have something like http://localhost:8080/axis2/uploadZip?path=... On Tue, 11 Oct 2005, Antony Grinyer wrote: > Hi all, > > This is my first mail to the list as I am new to axis2 development. I am > using axis2 and resin 2.1.0, and I have developed a basic web service > which allows me to retrieve information from the database using basic > http parameters as arguments to web service calls e.g. > > http://localhost:8080/axis2/services/myservice/getPerson?db=myDb&personI > D=10 > > > I would now like to write a method to upload a zip file from a client to > the server using a web service call convention like: > > http://localhost:8080/axis2/services/myservice/uploadZip?path=c:\data\xm > l.zip > > Which takes the file from the client machine and dumps it on the server. > This file will then be unzipped at the server end and processed to > upload XML to a database. > > I am using AXIOM for my web service methods to process all the web > service calls e.g. > > public OMElement uploadZip(OMElement element) > throws XMLStreamException > { > QName qn = new QName("path"); > OMElement e = element.getFirstChildWithName(qn); > String pathToZip = e.getText(); > >// missing implementation - what goes here? > } > > ...however I am completely mystified how I can implement this service to > actually get the file from the client and put it on the server? i.e. how > can my uploadZip method get the file from the client for the server to > process? > > I can't find any examples anywhere on how to do this, therefore any > help/advice would be gratefully received! > > Many thanks in advance, > Antony > > > > Guy Rixon [EMAIL PROTECTED] Institute of Astronomy Tel: +44-1223-337542 Madingley Road, Cambridge, UK, CB3 0HA Fax: +44-1223-337523
webservice & oracle
Hello, I'm a bit lost...i'm trying to developp a webservice on axis1.2 using tomcat 5.5.11 my service have to keep lists of geographical objects from oracle...but i have this message... methods of connection works fine in eclipse but i have this error message: 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:bouba need some helpplease
Newbie - file upload with axis2?
Hi all, This is my first mail to the list as I am new to axis2 development. I am using axis2 and resin 2.1.0, and I have developed a basic web service which allows me to retrieve information from the database using basic http parameters as arguments to web service calls e.g. http://localhost:8080/axis2/services/myservice/getPerson?db=myDb&personI D=10 I would now like to write a method to upload a zip file from a client to the server using a web service call convention like: http://localhost:8080/axis2/services/myservice/uploadZip?path=c:\data\xm l.zip Which takes the file from the client machine and dumps it on the server. This file will then be unzipped at the server end and processed to upload XML to a database. I am using AXIOM for my web service methods to process all the web service calls e.g. public OMElement uploadZip(OMElement element) throws XMLStreamException { QName qn = new QName("path"); OMElement e = element.getFirstChildWithName(qn); String pathToZip = e.getText(); // missing implementation - what goes here? } ...however I am completely mystified how I can implement this service to actually get the file from the client and put it on the server? i.e. how can my uploadZip method get the file from the client for the server to process? I can't find any examples anywhere on how to do this, therefore any help/advice would be gratefully received! Many thanks in advance, Antony
Problem with WSDL4J
I am using wsdl4j apis to manipulate one wsdl file. But I am having one small problem. I am trying to add one message in the wsdl,i am printing the definition whether it is having the msg or not,it is showing the msg in the definition. But when I write with the WSDLWriter the message which I added is not being shown. How can I find out what I am doing wrong ? This is my code WSDLReaderImpl wsdlReaderImpl = new WSDLReaderImpl(); Definition definition = wsdlReaderImpl.readWSDL("One.wsdl"); Part userNamePart = definition.createPart(); userNamePart.setName("i"); userNamePart.setTypeName(new QName("http://www.w3.org/2001/XMLSchema","string";)); Part passwordPart = definition.createPart(); passwordPart.setName("j"); passwordPart.setTypeName(new QName("http://www.w3.org/2001/XMLSchema","string";)); Message msg = definition.createMessage(); QName qName = new QName("msg"); msgSecurity.setQName(qName); msgSecurity.addPart(iPart); msgSecurity.addPart(jPart); definition.addMessage(msg); WSDLWriterImpl wsdlWriterImpl = new WSDLWriterImpl(); wsdlWriterImpl.writeWSDL(definition, System.out); Thanks in advance. Can anyone let me know,whether I need to add anything else or not? Anshuk __ Start your day with Yahoo! - Make it your home page! http://www.yahoo.com/r/hs