Changing response status code
Hi all, How can i change the Response status code in Axis handlers? When there is an error, the response contains the soap fault. But, the response header shows status code as 500 (internal server error). I wanted to change the status code to 403(forbidden). How could i do it ? Regards,Sathish
RE: problem with web service method which returns boolean, not understood by JAX-RPC client
Hi Chandrashekhar, thanx for your answer. Actually, because of pressure of time, I'm thinking about to simply change the return type to String, since at least Strings are definitely working in this web service interop nightmare world ;-) Merten From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] Sent: Monday, March 21, 2005 8:13 AMTo: axis-user@ws.apache.orgSubject: RE: problem with web service method which returns boolean, not understood by JAX-RPC client Hi Merten, I havent faced this problem but from what I have read... boolean return types are automatically converted in its form at both ends.. Infact if method returns null, its wrapped by Boolean wrapper.. Doubt I have whether the method returns non null and non boolean value.. Its just my guess as I dont have hands on with boolean return types.. Will confirm when come across. Regards, Chandrashekhar D Tupe "Merten Schumann" <[EMAIL PROTECTED]> 03/21/05 12:32 PM Please respond toaxis-user@ws.apache.org To cc Subject RE: problem with web service method which returns boolean, not understood by JAX-RPC client Hello, anyone else experiencing such a problem??? Thanx!> -Original Message-> From: Merten Schumann [mailto:[EMAIL PROTECTED] > Sent: Friday, March 18, 2005 1:41 PM> To: axis-user@ws.apache.org> Subject: problem with web service method which returns > boolean, not understood by JAX-RPC client> > Hello,> > my (Sun J2EE 1.4 RI from 2005) JAX-RPC client fails against a web> service hosted by Axis 1.2RC3. I do try to invoke a method "boolean> returnSomething()". I end up with> > invalid boolean value:> at> com.sun.xml.rpc.encoding.simpletype.XSDBooleanEncoder.stringTo> Object(XSD> BooleanEncoder.java:62) at> com.sun.xml.rpc.encoding.SimpleTypeSerializer.deserialize(Simp> leTypeSeri> alizer.java:143)> ...> > I do really not know, which one (server or client) is behaving not> correctly. Does Axis send invalid data? Is Sun JAX-RPC doing something> wrong in evaluating the data from Axis?> > I can only tell that my service client works when the web service is> hosted by Sun Application Server or IBM WebSphere.> > One interesting thing is: if I do set the dotNetSoapEncFix switch in> global Axis config to "true", the client utilizing Sun's JAX-RPC> implementation works fine. :-) That's strange in a way, since > I saw that> the encoding for boolean is always (no matter how > dotNetSoapEncFix flag> is set) xsd:boolean ...> > Other SOAP clients (SOAP::Lite, SOAPpy) work fine, with both settings> (true, false) for dotNetSoapEncFix ...> > Anyone else experiencing problems with boolean return values > in Axis for> JAX-RPC clients?> Merten> ForwardSourceID:NT28BA Notice: The information contained in this e-mail message and/or attachments to it may contain confidential or privileged information. If you are not the intended recipient, any dissemination, use, review, distribution, printing or copying of the information contained in this e-mail message and/or attachments to it are strictly prohibited. If you have received this communication in error, please notify us by reply e-mail or telephone and immediately and permanently delete the message and any attachments. Thank you
RE: problem with web service method which returns boolean, not understood by JAX-RPC client
Hi Merten, I havent faced this problem but from what I have read... boolean return types are automatically converted in its form at both ends.. Infact if method returns null, its wrapped by Boolean wrapper.. Doubt I have whether the method returns non null and non boolean value.. Its just my guess as I dont have hands on with boolean return types.. Will confirm when come across. Regards, Chandrashekhar D Tupe "Merten Schumann" <[EMAIL PROTECTED]> 03/21/05 12:32 PM Please respond to axis-user@ws.apache.org To cc Subject RE: problem with web service method which returns boolean, not understood by JAX-RPC client Hello, anyone else experiencing such a problem??? Thanx! > -Original Message- > From: Merten Schumann [mailto:[EMAIL PROTECTED] > Sent: Friday, March 18, 2005 1:41 PM > To: axis-user@ws.apache.org > Subject: problem with web service method which returns > boolean, not understood by JAX-RPC client > > Hello, > > my (Sun J2EE 1.4 RI from 2005) JAX-RPC client fails against a web > service hosted by Axis 1.2RC3. I do try to invoke a method "boolean > returnSomething()". I end up with > > invalid boolean value: > at > com.sun.xml.rpc.encoding.simpletype.XSDBooleanEncoder.stringTo > Object(XSD > BooleanEncoder.java:62) at > com.sun.xml.rpc.encoding.SimpleTypeSerializer.deserialize(Simp > leTypeSeri > alizer.java:143) > ... > > I do really not know, which one (server or client) is behaving not > correctly. Does Axis send invalid data? Is Sun JAX-RPC doing something > wrong in evaluating the data from Axis? > > I can only tell that my service client works when the web service is > hosted by Sun Application Server or IBM WebSphere. > > One interesting thing is: if I do set the dotNetSoapEncFix switch in > global Axis config to "true", the client utilizing Sun's JAX-RPC > implementation works fine. :-) That's strange in a way, since > I saw that > the encoding for boolean is always (no matter how > dotNetSoapEncFix flag > is set) xsd:boolean ... > > Other SOAP clients (SOAP::Lite, SOAPpy) work fine, with both settings > (true, false) for dotNetSoapEncFix ... > > Anyone else experiencing problems with boolean return values > in Axis for > JAX-RPC clients? > Merten > ForwardSourceID:NT28BA Notice: The information contained in this e-mail message and/or attachments to it may contain confidential or privileged information. If you are not the intended recipient, any dissemination, use, review, distribution, printing or copying of the information contained in this e-mail message and/or attachments to it are strictly prohibited. If you have received this communication in error, please notify us by reply e-mail or telephone and immediately and permanently delete the message and any attachments. Thank you
RE: problem with web service method which returns boolean, not understood by JAX-RPC client
Hello, anyone else experiencing such a problem??? Thanx! > -Original Message- > From: Merten Schumann [mailto:[EMAIL PROTECTED] > Sent: Friday, March 18, 2005 1:41 PM > To: axis-user@ws.apache.org > Subject: problem with web service method which returns > boolean, not understood by JAX-RPC client > > Hello, > > my (Sun J2EE 1.4 RI from 2005) JAX-RPC client fails against a web > service hosted by Axis 1.2RC3. I do try to invoke a method "boolean > returnSomething()". I end up with > > invalid boolean value: > at > com.sun.xml.rpc.encoding.simpletype.XSDBooleanEncoder.stringTo > Object(XSD > BooleanEncoder.java:62) at > com.sun.xml.rpc.encoding.SimpleTypeSerializer.deserialize(Simp > leTypeSeri > alizer.java:143) > ... > > I do really not know, which one (server or client) is behaving not > correctly. Does Axis send invalid data? Is Sun JAX-RPC doing something > wrong in evaluating the data from Axis? > > I can only tell that my service client works when the web service is > hosted by Sun Application Server or IBM WebSphere. > > One interesting thing is: if I do set the dotNetSoapEncFix switch in > global Axis config to "true", the client utilizing Sun's JAX-RPC > implementation works fine. :-) That's strange in a way, since > I saw that > the encoding for boolean is always (no matter how > dotNetSoapEncFix flag > is set) xsd:boolean ... > > Other SOAP clients (SOAP::Lite, SOAPpy) work fine, with both settings > (true, false) for dotNetSoapEncFix ... > > Anyone else experiencing problems with boolean return values > in Axis for > JAX-RPC clients? >Merten >
Re: Can this soap message be consumed ?
Hi Kumar, I faced the similar problem with return types. There are no standard serializers/deserializers available for Map implementations. Even I had to convert them to arrays.. the structure I followed was : Vector of String arrays.. First element of Vector being String array headers.. and rest String array of data... This works fine... Please let me know if you find any stuff for Map implementations.. Chandrashekhar D Tupe Anne Thomas Manes <[EMAIL PROTECTED]> 03/21/05 12:20 AM Please respond to axis-user@ws.apache.org To axis-user@ws.apache.org, babloosony <[EMAIL PROTECTED]> cc Subject Re: Can this soap message be consumed ? Kumar, I suggest you convert your hashmap into an array. Anne On Sun, 20 Mar 2005 18:49:29 +0530, babloosony <[EMAIL PROTECTED]> wrote: > Hi All, > > I am using AXIS 1.2 RC2, Custom (De)Serializers. I am returning a > custom class (Forecast.java) from a EJB Web Service method which has > java.util.HashMap member variable in it. Now when I access this > service I am getting below soap response from the web service > deployed on WebSphere. It is assumed that my hashmap has > java.lang.String's as keys and java.lang.String's as values > > > 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"> > > > xmlns="http://ws.sosnoski.com/wsdl/wroxaxis/appendixb"> > > 343434 > Campbell > CA > April 11, 2003 > > b > d > > > > > > > I think for any web service client to consume this message it needs > custom (De)Serializes. Can any java based client or .NET based client > successfully consume this soap message ? How does a .NET client > consume this ? Please suggest ? > > How can the HashMap representation in soap message can be translated > to java.util.HashMap on client side assuming we are > using java on client side ? > > Thanks & Regards, > Kumar. > ForwardSourceID:NT285E Notice: The information contained in this e-mail message and/or attachments to it may contain confidential or privileged information. If you are not the intended recipient, any dissemination, use, review, distribution, printing or copying of the information contained in this e-mail message and/or attachments to it are strictly prohibited. If you have received this communication in error, please notify us by reply e-mail or telephone and immediately and permanently delete the message and any attachments. Thank you
Error deserializing Attachements
Hi, I have a sample echo services. I am sending an attachment that is echoed back. It is serialized properly but throws exception while deserializing echoed message. The message that is sent it. POST /services/MORServlet HTTP/1.0 Content-Type: multipart/related; type="text/xml"; start=""; boundary="=_Part_0_8702985.381063999" Accept: application/soap+xml, application/dime, multipart/related, text/* User-Agent: Axis/#axisVersion# Host: 127.0.0.1 Cache-Control: no-cache Pragma: no-cache SOAPAction: "" Content-Length: 979 --=_Part_0_8702985.381063999 Content-Type: text/xml; charset=UTF-8 Content-Transfer-Encoding: binary Content-Id: http://schemas.xmlsoap.org/soap/envelope/"; xmlns:xsd="http://www.w3.org/2001/XMLSchema"; xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance";> http://schemas.xmlsoap.org/soap/encoding/"; xmlns:ns1="EP_REQUESTOR"> SAMPLE TEXT 100 cid:AE14793DD976E42B949B8B9DE6045060"; xmlns:ns2="http://xml.apache.org/xml-soap"/> --=_Part_0_8702985.381063999 Content-Type: text/plain Content-Transfer-Encoding: binary Content-Id: ATTACHMENT PARAM --=_Part_0_8702985.381063999-- The echoed message is HTTP/1.0 200 OK Date: Mon, 21 Mar 2005 04:57:45 GMT Server: WebLogic WebLogic Server 7.0 SP2 Sun Jan 26 23:09:32 PST 2003 234192 Content-Type: multipart/related; type="text/xml"; start="<490EB4245654BB736E35B72489CC8CF1>"; boundary="=_Part_0_14898358.381066153" Connection: Close --=_Part_0_14898358.381066153 Content-Type: text/xml; charset=UTF-8 Content-Transfer-Encoding: binary Content-Id: <490EB4245654BB736E35B72489CC8CF1> http://schemas.xmlsoap.org/soap/envelope/"; xmlns:xsd="http://www.w3.org/2001/XMLSchema"; xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance";> http://schemas.xmlsoap.org/soap/encoding/"; xmlns:ns1="EP_REQUESTOR"> AVNBS cid:D42B460490512F24782DD888DC7793FE"; xmlns:ns2="http://xml.apache.org/xml-soap"/> --=_Part_0_14898358.381066153 Content-Type: text/plain Content-Transfer-Encoding: binary Content-Id: ECHO SAMPLE ATTACHMENT --=_Part_0_14898358.381066153-- The error during deserialization is faultCode: {http://schemas.xmlsoap.org/soap/envelope/}Server.userException faultSubcode: faultString: org.xml.sax.SAXException: Deserializing parameter 'RETAttach': could not find deserializer for type {http://xml.apache.org/axis/}Void faultActor: faultNode: faultDetail: {http://xml.apache.org/axis/}stackTrace: org.xml.sax.SAXException: Deserializing parameter 'RETAttach': could not find deserializer for type {http://xml.apache.org/axis/}Void at org.apache.axis.message.RPCHandler.onStartChild(RPCHandler.java:302) at org.apache.axis.encoding.DeserializationContextImpl.startElement(Deseria lizationContextImpl.java:963) at org.apache.axis.message.SAX2EventRecorder.replay(SAX2EventRecorder.java: 198) at org.apache.axis.message.MessageElement.publishToHandler(MessageElement.j ava:722) at org.apache.axis.message.RPCElement.deserialize(RPCElement.java:233) at org.apache.axis.message.RPCElement.getParams(RPCElement.java:347) at org.apache.axis.client.Call.invoke(Call.java:2273) at org.apache.axis.client.Call.invoke(Call.java:2172) at org.apache.axis.client.Call.invoke(Call.java:1692) at com.dorado.mor.client.ISClientRemote.callOperat...] at com.dorado.mor.log.LogUtil.rethrow(LogUtil.java:245) at com.dorado.mor.client.ISClientRemote.callOperation(ISClientRemote.java:1 67) at com.dorado.mor.client.ISClient.callOperation(ISClient.java:47) at com.dorado.mor.test.TestMain.doTest(TestMain.java:40) at com.dorado.mor.test.TestMain.main(TestMain.java:57) Exception in thread "main" . Why is Attachement not deserialized properly? What am I missing? Thanks for any help
Service Impl class public constructor
Title: Service Impl class public constructor All, I have a service impl class without a public constructor. I have generated the wsdd file such that it calls the service impl file directly instead of using the SOAPBindingSkeleton. Now when I try to access this web service or execute any methods, I am getting the following exception : java.lang.IllegalAccessException: Class org.apache.axis.providers.java.JavaProvider can not access a member of class <>with modifiers "private" It works when I have a public constructor. Is there any other way that I can get the web service working without the public constructor. Thanks.
Re: Can this soap message be consumed ?
Anne- Thank you for the response. Atleast a HashMap represenation in a document/literal WSDL with key's of java.lang.String type and value's as java.lang.String type can't be consumed on the .NET/Java side ? I am aware that Arrays's confirm to BP 1.0 but just thinking how can a HashMap cannot be interropable ? Thanks, Kumar. On Sun, 20 Mar 2005 13:50:31 -0500, Anne Thomas Manes <[EMAIL PROTECTED]> wrote: > Kumar, > > I suggest you convert your hashmap into an array. > > Anne > > > On Sun, 20 Mar 2005 18:49:29 +0530, babloosony <[EMAIL PROTECTED]> wrote: > > Hi All, > > > > I am using AXIS 1.2 RC2, Custom (De)Serializers. I am returning a > > custom class (Forecast.java) from a EJB Web Service method which has > > java.util.HashMap member variable in it. Now when I access this > > service I am getting below soap response from the web service > > deployed on WebSphere. It is assumed that my hashmap has > > java.lang.String's as keys and java.lang.String's as values > > > > > 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";> > > > >> xmlns="http://ws.sosnoski.com/wsdl/wroxaxis/appendixb";> > > > xmlns="http://ws.sosnoski.com/schemas/wroxaxis/appendixb";> > > 343434 > > Campbell > > CA > > April 11, 2003 > > > >b > >d > > > > > > > > > > > > > > I think for any web service client to consume this message it needs > > custom (De)Serializes. Can any java based client or .NET based client > > successfully consume this soap message ? How does a .NET client > > consume this ? Please suggest ? > > > > How can the HashMap representation in soap message can be translated > > to java.util.HashMap on client side assuming we are > > using java on client side ? > > > > Thanks & Regards, > > Kumar. > > >
Re: Handler to webservice bridge.
Hi. just posted a question of the same kind and got a response. in your WS you can get the soap message using org.apache.axis.MessageContext.getCurrentContext() which gives you an object of type MessageContext. that you can use just like in your handlers, so just retrieve user and pwd again in the WS implementation. hope that helps. Rob On Thu, 17 Mar 2005 17:58:43 -0500, Timour Mouratov <[EMAIL PROTECTED]> wrote: > Hello, > > Each SOAP request that comes to my web service contains user > credentials (name and password) within SOAP header. I'm using it to > authenticate a request and after user is authenticated I drop the > header. Now web service itself needs these parameters (user name and > password) for it is own business logic but I don't want to > expose/introduce them in WSDL. > > Is there a possibility to pass simple objects from handler to service > within the same request/response flaw ? > > Thanks in advance. >
Re: Axis/WebSphere SAAJ classloader issue
I was able to overcome the issue of WebSphere loading it's own SAAJ implementation by removing all but the following JARs from WEB-INF\lib: axis.jar axis-ant.jar saaj.jar log4j-1.2.8.jar This fixed the problem of the web app failing to start when its classloader mode was set to PARENT_LAST with the exception: org.apache.commons.discovery.DiscoveryException: Class com.ibm.ws.commons.logging.TrLogFactory does not implement org.apache.commons.logging.LogFactory Delfina Gonzalez wrote: Help! I'm aware that the fix for this is to set the classloader mode to 'parent last', however I've tried just about every combination of setting the classloader mode at the server, application and web app level to no avail. I'm not using WSAD, instead tinkering with these values via the admin console in: * Servers\Application Servers\\General Properties * Applications\Enterprise Applications\\Classloader Mode * Applications\Enterprise Applications\\Local Topology\\Web Module\\Classloader Mode I'm restarting the server after every config change and testing my web service via the DynamicInvoker client. I'm really stuck and would *greatly* appreciate and help Thanks Delfina
Re: SOAP message content in the service implementation
It might be best to treat WS A as a "message-style" service (that receives a SOAPEnvelope as argument and returns a SOAPEnvelope or SOAPElement, see the user guide), but if you can't do this for some reason, you can still use the MessageContext. org.apache.axis.MessageContext.getMessageContext(), which gives access to all parts of the request and response. Jeff - Original Message - From: "Robert Gombotz" <[EMAIL PROTECTED]> To: Sent: Sunday, March 20, 2005 2:49 PM Subject: SOAP message content in the service implementation > Hi. > > > This is more of a general question I am afraid. > I would need to have access to some parts of my SOAP message in the > service implementation. More precise, I am sending some info to a WS A > in SOAP headers. This service A in turn makes a call to another WS B( > in doing so WS A is acting as a client/consumer). Now I would like to > include the information, which WS A received in the form of SOAP > headers, to the message that WS A sends to WS B. > I am aware of handlers being able to process messages, but is it > possible to get a hold of the message inside the WS implementation? I > am pretty sure that it is not possible with Axis. After all, the > implementation of the WS would only be working when used as a WS. > So if I am right and it is not possible, does anybody know of other > SOAP enabled application servers that allow you to do something like > that? > Or any hints as to how I could alter the Axis code so that it migh be > possible (I know, that would be a mission and and half, anyway.) > > > Thanks in advance > > Rob
SOAP message content in the service implementation
Hi. This is more of a general question I am afraid. I would need to have access to some parts of my SOAP message in the service implementation. More precise, I am sending some info to a WS A in SOAP headers. This service A in turn makes a call to another WS B( in doing so WS A is acting as a client/consumer). Now I would like to include the information, which WS A received in the form of SOAP headers, to the message that WS A sends to WS B. I am aware of handlers being able to process messages, but is it possible to get a hold of the message inside the WS implementation? I am pretty sure that it is not possible with Axis. After all, the implementation of the WS would only be working when used as a WS. So if I am right and it is not possible, does anybody know of other SOAP enabled application servers that allow you to do something like that? Or any hints as to how I could alter the Axis code so that it migh be possible (I know, that would be a mission and and half, anyway.) Thanks in advance Rob
Re: Can this soap message be consumed ?
Kumar, I suggest you convert your hashmap into an array. Anne On Sun, 20 Mar 2005 18:49:29 +0530, babloosony <[EMAIL PROTECTED]> wrote: > Hi All, > > I am using AXIS 1.2 RC2, Custom (De)Serializers. I am returning a > custom class (Forecast.java) from a EJB Web Service method which has > java.util.HashMap member variable in it. Now when I access this > service I am getting below soap response from the web service > deployed on WebSphere. It is assumed that my hashmap has > java.lang.String's as keys and java.lang.String's as values > > 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";> > >xmlns="http://ws.sosnoski.com/wsdl/wroxaxis/appendixb";> > http://ws.sosnoski.com/schemas/wroxaxis/appendixb";> > 343434 > Campbell > CA > April 11, 2003 > >b >d > > > > > > > I think for any web service client to consume this message it needs > custom (De)Serializes. Can any java based client or .NET based client > successfully consume this soap message ? How does a .NET client > consume this ? Please suggest ? > > How can the HashMap representation in soap message can be translated > to java.util.HashMap on client side assuming we are > using java on client side ? > > Thanks & Regards, > Kumar. >
Can this soap message be consumed ?
Hi All, I am using AXIS 1.2 RC2, Custom (De)Serializers. I am returning a custom class (Forecast.java) from a EJB Web Service method which has java.util.HashMap member variable in it. Now when I access this service I am getting below soap response from the web service deployed on WebSphere. It is assumed that my hashmap has java.lang.String's as keys and java.lang.String's as values 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.sosnoski.com/wsdl/wroxaxis/appendixb";> http://ws.sosnoski.com/schemas/wroxaxis/appendixb";> 343434 Campbell CA April 11, 2003 b d I think for any web service client to consume this message it needs custom (De)Serializes. Can any java based client or .NET based client successfully consume this soap message ? How does a .NET client consume this ? Please suggest ? How can the HashMap representation in soap message can be translated to java.util.HashMap on client side assuming we are using java on client side ? Thanks & Regards, Kumar.