Re: Axis and .NET interop with dates
I would add that .Net has a problem with dates that are defined in your schema as nillable="true". Might be safer to just pass around strings and tell your client what is the format to use - ie, dates in UCT, in mmddhhss format. references: http://wiki.apache.org/ws/FrontPage/Axis/DotNetInterop http://blogs.msdn.com/smguest/archive/2004/05/07/128113.aspx http://msdn.microsoft.com/library/default.asp?url=/library/en-us/cpref/html/frlrfSystemXmlSerializationXmlSerializerClassTopic.asp ellecer On Fri, 25 Mar 2005 08:52:32 -0500, Christian faucher <[EMAIL PROTECTED]> wrote: > Hi, > > As another standardized way of passing date, you should consider julian dates. > > Julian dates are a integer, being the number of days since January 1, > 4713 BC at noon (not midnight). You can also add a fraction of days, > being the number of seconds elapsed since noon. > > Julian dates can be represnted as integers (for a precision to the > day) or as double (for a precision to the millis). > > You can google algorihtms to convert back and forth between julian and > gregorian dates, including support for February 29th and the leap that > occured in 15-ish from Oct, 4 to Oct. 15. > > Just my 5 cents... > > Christian Faucher >
dateTime input error
I am getting an error when I receive date times that are not in the format "-MM-dd HH:mm: ss. SSS z" Is there a way to add or change the dateTime format handler ?
RE: Accessing unparsed XML
Title: RE: Accessing unparsed XML I use a Handler to trace the Axis client stub, SOAP XML request and response to a file. = QName portName = stub.getPortName () ; Service service = stub._getService () ; // Axis 1.2 RC2 HandlerRegistry handlerRegistry = service.getHandlerRegistry () ; List handlerChain = handlerRegistry.getHandlerChain ( portName ) ; MyHandlerInfo handlerInfo = new MyHandlerInfo () ; handlerInfo.setHandlerClass ( MyHandler.class ) ; handlerChain.add ( handlerInfo ) ; handlerRegistry.setHandlerChain ( portName, handlerChain ) ; = public class MyHandler implements Handler { public void init ( HandlerInfo handlerInfo ) throws JAXRPCException { if ( handlerInfo instanceof MyHandlerInfo ) { } } public void destroy () throws JAXRPCException { } public QName[] getHeaders () { return new QName[0] ; } public boolean handleFault ( MessageContext messageContext ) throws JAXRPCException { return true ; // return true to continue processing } public boolean handleRequest ( MessageContext messageContext ) throws JAXRPCException { SOAPMessage message = ((SOAPMessageContext)messageContext).getMessage () ; return true ; // return true to continue processing } public boolean handleResponse ( MessageContext messageContext ) throws JAXRPCException { return true ; // return true to continue processing } -Original Message- From: QM [mailto:[EMAIL PROTECTED]] Sent: Saturday, 26 March 2005 11:05 AM To: axis-user@ws.apache.org Subject: Re: Accessing unparsed XML On Fri, Mar 25, 2005 at 07:36:54PM +0100, Rumm Nikolaus wrote: : I am using Axis for a SOAP client in Java. We need both the parsed : document (for storing parts of it in a database) and the unparsed XML : document (for transforming it into a PDF file using FOP). : : Is there any way to access the raw XML response ? Instead of raw XML, what about the DOM tree (which can easily be serialized back into raw XML)? Look into Axis Handlers. These are not too unlike servlet filters: you insert them between the request and the service endpoint object (via server-config.wsdd) and they can inspect/alter the request/response data. I don't have the exact method names in front of me, but look in the Axis docs (or just Google) for "Handler." Handler objects have access to the MessageContext, which holds (IIRC) the SoapEnvelope object, which in turn holds the SOAP headers/body. -QM -- software -- http://www.brandxdev.net/ tech news -- http://www.RoarNetworX.com/ code scan -- http://www.JxRef.org/
Re: Accessing unparsed XML
On Fri, Mar 25, 2005 at 07:36:54PM +0100, Rumm Nikolaus wrote: : I am using Axis for a SOAP client in Java. We need both the parsed : document (for storing parts of it in a database) and the unparsed XML : document (for transforming it into a PDF file using FOP). : : Is there any way to access the raw XML response ? Instead of raw XML, what about the DOM tree (which can easily be serialized back into raw XML)? Look into Axis Handlers. These are not too unlike servlet filters: you insert them between the request and the service endpoint object (via server-config.wsdd) and they can inspect/alter the request/response data. I don't have the exact method names in front of me, but look in the Axis docs (or just Google) for "Handler." Handler objects have access to the MessageContext, which holds (IIRC) the SoapEnvelope object, which in turn holds the SOAP headers/body. -QM -- software -- http://www.brandxdev.net/ tech news -- http://www.RoarNetworX.com/ code scan -- http://www.JxRef.org/
Accessing unparsed XML
I am using Axis for a SOAP client in Java. We need both the parsed document (for storing parts of it in a database) and the unparsed XML document (for transforming it into a PDF file using FOP). Is there any way to access the raw XML response ? Currently we use Axis in the noob-way (via the generated port objects) and not using SOAPEnvelope... Regards Nikolaus
Axis client and SSL: Unrecognized SSL message
Hi all, I used WSDL2Java to generate a client that calls a web service over SSL. The WS is deployed on my local host in tomcat. The command that I used for this is the following: java -Djavax.net.ssl.trustStore="D:\Java\j2sdk1.4.1 _02\jre\lib\security\myKeyStore" -cp %JAVA2WSDL_CLASSPATH% org.apache.axis.wsdl.WSDL2Java https://jroch2-01:8443/axis/services/HelloWorld?wsdl. I first had some certificate problems but now the client generation works fine. I can also see that the URL is correct in the locator class: private java.lang.String HelloWorld_address = "https://jroch2-01:8443/axis/services/HelloWorld";; So I created a simple client as following: System.setProperty("javax.net.ssl.trustStore","D:/Java/j2sdk1.4.1 _02/jre/lib/security/myKeyStore"); System.setProperty("java.protocol.handler.pkgs","com.sun.net.ssl.internal.www.protocol"); Security.addProvider(new com.sun.net.ssl.internal.ssl.Provider()); HelloWorldServiceLocator locator = new HelloWorldServiceLocator(); try{ HelloWorld hello = locator.getHelloWorld(); hello.getHelloWorldData("test"); }catch(Exception e){ e.printStackTrace(); } When I run this, I have the following error: AxisFault faultCode: {http://schemas.xmlsoap.org/soap/envelope/}Server.userException faultSubcode: faultString: javax.net.ssl.SSLException: Unrecognized SSL message, plaintext connection? faultActor: faultNode: faultDetail: {http://xml.apache.org/axis/}stackTrace:javax.net.ssl.SSLException: Unrecognized SSL message, plaintext connection? at com.sun.net.ssl.internal.ssl.InputRecord.b(DashoA6275) at com.sun.net.ssl.internal.ssl.InputRecord.read(DashoA6275) at com.sun.net.ssl.internal.ssl.SSLSocketImpl.a(DashoA6275) at com.sun.net.ssl.internal.ssl.SSLSocketImpl.j(DashoA6275) at com.sun.net.ssl.internal.ssl.SSLSocketImpl.startHandshake(DashoA6275) at org.apache.axis.components.net.JSSESocketFactory.create(JSSESocketFactory.java:186) at org.apache.axis.transport.http.HTTPSender.getSocket(HTTPSender.java:131) at org.apache.axis.transport.http.HTTPSender.writeToSocket(HTTPSender.java:370) at org.apache.axis.transport.http.HTTPSender.invoke(HTTPSender.java:88) at org.apache.axis.strategies.InvocationStrategy.visit(InvocationStrategy.java:32) at org.apache.axis.SimpleChain.doVisiting(SimpleChain.java:118) at org.apache.axis.SimpleChain.invoke(SimpleChain.java:83) at org.apache.axis.client.AxisClient.invoke(AxisClient.java:147) at org.apache.axis.client.Call.invokeEngine(Call.java:2719) at org.apache.axis.client.Call.invoke(Call.java:2702) at org.apache.axis.client.Call.invoke(Call.java:2378) at org.apache.axis.client.Call.invoke(Call.java:2301) at org.apache.axis.client.Call.invoke(Call.java:1758) at jroch2_01.axis.services.HelloWorld.HelloWorldSoapBindingStub.getHelloWorldData(HelloWorldSoapBindingStub.java:149) at TestFwk.test2(TestFwk.java:59) at TestFwk.main(TestFwk.java:68) {http://xml.apache.org/axis/}hostname:JROCH2-01 Can somebody help me ? Thx a lot, Johan.
Re: How not to advertise WSDL?
Interesting. Thank you. Question: I see the following in the FAQ: "Stop AxisServlet listing services To do this, set the Axis global configuration property axis.enableListQuery to false." What is an Axis global configuration property? Is it a java system property (as in 'java -Daxis.enableListQuery=false ...') or is there some other configuration file/servlet/context parameter where this needs to be set and I am not aware of? Thank you. Tim Sunil Kothari wrote: Tim, I disagree. I think its possibleHere's the link http://ws.apache.org/axis/java/security.html look under this heading Stop Autogenerating WSDL I hope that helps. Sunil Kothari Valtech India 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: "Tim K. (Gmane)" <[EMAIL PROTECTED]> Date: Friday, March 25, 2005 9:32 am Subject: Re: How not to advertise WSDL? I asked the same question a while back in this thread: http://thread.gmane.org/gmane.comp.apache.webservices.axis.user/26811 Apparently it is not possible. Maybe things have changed since then. Tim Steve Sobol wrote: I just recently installed Axis and am impressed with it. JWS, in particular, is a great idea, and I expect it to be a big timesaver during the early stages of web service development. I'm planning on creating some services, however, that I don't want to advertise. Is there any way to prevent http://www.some.url/some.webservice?wsdl from spitting out the WSDL? Is there any way to prevent someone going to /some.webservice in a browser from seeing "This is a web service"? And is there some way to prevent Axis from displaying the service's descriptor in the list of deployed services? I know I can achieve these goals by hacking the source code. :> What I need to know is if there is a way to accomplish any or all of them WITHOUT modifying the source. Thanks in advance, Steve
Re: Axis and .NET interop with dates
Hi, As another standardized way of passing date, you should consider julian dates. Julian dates are a integer, being the number of days since January 1, 4713 BC at noon (not midnight). You can also add a fraction of days, being the number of seconds elapsed since noon. Julian dates can be represnted as integers (for a precision to the day) or as double (for a precision to the millis). You can google algorihtms to convert back and forth between julian and gregorian dates, including support for February 29th and the leap that occured in 15-ish from Oct, 4 to Oct. 15. Just my 5 cents... Christian Faucher
Re: How to change saop response element name ?
Use document/literal (or wrapped) and define the response method element to be . (This assumes you are using the WSDL First (TM) method.) e.g., - Anne On Fri, 25 Mar 2005 15:35:06 +0530, babloosony <[EMAIL PROTECTED]> wrote: > Hi, > > I have below response soap message generated using Apache AXIS 1.2 RC2 > deployed on WebSphere 5.1 Application Server : > > response soap message > -- > HTTP/1.1 200 OK > Server: WebSphere Application Server/5.1 > Content-Type: text/xml; charset=utf-8 > Content-Language: en-US > Connection: close > > 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";> > > http://ws.as.com/wsdl/ds";> > http://ws.as.com/schemas/ds";> > > > > > > > In the above soap message I want top change the element > to element . How do I do that. Is > there a way to configure this in AXIS ? Can anyone please suggest ? > > Thanks, > Kumar. >
How to change saop response element name ?
Hi, I have below response soap message generated using Apache AXIS 1.2 RC2 deployed on WebSphere 5.1 Application Server : response soap message -- HTTP/1.1 200 OK Server: WebSphere Application Server/5.1 Content-Type: text/xml; charset=utf-8 Content-Language: en-US Connection: close http://schemas.xmlsoap.org/soap/envelope/"; xmlns:xsd="http://www.w3.org/2001/XMLSchema"; xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance";> http://ws.as.com/wsdl/ds";> http://ws.as.com/schemas/ds";> In the above soap message I want top change the element to element . How do I do that. Is there a way to configure this in AXIS ? Can anyone please suggest ? Thanks, Kumar.
Re: How not to advertise WSDL?
Tim, I disagree. I think its possibleHere's the link http://ws.apache.org/axis/java/security.html look under this heading Stop Autogenerating WSDL I hope that helps. Sunil Kothari Valtech India 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: "Tim K. (Gmane)" <[EMAIL PROTECTED]> Date: Friday, March 25, 2005 9:32 am Subject: Re: How not to advertise WSDL? > I asked the same question a while back in this thread: > > http://thread.gmane.org/gmane.comp.apache.webservices.axis.user/26811 > > Apparently it is not possible. Maybe things have changed since then. > > Tim > > > Steve Sobol wrote: > > I just recently installed Axis and am impressed with it. JWS, in > > particular, is a great idea, and I expect it to be a big > timesaver > > during the early stages of web service development. > > > > I'm planning on creating some services, however, that I don't > want to > > advertise. Is there any way to prevent > > http://www.some.url/some.webservice?wsdl from spitting out the > WSDL? Is > > there any way to prevent someone going to /some.webservice in a > browser > > from seeing "This is a web service"? And is there some way to > prevent > > Axis from displaying the service's descriptor in the list of > deployed > > services? > > > > I know I can achieve these goals by hacking the source code. :> > What I > > need to know is if there is a way to accomplish any or all of > them > > WITHOUT modifying the source. > > > > Thanks in advance, > > Steve > > > >