RE: Problem with Wrapped Literal style in .NET client
I also had this problem: 2 things: 1) It is possible that your temporary directory is not accessible by the .NET accounts - your program can't create the temporary assemblies. 2) .NET can't serialize an object and the assembly is not created - use the XmlPreCompiler (http://weblogs.asp.net/mnolton/archive/2004/12/01/273027.aspx) program to check wich object can't be serialized and modify the WSDL definition accordingly -Message d'origine- De : Murad [mailto:[EMAIL PROTECTED] Envoyé : lundi 28 février 2005 07:34 À : axis-user@ws.apache.org Objet : Problem with Wrapped Literal style in .NET client Hello All, I am trying to convert rpc encoding style wrapped/literal style.With .NET wsdl tool I am able to generate the proxy classes and dependency quite well. But at the time of running .net application there is an exception(FileNotFoundException) ... What I observed each time .NET application is trying to create a dll dynamically and try to load it later in the temp directory.I provided all the neccessary previleges into this directory.But the same error is still there.What I see this exception dont occur with rpc encoded style. I have an existing code base using rpc literal style.I want to convert this into either document or wrapped style. Which one would be better? Which conversion will be easier? In my proxy class I have methods with complex signatures(which are working nice with existing rpc encoded scheme). Please suggest. Regards, Murad
Re: Problem with Wrapped Literal style in .NET client
Thanks.. You showed two ways to track the problem. With number 2 I found no errors in deserializing my classes associated with the proxy. For number 1.I also provide all possible priviledges to the temp directory. On Mon, 28 Feb 2005 09:58:02 +0100, Gilles Devaux [EMAIL PROTECTED] wrote: I also had this problem: 2 things: 1) It is possible that your temporary directory is not accessible by the .NET accounts - your program can't create the temporary assemblies. 2) .NET can't serialize an object and the assembly is not created - use the XmlPreCompiler (http://weblogs.asp.net/mnolton/archive/2004/12/01/273027.aspx) program to check wich object can't be serialized and modify the WSDL definition accordingly -Message d'origine- De : Murad [mailto:[EMAIL PROTECTED] Envoyé : lundi 28 février 2005 07:34 À : axis-user@ws.apache.org Objet : Problem with Wrapped Literal style in .NET client Hello All, I am trying to convert rpc encoding style wrapped/literal style.With .NET wsdl tool I am able to generate the proxy classes and dependency quite well. But at the time of running .net application there is an exception(FileNotFoundException) ... What I observed each time .NET application is trying to create a dll dynamically and try to load it later in the temp directory.I provided all the neccessary previleges into this directory.But the same error is still there.What I see this exception dont occur with rpc encoded style. I have an existing code base using rpc literal style.I want to convert this into either document or wrapped style. Which one would be better? Which conversion will be easier? In my proxy class I have methods with complex signatures(which are working nice with existing rpc encoded scheme). Please suggest. Regards, Murad -- Best regards, Murad
SwA
I'm trying to send large attachments to my service based on the example found at http://viewcvs.globus.org/viewcvs.cgi/axis/java/samples/swa/ the service works great for small attachments but when trying to add large attachments I get java.lang.OutOfMemoryError exception. when using call.addAttachmentPart() and DIME I can send attachments of any size. (Attachments can be then amount of memory in my machine) What is the best way to describe in my wsdl that the service accepts DIME attachments, I'd really like to stay away from using DataHandler in the wsdl. Thanks
Re: JWSDP web service
I am trying to get the response from a jax rpc web service as a soapmessage or soapenvelope as we do in axis. Also jaxm support it but as an a servlet. But i want it as an web serivce so what should i do with jwsdp?Anne Thomas Manes [EMAIL PROTECTED] wrote: Please explain better what you're trying to do and what problem you're having.On Mon, 28 Feb 2005 02:25:03 -0800 (PST), Sandeep Gaikwad<[EMAIL PROTECTED]>wrote: Can anyone help me for passing the SOAP message as return from a JAX-RPC web service. Do you Yahoo!? Yahoo! Mail - You care about security. So do we. Do you Yahoo!? Yahoo! Sports - Sign up for Fantasy Baseball.
RE: Accessing Headers From WSDL2Java Generated Code
Thanks Tore, But I am unsure how to access the MessageContext in the client side - I presume I need to implement my own Handler to do this? Thanks James [EMAIL PROTECTED] 28/02/2005 16:31 Please respond to axis-user@ws.apache.org To axis-user@ws.apache.org cc Subject RE: Accessing Headers From WSDL2Java Generated Code Hei James, I insert some code that I made for accessing my header elements on the server side. The header elements requestId, username and password are placed in the header when the client call is made and I retrieve them for use in a system that its own authentication functionality. Here it is, may be you find it useful also on the client side: method /** * Method codegetHeaderElements/code sets in memory the SOAP header elements 'requestId' * and wraps the username and password in a AuthPrincipal object. It also find and sets * the API method name. * p * This method serves all requests that uses SOAP. */ private void getHeaderElements() throws RemoteException, Exception { /* declare and initialize method wide variables */ SOAPHeaderElement headerElement; this.methodName = MessageContext.getCurrentContext().getOperation().getName(); try { Iterator iter = MessageContext.getCurrentContext().getMessage().getSOAPPart().getEnvelope().g etHeader() .extractHeaderElements(null); while (iter.hasNext()) { headerElement = (SOAPHeaderElement) iter.next(); if (headerElement.getName().equals(requestId)) { this.requestId = headerElement.getValue(); } else if (headerElement.getName().equals(username)) { this.username = headerElement.getValue(); } else if (headerElement.getName().equals(password)) { this.password = headerElement.getValue(); } else if (!headerElement.getName().equals(requestId)) { throw new Exception(WebServiceManager::getHeaderElements:: + methodName + . RequestId not found in SOAP Header); } } this.principal = new AuthPrincipal(username, password); } catch (Exception e) { log.error(WebServiceManager::getHeaderElements:: + methodName + - Exception occured: , e); throw e; } } /method Regards from Tore -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] Sent: 25. februar 2005 15:52 To: axis-user@ws.apache.org Subject: Accessing Headers From WSDL2Java Generated Code Hi. I'm trying to access the header from the responses I get from a SOAP Server. However, I'm using code generated by the WSDL2Java tool, so I can't seem to find a way to read the headers of these responses. Do I need to alter my generated code, or is there a better way - perhaps I need to provide another parameter when generating the code? I'd appreciate any help. Thanks James, This email is intended solely for the use of the named addressee(s). Any unauthorised disclosure, copying or distribution of the confidential information contained therein, or the taking of any action based on it, is prohibited. The sender disclaims any liability for the integrity of this email. Legally binding declarations must be in written form.
Re: Using Axis 1.2RC2 stubs with Axis 1.1 ?
nope On Mon, 28 Feb 2005 10:50:02 -0600, sandeep arshanapally [EMAIL PROTECTED] wrote: You should be able to do that. Sandeep On Mon, 28 Feb 2005 17:46:16 +0100, Sebastien Mayemba Mbokoso [EMAIL PROTECTED] wrote: Hi, just a question. I heard Axis 1.1 Ant Tasks don't work very well cause of its many bugs. Does anybody know if i can use generated stubs by Axis 1.2RC2 with Axis 1.1 ? --- Sebastien -- Davanum Srinivas - http://webservices.apache.org/~dims/
Axis service deploy on tomcat timeout
Hi all, I have been in development or a few weeks on an axis based web service. It has worked very well in dev. Now that I am deploying for production though, I find that it takes upwards of an hour for the service to become available after the tomcat server comes up. After the server is up I can hit the service at will, no problem. I used JBuilder enterprise to create the service (it has a built in Axis wizard thinger) and I have it making the war file with all of the required libraries included. I hit the axis console page and the service validates immediately upon server startup, all of the wsdl for the methods is available instantly as well. It is just when you actually send a method request that the timeout happens. And each time you submit a request, the load number increments. Eventually the requests are all processed... sometimes an hour or more later. Has anyone seen anything like this at all? I would appreciate any and all help on this :-) Thanks, Adam
Re: Using Axis 1.2RC2 stubs with Axis 1.1 ?
May be I misunderstood this, if the question is that you are generating stubs using Axis1.1 and running with Axis1.2 then it should be fine. Dims -- Do you think we will have issues with this?? Sandeep On Mon, 28 Feb 2005 11:53:43 -0500, Davanum Srinivas [EMAIL PROTECTED] wrote: nope On Mon, 28 Feb 2005 10:50:02 -0600, sandeep arshanapally [EMAIL PROTECTED] wrote: You should be able to do that. Sandeep On Mon, 28 Feb 2005 17:46:16 +0100, Sebastien Mayemba Mbokoso [EMAIL PROTECTED] wrote: Hi, just a question. I heard Axis 1.1 Ant Tasks don't work very well cause of its many bugs. Does anybody know if i can use generated stubs by Axis 1.2RC2 with Axis 1.1 ? --- Sebastien -- Davanum Srinivas - http://webservices.apache.org/~dims/
Fault code not being reported when CastorSerializer throws exception
Hi, I am seeing a validation failure in my response (which is an application failure that I will correct), but the associated fault code isnt being reported back to the client. Here is the exception that I see in the application server logs : [2/28/05 11:19:34:782 CST] 35205df6 SystemOut U - Exception: AxisFault faultCode: {http://schemas.xmlsoap.org/soap/envelope/}Server.userException faultSubcode: faultString: java.io.IOException: Message doesn't comply with the associated XML schema :The following exception occured while validating field: _items of class: services.ice.catalog.details.DetailResponseType faultActor: faultNode: faultDetail: {http://xml.apache.org/axis/}stackTrace:java.io.IOException: Message doesn't comply with the associated XML schema :The following exception occured while validating field: _items of class: services.ice.catalog.details.DetailResponseType at org.apache.axis.encoding.ser.castor.CastorSerializer.serialize(CastorSerializer.java:120) at org.apache.axis.encoding.SerializationContext.serializeActual(SerializationContext.java:1353) at org.apache.axis.encoding.SerializationContext.serialize(SerializationContext.java:880) at org.apache.axis.message.RPCParam.serialize(RPCParam.java:177) But on the client side, I get an empty response with an HTTP status code of 200. Has anyone seen this behaviour? Any known fixes? I am using 1.2RC2 on WebSphere v4. Thanks, Kenneth
RE: Using axis ant task with typed enums
Or you can read in the jax-rpc spec 1.1 on how to write the java 1.4 enums in such a way that the axis engine will generate an enum that anne gave an example for... mainly the following: //Java public class enumeration_name { // ... // Constructor protected enumeration_name(base_type value) { ... } // One for each label in the enumeration public static final base_type _label = value; public static final enumeration_name label = new enumeration_name(_label); // Gets the value for a enumerated value public base_type getValue() {...} // Gets enumeration with a specific value // Required to throw java.lang.IllegalArgumentException if // any invalid value is specified public static enumeration_name fromValue(base_type value) { ... } // Gets enumeration from a String // Required to throw java.lang.IllegalArgumentException if // any invalid value is specified public static enumeration_name fromString(String value){ ... } // Returns String representation of the enumerated value public String toString() { ... } public boolean equals(Object obj) { ... } public int hashCode() { ... } } -Original Message- From: Anne Thomas Manes [mailto:[EMAIL PROTECTED] Sent: Montag, 28. Februar 2005 16:41 To: axis-user@ws.apache.org Subject: Re: Using axis ant task with typed enums Ulrich, First of all, WSDL does not contain any class descriptions. WSDL contains element and type descriptions -- specified using XML Schema. If you read through the archives, you will see frequent recommendations to take a WSDL first or Schema first approach to web services rather than a Java first approach. Here is an example of a definition of simple type that is an enumeration of string values: xs:simpleType name=MyEnum xs:restriction base=xs:string xs:enumeration value=value1/ xs:enumeration value=value2/ /xs:restriction /xs:simpleType Anne On Sun, 27 Feb 2005 23:20:30 +0100, Ulrich Ackermann [EMAIL PROTECTED] wrote: Hi, in the meantime I came to the conclusion, that my question has no solution that could satisfy me. I fear that there is no way to create a WSDL file containing a class description, where the class contains just public static members (or does the WSDL spec offer a way to express such things?). Could anyone confirm my assumption? Is there an alternative way to restrict the value of a method parameter to a set of predefined String values? Regards, Ulrich axis-user@ws.apache.org schrieb am 27.02.05 00:08:00: Hi, I have a problem using something like typed enums in the signature of my webservice methods (don't know if 'typed enums' is the right term). E.g.: public class MyEnum { private String attribute = null; public static MyEnum VALUE_1 = new MyEnum(value1); // other static values go here private MyEnum(String attribute) { this.attribute = attribute; } // other methods like toString() go here } Now, if I have a method like this in my interface... public void myMethod(String someParam, MyEnum otherParam); ... and run the axis-java2wsdl ant task, the MyEnum class looks quit different than before: axis-java2wsdl added some attributes and implemented the equals and hashcode methods (which is quite ok I guesss...) and removed everything I typed in before in the MyEnum class (which is not ok - at least for me). But maybe this has a reason, and as I'm quite new to webservices this is a feature and not a flaw. Is there a way to keep the intention of the MyEnum class and let the axis ant task generate what I intended? I use the ant task in this way: axis-java2wsdl output=${project.webservice.wsdl.dir}/${project.webservice.ws dl.filename} location=http://${project.webservice.host}:${project.webservi ce.port}/axis/services/${project.webservice.service.namespace} namespace=${project.webservice.service.name} classname=${project.webservice.endpoint.package.structure} classpath path refid=axis.lib.path /path /classpath mapping namespace=service package=service/ /axis-java2wsdl Regards, Ulrich __ Verschicken Sie romantische, coole und witzige Bilder per SMS! Jetzt bei WEB.DE FreeMail: http://f.web.de/?mc=021193 __ Verschicken Sie romantische, coole und witzige Bilder per SMS! Jetzt bei WEB.DE FreeMail: http://f.web.de/?mc=021193 . .
java stand-alone axis client
Hi,I want to use a light version of axis to call webservices in a client =application...Size of the final application is an important factor for me.I am only interested in the client side of axis.Is there a way to reduce the dependecies and axis package size to >have what I need.thanks for your help.DrLeinster.
Why Castor + AXIS?
What's the typical reason for using Castor with AXIS? - AXIS is missing features that Castor has? - Castor is already in use and the org wants to add webservices capability - something else? -Dino -Original Message- From: Kenneth Stephen [mailto:[EMAIL PROTECTED] Sent: Monday, February 28, 2005 12:33 PM To: axis-user@ws.apache.org Subject: Fault code not being reported when CastorSerializer throws exception Hi, I am seeing a validation failure in my response (which is an application failure that I will correct), but the associated fault code isnt being reported back to the client. Here is the exception that I see in the application server logs : [2/28/05 11:19:34:782 CST] 35205df6 SystemOut U - Exception: AxisFault faultCode: {http://schemas.xmlsoap.org/soap/envelope/}Server.userException faultSubcode: faultString: java.io.IOException: Message doesn't comply with the associated XML schema :The following exception occured while validating field: _items of class: services.ice.catalog.details.DetailResponseType faultActor: faultNode: faultDetail: {http://xml.apache.org/axis/}stackTrace:java.io.IOException: Message doesn't comply with the associated XML schema :The following exception occured while validating field: _items of class: services.ice.catalog.details.DetailResponseType at org.apache.axis.encoding.ser.castor.CastorSerializer.serialize(CastorSer ializer.java:120) at org.apache.axis.encoding.SerializationContext.serializeActual(Serializat ionContext.java:1353) at org.apache.axis.encoding.SerializationContext.serialize(SerializationCon text.java:880) at org.apache.axis.message.RPCParam.serialize(RPCParam.java:177) But on the client side, I get an empty response with an HTTP status code of 200. Has anyone seen this behaviour? Any known fixes? I am using 1.2RC2 on WebSphere v4. Thanks, Kenneth
RE: Document/Literal problem with .NET client
We could help if you sent the WSDL and a copy of the request and response. If .NET does not see the namespace it expects, you'll get null. Even the smallest namespace change in the XML response document will cause the .NET client proxy to return null to the application. We saw this with Pradeep's collection of ContainerBeans last week. And someone else posted a similar story, too. But it's not possible to diagnose with just your WSDD file. -Original Message- From: Murad [mailto:[EMAIL PROTECTED] Sent: Saturday, February 26, 2005 4:43 AM To: axis-user@ws.apache.org Subject: Document/Literal problem with .NET client Hello, I am using Axis1.2RC2. .Net clients successfully make a request and axis also produces a successful response(see through TCP monitor). But as a return value I am getting null.Proxy client is generating without giving any error(I am using wsdl.exe comes with visual studio.net).With default options(by not mentioning style and literal attributes) everything works fine. Here is the service element from server-config.wsdd : service name=IRTypeService provider=java:RPC style=document use=literal namespaceurn:ihis/namespace parameter name=allowedMethods value=*/ parameter name=scope value=session/ parameter name=className value=com.sikraft.ihis.inpatient.roomtype.JaxRpcIRTypeService/ beanMapping qname=ihis:IRTypeDTO xmlns:ihis=urn:ihis languageSpecificType=java:com.sikraft.ihis.inpatient.roomtype.IRTypeDTO / beanMapping qname=ihis:PersistantCapable xmlns:ihis=urn:ihis languageSpecificType=java:com.sikraft.welkin.business.PersistantCapable / beanMapping qname=ihis:PersistantCapableDTO xmlns:ihis=urn:ihis languageSpecificType=java:com.sikraft.welkin.business.PersistantCapable DTO/ beanMapping qname=ihis:BusinessEntity xmlns:ihis=urn:ihis languageSpecificType=java:com.sikraft.ihis.common.BusinessEntity/ beanMapping qname=ihis:SearchCapableDTO xmlns:ihis=urn:ihis languageSpecificType=java:com.sikraft.welkin.search.SearchCapableDTO/ beanMapping qname=ihis:SearchableBusinessEntity xmlns:ihis=urn:ihis languageSpecificType=java:com.sikraft.ihis.common.SearchableBusinessEnt ity/ beanMapping qname=ihis:Result xmlns:ihis=urn:ihis languageSpecificType=java:com.sikraft.welkin.business.Result/ beanMapping qname=ihis:GenericException xmlns:ihis=urn:ihis languageSpecificType=java:com.sikraft.welkin.exception.GenericException / beanMapping qname=ihis:SystemException xmlns:ihis=urn:ihis languageSpecificType=java:com.sikraft.welkin.exception.SystemException / beanMapping qname=ihis:BusinessRuleException xmlns:ihis=urn:ihis languageSpecificType=java:com.sikraft.welkin.exception.BusinessRuleExce ption/ /service Please help... Regards, Murad
RE: Speaking of deserialize exceptions
Ah, no. I believe Mariano is saying : WSDL is the contract. The promise that is made between server and client. (I promise, that if you send me a message that looks like X, I will send you a reply that looks like Y). The De-serializer falls under the execution of the contract. That is to say, whether the contract is being fulfilled or not. (Example: A message that looks like X is received, and maybe a message that DOES NOT look like Y is returned.) In order to properly respond to incoming requests, AXIS needs to be able to de-serialize data from the XML. If the server-side AXIS app does not de-serialize, then I suppose it will not be able to honor the WSDL contract. -Original Message- From: Joaco [mailto:[EMAIL PROTECTED] Sent: Friday, February 25, 2005 8:56 AM To: axis-user@ws.apache.org Subject: Re: Speaking of deserialize exceptions Hi mariano, Thenks for your fast answer. So?. you said that wsdl does not have all the information that the client need to understand the server ? Regards Joaco. -- Mensaje original -- Reply-To: axis-user@ws.apache.org Date: Fri, 25 Feb 2005 09:13:11 +0100 From: Mariano Eloy Fernández [EMAIL PROTECTED] To: axis-user@ws.apache.org Subject: Re: Speaking of deserialize exceptions Hi Joaco, The client probably does not work because if you remove that particular deserializer the server does not know how to deserialize incoming XML request from your client (.NET). WSDL does not change becouse De/Serializers and WSDL are two different things. Regards, Mariano. Joaco wrote: Hi everybody! Me again?? with my questions ;) When I delete for example deserializer=org.apache.axis.encoding.ser.BeanDeserializerFactory in my server-config.wsdl (typeMapping), the ws´s wsdl don?t change. But the client ( .net ) don´t work. My question is: Of course the client don?t see my server-config.wsdl :), so I don?t understand why is necessary if the wsdl don?t change. and I don?t understand Why if the client is .net I need to set up this attribute (deserializer) with a Java class. I hope someone have the answers. Tanks! Joaquín.
Re: Why Castor + AXIS?
Dino, In my case, it is primarily the first reason you mention. Castor has better coverage of XML schema features. Plus it also allows validation. Another minor thing : the Axis generated code serializes null object references using xsi:nil, whereas, wilth Castor, the XML element itself doesnt get produced. This, IMHO, is cleaner XML, though both forms are correct. Regards, Kenneth On Mon, 28 Feb 2005 11:11:02 -0800, Dino Chiesa [EMAIL PROTECTED] wrote: What's the typical reason for using Castor with AXIS? - AXIS is missing features that Castor has? - Castor is already in use and the org wants to add webservices capability - something else?
Same signature operations in WSDL
I have a simple question but I couldn't find an answer on w3.org. Can I define an operations in WSDL with same name and identical signatures. like this: message name=req part name=str type=xs:string/ /message message name=empty/ portType name=Test operation name=op1 input name=request message=tns:req/ output name=responsemessage=tns:empty/ /operation operation name=op2 input name=request message=tns:req/ output name=responsemessage=tns:empty/ /operation /portType When I generate the stubs and deploy the service , axis always calls op1 never op2. Is it legitimate from WSDL specification point of view? Best regards, Timour
RE: Adding a custom handler
Title: RE: Adding a custom handler I have the following working = QName portName = stub.getPortName () ; Service service = stub._getService () ; // Axis 1.2 RC2 HandlerRegistry handlerRegistry = service.getHandlerRegistry () ; List handlerChain = handlerRegistry.getHandlerChain ( portName ) ; MyHandlerInfo handlerInfo = new MyHandlerInfo () ; handlerInfo.setHandlerClass ( MyHandler.class ) ; handlerChain.add ( handlerInfo ) ; handlerRegistry.setHandlerChain ( portName, handlerChain ) ; = public class MyHandler implements Handler { public void init ( HandlerInfo handlerInfo ) throws JAXRPCException { if ( handlerInfo instanceof MyHandlerInfo ) { } } public void destroy () throws JAXRPCException { } public QName[] getHeaders () { return new QName[0] ; } public boolean handleFault ( MessageContext messageContext ) throws JAXRPCException { return true ; // return true to continue processing } public boolean handleRequest ( MessageContext messageContext ) throws JAXRPCException { SOAPMessage message = ((SOAPMessageContext)messageContext).getMessage () ; return true ; // return true to continue processing } public boolean handleResponse ( MessageContext messageContext ) throws JAXRPCException { return true ; // return true to continue processing } = -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]] Sent: Tuesday, 1 March 2005 3:26 AM To: axis-user@ws.apache.org Subject: Adding a custom handler Hi. I'm writing a client side Axis application, in which I need to create my own custom handler. I'm using WSDL2Java to generate my code stubs, and I was hoping that I could add a handler as follows: HandlerRegistry registry = service.getHandlerRegistry(); QName portName = s.getPortName(); List handlerChain = registry.getHandlerChain(portName); HandlerInfo handlerInfo = new HandlerInfo(); handlerInfo.setHandlerClass(com.foo.MyHandler); handlerChain.add(handlerInfo); registry.setHandlerChain(portName, handlerChain); But when I run the client application, it would seem this handler is not called as both the handleRequest and handleResponse methods produce no output (I've added in System.out's to them to see if it works) Does anyone have any ideas of what I may be missing? Thanks. James This email is intended solely for the use of the named addressee(s). Any unauthorised disclosure, copying or distribution of the confidential information contained therein, or the taking of any action based on it, is prohibited. The sender disclaims any liability for the integrity of this email. Legally binding declarations must be in written form.
RE: Dime Attachments
I used the following test code to return various size files formated DIME from a server, and it worked (lookes like what you have). If I remember correctly, looking at messages via TCPMonitor, the message with DIME looks bizarro (as compared to MIME). So if you are saying that things do not work because of the message format (as listed below); possibly things are working? Raul public com.lmtas.swa.services.DimResData getDime(com.lmtas.swa.services.DimReqData parameters) throws java.rmi.RemoteException { DimResData drd = new DimResData(Your file is attached DIME ); MessageContext msgContext = MessageContext.getCurrentContext(); Message msg = msgContext.getResponseMessage(); msg.getAttachmentsImpl().setSendType(Attachments.SEND_TYPE_DIME); AttachmentPart part = new AttachmentPart(new DataHandler(new FileDataSource(c:/java/testFile.txt))); part.setContentId(testFile.txt); msg.addAttachmentPart(part); // 2.5M part = new AttachmentPart(new DataHandler(new FileDataSource(C:/Documents and Settings/My Documents/Understanding_Web_Services_Security.pdf))); part.setContentId(Understanding_Web_Services_Security.pdf); msg.addAttachmentPart(part); // 15M // part = new AttachmentPart(new DataHandler(new FileDataSource(C:/Documents and Settings/My Documents/My Downloads/axis-1_2beta3-src.zip))); // 410M // part = new AttachmentPart(new DataHandler(new FileDataSource(C:/Documents and Settings/My Documents/en_office_2003_pro.iso))); return drd; } -Original Message- From: Shawn Konopinsky [mailto:[EMAIL PROTECTED] Sent: Monday, February 28, 2005 3:26 PM To: axis-user@ws.apache.org Subject: Dime Attachments I have what seems to be a problem with send DIME attachments in SOAP. Mime works just fine for me when I use the following to set the send type: reply.getAttachmentsImpl().setSendType(Attachments.SEND_TYPE_MIME). However, when I make the simple modification to the line above to use DIME as the send type (replace Attachments.SEND_TYPE_MIME with Attachments.SEND_TYPE_DIME), it doesn't work. Is there anything additional that I have to do aside from setting the attachment type to DIME to switch between a MIME and DIME attachment type? I am viewing the request/response through Axis' TCP Tunnel viewer. When I run through a request with DIME, the response from the server looks like this: HTTP/1.1 200 OK Set-Cookie: JSESSIONID=754354ADC18D3D950CEACF80F0191805; Path=/bind Content-Type: application/dime;charset=utf-8 Date: Mon, 28 Feb 2005 20:50:51 GMT Server: Apache-Coyote/1.1 Connection: close xsd:int1/totalRecordsFound records xsi:type=xsd:stringsee attachment/records query xsi:type=xsd:string(+(+RecordType:(interaction complex pathway ) +(gi:(4757840 -((+BINDInteraction.a.type:quot;not specifiedquot; +BINDInteraction.a.shortlabel:quot;Unknownquot;) (+BINDInteraction.b.type:quot;not specifiedquot; +BINDInteraction.b.shortlabel:quot;Unknownquot;))/query returnType xsi:type=xsd:stringxml/returnType /multiRef /soapenv:Body /soapenv:Envelope As you can see it seems as if the response is malformed. Not sure if this is a result of the problem, or something wrong with the proxy that I am using to view the response. It is stumping me because MIME works fine, and DIME give me the weird result above. No exceptions seem to be thrown from the SOAP server. Has anyone else had a problem like this or know how I might troubleshoot it?
Re: Using Axis 1.2RC2 stubs with Axis 1.1 ?
Yes -- you can generate stubs using Axis 1.1 and run on Axis 1.2, but Sebastien was asking if he could generate stubs using Axis 1.2 and run on Axis 1.1. The latter does not work. Anne On Mon, 28 Feb 2005 11:11:03 -0600, sandeep arshanapally [EMAIL PROTECTED] wrote: May be I misunderstood this, if the question is that you are generating stubs using Axis1.1 and running with Axis1.2 then it should be fine. Dims -- Do you think we will have issues with this?? Sandeep On Mon, 28 Feb 2005 11:53:43 -0500, Davanum Srinivas [EMAIL PROTECTED] wrote: nope On Mon, 28 Feb 2005 10:50:02 -0600, sandeep arshanapally [EMAIL PROTECTED] wrote: You should be able to do that. Sandeep On Mon, 28 Feb 2005 17:46:16 +0100, Sebastien Mayemba Mbokoso [EMAIL PROTECTED] wrote: Hi, just a question. I heard Axis 1.1 Ant Tasks don't work very well cause of its many bugs. Does anybody know if i can use generated stubs by Axis 1.2RC2 with Axis 1.1 ? --- Sebastien -- Davanum Srinivas - http://webservices.apache.org/~dims/
RE: Handmade WSDL?
Not stupid... Your approach is reasonable, but... Can you not contact the card processing service people and ask them to resolve the difference between the doc and the WSDL ? -Original Message- From: Elaine Nance [mailto:[EMAIL PROTECTED] Sent: Monday, February 28, 2005 3:45 PM To: axis-user@ws.apache.org Subject: Handmade WSDL? Hope this is not stupid, but Problem: the wsdl for our (supposedly) enterprise credit card processing service shows well defined request parameters, but the SOAP responses are all designated as string, as shown below. I am thinking that the best way to generate the client stubs I need in Java is to create a wsdl with better response typing and generate the stubs using WSDL2Java and then test. Does it make sense to proceed like the above? or should I just build parsers using SAX or DOM or whatever? Thank you, Elaine - example request s:element name=GetAVSResponseCodeValue s:complexType s:sequence s:element minOccurs=0 maxOccurs=1 name=sCode type=s:string / /s:sequence /s:complexType /s:element - example response as given s:element name=GetAVSResponseCodeValueResponse s:complexType s:sequence s:element minOccurs=0 maxOccurs=1 name=GetAVSResponseCodeValueResult type=s:string / /s:sequence /s:complexType /s:element - WHAT THE RESPONSE SHOULD LOOK LIKE (I THINK) s:element name=GetAVSResponseCodeValueResponse s:complexType type=s:AVSRespCode s:sequence s:element minOccurs=1 maxOccurs=1 name=AVSCode type=s:string/ s:element minOccurs=1 maxOccurs=1 name=AVSMessage type=s:string/ s:element minOccurs=1 maxOccurs=1 name=ID type=s:string/ s:element minOccurs=1 maxOccurs=1 name=Status type=s:string/ /s:sequence /s:complexType /s:element - ALTERNATIVELY s:element name=GetAVSResponseCodeValueResponse s:complexType type=s:NewDataSet s:sequence type=s:AVSRespCode s:element minOccurs=1 maxOccurs=1 name=AVSCode type=s:string/ s:element minOccurs=1 maxOccurs=1 name=AVSMessage type=s:string/ s:element minOccurs=1 maxOccurs=1 name=ID type=s:string/ s:element minOccurs=1 maxOccurs=1 name=Status type=s:string/ /s:sequence /s:complexType /s:element - the web service docs indicate that the xml returned (minus SOAP envelope) will look like the following: NewDataSet AVSRespCode AVSCode1/AVSCode AVSMessageNo Address Supplied/AVSMessage ID1/ID StatusE/Status /AVSRespCode /NewDataSet ~~ | Computers are useless. They can only give you answers. | -- Pablo Picasso -- ~~
Re: Handmade WSDL?
Well, I can contact the project manager and ask, but that would be effective only if I rewrite the WSDL first and include samples. The project manager is not a programmer. ITMT, which form of the changed WSDL below will be best? The responses which return xml documents (as strings) all seem to use the root element of NewDataSet /, which I think violates the WSDL specification for uniqueness. [?] I am currently reading the WSDL 1.1 W3C Note dated 15 March 2001, but the published wsdl doesn't seem to quite match with that, and this doc is definitely *not* WSDL 2.0 compliant. Really appreciate the input. :) I want to do this as well as possible. Thanks again, Elaine Dino Chiesa wrote: Not stupid... Your approach is reasonable, but... Can you not contact the card processing service people and ask them to resolve the difference between the doc and the WSDL ? -Original Message- From: Elaine Nance [mailto:[EMAIL PROTECTED] Sent: Monday, February 28, 2005 3:45 PM To: axis-user@ws.apache.org Subject: Handmade WSDL? Hope this is not stupid, but Problem: the wsdl for our (supposedly) enterprise credit card processing service shows well defined request parameters, but the SOAP responses are all designated as string, as shown below. I am thinking that the best way to generate the client stubs I need in Java is to create a wsdl with better response typing and generate the stubs using WSDL2Java and then test. Does it make sense to proceed like the above? or should I just build parsers using SAX or DOM or whatever? Thank you, Elaine - example request s:element name=GetAVSResponseCodeValue s:complexType s:sequence s:element minOccurs=0 maxOccurs=1 name=sCode type=s:string / /s:sequence /s:complexType /s:element - example response as given s:element name=GetAVSResponseCodeValueResponse s:complexType s:sequence s:element minOccurs=0 maxOccurs=1 name=GetAVSResponseCodeValueResult type=s:string / /s:sequence /s:complexType /s:element - WHAT THE RESPONSE SHOULD LOOK LIKE (I THINK) s:element name=GetAVSResponseCodeValueResponse s:complexType type=s:AVSRespCode s:sequence s:element minOccurs=1 maxOccurs=1 name=AVSCode type=s:string/ s:element minOccurs=1 maxOccurs=1 name=AVSMessage type=s:string/ s:element minOccurs=1 maxOccurs=1 name=ID type=s:string/ s:element minOccurs=1 maxOccurs=1 name=Status type=s:string/ /s:sequence /s:complexType /s:element - ALTERNATIVELY s:element name=GetAVSResponseCodeValueResponse s:complexType type=s:NewDataSet s:sequence type=s:AVSRespCode s:element minOccurs=1 maxOccurs=1 name=AVSCode type=s:string/ s:element minOccurs=1 maxOccurs=1 name=AVSMessage type=s:string/ s:element minOccurs=1 maxOccurs=1 name=ID type=s:string/ s:element minOccurs=1 maxOccurs=1 name=Status type=s:string/ /s:sequence /s:complexType /s:element - the web service docs indicate that the xml returned (minus SOAP envelope) will look like the following: NewDataSet AVSRespCode AVSCode1/AVSCode AVSMessageNo Address Supplied/AVSMessage ID1/ID StatusE/Status /AVSRespCode /NewDataSet ~~ | Computers are useless. They can only give you answers. | -- Pablo Picasso -- ~~
Handler configuration in client-config.wsdd
I am experimenting with Axis handlers of type JAXRPCHandler I can successfully configure *server-side* requestFlow/responseFlow handlers in the server-config.wsdd such that they are service specific. But on the *client-side* it only seems to work when the handlers are configured in the globalConfiguration requestFlow/responseFlow. All examples I could find were also using globalConfiguration. ~~ Q1. Can handlers be configured to be service specific in the client-config.wsdd? Q2. If yes, does anybody have a working example of the client-config.wsdd with service specific handlers? Thanks. Peter. This is an email from Fujitsu Australia Software Technology Pty Ltd, ABN 27 003 693 481. It is confidential to the ordinary user of the email address to which it was addressed and may contain copyright and/or legally privileged information. No one else may read, print, store, copy or forward all or any of it or its attachments. If you receive this email in error, please return to sender. Thank you. If you do not wish to receive commercial email messages from Fujitsu Australia Software Technology Pty Ltd, please email [EMAIL PROTECTED]
Re: java stand-alone axis client
Hi, I think using DII to invoke a web service will greatly reduce the size of code. But if you are using custom exception handling then you might have to think twice before going for it. Sunil Kothari DISCLAIMER: Any Information contained or transmitted in this e-mail and / or attachments may contain confidential data, proprietary to Majoris Systems Pvt Ltd., and / or the authors of the information and is intended for use only by the individual or entity to which it is addressed. If you are not the intended recipient or email appears to have been sent to you by error, you are not authorised to access, read, disclose, copy, use or otherwise deal with it. If you have received this e-mail in error, please notify us immediately at mail to: [EMAIL PROTECTED] and delete this mail from your records. This is to notify that Majoris Systems Pvt Limited shall have no liability or obligation, legal or otherwise, for any errors, omissions, viruses or computer problems experienced as a result of this transmission since data over the public Internet cannot be guaranteed to be secure or error-free. - Original Message - From: Dr Leinster [EMAIL PROTECTED] Date: Monday, February 28, 2005 11:51 pm Subject: java stand-alone axis client Hi, I want to use a light version of axis to call webservices in a client = application... Size of the final application is an important factor for me. I am only interested in the client side of axis. Is there a way to reduce the dependecies and axis package size to only = have what I need. thanks for your help. DrLeinster.
Test Mail
Help for returning soap from a JAX-RPC web service
I am new to web services in sun. I want to return a soap envelope from JAX-RPC web service as we return the integer in sum web service.Whether it is possible?If yes how? Do you Yahoo!? Yahoo! Mail - You care about security. So do we.
Re: .java to .xsd
Axis' Java2Wsdl generates WSDL files that contain the same information, in the same format, as the XSD file. babloosony wrote: Hi All, Are there any commercial, opensource tools out there that can convert my java class (that use inheritance) to XSD file ? Since I want to use such generated xsd in wsdl file and make no mistake by handcrafting xsd files based on my java files. Thanks Regards, Kumar.