Re: FW: Consuming a .NET Windows Integrated Security protected web service
Yes it works. On Tue, 2008-02-05 at 12:53 +0200, Asaf Lahav wrote: Did anyone get my email? (If you did please reply to it… I'm not sure my news group registration works) From: Asaf Lahav [mailto:[EMAIL PROTECTED] Sent: Monday, February 04, 2008 8:26 PM To: 'axis-user@ws.apache.org' Subject: Consuming a .NET Windows Integrated Security protected web service Hello everybody, I need your help in consuming a .NET Windows Integrated Security protected web service. I followed the instructions on the following link: http://people.etango.com/~markm/archives/2005/11/21/using_apache_axis_with_integrated_windows_security.html And I'm still unable to consume the WS. This is the code I'm using: import org.apache.axis.EngineConfiguration; import org.apache.axis.client.Call; import org.apache.axis.client.Service; import org.apache.axis.configuration.FileProvider; public class Test1 { public static void main(String[] args) { try { EngineConfiguration config = new FileProvider(Test1.class .getResourceAsStream(AxisClientDeployment.wsdd)); try { String endpoint = http://MyServer/wsApp/WebService.asmx;; Service service = new Service(config); Call call = (Call) service.createCall(); call.setSOAPActionURI(http://tempuri.org/MyOperation1;); call.setUsername(MyDomain\\MyUser); call.setPassword(MyPassword123456); call.setTargetEndpointAddress(new java.net.URL(endpoint)); call.setOperationName(new QName(http://tempuri.org/;, MyOperation1)); Object ret = call.invoke(new Object[] { app,usr,ctxt }); System.out.println(Response' + ret + '); } catch (Exception e) { e.printStackTrace(); } } catch (Exception e) { } } } Any help would be highly appreciated. Best, Asaf == DISCLAIMER: The information in this message is confidential and may be legally privileged. It is intended solely for the addressee. Access to this message by anyone else is unauthorized. If you are not the intended recipient, any disclosure, copying, or distribution of the message, or any action or omission taken by you in reliance on it, is prohibited and may be unlawful. Please immediately contact the sender if you have received this message in error. Further, this e-mail may contain viruses and all reasonable precaution to minimize the risk arising there from is taken by OnMobile. OnMobile is not liable for any damage sustained by you as a result of any virus in this e-mail. All applicable virus checks should be carried out by you before opening this e-mail or any attachment thereto. Thank you - OnMobile Global Limited. == - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Regarding Axis serialization of user-defined object containing array of objects
Hi Everybody, I was able to solve my problem of serialization. The solution is as follows: I had to mark every member variable of my user-defined object public. Also I had to make a few modifications in my deployment descriptor. I got this info from http://www.javaranch.com/journal/200603/WSComplexTypes.html Now I'm facing a problem with deserializing the object on client side. My Object contains a 2D Array of objects of type java.lang.Object, 2 int values and 1 String object. While deserializing I'm getting the following error: Caused by: org.xml.sax.SAXException: No object was found for class type int at org.apache.axis.encoding.ConstructorTarget.set(ConstructorTarget.java:97) at org.apache.axis.encoding.DeserializerImpl.valueComplete(DeserializerImpl.java:249) at org.apache.axis.encoding.ser.ArrayDeserializer.valueComplete(ArrayDeserializer.java:583) at org.apache.axis.encoding.DeserializerImpl.endElement(DeserializerImpl.java:509) at org.apache.axis.encoding.DeserializationContext.endElement(DeserializationContext.java:1087) at org.apache.axis.message.SAX2EventRecorder.replay(SAX2EventRecorder.java:171) at org.apache.axis.message.MessageElement.publishToHandler(MessageElement.java:1141) at org.apache.axis.encoding.DeserializerImpl.startElement(DeserializerImpl.java:369) at org.apache.axis.encoding.ser.BeanDeserializer.startElement(BeanDeserializer.java:154) at org.apache.axis.encoding.DeserializationContext.startElement(DeserializationContext.java:1048) at org.apache.axis.message.SAX2EventRecorder.replay(SAX2EventRecorder.java:165) at org.apache.axis.message.MessageElement.publishToHandler(MessageElement.java:1141) at org.apache.axis.message.RPCElement.deserialize(RPCElement.java:345) at org.apache.axis.message.RPCElement.getParams(RPCElement.java:384) at org.apache.axis.client.Call.invoke(Call.java:2467) I'm attaching my server-config.wsdd and my client-side program. Can anyone help me here? Thanks, Pratiksha On Tue, 2008-01-29 at 12:25 +0530, Pratiksha Powar wrote: Hi Everybody, I'm trying to return a user-defined object which contains two primitives namely : int and Java String and a 2D array of objects of type :java.lang.Object Can you tell how should I map these objects in the server-config.wsdd file so that axis produces the correct wsdl ? I'm attaching my copy of server-config.wsdd. Also is it possible to write your own wsdl and make axis point to it? Thanks, Pratiksha == DISCLAIMER: The information in this message is confidential and may be legally privileged. It is intended solely for the addressee. Access to this message by anyone else is unauthorized. If you are not the intended recipient, any disclosure, copying, or distribution of the message, or any action or omission taken by you in reliance on it, is prohibited and may be unlawful. Please immediately contact the sender if you have received this message in error. Further, this e-mail may contain viruses and all reasonable precaution to minimize the risk arising there from is taken by OnMobile. OnMobile is not liable for any damage sustained by you as a result of any virus in this e-mail. All applicable virus checks should be carried out by you before opening this e-mail or any attachment thereto. Thank you - OnMobile Global Limited. == - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] package db; import java.net.MalformedURLException; import java.rmi.RemoteException; import javax.xml.rpc.ServiceException; import javax.xml.namespace.QName; import org.apache.axis.client.Call; import org.apache.axis.client.Service; import org.apache.axis.encoding.ser.BeanSerializerFactory; import org.apache.axis.encoding.ser.BeanDeserializerFactory; import org.apache.axis.encoding.ser.ArraySerializerFactory; import org.apache.axis.encoding.ser.ArrayDeserializerFactory; import content.OnMobileResultSet; public class DBManager { private static final String CLASS_NAME = DBManager; //pratiksha: have to obtain endpoint from SPInteractor in DBUtils.java //use the following endpoint while going via tcpMon to connect to Axis private String endpoint = http://127.0.0.1:1234/DBAccess/servlet/AxisServlet;; //private String endpoint = http://172.16.27.23:8010/DBAccess/servlet/AxisServlet;; private Service service ; private String cdNameSpc = BeanOnMobileResultSet; private Class cdClass = OnMobileResultSet.class; private String cdClassName = OnMobileResultSet; private String caNameSpc = BeanOnMobileResultSet; private Class caClass = Object[][].class; private String caClassName =ArrayOf_Content; private QName cdQName = null; private QName caQName = null; public DBManager() { service = new Service(); cdQName = new QName(cdNameSpc, cdClassName); caQName = new QName
Regarding Axis serialization of user-defined object containing array of objects
Hi Everybody, I'm trying to return a user-defined object which contains two primitives namely : int and Java String and a 2D array of objects of type :java.lang.Object Can you tell how should I map these objects in the server-config.wsdd file so that axis produces the correct wsdl ? I'm attaching my copy of server-config.wsdd. Also is it possible to write your own wsdl and make axis point to it? Thanks, Pratiksha server-config.wsdd Description: XML document == DISCLAIMER: The information in this message is confidential and may be legally privileged. It is intended solely for the addressee. Access to this message by anyone else is unauthorized. If you are not the intended recipient, any disclosure, copying, or distribution of the message, or any action or omission taken by you in reliance on it, is prohibited and may be unlawful. Please immediately contact the sender if you have received this message in error. Further, this e-mail may contain viruses and all reasonable precaution to minimize the risk arising there from is taken by OnMobile. OnMobile is not liable for any damage sustained by you as a result of any virus in this e-mail. All applicable virus checks should be carried out by you before opening this e-mail or any attachment thereto. Thank you - OnMobile Global Limited. == - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]