Re: server shutdown of long lived connections
Great ! Can you implement and send diffs? Perhaps this is too big a change at this late stage in 1.5 beta - thoughts anyone? Tim Bartley [EMAIL PROTECTED] 11/03/2005 23:07 Please respond to Apache AXIS C User List To Apache AXIS C User List axis-c-user@ws.apache.org cc Subject server shutdown of long lived connections HTTP 1.1 (and 1.0 with Connection: Keep-Alive) permits the client to re-use a connection for multiple requests and Axis makes use of this. However, if the client hasn't sent a request on that connection for a while the server will typlically shutdown the connection. One server I've seen (WebSphere) does this simply by sending a FIN from it's end. This means that the client-server half of the connection is still open so the next client send (*m_pActiveChannel this-getHTTPHeaders() in HTTPTransport::flushOutput) succeeds. The server responds to this by aborting the connection but it's not until the the next send (*m_pActiveChannel this-m_strBytesToSend.c_str()) that an IO error occurs and ultimately an exception is thrown to the client application. Now this behaviour is a property of the transport so I think Axis should detect that the server side has closed the connection and resend the request. This should always be OK because an IO error on any part of the send must mean the request has not been completely sent and therefore re-sending the request should not be harmful. So I think HTTPTransport::flushOutput should have some logic like: try { *m_pActiveChannel this-getHTTPHeaders(); *m_pActiveChannel this-strBytesToSend.c_str(); } catch (HTTPTransportException e) { if (didn't just re-open the connection) { m_pActiveChannel-close(); m_pActiveChannel-open(); *m_pActiveChannel this-getHTTPHeaders(); *m_pActiveChannel this-strBytesToSend.c_str(); } else { throw; } } We can do slightly better than this by trying to detect that the server has closed the connection before sending at all - this saves the network bandwidth of the first packet and saves us a bit of computation. This can be done approximately as follows: bool reopenConnection; fd_set_t read_fds; fd_set_t except_fds; FD_ZERO(read_fds); FD_ZERO(except_fds); FD_SET(socket, read_fds); FD_SET(socket, except_fds); timepec_t t = {0}; int result = select(FD_SETSIZE, read_fds, NULL, except_fds, t); if (result 0) { throw something; } else if (result == 0) { /* socket not readable - therefore not closed - ok to send */ reopenConnection = false; } else { /* socket readable or in error - see if data available */ unsigned char byte; result = recv(socket, byte, 1, MSG_PEEK); if (result == 0) { /* socket shutdown by remote end */ reopenConnection = true; } else if (result 0) { if (errno == ECONNRESET) { reopenConnection = true; } else { /* Possibly this is too aggressive and reopenConnection should be set to true irrespective of the errno value */ throw something; } } } return reopenConnection I suggest the above logic be encapsulated in the channels and accessed through the IChannel interface in flushOutput as something like: bool connectionJustReopened = false; if (m_bReopenConnection || m_pActiveChannel-connectionReopenRequired()) { m_pActiveChannel-close(); m_pActiveChannel-open(); connectionJustReopened = true; } bool retry; do { retry = false; try { *m_pActiveChannel this-getHTTPHeaders(); *m_pActiveChannel this-strDataBytes.c_str(); } catch (HTTPTransportException e) { if (!connectionJustReopened) { m_pActiveChannel-close(); m_pActiveChannel-open(); retry = true; connectionJustReopened = true; } else { throw; } } } while (retry); Even if we implement a connectionReopenRequired interface we still need to re-open on IO error from the send because there is a race condition between when we test this and actually send the request - the connection ReopenRequired interface is really just an optimization. What do you think? Cheers, Tim -- IBM Tivoli Access Manager Development Gold Coast Development Lab, Australia +61-7-5552-4001 phone +61-7-5571-0420 fax
RE: server shutdown of long lived connections
On deciding whether to put in 1.5, we could apply the patch and do the tests before commit for side effects, provided the diff is against the latest CVS. This looks to me as if it is a moderate change (as far as amount of changes are concerned) Hence I believe we could manage. Thanks, Samisa -Original Message- From: John Hawkins [mailto:[EMAIL PROTECTED] Sent: Tuesday, March 15, 2005 5:26 PM To: Apache AXIS C User List Subject: Re: server shutdown of long lived connections Great ! Can you implement and send diffs? Perhaps this is too big a change at this late stage in 1.5 beta - thoughts anyone? Tim Bartley [EMAIL PROTECTED] 11/03/2005 23:07 Please respond to Apache AXIS C User List To Apache AXIS C User List axis-c-user@ws.apache.org cc Subject server shutdown of long lived connections HTTP 1.1 (and 1.0 with Connection: Keep-Alive) permits the client to re-use a connection for multiple requests and Axis makes use of this. However, if the client hasn't sent a request on that connection for a while the server will typlically shutdown the connection. One server I've seen (WebSphere) does this simply by sending a FIN from it's end. This means that the client-server half of the connection is still open so the next client send (*m_pActiveChannel this-getHTTPHeaders() in HTTPTransport::flushOutput) succeeds. The server responds to this by aborting the connection but it's not until the the next send (*m_pActiveChannel this-m_strBytesToSend.c_str()) that an IO error occurs and ultimately an exception is thrown to the client application. Now this behaviour is a property of the transport so I think Axis should detect that the server side has closed the connection and resend the request. This should always be OK because an IO error on any part of the send must mean the request has not been completely sent and therefore re-sending the request should not be harmful. So I think HTTPTransport::flushOutput should have some logic like: try { *m_pActiveChannel this-getHTTPHeaders(); *m_pActiveChannel this-strBytesToSend.c_str(); } catch (HTTPTransportException e) { if (didn't just re-open the connection) { m_pActiveChannel-close(); m_pActiveChannel-open(); *m_pActiveChannel this-getHTTPHeaders(); *m_pActiveChannel this-strBytesToSend.c_str(); } else { throw; } } We can do slightly better than this by trying to detect that the server has closed the connection before sending at all - this saves the network bandwidth of the first packet and saves us a bit of computation. This can be done approximately as follows: bool reopenConnection; fd_set_t read_fds; fd_set_t except_fds; FD_ZERO(read_fds); FD_ZERO(except_fds); FD_SET(socket, read_fds); FD_SET(socket, except_fds); timepec_t t = {0}; int result = select(FD_SETSIZE, read_fds, NULL, except_fds, t); if (result 0) { throw something; } else if (result == 0) { /* socket not readable - therefore not closed - ok to send */ reopenConnection = false; } else { /* socket readable or in error - see if data available */ unsigned char byte; result = recv(socket, byte, 1, MSG_PEEK); if (result == 0) { /* socket shutdown by remote end */ reopenConnection = true; } else if (result 0) { if (errno == ECONNRESET) { reopenConnection = true; } else { /* Possibly this is too aggressive and reopenConnection should be set to true irrespective of the errno value */ throw something; } } } return reopenConnection I suggest the above logic be encapsulated in the channels and accessed through the IChannel interface in flushOutput as something like: bool connectionJustReopened = false; if (m_bReopenConnection || m_pActiveChannel-connectionReopenRequired()) { m_pActiveChannel-close(); m_pActiveChannel-open(); connectionJustReopened = true; } bool retry; do { retry = false; try { *m_pActiveChannel this-getHTTPHeaders(); *m_pActiveChannel this-strDataBytes.c_str(); } catch (HTTPTransportException e) { if (!connectionJustReopened) { m_pActiveChannel-close(); m_pActiveChannel-open(); retry = true; connectionJustReopened = true; } else { throw; } } } while (retry); Even if we implement a connectionReopenRequired interface we still need to re-open on IO error from the send because there is a race condition between when we test this and actually send the request - the connection ReopenRequired interface is really just an optimization. What do you think?
RE: Help with using axis C++
Hi, As I said before you can ignore the attachment support warnings. You can also ignore the anonymous type warnings. The prefix is annoying- this is where I revert back to we don't support rpc as well as doc/lit. These sorts of problems came when we upgraded the pre-reqs to Axis Java beta - we fixed tem in doc lit but evidently missed some in rpc ! As I said before is it possible for you to move to doc/lit ? Kon Kam King, France [EMAIL PROTECTED] 15/03/2005 15:38 Please respond to Apache AXIS C User List To Apache AXIS C User List axis-c-user@ws.apache.org cc Subject RE: Help with using axis C++ John, Things are better with 1.4 1.5. I don't get the error I had with 1.3. But I am getting a warning: C:\axis-c-1.5.0\lib\axis\wsdl2ws_complexjava -classpath .\wsdl2ws.jar;.;%CLASSP ATH% org.apache.axis.wsdl.wsdl2ws.WSDL2Ws copieCalculator.wsdl -o./ClientOut -lc ++ -sclient 15 mars 2005 16:17:26 org.apache.axis.utils.JavaUtils isAttachmentSupported ATTENTION: Unable to find required classes (javax.activation.DataHandler and jav ax.mail.internet.MimeMultipart). Attachment support is disabled. ignoring anonymous type CONTROLXMLSTART Code generation completed. The generated code is not quite right, as there does not seem to be declaration of my complex type, and the name of the type used in the call is prfixed ith '', CONTROLXMLSTART I thing there is some bug existing.I am attaching a run with 1.5 (nightly build). Thanks for your help. De : John Hawkins [mailto:[EMAIL PROTECTED] Envoyé : mardi 15 mars 2005 10:24 À : Apache AXIS C User List Objet : RE: Help with using axis C++ Ah ! axis 1.3 is quite an old version and we don't really support that. Can you upgrade to either 1.4 or preferably 1.5 beta (you can just take a nightly build from here - http://cvs.apache.org/dist/axis/nightly/) Please be aware that rpc/encoded is not supported as well as document literal. Is this a situation where you need to have rpc/encoded or could you move to doc/lit? Kon Kam King, France [EMAIL PROTECTED] 14/03/2005 18:52 Please respond to Apache AXIS C User List To Apache AXIS C User List axis-c-user@ws.apache.org cc Subject RE: Help with using axis C++ Here is my classpath: C:\j2sdk1.4.1_01\jre\lib;C:\axis-1_2RC2\axis-1_2RC2\lib\axis.jar;C:\axis-1_2RC2\ axis-1_2RC2\lib\commons-discovery.jar;C:\axis-1_2RC2\axis-1_2RC2\lib\commons-log ging.jar;C:\axis-1_2RC2\axis-1_2RC2\lib\jaxrpc.jar;C:\axis-1_2RC2\axis-1_2RC2\li b\saaj.jar;C:\axis-1_2RC2\axis-1_2RC2\lib\wsdl4j.jar;C:\axis-1_2RC2\axis-1_2RC2\ lib\xml-apis.jar I am running Axis-C 1.3. De : John Hawkins [mailto:[EMAIL PROTECTED] Envoyé : lundi 14 mars 2005 19:47 À : Apache AXIS C User List Objet : RE: Help with using axis C++ This seems to work fine for me - I get the attached files produced . My cmd line is - set WSDL2WsJar=%builddir%\obj\classes\wsdl2ws.jar set axisJar=%PreReqsDir%\java\axis.jar set commonsdiscoveryJar=%PreReqsDir%\java\commons-discovery.jar set commonsloggingjar=%PreReqsDir%\java\commons-logging.jar set jaxrpcjar=%PreReqsDir%\java\jaxrpc.jar set saajjar=%PreReqsDir%\java\saaj.jar set wsdl4jjar=%PreReqsDir%\java\wsdl4j.jar rem set WSDLFile=%baseWSDLPath%\%1 set WSDLFile=%1 set foo=%wsdl2wsjar%;%axisJar%;%commonsdiscoveryjar%;%commonsloggingjar%;%jaxrpcjar%;%saajjar%;%wsdl4jjar% java -classpath %foo% org.apache.axis.wsdl.wsdl2ws.WSDL2Ws -sclient -oWSDLOutput %WSDLFile% you sure you got the right level of pre-reqs? Where did you get them from? Kon Kam King, France [EMAIL PROTECTED] 14/03/2005 18:13 Please respond to Apache AXIS C User List To Apache AXIS C User List axis-c-user@ws.apache.org cc Subject RE: Help with using axis C++ Here it is: De : John Hawkins [mailto:[EMAIL PROTECTED] Envoyé : lundi 14 mars 2005 19:09 À : Apache AXIS C User List Objet : RE: Help with using axis C++ I think this should work but can you send us the WSDL to try? Kon Kam King, France [EMAIL PROTECTED] 14/03/2005 18:00 Please respond to Apache AXIS C User List To Apache AXIS C User List axis-c-user@ws.apache.org cc Subject RE: Help with using axis C++ When I remove the type schema declaration from my WSDL, WSDL2Ws runs to completion. Is complex type allowed wih WSDL2Ws? I do see an example of a WSDL in the samples library with doclitfault. Can somebody help me? De : Kon Kam King, France Envoyé : lundi 14 mars 2005 16:10 À : 'Apache AXIS C User List' Objet : RE: Help with using axis C++ I need to pass a complex-type parameter from a C++ client to a soap server, for example person useruser1/user passwordpass/pass parameterparameters/parameters /person How is this done in Axis-c? I tried to use WSDL2Ws to try generating the client stubs, with a WSDL with complex-type, and soap/literal binding, but got an exception: ATTENTION: Unable to find required classes
Re: [Flash news] JAX-WS ???
To: 皆様 木村です。 昨日は、JAXB ver 2.0(JSR-222)のEarly Draft 2の提供に ついて案内させて頂きましたが、JAX-RPC ver 2.0(JSR-224) のEarly Draft 3の準備も行われています。 仕様の更新もあるのですが、RI(Reference Implementation) のEarly accessの提供準備も合わせて進められています。 よろしくお願いします。 --- Toshi [EMAIL PROTECTED] On Mon, 7 Feb 2005, Toshiyuki Kimura wrote: 木村です。 本ニュースの関連情報です。 下記サイトで、2005/2/4からJAX-RPC ver 2.0仕様の「Early Draft Review 2」が提供されています。(残念ながら、英語版のみです) http://jcp.org/en/jsr/detail?id=224 理解しなければならない仕様としてJAX-RPCを挙げられていましたが、 私も次期仕様のver 2.0(JSR-224)の仕様化メンバ(Expert Group)とし ても活動しています。もし、何かご協力できることがあれば、お手伝 いさせて頂きます。 現在は、昨年のJavaOneに合わせてリリースしたバージョンのEarly Draft版ですが、近日中にアップデート版をご案内できるものと思います。 宜しく御願いします。 --- Toshi [EMAIL PROTECTED] On Mon, 7 Feb 2005, Toshiyuki Kimura wrote: To: 皆様 木村です。 直接、Axisの話題ということではないですが、対応するJava標準仕様で ある「JAX-RPC」に関連する話題です。 JSR-224としてJCPで標準化が行われている次期仕様のJAX-RPC ver 2.0 ですが、JAX-WS 1.0として新たにスタートする可能性が出てきました。 ・現行のJAX-RPC 1.1との下位互換性確保の問題 ・Document型も含めて利用するのにRPCというのは妥当か など、様々な要因があるのですが、それが実現すればpackageも含めて 見直されることになり、結構大掛かりな話になります。 現状、まだ確定しているわけではなく、JSR-224(JAX-RPC 2.0)とJSR-244 (J2EE 5.0)の専門家グループで協議をはじめたところです。何か進展があれ ば、またご報告したいと思いますが、とりあえずはご参考まで。 P.S. まだ、仕様化メンバのみで議論している段階ですので、確定情報ではない ことにご注意ください。 --- Toshi [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Bug in AxisEngineException with fix
Hi,I am testing clients on Windows platform. The test1 crahed when it was not able to load a DLL. Here is the call stack:_free_dbg_lk(void * 0x1006a36c `string', int 1) line 1044 + 48 bytes_free_dbg(void * 0x1006a36c `string', int 1) line 1001 + 13 bytesfree(void * 0x1006a36c `string') line 956 + 11 bytesoperator delete(void * 0x1006a36c `string') line 7 + 9 bytesaxiscpp::AxisEngineException::processException(const int 27, char * 0x1006a36c `string') line 89 + 15 bytesaxiscpp::AxisEngineException::AxisEngineException(const int 27, char * 0x1006a36c `string') line 46axiscpp::XMLParserFactory::loadLib() line 106 + 15 bytesaxiscpp::XMLParserFactory::initialize() line 56 + 5 bytesinitialize_module(int 0) line 306axiscpp::Call::Call() line 58 + 7 bytesaxiscpp::Stub::Stub(const char * 0x0012fe08, AXIS_PROTOCOL_TYPE APTHTTP1_1) line 31 + 31 bytesInteropTestPortType::InteropTestPortType(const char * 0x0012fe08, AXIS_PROTOCOL_TYPE APTHTTP1_1) line 23 + 45 bytesmain(int 1, char * * 0x00311280) line 56 + 20 bytesmainCRTStartup() line 206 + 25 bytesKERNEL32! 7c59893d()In int XMLParserFactory::loadLib(), when PLATFORM_LOADLIB() fails, it tries to do "throw AxisEngineException(SERVER_ENGINE_LOADING_PARSER_FAILED, PLATFORM_LOADLIB_ERROR);" The second parameter PLATFORM_LOADLIB_ERROR will be deleted in void AxisEngineException::processException(const int iExceptionCode, char* pcMessage)However PLATFORM_LOADLIB_ERROR was defined as empty string "" in src\platforms\windows\PlatformSpecificWindows.hpp. #define PLATFORM_LOADLIB_ERROR ""Therefore it crashed.The fix will be define it as NULL:#define PLATFORM_LOADLIB_ERROR NULLAnd change function void AxisEngineException::processException(const int iExceptionCode, char* pcMessage)Tovoid AxisEngineException::processException(const int iExceptionCode, char* pcMessage){AxisString sMessage ="";if (pcMessage) AxisString sMessage = pcMessage; m_sMessage = getMessage(iExceptionCode) + " " + sMessage; if(pcMessage) delete pcMessage;}Let me if it make sense.ThanksDavid
How to use axis with JMS
Hi, I am working on a web service project. Currently we are using HTTP transport and want to switch to JMS transport. I want to know how axis client/server needs to be configured. Regards, Mallik
Question abount faultcode Server.userException
Hello! Hopefully a simple question :o) When does Axis throw Server.userException SoapFaults !? I notice I get this when Castor throws a (De)Serializer Exception but are there other cases ? Cheers, Are T. Tysnes
RE: .NET and Axis
Title: .NET and Axis Hi Dino, you can get it working because you are using the Axis generated Java beans which contains class specific Serializer and Deserializer code. If I cut and paste the Axis generated Serializer and Deserializer code into my existing classes it works aswell. Thanks to you I have recognised the problem, i.e., that using the de/serializers specified in the server-config.wsdd file creates name space issues. typeMapping deserializer="org.apache.axis.encoding.ser.BeanDeserializerFactory" encodingStyle="" qname="ns5:BankIdentifier" serializer="org.apache.axis.encoding.ser.BeanSerializerFactory" type="java:com.rbc.gpb.util.BankIdentifier" xmlns:ns5="http://util.gpb.rbc.com"/ typeMapping deserializer="org.apache.axis.encoding.ser.BeanDeserializerFactory" encodingStyle="" qname="ns6:Code" serializer="org.apache.axis.encoding.ser.BeanSerializerFactory" type="java:com.rbc.gpb.util.Code" xmlns:ns6="http://util.gpb.rbc.com"/ Any idea how I can continue to use my preexisting Java classes (and there are a lot of them) without having to cut and paste the de/serializer code into each of them? Example of Axis generated Serializer and Deserializer code private static org.apache.axis.description.TypeDesc typeDesc = new org.apache.axis.description.TypeDesc(BankIdentifier.class, true); static { typeDesc.setXmlType(new javax.xml.namespace.QName("http://util.gpb.rbc.com", "BankIdentifier")); org.apache.axis.description.ElementDesc elemField = new org.apache.axis.description.ElementDesc(); elemField.setFieldName("bank"); elemField.setXmlName(new javax.xml.namespace.QName("http://util.gpb.rbc.com", "bank")); elemField.setXmlType(new javax.xml.namespace.QName("http://www.w3.org/2001/XMLSchema", "int")); typeDesc.addFieldDesc(elemField); elemField = new org.apache.axis.description.ElementDesc(); elemField.setFieldName("transit"); elemField.setXmlName(new javax.xml.namespace.QName("http://util.gpb.rbc.com", "transit")); elemField.setXmlType(new javax.xml.namespace.QName("http://www.w3.org/2001/XMLSchema", "int")); typeDesc.addFieldDesc(elemField); elemField = new org.apache.axis.description.ElementDesc(); elemField.setFieldName("key"); elemField.setXmlName(new javax.xml.namespace.QName("http://util.gpb.rbc.com", "key")); elemField.setXmlType(new javax.xml.namespace.QName("http://www.w3.org/2001/XMLSchema", "string")); elemField.setNillable(true); typeDesc.addFieldDesc(elemField); elemField = new org.apache.axis.description.ElementDesc(); elemField.setFieldName("number"); elemField.setXmlName(new javax.xml.namespace.QName("http://util.gpb.rbc.com", "number")); elemField.setXmlType(new javax.xml.namespace.QName("http://www.w3.org/2001/XMLSchema", "int")); typeDesc.addFieldDesc(elemField); } /** * Return type metadata object */ public static org.apache.axis.description.TypeDesc getTypeDesc() { return typeDesc; } /** * Get Custom Serializer */ public static org.apache.axis.encoding.Serializer getSerializer( java.lang.String mechType, java.lang.Class _javaType, javax.xml.namespace.QName _xmlType) { return new org.apache.axis.encoding.ser.BeanSerializer( _javaType, _xmlType, typeDesc); } /** * Get Custom Deserializer */ public static org.apache.axis.encoding.Deserializer getDeserializer( java.lang.String mechType, java.lang.Class _javaType, javax.xml.namespace.QName _xmlType) { return new org.apache.axis.encoding.ser.BeanDeserializer( _javaType, _xmlType, typeDesc); } This e-mail may be privileged and/or confidential, and the sender does not waive any related rights and obligations. Any distribution, use or copying of this e-mail or the information it contains by other than an intended recipient is unauthorized. If you received this e-mail in error, please advise me (by return e-mail or otherwise) immediately. Ce courrier électronique est confidentiel et protégé. L'expéditeur ne renonce pas aux droits et obligations qui s'y rapportent. Toute diffusion, utilisation ou copie de ce message ou des renseignements qu'il contient par une personne autre que le (les) destinataire(s) désigné(s) est interdite. Si vous recevez ce courrier électronique par erreur, veuillez m'en aviser immédiatement, par retour de courrier électronique ou par un autre moyen.
Re: Need to test WSDL with .NET Consumer
Murad - I tried to run WebserviceStudio20\bin\WebServiceStudio.exe and I am getting an 'Unable to Locate DLL' Windows error dialog saying The dynamic link library mscoree.dlll could not be found in the specified path C:\Documents and Settings\. Please clarify ... On Mon, 14 Mar 2005 10:26:39 +0600, Murad [EMAIL PROTECTED] wrote: U can check this URL http://www.gotdotnet.com/Community/UserSamples/Download.aspx?SampleGuid=65A1D4EA-0F7A-41BD-8494-E916EBC4159C On Sun, 13 Mar 2005 19:43:31 +0530, babloosony [EMAIL PROTECTED] wrote: I have document/wrapped WSDL developed using AXIS 1.2 RC2 on the j2ee server side. Now I want to test it using .NET SOAP Toolkit. Are there freely available .NET Web Service SOAP Clients/Consumers that can successfully consume my WSDL. Can anyone give me urls or freelance this job for me. Just I want to test whether .NET WS Client is able to call my method operations and successfully get a response. Please suggest ... -- Best regards, Murad
RE: Need help for java.lang.IncompatibleClassChangeError
I think there were some discussions on this previously ... and it was occurring because of out of date saaj.jar being used by the application server. Try adding the saaj.jar of Axis to your classpath and see if it helps. Ashutosh -Original Message- From: Jogesh Kanojia [mailto:[EMAIL PROTECTED] Sent: Tuesday, March 15, 2005 5:36 PM To: axis-user@ws.apache.org Subject: Need help for java.lang.IncompatibleClassChangeError Importance: Low Hi I am using Sun One Application server 7. I have webservice client build on Axis 1.2 RC2. When I run my client from Java console ,its works fine , but when I use the same code in my Web application its throws java.lang.IncompatibleClassChangeError. I am not able to figure out the exact problem. If any one knows the solutions , please let me know. I have attached the details of exception in the mail. Waiting for reply. Regards, Jogesh Kanojia, Sr. Software Engineer. Patni Computer Systems Limited Mobile:- +91 9820275701 Tel:+91-22-27611090 Ext.1117
RE: Array of objects
http://dinoch.dyndns.org:7070/axis1.2/AboutArrays2.jsp -Original Message- From: bohldan bohldan [mailto:[EMAIL PROTECTED] Sent: Tuesday, March 15, 2005 5:37 AM To: axis-user@ws.apache.org Subject: Array of objects Hi I think ive tried everything and i searched for a while now on how i send an array of object. If someone has something that works can that someone be nice to give me an example of the client, wsdd file. This is how my code look like.. client --- String endpointURL = http://localhost:8080/axis/services/GlazeService;; Service service = new Service(); Call call = (Call) service.createCall(); QName qn = new QName( urn:GlazeService, User ); call.setOperationName(ldap_GetAllUsernames); call.setTargetEndpointAddress( new java.net.URL(endpointURL) ); call.registerTypeMapping( User.class, qn, new org.apache.axis.encoding.ser.BeanSerializerFactory(User.class, qn), new org.apache.axis.encoding.ser.BeanDeserializerFactory(User.class,qn)); User[] tomte = (User[])call.invoke(new Object [] {}); System.out.println(Size: + tomte.length); for(int i = 0; i tomte.length; i++){ System.out.println(tomte[i].getGecos()); } wsdd file --- deployment xmlns=http://xml.apache.org/axis/wsdd/; xmlns:java=http://xml.apache.org/axis/wsdd/providers/java; xmlns:glaze=urn:GlazeService.Service service name=GlazeService provider=java:RPC parameter name=className value=GlazeService.Service/ parameter name=allowedMethods value=*/ beanMapping languageSpecificType=java:GlazeService.Service qname=ns1:User xmlns:ns1=urn:GlazeService/ typeMapping qname=glaze:ArrayOfUser type=java:GlazeService.User[] serializer=org.apache.axis.encoding.ser.BeanSerializerFactory deserializer=org.apache.axis.encoding.ser.BeanDeserializerFactory encodingStyle=http://schemas.xmlsoap.org/soap/encoding/; xmlns:glaze=urn:GlazeService/ /service /deployment _ Hitta rätt på nätet med MSN Sök http://search.msn.se/
RE: WSDL generation
WS-I BP1.1 advises against the guidance of WSDL 1.1 spec, on the point of arrays. Go to http://www.ws-i.org/Profiles/BasicProfile-1.1-2004-08-24.html And search for soapenc:Array (section 4.3.3) : *** Begin Excerpt *** The recommendations in WSDL 1.1 Section 2.2 for declaration of array types have been interpreted in various ways, leading to interoperability problems. Further, there are other clearer ways to declare arrays. R2110 In a DESCRIPTION, declarations MUST NOT extend or restrict the soapenc:Array type. R2111 In a DESCRIPTION, declarations MUST NOT use wsdl:arrayType attribute in the type declaration. R2112 In a DESCRIPTION, elements SHOULD NOT be named using the convention ArrayOfXXX. R2113 An ENVELOPE MUST NOT include the soapenc:arrayType attribute. *** End Excerpt *** AXIS seems to comply with the WS-I BP1.1 recommendation. -Dino -Original Message- From: jayachandra [mailto:[EMAIL PROTECTED] Sent: Tuesday, March 15, 2005 3:28 AM To: axis-user@ws.apache.org; axis-dev@ws.apache.org Subject: WSDL generation Trying to analyse some problem, I had to refer to wsdl 1.1 spec. There under the 'Types' section [http://www.w3.org/TR/wsdl#_types , 3rd bullet point], there is this mention. ** Begin of Excerpt ** Array types should extend the Array type defined in the SOAP v1.1 encoding schema (http://schemas.xmlsoap.org/soap/encoding/) (regardless of whether the resulting form actually uses the encoding specified in Section 5 of the SOAP v1.1 document). Use the name ArrayOfXXX for array types (where XXX is the type of the items in the array). The type of the items in the array and the array dimensions are specified by using a default value for the soapenc:arrayType attribute. At the time of this writing, the XSD specification does not have a mechanism for specifying the default value of an attribute which contains a QName value. To overcome this limitation, WSDL introduces the arrayType attribute (from namespace http://schemas.xmlsoap.org/wsdl/) which has the semantic of providing the default value. If XSD is revised to support this functionality, the revised mechanism SHOULD be used in favor of the arrayType attribute defined by WSDL. ** End of Excerpt ** So does this mean even in DOCUMENT/LITERAL and WRAPPED/LITERAL kind of wsdl we should have for an array type (e.g: public Point[] myPoints;) a wsdl that reads as complexType name=ArrayOfPoint complexContent restriction base=soapenc:Array attribute ref=soapenc:arrayType wsdl:arrayType=impl:Point[]/ /restriction /complexContent /complexType Currently in axis we get a wsdl fragment that looks like complexType name=ArrayOfPoint sequence element maxOccurs=unbounded minOccurs=0 name=item type=impl:Point/ /sequence /complexType Which one is correct? Any insight into this issue will be very much appreciated. Thanks in advance Jaya
Re: faultcodes in SoapFaults thrown from Axis
Yes..Those are the general categories of errors. I have seen it well documented somewhere but don't no where exactly. 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: Tysnes Are Thobias [EMAIL PROTECTED] Date: Tuesday, March 15, 2005 6:36 pm Subject: faultcodes in SoapFaults thrown from Axis Hello! It looks to me that Axis throws SoapFaults with the following faultcodes: - Client - Server.generalException - Server.userException - VersionMismatch - MustUnserstand - Server.NoService Wonder if someone could confirm this :o) Cheers, Are T. Tysnes
Re: Need to test WSDL with .NET Consumer
Dino - Thank you for the response. I am complete new to .NET. Can anyone redirect me exact download link on Microsoft Website ? On Tue, 15 Mar 2005 05:25:38 -0800, Dino Chiesa [EMAIL PROTECTED] wrote: You need to have .NET installed to use that tool. -Original Message- From: babloosony [mailto:[EMAIL PROTECTED] Sent: Monday, March 14, 2005 1:27 AM To: Murad Cc: axis-user@ws.apache.org Subject: Re: Need to test WSDL with .NET Consumer Murad - I tried to run WebserviceStudio20\bin\WebServiceStudio.exe and I am getting an 'Unable to Locate DLL' Windows error dialog saying The dynamic link library mscoree.dlll could not be found in the specified path C:\Documents and Settings\. Please clarify ... On Mon, 14 Mar 2005 10:26:39 +0600, Murad [EMAIL PROTECTED] wrote: U can check this URL http://www.gotdotnet.com/Community/UserSamples/Download.aspx?SampleGui d=65A1D4EA-0F7A-41BD-8494-E916EBC4159C On Sun, 13 Mar 2005 19:43:31 +0530, babloosony [EMAIL PROTECTED] wrote: I have document/wrapped WSDL developed using AXIS 1.2 RC2 on the j2ee server side. Now I want to test it using .NET SOAP Toolkit. Are there freely available .NET Web Service SOAP Clients/Consumers that can successfully consume my WSDL. Can anyone give me urls or freelance this job for me. Just I want to test whether .NET WS Client is able to call my method operations and successfully get a response. Please suggest ... -- Best regards, Murad
RE: faultcodes in SoapFaults thrown from Axis
Thanks! The only documentation I found was in this java file .. :-/ http://cvs.apache.org/viewcvs.cgi/ws-axis/java/src/org/apache/axis/Const ants.java?rev=1.137view=markup Cheers, Are T. Tysnes -Original Message- From: Sunil Kothari [mailto:[EMAIL PROTECTED] Sent: 15. mars 2005 14:48 To: axis-user@ws.apache.org Subject: Re: faultcodes in SoapFaults thrown from Axis Yes..Those are the general categories of errors. I have seen it well documented somewhere but don't no where exactly. 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: Tysnes Are Thobias [EMAIL PROTECTED] Date: Tuesday, March 15, 2005 6:36 pm Subject: faultcodes in SoapFaults thrown from Axis Hello! It looks to me that Axis throws SoapFaults with the following faultcodes: - Client - Server.generalException - Server.userException - VersionMismatch - MustUnserstand - Server.NoService Wonder if someone could confirm this :o) Cheers, Are T. Tysnes
Re: DataHandler problem (Axis 1.1)
Hi all, I have the same problem. Is there anybody with a solution? Thank you advance, Pere
Re: Dynamically reconfiguring Axis at runtime?
The preferred method is Start With WSDL First (tm). - Anne On Mon, 14 Mar 2005 19:43:28 -0800 (PST), Brian Abbott [EMAIL PROTECTED] wrote: Hi, I have a webservice generated from a class that has overloaded methods. However, I only want one method defination to be exposed through Axis and have only that same method be represented in the generated WSDL. What would be the best way to do this? I was thinking about dynamically removing the definitions from WSDDDeployment dynamically at runtime. Is that a sane idea? Is there a more preffered way? If I was to reconfigure the AxisEngine's EngineConfiguration, where would I start for that? Thank you so much, Brian Abbott __ Do you Yahoo!? Yahoo! Small Business - Try our new resources site! http://smallbusiness.yahoo.com/resources/
RE: WSDL generation
Jaya, For the document style web services the WSDL that Axis produces is correct. An array is represented as a sequence of 0 or more elements. See the WS-I Basic profile for why this is so. -- Tom Jordahl Macromedia Server Development -Original Message- From: jayachandra [mailto:[EMAIL PROTECTED] Sent: Tuesday, March 15, 2005 3:28 AM To: axis-user@ws.apache.org; axis-dev@ws.apache.org Subject: WSDL generation Trying to analyse some problem, I had to refer to wsdl 1.1 spec. There under the 'Types' section [http://www.w3.org/TR/wsdl#_types , 3rd bullet point], there is this mention. ** Begin of Excerpt ** Array types should extend the Array type defined in the SOAP v1.1 encoding schema (http://schemas.xmlsoap.org/soap/encoding/) (regardless of whether the resulting form actually uses the encoding specified in Section 5 of the SOAP v1.1 document). Use the name ArrayOfXXX for array types (where XXX is the type of the items in the array). The type of the items in the array and the array dimensions are specified by using a default value for the soapenc:arrayType attribute. At the time of this writing, the XSD specification does not have a mechanism for specifying the default value of an attribute which contains a QName value. To overcome this limitation, WSDL introduces the arrayType attribute (from namespace http://schemas.xmlsoap.org/wsdl/) which has the semantic of providing the default value. If XSD is revised to support this functionality, the revised mechanism SHOULD be used in favor of the arrayType attribute defined by WSDL. ** End of Excerpt ** So does this mean even in DOCUMENT/LITERAL and WRAPPED/LITERAL kind of wsdl we should have for an array type (e.g: public Point[] myPoints;) a wsdl that reads as complexType name=ArrayOfPoint complexContent restriction base=soapenc:Array attribute ref=soapenc:arrayType wsdl:arrayType=impl:Point[]/ /restriction /complexContent /complexType Currently in axis we get a wsdl fragment that looks like complexType name=ArrayOfPoint sequence element maxOccurs=unbounded minOccurs=0 name=item type=impl:Point/ /sequence /complexType Which one is correct? Any insight into this issue will be very much appreciated. Thanks in advance Jaya
Re: DataHandler problem (Axis 1.1)
I was talking about the James Richardson problem's (http://marc.theaimsgroup.com/?l=axis-userm=110561615200800w=2) En/na Pere Soler Rubí ha escrit: Hi all, I have the same problem. Is there anybody with a solution? Thank you advance, Pere
Re: WSDL generation
Thanks Dino. The link was quite useful, pin-point precise to the doubts that crawled into my mind reading the wsdl1.1 spec. Well, if I was worrying abt interop, I better should have seen WSI-BP in the first place. But thanks a lot for the link. @Tom Yeah! just had a look at WSI-BP. Thanks for the reply. Jaya On Tue, 15 Mar 2005 05:30:40 -0800, Dino Chiesa [EMAIL PROTECTED] wrote: WS-I BP1.1 advises against the guidance of WSDL 1.1 spec, on the point of arrays. Go to http://www.ws-i.org/Profiles/BasicProfile-1.1-2004-08-24.html And search for soapenc:Array (section 4.3.3) : *** Begin Excerpt *** The recommendations in WSDL 1.1 Section 2.2 for declaration of array types have been interpreted in various ways, leading to interoperability problems. Further, there are other clearer ways to declare arrays. R2110 In a DESCRIPTION, declarations MUST NOT extend or restrict the soapenc:Array type. R2111 In a DESCRIPTION, declarations MUST NOT use wsdl:arrayType attribute in the type declaration. R2112 In a DESCRIPTION, elements SHOULD NOT be named using the convention ArrayOfXXX. R2113 An ENVELOPE MUST NOT include the soapenc:arrayType attribute. *** End Excerpt *** AXIS seems to comply with the WS-I BP1.1 recommendation. -Dino -Original Message- From: jayachandra [mailto:[EMAIL PROTECTED] Sent: Tuesday, March 15, 2005 3:28 AM To: axis-user@ws.apache.org; axis-dev@ws.apache.org Subject: WSDL generation Trying to analyse some problem, I had to refer to wsdl 1.1 spec. There under the 'Types' section [http://www.w3.org/TR/wsdl#_types , 3rd bullet point], there is this mention. ** Begin of Excerpt ** Array types should extend the Array type defined in the SOAP v1.1 encoding schema (http://schemas.xmlsoap.org/soap/encoding/) (regardless of whether the resulting form actually uses the encoding specified in Section 5 of the SOAP v1.1 document). Use the name ArrayOfXXX for array types (where XXX is the type of the items in the array). The type of the items in the array and the array dimensions are specified by using a default value for the soapenc:arrayType attribute. At the time of this writing, the XSD specification does not have a mechanism for specifying the default value of an attribute which contains a QName value. To overcome this limitation, WSDL introduces the arrayType attribute (from namespace http://schemas.xmlsoap.org/wsdl/) which has the semantic of providing the default value. If XSD is revised to support this functionality, the revised mechanism SHOULD be used in favor of the arrayType attribute defined by WSDL. ** End of Excerpt ** So does this mean even in DOCUMENT/LITERAL and WRAPPED/LITERAL kind of wsdl we should have for an array type (e.g: public Point[] myPoints;) a wsdl that reads as complexType name=ArrayOfPoint complexContent restriction base=soapenc:Array attribute ref=soapenc:arrayType wsdl:arrayType=impl:Point[]/ /restriction /complexContent /complexType Currently in axis we get a wsdl fragment that looks like complexType name=ArrayOfPoint sequence element maxOccurs=unbounded minOccurs=0 name=item type=impl:Point/ /sequence /complexType Which one is correct? Any insight into this issue will be very much appreciated. Thanks in advance Jaya -- -- Jaya
Http authentication for my Axis client...
Hi All, I am trying to program my axis client to go through an authenticated http proxy server. I set these properties and am partially successful. System.setProperty(http.proxyHost, proxy); System.setProperty(http.proxyPort, 8005); System.setProperty(http.proxyUser, user); System.setProperty(http.proxyPassword, pass); The host and port are respected every time... however... the username and password seem to never be used. I have verified that these creds work with the proxy server, but whenever my client runs I get the error: (407)Proxy Authentication Required What am I doing wrong setting the proxy user and password that is screwing this up? Anyone? Does anyone know of another way to set these credentials for the client? Thank you, hopefully someone knows... I am not sure anyone even gets my messages as I have never had a response of any kind :-) -Adam
Getting java2wsdl to generate enumerations
I have a few classes that are enumerations, and I'd like it if the WSDL generator could recognize them as such. Therefore, I followed Paul's advice on how to pattern my class appropriately (see http://marc.theaimsgroup.com/?l=axis-userm=110961246509001w=2). However, java2wsdl doesn't recognize my class as an enumeration (it complains about the lack of default constructor). Can anybody help me so that I can get the WSDL generator to recognize my class as an enumeration? JDG -Original Message- From: Jay Glanville [mailto:[EMAIL PROTECTED] Sent: Wednesday, March 09, 2005 11:08 AM To: axis-user@ws.apache.org Subject: RE: Using axis ant task with typed enums Hello Paul (and all) I tried to create an enumeration using your template below. However, when I ran Java2WSDL, I got the following error: ... [axis-java2wsdl] - The class com.nci.slt.epi.admin.Enumeration does not contain a default constructor, which is a requirement for a bean class. The class cannot be converted into an xml schema type. An xml schema anyType will be used to define this class in the wsdl file. ... I was under the impression that if I followed your template, that I wouldn't need a public default constructor. Am I mistaken? Is there something I'm missing? Here is my implementation of the enumeration test code: package com.nci.slt.epi.admin; import java.util.HashMap; import org.apache.commons.lang.builder.ToStringBuilder; import org.apache.commons.lang.builder.EqualsBuilder; import org.apache.commons.lang.builder.HashCodeBuilder; public class Enumeration { public static final int _ONE = 1; public static final Enumeration ONE = new Enumeration( _ONE ); public static final int _TWO = 1; public static final Enumeration TWO = new Enumeration( _ONE ); public static final int _THREE = 1; public static final Enumeration THREE = new Enumeration( _ONE ); private static HashMap ALL = new HashMap(); static { ALL.put( new Integer( _ONE ), ONE ); ALL.put( new Integer( _TWO ), TWO ); ALL.put( new Integer( _THREE ), THREE ); } private int value; protected Enumeration( int type ) { value = type; } public int getType() { return value; } public static Enumeration fromValue( int value ) { return (Enumeration) ALL.get( new Integer( value ) ); } public static Enumeration fromString( String valueStr ) { try { int value = Integer.parseInt( valueStr ); return fromValue( value ); } catch ( NumberFormatException e ) { throw new IllegalArgumentException(); } } public String toString() { return new ToStringBuilder( this ) .append( type, this.getType() ) .toString(); } public boolean equals( Object object ) { if ( object == this ) { return true; } if ( !(object instanceof Enumeration) ) { return false; } Enumeration rhs = (Enumeration) object; return new EqualsBuilder() .appendSuper( super.equals( object ) ) .append( this.value, rhs.value ) .isEquals(); } public int hashCode() { return new HashCodeBuilder( -609718375, -2117186511 ) .appendSuper( super.hashCode() ) .append( this.value ) .toHashCode(); } } -Original Message- From: Bouche Paul [mailto:[EMAIL PROTECTED] Sent: Monday, February 28, 2005 12:41 PM To: axis-user@ws.apache.org Subject: 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
Re: Dynamically reconfiguring Axis at runtime?
It's perfectly sane :-) Check out http://demo.wsabi.org Mike. Brian Abbott wrote: Hi, I have a webservice generated from a class that has overloaded methods. However, I only want one method defination to be exposed through Axis and have only that same method be represented in the generated WSDL. What would be the best way to do this? I was thinking about dynamically removing the definitions from WSDDDeployment dynamically at runtime. Is that a sane idea? Is there a more preffered way? If I was to reconfigure the AxisEngine's EngineConfiguration, where would I start for that? Thank you so much, Brian Abbott __ Do you Yahoo!? Yahoo! Small Business - Try our new resources site! http://smallbusiness.yahoo.com/resources/
Re: Array of objects
Link reports Document has no data Dino Chiesa wrote: http://dinoch.dyndns.org:7070/axis1.2/AboutArrays2.jsp -Original Message- From: bohldan bohldan [mailto:[EMAIL PROTECTED] Sent: Tuesday, March 15, 2005 5:37 AM To: axis-user@ws.apache.org Subject: Array of objects Hi I think ive tried everything and i searched for a while now on how i send an array of object. If someone has something that works can that someone be nice to give me an example of the client, wsdd file. This is how my code look like.. client --- String endpointURL = http://localhost:8080/axis/services/GlazeService;; Service service = new Service(); Call call = (Call) service.createCall(); QName qn = new QName( urn:GlazeService, User ); call.setOperationName(ldap_GetAllUsernames); call.setTargetEndpointAddress( new java.net.URL(endpointURL) ); call.registerTypeMapping( User.class, qn, new org.apache.axis.encoding.ser.BeanSerializerFactory(User.class, qn), new org.apache.axis.encoding.ser.BeanDeserializerFactory(User.class,qn)); User[] tomte = (User[])call.invoke(new Object [] {}); System.out.println(Size: + tomte.length); for(int i = 0; i tomte.length; i++){ System.out.println(tomte[i].getGecos()); } wsdd file --- deployment xmlns=http://xml.apache.org/axis/wsdd/; xmlns:java=http://xml.apache.org/axis/wsdd/providers/java; xmlns:glaze=urn:GlazeService.Service service name=GlazeService provider=java:RPC parameter name=className value=GlazeService.Service/ parameter name=allowedMethods value=*/ beanMapping languageSpecificType=java:GlazeService.Service qname=ns1:User xmlns:ns1=urn:GlazeService/ typeMapping qname=glaze:ArrayOfUser type=java:GlazeService.User[] serializer=org.apache.axis.encoding.ser.BeanSerializerFactory deserializer=org.apache.axis.encoding.ser.BeanDeserializerFactory encodingStyle=http://schemas.xmlsoap.org/soap/encoding/; xmlns:glaze=urn:GlazeService/ /service /deployment _ Hitta rätt på nätet med MSN Sök http://search.msn.se/ -- ~~ | Computers are useless. They can only give you answers. | -- Pablo Picasso -- ~~
is it possible to change soapenc:string to xsd:string in generated WSDL?
Hello, when testing my web service (Axis 1.2RC3) with MS SOAPToolkit 3.0 I found that it's not working obviously due to this soapenc:string encodings instead of xsd:string. I found some cries for help regarding this interop issue in the web, but no solution as far as I could see. Maybe you've seen this message from MSSoapInit too SoapMapper for element string could not be created. I could try to hand over my own WSDL file (created with Sun's wscompile from J2EE stuff) to the WSDD deploy step, but I guess Axis will not accept it or so. My Perl and Python clients work fine. Some .NET stuff too. But I need this MS SOAPToolkit stuff (to use the Axis powered web service from VBA in MS Office documents). I think it's a problem in the SOAPToolkit, not in Axis, but the SOAPToolkit is there and will not be changed/supported in the future ... For boolean, Axis is using xsd:boolean. Is there a way to let Axis create xsd:string elements? Thanx a lot! Merten
RE: Array of objects
I can't figure out why you'd be having troubles with the link. It works for me and it is working for other people, too. I can see in the logs that it is succeeding. . . . Sorry, -D -Original Message- From: Elaine Nance [mailto:[EMAIL PROTECTED] Sent: Tuesday, March 15, 2005 11:15 AM To: axis-user@ws.apache.org Subject: Re: Array of objects Link reports Document has no data Dino Chiesa wrote: http://dinoch.dyndns.org:7070/axis1.2/AboutArrays2.jsp -Original Message- From: bohldan bohldan [mailto:[EMAIL PROTECTED] Sent: Tuesday, March 15, 2005 5:37 AM To: axis-user@ws.apache.org Subject: Array of objects Hi I think ive tried everything and i searched for a while now on how i send an array of object. If someone has something that works can that someone be nice to give me an example of the client, wsdd file. This is how my code look like.. client --- String endpointURL = http://localhost:8080/axis/services/GlazeService;; Service service = new Service(); Call call = (Call) service.createCall(); QName qn = new QName( urn:GlazeService, User ); call.setOperationName(ldap_GetAllUsernames); call.setTargetEndpointAddress( new java.net.URL(endpointURL) ); call.registerTypeMapping( User.class, qn, new org.apache.axis.encoding.ser.BeanSerializerFactory(User.class, qn), new org.apache.axis.encoding.ser.BeanDeserializerFactory(User.class,qn)); User[] tomte = (User[])call.invoke(new Object [] {}); System.out.println(Size: + tomte.length); for(int i = 0; i tomte.length; i++){ System.out.println(tomte[i].getGecos()); } wsdd file --- deployment xmlns=http://xml.apache.org/axis/wsdd/; xmlns:java=http://xml.apache.org/axis/wsdd/providers/java; xmlns:glaze=urn:GlazeService.Service service name=GlazeService provider=java:RPC parameter name=className value=GlazeService.Service/ parameter name=allowedMethods value=*/ beanMapping languageSpecificType=java:GlazeService.Service qname=ns1:User xmlns:ns1=urn:GlazeService/ typeMapping qname=glaze:ArrayOfUser type=java:GlazeService.User[] serializer=org.apache.axis.encoding.ser.BeanSerializerFactory deserializer=org.apache.axis.encoding.ser.BeanDeserializerFactory encodingStyle=http://schemas.xmlsoap.org/soap/encoding/; xmlns:glaze=urn:GlazeService/ /service /deployment _ Hitta rätt på nätet med MSN Sök http://search.msn.se/ -- ~~ | Computers are useless. They can only give you answers. | -- Pablo Picasso -- ~~
RE: is it possible to change soapenc:string to xsd:string in generated WSDL?
Title: RE: is it possible to change soapenc:string to xsd:string in generated WSDL? Wow, aedemar, thank you, that looks exactly like what I need. Tried it with 1.2RC3, but seems to have no effect, there are still these soapenc:string beasts in the generated WSDL ... Will continue my tries ... cu Merten From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] Sent: Tuesday, March 15, 2005 5:51 PMTo: axis-user@ws.apache.orgSubject: RE: is it possible to change soapenc:string to xsd:string in generated WSDL? see http://issues.apache.org/jira/browse/AXIS-1834. They say it can be solved with by adding the new "dotNetSoapEncFix" flag in your server-config.wsdd's globalConfiguration section. Axis documentation has more info. -Original Message- From: Merten Schumann [mailto:[EMAIL PROTECTED]] Sent: 15 March 2005 4:46 To: axis-user@ws.apache.org Subject: is it possible to change soapenc:string to xsd:string in generated WSDL? Hello, when testing my web service (Axis 1.2RC3) with MS SOAPToolkit 3.0 I found that it's not working obviously due to this soapenc:string encodings instead of xsd:string. I found some cries for help regarding this interop issue in the web, but no solution as far as I could see. Maybe you've seen this message from MSSoapInit too "SoapMapper for element string could not be created". I could try to hand over my own WSDL file (created with Sun's wscompile from J2EE stuff) to the WSDD deploy step, but I guess Axis will not accept it or so. My Perl and Python clients work fine. Some .NET stuff too. But I need this MS SOAPToolkit stuff (to use the Axis powered web service from VBA in MS Office documents). I think it's a problem in the SOAPToolkit, not in Axis, but the SOAPToolkit is there and will not be changed/supported in the future ... For boolean, Axis is using xsd:boolean. Is there a way to let Axis create xsd:string elements? Thanx a lot! Merten This e-mail may be privileged and/or confidential, and the sender does not waive any related rights and obligations. Any distribution, use or copying of this e-mail or the information it contains by other than an intended recipient is unauthorized. If you received this e-mail in error, please advise me (by return e-mail or otherwise) immediately. Ce courrier électronique est confidentiel et protégé. L'expéditeur ne renonce pas aux droits et obligations qui s'y rapportent. Toute diffusion, utilisation ou copie de ce message ou des renseignements qu'il contient par une personne autre que le (les) destinataire(s) désigné(s) est interdite. Si vous recevez ce courrier électronique par erreur, veuillez m'en aviser immédiatement, par retour de courrier électronique ou par un autre moyen.
RE: is it possible to change soapenc:string to xsd:string in generated WSDL?
Title: RE: is it possible to change soapenc:string to xsd:string in generated WSDL? I couldn't get it to work either - that's why I said "They say" :) - but I haven't had time to do a lot of research into it. -Original Message-From: Merten Schumann [mailto:[EMAIL PROTECTED]Sent: 15 March 2005 5:03 To: axis-user@ws.apache.orgSubject: RE: is it possible to change soapenc:string to xsd:string in generated WSDL? Wow, aedemar, thank you, that looks exactly like what I need. Tried it with 1.2RC3, but seems to have no effect, there are still these soapenc:string beasts in the generated WSDL ... Will continue my tries ... cu Merten From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] Sent: Tuesday, March 15, 2005 5:51 PMTo: axis-user@ws.apache.orgSubject: RE: is it possible to change soapenc:string to xsd:string in generated WSDL? see http://issues.apache.org/jira/browse/AXIS-1834. They say it can be solved with by adding the new "dotNetSoapEncFix" flag in your server-config.wsdd's globalConfiguration section. Axis documentation has more info. -Original Message- From: Merten Schumann [mailto:[EMAIL PROTECTED]] Sent: 15 March 2005 4:46 To: axis-user@ws.apache.org Subject: is it possible to change soapenc:string to xsd:string in generated WSDL? Hello, when testing my web service (Axis 1.2RC3) with MS SOAPToolkit 3.0 I found that it's not working obviously due to this soapenc:string encodings instead of xsd:string. I found some cries for help regarding this interop issue in the web, but no solution as far as I could see. Maybe you've seen this message from MSSoapInit too "SoapMapper for element string could not be created". I could try to hand over my own WSDL file (created with Sun's wscompile from J2EE stuff) to the WSDD deploy step, but I guess Axis will not accept it or so. My Perl and Python clients work fine. Some .NET stuff too. But I need this MS SOAPToolkit stuff (to use the Axis powered web service from VBA in MS Office documents). I think it's a problem in the SOAPToolkit, not in Axis, but the SOAPToolkit is there and will not be changed/supported in the future ... For boolean, Axis is using xsd:boolean. Is there a way to let Axis create xsd:string elements? Thanx a lot! Merten This e-mail may be privileged and/or confidential, and the sender does not waive any related rights and obligations. Any distribution, use or copying of this e-mail or the information it contains by other than an intended recipient is unauthorized. If you received this e-mail in error, please advise me (by return e-mail or otherwise) immediately. Ce courrier électronique est confidentiel et protégé. L'expéditeur ne renonce pas aux droits et obligations qui s'y rapportent. Toute diffusion, utilisation ou copie de ce message ou des renseignements qu'il contient par une personne autre que le (les) destinataire(s) désigné(s) est interdite. Si vous recevez ce courrier électronique par erreur, veuillez m'en aviser immédiatement, par retour de courrier électronique ou par un autre moyen. This e-mail may be privileged and/or confidential, and the sender does not waive any related rights and obligations. Any distribution, use or copying of this e-mail or the information it contains by other than an intended recipient is unauthorized. If you received this e-mail in error, please advise me (by return e-mail or otherwise) immediately. Ce courrier électronique est confidentiel et protégé. L'expéditeur ne renonce pas aux droits et obligations qui s'y rapportent. Toute diffusion, utilisation ou copie de ce message ou des renseignements qu'il contient par une personne autre que le (les) destinataire(s) désigné(s) est interdite. Si vous recevez ce courrier électronique par erreur, veuillez m'en aviser immédiatement, par retour de courrier électronique ou par un autre moyen.
.NET Interop
FYI I updated the AXIS wiki page on .NET Interop http://wiki.apache.org/ws/FrontPage/Axis/DotNetInterop And added a new page http://wiki.apache.org/ws/DotNetInteropArrays
RE: is it possible to change soapenc:string to xsd:string in generated WSDL?
Title: RE: is it possible to change soapenc:string to xsd:string in generated WSDL? I do know, Dino, I do know. And I do understand. And I do agree. But have to create this VBA stuff. And I have to create the same stuff (at the end a Excel document too) utilizing .NET too. So I just want to get both things working.:-) cu Merten From: Dino Chiesa [mailto:[EMAIL PROTECTED] Sent: Tuesday, March 15, 2005 6:11 PMTo: axis-user@ws.apache.orgSubject: RE: is it possible to change soapenc:string to xsd:string in generated WSDL? Don't use MS SOAP Toolkit. It will reach end-of-life in a month or so. Abetter approach is to build a .NET webservice client, and expose that .NET assembly via COM interop (tlbexp). if you follow this approach, clients (your Office docs) need the .NET Framework installed. here's a related link http://blogs.msdn.com/dotnetinterop/archive/2004/11/22/267933.aspx From: Merten Schumann [mailto:[EMAIL PROTECTED] Sent: Tuesday, March 15, 2005 12:03 PMTo: axis-user@ws.apache.orgSubject: RE: is it possible to change soapenc:string to xsd:string in generated WSDL? Wow, aedemar, thank you, that looks exactly like what I need. Tried it with 1.2RC3, but seems to have no effect, there are still these soapenc:string beasts in the generated WSDL ... Will continue my tries ... cu Merten From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] Sent: Tuesday, March 15, 2005 5:51 PMTo: axis-user@ws.apache.orgSubject: RE: is it possible to change soapenc:string to xsd:string in generated WSDL? see http://issues.apache.org/jira/browse/AXIS-1834. They say it can be solved with by adding the new "dotNetSoapEncFix" flag in your server-config.wsdd's globalConfiguration section. Axis documentation has more info. -Original Message- From: Merten Schumann [mailto:[EMAIL PROTECTED]] Sent: 15 March 2005 4:46 To: axis-user@ws.apache.org Subject: is it possible to change soapenc:string to xsd:string in generated WSDL? Hello, when testing my web service (Axis 1.2RC3) with MS SOAPToolkit 3.0 I found that it's not working obviously due to this soapenc:string encodings instead of xsd:string. I found some cries for help regarding this interop issue in the web, but no solution as far as I could see. Maybe you've seen this message from MSSoapInit too "SoapMapper for element string could not be created". I could try to hand over my own WSDL file (created with Sun's wscompile from J2EE stuff) to the WSDD deploy step, but I guess Axis will not accept it or so. My Perl and Python clients work fine. Some .NET stuff too. But I need this MS SOAPToolkit stuff (to use the Axis powered web service from VBA in MS Office documents). I think it's a problem in the SOAPToolkit, not in Axis, but the SOAPToolkit is there and will not be changed/supported in the future ... For boolean, Axis is using xsd:boolean. Is there a way to let Axis create xsd:string elements? Thanx a lot! Merten This e-mail may be privileged and/or confidential, and the sender does not waive any related rights and obligations. Any distribution, use or copying of this e-mail or the information it contains by other than an intended recipient is unauthorized. If you received this e-mail in error, please advise me (by return e-mail or otherwise) immediately. Ce courrier électronique est confidentiel et protégé. L'expéditeur ne renonce pas aux droits et obligations qui s'y rapportent. Toute diffusion, utilisation ou copie de ce message ou des renseignements qu'il contient par une personne autre que le (les) destinataire(s) désigné(s) est interdite. Si vous recevez ce courrier électronique par erreur, veuillez m'en aviser immédiatement, par retour de courrier électronique ou par un autre moyen.
Re: Help about Array and WSDL
Hi Dino, Which the alterations that I would have to make in your Arrays2.wsdl file to use RPC/Encoded? For exemple, how would be this message tag? message name=SendArrayOfStringSoapIn part name=parameters element=s0:SendArrayOfString / /message Because when RPC/Encoed is used, part tag would have to use type and not element. Thanks, Ana Carolina
Re: Help about Array and WSDL
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 [EMAIL PROTECTED] wrote: | Hi Dino, | Which the alterations that I would have to make in your Arrays2.wsdl | file to use RPC/Encoded? | For exemple, how would be this message tag? | message name=SendArrayOfStringSoapIn | part name=parameters element=s0:SendArrayOfString / | /message | Because when RPC/Encoed is used, part tag would have to use type and | not element. | Thanks, | Ana Carolina ~ As a general rule, I have found that if you are using rpc/enc that java2wsdl, then wsdl2java works fine, generally. - -- Love is mutual self-giving that ends in self-recovery. Fulton Sheen James Black[EMAIL PROTECTED] -BEGIN PGP SIGNATURE- Version: GnuPG v1.2.5 (MingW32) Comment: Using GnuPG with Thunderbird - http://enigmail.mozdev.org iD8DBQFCN1RqikQgpVn8xrARAuViAJ0R1O0mcgM3EmBwIFd+AMkvU+7DfQCcDC9o qbYwabsG4DeO9JhXMxZ9fCo= =8BtM -END PGP SIGNATURE-
Re: Help about Array and WSDL
Hi James, yes, java2wsdl and wsdl2java work fine, however a wrapper type (ArrayOfXxx) for the array is created. My method is: Note[] findNotesByCooperationId(int cooperationId) and my wsdl generated by Java2WSDL is: ... schema targetNamespace=http://business.annotation.infravida.cenas; xmlns=http://www.w3.org/2001/XMLSchema; import namespace=http://ws.communication.annotation.infravida.cenas/ import namespace=http://schemas.xmlsoap.org/soap/encoding// complexType name=Note sequence element name=author nillable=true type=xsd:string/ element name=cooperationId type=xsd:int/ element name=date nillable=true type=xsd:dateTime/ element name=note nillable=true type=xsd:string/ element name=id type=xsd:int/ /sequence /complexType /schema schema targetNamespace=http://ws.communication.annotation.infravida.cenas; xmlns=http://www.w3.org/2001/XMLSchema; import namespace=http://business.annotation.infravida.cenas/ import namespace=http://schemas.xmlsoap.org/soap/encoding// complexType name=ArrayOf_tns2_Note complexContent restriction base=soapenc:Array attribute ref=soapenc:arrayType wsdl:arrayType=tns2:Note[]/ /restriction /complexContent /complexType /schema /wsdl:types wsdl:message name=findNotesByCooperationRequest wsdl:part name=in0 type=xsd:int/ /wsdl:message wsdl:message name=findNotesByCooperationResponse wsdl:part name=findNotesByCooperationReturn type=impl:ArrayOf_tns2_Note/ /wsdl:message ... Is it Correct? Is my wsdl WS-I compliant? Thanks, Ana Carolina. James Black writes: -BEGIN PGP SIGNED MESSAGE- Hash: SHA1 [EMAIL PROTECTED] wrote: | Hi Dino, | Which the alterations that I would have to make in your Arrays2.wsdl | file to use RPC/Encoded? | For exemple, how would be this message tag? | message name=SendArrayOfStringSoapIn | part name=parameters element=s0:SendArrayOfString / | /message | Because when RPC/Encoed is used, part tag would have to use type and | not element. | Thanks, | Ana Carolina ~ As a general rule, I have found that if you are using rpc/enc that java2wsdl, then wsdl2java works fine, generally. - -- Love is mutual self-giving that ends in self-recovery. Fulton Sheen James Black[EMAIL PROTECTED] -BEGIN PGP SIGNATURE- Version: GnuPG v1.2.5 (MingW32) Comment: Using GnuPG with Thunderbird - http://enigmail.mozdev.org iD8DBQFCN1RqikQgpVn8xrARAuViAJ0R1O0mcgM3EmBwIFd+AMkvU+7DfQCcDC9o qbYwabsG4DeO9JhXMxZ9fCo= =8BtM -END PGP SIGNATURE-
re: problem using lit/doc for .net clients, bug reported
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 It appears to be bug 1876, I have a testcase to show the problem with anything but rpc/enc when using java2wsdl then wsdl2java. doc/lit/wrapped: BlackboardClient.test.TestRetrieveRSAPublicKey : System.InvalidOperationException : Method BBServerService.getGradesByCourse can not be reflected. ~ System.InvalidOperationException : There was an error reflecting 'getGradesByCourseResult'. ~ System.InvalidOperationException : There was an error reflecting type 'BlackboardClient.edu.usf.acomp.webservice.blackboard.UserGrades'. ~ System.InvalidOperationException : There was an error reflecting field 'grades'. ~ System.InvalidOperationException : The XML element named 'item' from namespace 'http://localhost/axis/services/BBServer' references distinct types BlackboardClient.edu.usf.acomp.webservice.blackboard.MessageBean and BlackboardClient.edu.usf.acomp.webservice.blackboard.UserGradeItem. Use XML attributes to specify another XML name or namespace for the element or types. doc/lit: won't compile, as the the bean package name and class is changed for MessageBean[]. - -- Love is mutual self-giving that ends in self-recovery. Fulton Sheen James Black[EMAIL PROTECTED] -BEGIN PGP SIGNATURE- Version: GnuPG v1.2.5 (MingW32) Comment: Using GnuPG with Thunderbird - http://enigmail.mozdev.org iD8DBQFCN1o0ikQgpVn8xrARAr+sAJkBqwFehktZDSVdDvCl2npefQX73ACffpnc Feb3H8gDSV3PDH6lrY6ZLX4= =YEHN -END PGP SIGNATURE-
RE: Help about Array and WSDL
Sorry, I don't speak rpc/enc (on moral principles), so I cannot help you to build such a service. But it works in doc/lit, so... ? Maybe you should use *that* ? -Original Message- From: James Black [mailto:[EMAIL PROTECTED] Sent: Tuesday, March 15, 2005 5:00 PM To: axis-user@ws.apache.org Subject: Re: Help about Array and WSDL -BEGIN PGP SIGNED MESSAGE- Hash: SHA1 [EMAIL PROTECTED] wrote: | Hi James, | yes, java2wsdl and wsdl2java work fine, however a wrapper type | (ArrayOfXxx) for the array is created. | My method is: | Note[] findNotesByCooperationId(int cooperationId) and my wsdl | generated by Java2WSDL is: | ... | schema targetNamespace=http://business.annotation.infravida.cenas; | xmlns=http://www.w3.org/2001/XMLSchema; | import | namespace=http://ws.communication.annotation.infravida.cenas/ | import namespace=http://schemas.xmlsoap.org/soap/encoding// | complexType name=Note | sequence | element name=author nillable=true type=xsd:string/ | element name=cooperationId type=xsd:int/ | element name=date nillable=true type=xsd:dateTime/ | element name=note nillable=true type=xsd:string/ | element name=id type=xsd:int/ | /sequence | /complexType | /schema | schema | targetNamespace=http://ws.communication.annotation.infravida.cenas; | xmlns=http://www.w3.org/2001/XMLSchema; | import namespace=http://business.annotation.infravida.cenas/ | import namespace=http://schemas.xmlsoap.org/soap/encoding// | complexType name=ArrayOf_tns2_Note complexContent | restriction base=soapenc:Array |attribute ref=soapenc:arrayType wsdl:arrayType=tns2:Note[]/ | /restriction | /complexContent | /complexType | /schema | /wsdl:types | wsdl:message name=findNotesByCooperationRequest | wsdl:part name=in0 type=xsd:int/ /wsdl:message wsdl:message | name=findNotesByCooperationResponse |wsdl:part name=findNotesByCooperationReturn | type=impl:ArrayOf_tns2_Note/ | /wsdl:message | ... | Is it Correct? Is my wsdl WS-I compliant? ~ It isn't WS-I compliant if you use rpc/enc, but, at the moment my priority is on having the webservice working, and aim for compliance when axis will work with me on this. :) - -- Love is mutual self-giving that ends in self-recovery. Fulton Sheen James Black[EMAIL PROTECTED] -BEGIN PGP SIGNATURE- Version: GnuPG v1.2.5 (MingW32) Comment: Using GnuPG with Thunderbird - http://enigmail.mozdev.org iD8DBQFCN1rOikQgpVn8xrARAm/8AKCRRkkiqtmFjsk3dTTC1gXVrIuUAQCbBtQg V9gl96OVlxQy//RLVeEoDOE= =gDo4 -END PGP SIGNATURE-
RE: org.xml.sax.SAXException: SimpleDeserializer encountered a ch ild element...
Actually, that WSDL validated in the eclipse plugin... I was including an external wsdl into the wsdd file so that axis would not generate one for me. I have determined that is not the problem. Here is what is happening now (I've been dealing with this issue for a while): I have a PurchaseOrder java bean with a description field on it. Again, I'm using document/literal. If the soap message looks like this, it works: SOAP-ENV:Body echoMessage descriptiontest.../description /echoMessage SOAP-ENV:Body This does NOT work: SOAP-ENV:Body echoMessage PurchaseOrder descriptiontest.../description PurchaseOrder /echoMessage SOAP-ENV:Body When I put the PurchaseOrder node in, it breaks. This is just a proof of concept service, but when we implement, I will need the root node in there to validate against an industry standard schema. In this case, I'm just using PurchaseOrder. Any ideas? Thanks for the reply. Here is the WSDL: (copied from the running service, auto-generated from axis) wsdl:definitions targetNamespace=http://localhost:8080/poc-axis-server/services/MessageService; !-- WSDL created by Apache Axis version: 1.2RC2 Built on Nov 16, 2004 (12:19:44 EST) -- wsdl:types schema elementFormDefault=qualified targetNamespace=http://localhost:8080/poc-axis-server/services/MessageService; complexType name=purchaseOrder sequence element name=description nillable=true type=xsd:string/ /sequence /complexType element name=echoMessageReturn type=xsd:string/ /schema schema elementFormDefault=qualified targetNamespace=http://server.web.services.farmsource.com; import namespace=http://localhost:8080/poc-axis-server/services/MessageService/ element name=po type=impl:purchaseOrder/ /schema /wsdl:types wsdl:message name=echoMessageResponse wsdl:part element=impl:echoMessageReturn name=echoMessageReturn/ /wsdl:message wsdl:message name=echoMessageRequest wsdl:part element=tns1:po name=po/ /wsdl:message wsdl:portType name=JaxRpcMessageService wsdl:operation name=echoMessage parameterOrder=po wsdl:input message=impl:echoMessageRequest name=echoMessageRequest/ wsdl:output message=impl:echoMessageResponse name=echoMessageResponse/ /wsdl:operation /wsdl:portType wsdl:binding name=MessageServiceSoapBinding type=impl:JaxRpcMessageService wsdlsoap:binding style=document transport=http://schemas.xmlsoap.org/soap/http/ wsdl:operation name=echoMessage wsdlsoap:operation soapAction=/ wsdl:input name=echoMessageRequest wsdlsoap:body use=literal/ /wsdl:input wsdl:output name=echoMessageResponse wsdlsoap:body use=literal/ /wsdl:output /wsdl:operation /wsdl:binding wsdl:service name=JaxRpcMessageServiceService wsdl:port binding=impl:MessageServiceSoapBinding name=MessageService wsdlsoap:address location=http://localhost:8080/poc-axis-server/services/MessageService/ /wsdl:port /wsdl:service /wsdl:definitions -Original Message- From: Dino Chiesa [mailto:[EMAIL PROTECTED] Sent: Tuesday, March 15, 2005 4:24 PM To: axis-user@ws.apache.org Subject: RE: org.xml.sax.SAXException: SimpleDeserializer encountered a child element... It looks like a disagreement in XML namespace. The echoMessage in the wsdl appears to be in a particular namespace, whereas the VB6 client is sending a message in no namespace at all. echoMessage PurchaseOrder descriptionstring/description /PurchaseOrder /echoMessage The WSDL you sent isn't a real wsdl. It is missing a bunch of stuff? So it is hard to say whether what I wrote above is right. -Original Message- From: BALDWIN, ALAN J [AG-Contractor/1000] [mailto:[EMAIL PROTECTED] Sent: Tuesday, March 15, 2005 5:03 PM To: 'axis-user@ws.apache.org' Subject: RE: org.xml.sax.SAXException: SimpleDeserializer encountered a child element... Here is the response I'm getting, if this helps. I've seen several people having this problem on the web, but nobody seems to have posted any fixes. soapenv:Fault xmlns:soapenv=http://schemas.xmlsoap.org/soap/envelope/; faultcodesoapenv:Server.userException/faultcode faultstringorg.xml.sax.SAXException: SimpleDeserializer encountered a child element, which is NOT expected, in something it was trying to deserialize./faultstring detail ns1:hostname xmlns:ns1=http://xml.apache.org/axis/;LCEVER/ns1:hostname /detail /soapenv:Fault Thanks, -Alan Baldwin- -Original Message- From: BALDWIN, ALAN J [AG-Contractor/1000] [mailto:[EMAIL PROTECTED]
RE: org.xml.sax.SAXException: SimpleDeserializer encountered a ch ild element...
I forgot to include this: beanMapping languageSpecificType=java:com.farmsource.domain.PurchaseOrder qname=impl:purchaseOrder xmlns:impl=http://localhost:8080/poc-axis-server/services/MessageService; / -Original Message- From: BALDWIN, ALAN J [AG-Contractor/1000] [mailto:[EMAIL PROTECTED] Sent: Tuesday, March 15, 2005 4:40 PM To: 'axis-user@ws.apache.org' Subject: RE: org.xml.sax.SAXException: SimpleDeserializer encountered a ch ild element... Actually, that WSDL validated in the eclipse plugin... I was including an external wsdl into the wsdd file so that axis would not generate one for me. I have determined that is not the problem. Here is what is happening now (I've been dealing with this issue for a while): I have a PurchaseOrder java bean with a description field on it. Again, I'm using document/literal. If the soap message looks like this, it works: SOAP-ENV:Body echoMessage descriptiontest.../description /echoMessage SOAP-ENV:Body This does NOT work: SOAP-ENV:Body echoMessage PurchaseOrder descriptiontest.../description PurchaseOrder /echoMessage SOAP-ENV:Body When I put the PurchaseOrder node in, it breaks. This is just a proof of concept service, but when we implement, I will need the root node in there to validate against an industry standard schema. In this case, I'm just using PurchaseOrder. Any ideas? Thanks for the reply. Here is the WSDL: (copied from the running service, auto-generated from axis) wsdl:definitions targetNamespace=http://localhost:8080/poc-axis-server/services/MessageService; !-- WSDL created by Apache Axis version: 1.2RC2 Built on Nov 16, 2004 (12:19:44 EST) -- wsdl:types schema elementFormDefault=qualified targetNamespace=http://localhost:8080/poc-axis-server/services/MessageService; complexType name=purchaseOrder sequence element name=description nillable=true type=xsd:string/ /sequence /complexType element name=echoMessageReturn type=xsd:string/ /schema schema elementFormDefault=qualified targetNamespace=http://server.web.services.farmsource.com; import namespace=http://localhost:8080/poc-axis-server/services/MessageService/ element name=po type=impl:purchaseOrder/ /schema /wsdl:types wsdl:message name=echoMessageResponse wsdl:part element=impl:echoMessageReturn name=echoMessageReturn/ /wsdl:message wsdl:message name=echoMessageRequest wsdl:part element=tns1:po name=po/ /wsdl:message wsdl:portType name=JaxRpcMessageService wsdl:operation name=echoMessage parameterOrder=po wsdl:input message=impl:echoMessageRequest name=echoMessageRequest/ wsdl:output message=impl:echoMessageResponse name=echoMessageResponse/ /wsdl:operation /wsdl:portType wsdl:binding name=MessageServiceSoapBinding type=impl:JaxRpcMessageService wsdlsoap:binding style=document transport=http://schemas.xmlsoap.org/soap/http/ wsdl:operation name=echoMessage wsdlsoap:operation soapAction=/ wsdl:input name=echoMessageRequest wsdlsoap:body use=literal/ /wsdl:input wsdl:output name=echoMessageResponse wsdlsoap:body use=literal/ /wsdl:output /wsdl:operation /wsdl:binding wsdl:service name=JaxRpcMessageServiceService wsdl:port binding=impl:MessageServiceSoapBinding name=MessageService wsdlsoap:address location=http://localhost:8080/poc-axis-server/services/MessageService/ /wsdl:port /wsdl:service /wsdl:definitions -Original Message- From: Dino Chiesa [mailto:[EMAIL PROTECTED] Sent: Tuesday, March 15, 2005 4:24 PM To: axis-user@ws.apache.org Subject: RE: org.xml.sax.SAXException: SimpleDeserializer encountered a child element... It looks like a disagreement in XML namespace. The echoMessage in the wsdl appears to be in a particular namespace, whereas the VB6 client is sending a message in no namespace at all. echoMessage PurchaseOrder descriptionstring/description /PurchaseOrder /echoMessage The WSDL you sent isn't a real wsdl. It is missing a bunch of stuff? So it is hard to say whether what I wrote above is right. -Original Message- From: BALDWIN, ALAN J [AG-Contractor/1000] [mailto:[EMAIL PROTECTED] Sent: Tuesday, March 15, 2005 5:03 PM To: 'axis-user@ws.apache.org' Subject: RE: org.xml.sax.SAXException: SimpleDeserializer encountered a child element... Here is the response I'm getting, if this helps. I've seen several people having this problem on the web, but nobody seems to have posted any fixes. soapenv:Fault
Using .NET how to deserialize obj from detail element of SOAP fault sentby AXIS?
Hello, I'm trying to build a C# client to consume an AXIS Web Service (running SOAP over HTTP). The Web Service encodes full server-side exception traces in the Soap Fault Detail element using complex type structures declared in the WSDL file. I have had absolutely no luck working out how I can deserialize the custom server exception object out of the detail element using .NET (C#). I' wondering if anyone in the AXIS community has done this before? I have tried both SoapFormatter, and XmlSerializer with absolutely no luck. try { e.g. login operation } catch (System.Web.Services.Protocols.SoapException e) { XmlReader reader = null; XmlWriter writer = null; MemoryStream mem = new MemoryStream(); FdkException fe = null; try { reader = new XmlNodeReader(e.Detail.FirstChild); writer = new XmlTextWriter(mem, System.Text.Encoding.UTF8); writer.WriteNode(reader,true); writer.Flush(); mem.Position = 0; Add deserialization code here fe = (FdkException) } catch (Exception ex) { System.Console.WriteLine(ex.toString()); throw; } } The first deserialization mechansim I tried was using System.Runtime.Serialization.Formatters.Soap.SoapFormatter SoapFormatter sf = new SoapFormatter(); sf.Binder = new FdkExceptionDeserializationBinder(); fe = (FdkException) sf.Deserialize(mem); With FdkExceptionDeserializationBinder.cs looking like the following: public class FdkExceptionDeserializationBinder : System.Runtime.Serialization.SerializationBinder { public override Type BindToType(string assemblyName, string typeName) { if (assemblyName.Equals("http://xmlns.mycompany.com/app/ws")) { switch (typeName) { case "FdkException" : return typeof(FdkException); break; case "ArrayOfFdkExceptionEntry" : return typeof(FdkExceptionEntry[]); break; } } return Type.GetType(String.Format("{0}, {1}", typeName, assemblyName)); } } This deserialization approach resulted in an exception: Exception Type: System.Runtime.Serialization.SerializationException Message: No Top Object Source: System.Runtime.Serialization.Formatters.Soap The second deserialization mechanism I tried was using XmlSerializer: XmlTypeMapping myMapping = (new SoapReflectionImporter().ImportTypeMapping(typeof(FdkException))); XmlSerializer serializer = new XmlSerializer(myMapping); fe = (FdkException) serializer.Deserialize(mem); I set Soap options in the FdkException class: using System; using System.Xml.Serialization; ... [Serializable] [SoapTypeAttribute(Namespace="http://xmlns.mycompany.com/app/ws", TypeName=fault)] public class FdkException { public string errorCode; public FdkExceptionEntry[] exceptionEntries; public string serverStackTraceId; } using System; using System.Xml.Serialization; [Serializable] [SoapTypeAttribute(Namespace="http://xmlns.mycompany.com/app/ws", TypeName=FdkExceptionEntry)] public class FdkExceptionEntry { public string errorCode; public long id; public string serverStackTraceId; } I got the following exception: Message: There is an error in XML Document (1,541). Exception Type: System.InvalidOperationException Source: System.Xml Inner Exception: Message: Cannot assign object of type System.Xml.XmlNode[] to an object of type FdkException Exception Type: System.InvalidCastException Below is the SOAP message returned from the server on an invalid logon attempt (including Fault):- soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" soapenv:Body soapenv:Fault faultcodesoapenv:Server.userException/faultcode faultstringAccessDenied/faultstring detail ns1:fault xsi:type="ns1:FdkException" xmlns:ns1="http://xmlns.mycompany.com/app/ws" errorCode xsi:type="soapenc:string" xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/"AccessDenied - Invalid Credentials/errorCode exceptionEntries xsi:type="ns1:ArrayOfFdkExceptionEntry" xsi:nil="true"/ serverStackTraceId xsi:type="soapenc:string" xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/"/ /ns1:fault /detail /soapenv:Fault /soapenv:Body /soapenv:Envelope Below is relevant pieces of the WSDL file relating to the FdkException object: wsdl:types schema xmlns="http://www.w3.org/2001/XMLSchema" targetNamespace="http://xmlns.mycompany.com/app/ws" import namespace="http://schemas.xmlsoap.org/soap/encoding/"/ complexType name="FdkExceptionEntry" sequence element name="errorCode" nillable="true" type="xsd:string"/ element name="id" type="xsd:long"/ element name="serverStackTraceId" nillable="true" type="xsd:string"/ /sequence /complexType complexType name="ArrayOfFdkExceptionEntry" complexContent restriction base="soapenc:Array" attribute ref="soapenc:arrayType" wsdl:arrayType="impl:FdkExceptionEntry[]"/ /restriction /complexContent /complexType complexType name="FdkException" sequence element name="errorCode" nillable="true" type="xsd:string"/ element name="exceptionEntries"
RE: org.xml.sax.SAXException: SimpleDeserializer encountered a child element...
The reason I say the WSDL isn't valid is, for example, the wsdl: prefix is not defined: wsdl:definitions targetNamespace=http://localhost:8080/poc-axis-server/services/MessageS ervice What is the meaning of the wsdl: prefix in the above ? There are a bunch of other missing prefixes: xsd, impl, etc. -Original Message- From: BALDWIN, ALAN J [AG-Contractor/1000] [mailto:[EMAIL PROTECTED] Sent: Tuesday, March 15, 2005 5:40 PM To: 'axis-user@ws.apache.org' Subject: RE: org.xml.sax.SAXException: SimpleDeserializer encountered a child element... Actually, that WSDL validated in the eclipse plugin... I was including an external wsdl into the wsdd file so that axis would not generate one for me. I have determined that is not the problem. Here is what is happening now (I've been dealing with this issue for a while): I have a PurchaseOrder java bean with a description field on it. Again, I'm using document/literal. If the soap message looks like this, it works: SOAP-ENV:Body echoMessage descriptiontest.../description /echoMessage SOAP-ENV:Body This does NOT work: SOAP-ENV:Body echoMessage PurchaseOrder descriptiontest.../description PurchaseOrder /echoMessage SOAP-ENV:Body When I put the PurchaseOrder node in, it breaks. This is just a proof of concept service, but when we implement, I will need the root node in there to validate against an industry standard schema. In this case, I'm just using PurchaseOrder. Any ideas? Thanks for the reply. Here is the WSDL: (copied from the running service, auto-generated from axis) wsdl:definitions targetNamespace=http://localhost:8080/poc-axis-server/services/MessageS ervice !-- WSDL created by Apache Axis version: 1.2RC2 Built on Nov 16, 2004 (12:19:44 EST) -- wsdl:types schema elementFormDefault=qualified targetNamespace=http://localhost:8080/poc-axis-server/services/MessageS ervice complexType name=purchaseOrder sequence element name=description nillable=true type=xsd:string/ /sequence /complexType element name=echoMessageReturn type=xsd:string/ /schema schema elementFormDefault=qualified targetNamespace=http://server.web.services.farmsource.com; import namespace=http://localhost:8080/poc-axis-server/services/MessageService / element name=po type=impl:purchaseOrder/ /schema /wsdl:types wsdl:message name=echoMessageResponse wsdl:part element=impl:echoMessageReturn name=echoMessageReturn/ /wsdl:message wsdl:message name=echoMessageRequest wsdl:part element=tns1:po name=po/ /wsdl:message wsdl:portType name=JaxRpcMessageService wsdl:operation name=echoMessage parameterOrder=po wsdl:input message=impl:echoMessageRequest name=echoMessageRequest/ wsdl:output message=impl:echoMessageResponse name=echoMessageResponse/ /wsdl:operation /wsdl:portType wsdl:binding name=MessageServiceSoapBinding type=impl:JaxRpcMessageService wsdlsoap:binding style=document transport=http://schemas.xmlsoap.org/soap/http/ wsdl:operation name=echoMessage wsdlsoap:operation soapAction=/ wsdl:input name=echoMessageRequest wsdlsoap:body use=literal/ /wsdl:input wsdl:output name=echoMessageResponse wsdlsoap:body use=literal/ /wsdl:output /wsdl:operation /wsdl:binding wsdl:service name=JaxRpcMessageServiceService wsdl:port binding=impl:MessageServiceSoapBinding name=MessageService wsdlsoap:address location=http://localhost:8080/poc-axis-server/services/MessageService; / /wsdl:port /wsdl:service /wsdl:definitions -Original Message- From: Dino Chiesa [mailto:[EMAIL PROTECTED] Sent: Tuesday, March 15, 2005 4:24 PM To: axis-user@ws.apache.org Subject: RE: org.xml.sax.SAXException: SimpleDeserializer encountered a child element... It looks like a disagreement in XML namespace. The echoMessage in the wsdl appears to be in a particular namespace, whereas the VB6 client is sending a message in no namespace at all. echoMessage PurchaseOrder descriptionstring/description /PurchaseOrder /echoMessage The WSDL you sent isn't a real wsdl. It is missing a bunch of stuff? So it is hard to say whether what I wrote above is right. -Original Message- From: BALDWIN, ALAN J [AG-Contractor/1000] [mailto:[EMAIL PROTECTED] Sent: Tuesday, March 15, 2005 5:03 PM To: 'axis-user@ws.apache.org' Subject: RE: org.xml.sax.SAXException: SimpleDeserializer encountered a child element... Here is the response I'm getting, if this helps. I've seen several people having this problem on the web, but nobody seems to have posted any fixes.
Re: adding Axis to your own Webapp
I build an Axis WAR as follows and it deploys into my container OK. !-- Make an Axis WAR file (suitable for deployment into an Interstage IJServer). This is made from the provided webapps axis files except that the web.xml has to be modified because Interstage deployment does not allow the DOCTYPE element to be split across multiple lines as the original web.xml has. -- target name=axis.make.axis.war.for.interstage description=Make Axis WAR file delete file=${dist.dir}/${axis.war.filename} verbose=true/ war destfile=${dist.dir}/${axis.war.filename} webxml=${src.dir}/metadata/axis/axis-war-web.xml basedir=${axis.root.dir}/webapps/axis metainf dir=${src.dir}/metadata/axis includes=services/**.*/ /war /target The only quirk for me was the original Axis web.xml DOCTYPE was split across multiple lines which for some reason caused deployment to fail. This might not apply to you. Maybe a JIRA issue should be raised for this. And there is nothing in my metadata/axis/services/ directory so you could probably leave that part out. Regrds, Peter. nafise hassani wrote: hi I want to add Axis to my own webapp (I read the user guide but it was incomplete and also the link for the Chapter 15 of Java Development with Ant pdf format did'nt work ) what should I do??? I don't know how can I Run the Axis AdminClient against my own webapp and realy need a clear instruction. __ Do you Yahoo!? Yahoo! Small Business - Try our new resources site! http://smallbusiness.yahoo.com/resources/ 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: org.xml.sax.SAXException: SimpleDeserializer encountered a child element...
The xs:schema in your types section is missing a targetNamespace. Presuming that you mean this namespace to be targetNamespace=http://localhost:8080/poc-axis-server/services/MessageServi ce then you should add the xmls:impl=http://localhost:8080/poc-axis-server/services/MessageService; attribute in the appropriate place. Then the soap body you transmit should contain impl:echoMessage impl:PurchaseOrder impl:description... Jeff - Original Message - From: Dino Chiesa [EMAIL PROTECTED] To: axis-user@ws.apache.org Sent: Tuesday, March 15, 2005 3:56 PM Subject: RE: org.xml.sax.SAXException: SimpleDeserializer encountered a child element... Ps: you originally said you were using AXIS 1.2RC3, But that WSDL doc (which I still cannot parse) says it was generated by AXIS 1.2RC2. ?? Seems like in your WSDD you are specifying a static WSDL? Is that right? Then there is nothing guaranteeing that the static WSDL you are serving actually conforms to what your code is expecting. The static WSDL file could have a picture of tweety bird in it, but that doesn't mean your MessageService actually implements the tweety bird contract. -Dino -Original Message- From: BALDWIN, ALAN J [AG-Contractor/1000] [mailto:[EMAIL PROTECTED] Sent: Tuesday, March 15, 2005 5:40 PM To: 'axis-user@ws.apache.org' Subject: RE: org.xml.sax.SAXException: SimpleDeserializer encountered a child element... Actually, that WSDL validated in the eclipse plugin... I was including an external wsdl into the wsdd file so that axis would not generate one for me. I have determined that is not the problem. Here is what is happening now (I've been dealing with this issue for a while): I have a PurchaseOrder java bean with a description field on it. Again, I'm using document/literal. If the soap message looks like this, it works: SOAP-ENV:Body echoMessage descriptiontest.../description /echoMessage SOAP-ENV:Body This does NOT work: SOAP-ENV:Body echoMessage PurchaseOrder descriptiontest.../description PurchaseOrder /echoMessage SOAP-ENV:Body When I put the PurchaseOrder node in, it breaks. This is just a proof of concept service, but when we implement, I will need the root node in there to validate against an industry standard schema. In this case, I'm just using PurchaseOrder. Any ideas? Thanks for the reply. Here is the WSDL: (copied from the running service, auto-generated from axis) wsdl:definitions targetNamespace=http://localhost:8080/poc-axis-server/services/MessageS ervice !-- WSDL created by Apache Axis version: 1.2RC2 Built on Nov 16, 2004 (12:19:44 EST) -- wsdl:types schema elementFormDefault=qualified targetNamespace=http://localhost:8080/poc-axis-server/services/MessageS ervice complexType name=purchaseOrder sequence element name=description nillable=true type=xsd:string/ /sequence /complexType element name=echoMessageReturn type=xsd:string/ /schema schema elementFormDefault=qualified targetNamespace=http://server.web.services.farmsource.com; import namespace=http://localhost:8080/poc-axis-server/services/MessageService / element name=po type=impl:purchaseOrder/ /schema /wsdl:types wsdl:message name=echoMessageResponse wsdl:part element=impl:echoMessageReturn name=echoMessageReturn/ /wsdl:message wsdl:message name=echoMessageRequest wsdl:part element=tns1:po name=po/ /wsdl:message wsdl:portType name=JaxRpcMessageService wsdl:operation name=echoMessage parameterOrder=po wsdl:input message=impl:echoMessageRequest name=echoMessageRequest/ wsdl:output message=impl:echoMessageResponse name=echoMessageResponse/ /wsdl:operation /wsdl:portType wsdl:binding name=MessageServiceSoapBinding type=impl:JaxRpcMessageService wsdlsoap:binding style=document transport=http://schemas.xmlsoap.org/soap/http/ wsdl:operation name=echoMessage wsdlsoap:operation soapAction=/ wsdl:input name=echoMessageRequest wsdlsoap:body use=literal/ /wsdl:input wsdl:output name=echoMessageResponse wsdlsoap:body use=literal/ /wsdl:output /wsdl:operation /wsdl:binding wsdl:service name=JaxRpcMessageServiceService wsdl:port binding=impl:MessageServiceSoapBinding name=MessageService wsdlsoap:address location=http://localhost:8080/poc-axis-server/services/MessageService; / /wsdl:port /wsdl:service /wsdl:definitions -Original Message- From: Dino Chiesa [mailto:[EMAIL PROTECTED] Sent: Tuesday, March 15, 2005 4:24 PM To: axis-user@ws.apache.org Subject: RE: org.xml.sax.SAXException: SimpleDeserializer encountered a child element... It looks like a disagreement in XML namespace. The echoMessage in the wsdl appears to be in a particular namespace, whereas the VB6 client is sending a message in no namespace at all. echoMessage PurchaseOrder descriptionstring/description /PurchaseOrder /echoMessage The WSDL you sent isn't a real wsdl. It is missing a bunch of stuff? So it is hard to say whether what I wrote above is right. -Original Message- From:
RE: Using .NET how to deserialize obj from detail element of SOAP fault sentby AXIS?
Hi Dino, Thanks for your reply. Does .NET uses XMLSerializer behind the scenes to perform serialization/deserialization of SOAP messages? If so, it seems to support these complex array types (defined in the same .WSDL file) fine - and I didn't do anything tricky to make this happen either. I just used the web reference tool to point to the WSDL file and woila! For example, on a successful login, the server returns a loginResponse message that is defined as following: wsdl:message name="loginResponse" wsdl:part name="loginReturn" type="impl:ArrayOfNamedValue" / /wsdl:message complexType name="NamedValue" sequence element name="name" nillable="true" type="xsd:string" / element name="value" nillable="true" type="xsd:anyType" / /sequence/complexType complexType name="ArrayOfNamedValue" complexContent restriction base="soapenc:Array"attribute ref="soapenc:arrayType" wsdl:arrayType="impl:NamedValue[]" / /restriction /complexContent/complexType complexType name="Item" sequence element name="id" type="xsd:long" / element name="name" nillable="true" type="xsd:string" / element name="requestedAttributes" nillable="true" type="impl:ArrayOfNamedValue" / element name="type" nillable="true" type="xsd:string" / /sequence/complexType Where: xmlns:impl="http://xmlns.mycompany.com/app/ws" and: xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/"and: xmlns:xsd="http://www.w3.org/2001/XMLSchema" In my code, the following works perfectly: int sessionTimeout = -1, transactionTimeout = -1;Item user = null;NamedValue[] nvArray = null;try{ nvArray = rlManager.login(username,password);}catch(System.Web.Services.Protocols.SoapException e){ throw;}for (int i=0; i nvArray.Length; i++){ switch (nvArray[i].name) { case WebServiceConstants.LOGIN_USER: if (!(nvArray[i].value is Item)) throw new exception.UnexpectedTypeException(WebServiceConstants.LOGIN_USER + " not an Item."); user = (Item) nvArray[i].value; if (user.type != ItemTypes.USER) throw new exception.UnexpectedTypeException(WebServiceConstants.LOGIN_USER + " not an Item of type " + ItemTypes.USER); break; case WebServiceConstants.SESSION_TIMEOUT: if (!(nvArray[i].value is Int32)) throw new exception.UnexpectedTypeException(WebServiceConstants.SESSION_TIMEOUT + " not an Int32."); sessionTimeout = (Int32) nvArray[i].value; break; case WebServiceConstants.TRANSACTION_TIMEOUT: if (!(nvArray[i].value is Int32)) throw new exception.UnexpectedTypeException(WebServiceConstants.TRANSACTION_TIMEOUT + " not an Int32."); transactionTimeout = (Int32) nvArray[i].value; break; default: break; }}if (user == null){ throw new exception.AccessDeniedException();} Is there an alternative preferred/standard mechanism to define array types in the WSDL? Assuming I was not using the funky array stuff, and just trying to deserializea standard object with xsd string/int attributes etc by using the detail element inside a SoapException, do you know how you would go about doing this? many thanks, Matt. From: "Dino Chiesa" [EMAIL PROTECTED] Reply-To: axis-user@ws.apache.org To: axis-user@ws.apache.org Subject: RE: Using .NET how to deserialize obj from detail element of SOAP fault sentby AXIS? Date: Tue, 15 Mar 2005 17:32:05 -0800 first, get rid of that soapenc:Array stuff. .NET's XML Serializer won't handle that ! The SOAP serializer might, but I can't help you there. From: M S [mailto:[EMAIL PROTECTED] Sent: Tuesday, March 15, 2005 6:53 PM To: axis-user@ws.apache.org Subject: Using .NET how to deserialize obj from detail element of SOAP fault sentby AXIS? Hello, I'm trying to build a C# client to consume an AXIS Web Service (running SOAP over HTTP).The Web Service encodes full server-side exception traces in the Soap Fault Detail element using complex type structures declared in the WSDL file. I have had absolutely no luck working out how I can deserialize the custom server exception object out of the detail element using .NET (C#).I' wondering if anyone in the AXIS community has done this before? I have tried both SoapFormatter, and XmlSerializer with absolutely no luck. try { e.g. login operation } catch (System.Web.Services.Protocols.SoapException e) { XmlReader reader = null; XmlWriter writer = null; MemoryStream mem = new MemoryStream(); FdkException fe = null; try { reader = new XmlNodeReader(e.Detail.FirstChild); writer = new XmlTextWriter(mem, System.Text.Encoding.UTF8); writer.WriteNode(reader,true); writer.Flush(); mem.Position = 0; Add deserialization code here fe = (FdkException) } catch (Exception ex) { System.Console.WriteLine(ex.toString()); throw; } } The first deserialization mechansim I tried was using System.Runtime.Serialization.Formatters.Soap.SoapFormatter SoapFormatter sf = new SoapFormatter(); sf.Binder = new FdkExceptionDeserializationBinder(); fe = (FdkException) sf.Deserialize(mem); With FdkExceptionDeserializationBinder.cs looking
RE: adding Axis to your own Webapp
I've got just another question in this area: is it allowed by license and all to distribute such an web app added to Axis .war to customers? I mean, at the end you distribute your code AND Axis. I guess you have to add something like This product includes software developed by the Apache Software Foundation. in the readme and include the license file, but you don't have to offer your code for the web app, or? What are the reasons for Axis to not include in the distribution the activation.jar file from Sun JAF? Maybe some license stuff? BTW: I tried my stuff without activation.jar. The happyaxis page tells me Axis will not work because of this file missing. But my simple web app works. So, for which scenarios is this .jar needed? Thank you Merten -Original Message- From: Peter Smith [mailto:[EMAIL PROTECTED] Sent: Wednesday, March 16, 2005 1:55 AM To: axis-user@ws.apache.org Subject: Re: adding Axis to your own Webapp I build an Axis WAR as follows and it deploys into my container OK. !-- Make an Axis WAR file (suitable for deployment into an Interstage IJServer). This is made from the provided webapps axis files except that the web.xml has to be modified because Interstage deployment does not allow the DOCTYPE element to be split across multiple lines as the original web.xml has. -- target name=axis.make.axis.war.for.interstage description=Make Axis WAR file delete file=${dist.dir}/${axis.war.filename} verbose=true/ war destfile=${dist.dir}/${axis.war.filename} webxml=${src.dir}/metadata/axis/axis-war-web.xml basedir=${axis.root.dir}/webapps/axis metainf dir=${src.dir}/metadata/axis includes=services/**.*/ /war /target The only quirk for me was the original Axis web.xml DOCTYPE was split across multiple lines which for some reason caused deployment to fail. This might not apply to you. Maybe a JIRA issue should be raised for this. And there is nothing in my metadata/axis/services/ directory so you could probably leave that part out. Regrds, Peter. nafise hassani wrote: hi I want to add Axis to my own webapp (I read the user guide but it was incomplete and also the link for the Chapter 15 of Java Development with Ant pdf format did'nt work ) what should I do??? I don't know how can I Run the Axis AdminClient against my own webapp and realy need a clear instruction. __ Do you Yahoo!? Yahoo! Small Business - Try our new resources site! http://smallbusiness.yahoo.com/resources/ 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]