RE: [axis2] problem with 'enableRESTInAxis2MainServlet' flag
Hi Deepak, Thanks. I tried it out with Axis2 1.1.1 release and it is working fine on it. Regards, Nalini -Original Message- From: Deepal Jayasinghe [mailto:[EMAIL PROTECTED] Sent: Friday, March 02, 2007 12:19 PM To: axis-user@ws.apache.org Subject: Re: [axis2] problem with 'enableRESTInAxis2MainServlet' flag Hi Nalini ; As I can see you are using Axis2 1.1 release , any possibility of checking with nightly builds ? Even in current code base we are no loner use that parameter as well , only one parameter to control the REST support. Thanks Deepal Hi, I am trying to enable my webservice to handle both REST and SOAP. I am currently using ADB for databinding. Also I changed the ' 'enableRESTInAxis2MainServlet' flag to true in axis2.xml file. Please see the file snippet below: *!--parameters help to tweak the message handling of two main servlets. --* * * *!-- If the enableRESTInAxis2MainServlet is true, then Axis2MainServlet will handle both SOAP and REST messages --* *parameter name=enableRESTInAxis2MainServlet locked=truetrue/parameter* * * *!-- Following parameter will completely disable REST handling in both the servlets--* *parameter name=disableREST locked=truefalse/parameter* * * *!-- This will disable the separate servlet we have for REST handling. --* *parameter name=disableSeparateEndpointForREST locked=truetrue/parameter* * * After changing the file I regenerated the wsdl and created the aar file again. When I deployed it on the server(JBoss) and tried invoke the service using REST I was able to do so. But when I tried to invoke the service using SOAP client(with the help of stub). I get the following error. * [java] org.apache.axis2.AxisFault: Transport level information does not ma* *ch with SOAP Message namespace URI; nested exception is:* * [java] org.apache.axiom.soap.SOAPProcessingException: Transport level* *nformation does not match with SOAP Message namespace URI* * [java] at org.apache.axis2.transport.TransportUtils.createSOAPMessage(* *ransportUtils.java:126)* * [java] at org.apache.axis2.transport.TransportUtils.createSOAPMessage(* *ransportUtils.java:67)* * [java] at org.apache.axis2.description.OutInAxisOperationClient.send(O* *tInAxisOperation.java:252)* * [java] at org.apache.axis2.description.OutInAxisOperationClient.execut* *(OutInAxisOperation.java:202)* * [java] at com.gryphonnetworks.ws.CertifyServiceStub.certifyClient(Cert* *fyServiceStub.java:344)* * [java] at com.gryphonnetworks.ws.GryphonClient.main(GryphonClient.java* *56)* * [java] Caused by: org.apache.axiom.soap.SOAPProcessingException: Transport* *level information does not match with SOAP Message namespace URI* * [java] at org.apache.axiom.soap.impl.builder.StAXSOAPModelBuilder.iden* *ifySOAPVersion(StAXSOAPModelBuilder.java:144)* * [java] at org.apache.axiom.soap.impl.builder.StAXSOAPModelBuilder.ini* *(StAXSOAPModelBuilder.java:108)* * [java] at org.apache.axis2.transport.TransportUtils.createSOAPMessage(* *ransportUtils.java:120)* * [java] ... 5 more* Following is my SOAP client code: package com.gryphonnetworks.ws; import java.rmi.RemoteException; import com.gryphonnetworks.ws.CertifyServiceStub; import com.gryphonnetworks.common.xsd.ChannelDetails; import com.gryphonnetworks.common.xsd.CertificationData; import com.gryphonnetworks.ws.xsd.CertifyClient; import com.gryphonnetworks.ws.CertifyClientFaultException; import com.gryphonnetworks.ws.xsd.CertifyClientFault; import com.gryphonnetworks.ws.xsd.CertifyClientResponse; public class GryphonClient { /** * If account# == 13, then you will get a AccountNotExistFault. * otherwise if you provide an amount 1000, you will get a InsufficientFundFaultMessageException, * otherwise you will get a response with a balance equal to 1000 - amountWithdrawn. */ private static String URL = http://localhost:8080/axis2/services/CertifyService;; public static void main(String[] args) { CertifyServiceStub stub = null; System.out.println(Entering: GryphonClient); try { stub = new CertifyServiceStub(URL); CertificationData[] certificationData = new CertificationData[2]; CertificationData cdTemp = new CertificationData(); ChannelDetails [] cahnnelDetails = new ChannelDetails[1]; ChannelDetails temp = new ChannelDetails(); temp.setChannelType(EMAIL); temp.setChannelDetails(12345); cahnnelDetails[0] = temp
RE: [axis2] problem with 'enableRESTInAxis2MainServlet' flag
Hi, I am trying to enable my webservice to handle both REST and SOAP. I am currently using ADB for databinding. Also I changed the ' 'enableRESTInAxis2MainServlet' flag to true in axis2.xml file. Please see the file snippet below: !--parameters help to tweak the message handling of two main servlets. -- !-- If the enableRESTInAxis2MainServlet is true, then Axis2MainServlet will handle both SOAP and REST messages -- parameter name=enableRESTInAxis2MainServlet locked=truetrue/parameter !-- Following parameter will completely disable REST handling in both the servlets-- parameter name=disableREST locked=truefalse/parameter !-- This will disable the separate servlet we have for REST handling. -- parameter name=disableSeparateEndpointForREST locked=truetrue/parameter After changing the file I regenerated the wsdl and created the aar file again. When I deployed it on the server(JBoss) and tried invoke the service using REST I was able to do so. But when I tried to invoke the service using SOAP client(with the help of stub). I get the following error. [java] org.apache.axis2.AxisFault: Transport level information does not ma ch with SOAP Message namespace URI; nested exception is: [java] org.apache.axiom.soap.SOAPProcessingException: Transport level nformation does not match with SOAP Message namespace URI [java] at org.apache.axis2.transport.TransportUtils.createSOAPMessage( ransportUtils.java:126) [java] at org.apache.axis2.transport.TransportUtils.createSOAPMessage( ransportUtils.java:67) [java] at org.apache.axis2.description.OutInAxisOperationClient.send(O tInAxisOperation.java:252) [java] at org.apache.axis2.description.OutInAxisOperationClient.execut (OutInAxisOperation.java:202) [java] at com.gryphonnetworks.ws.CertifyServiceStub.certifyClient(Cert fyServiceStub.java:344) [java] at com.gryphonnetworks.ws.GryphonClient.main(GryphonClient.java 56) [java] Caused by: org.apache.axiom.soap.SOAPProcessingException: Transport level information does not match with SOAP Message namespace URI [java] at org.apache.axiom.soap.impl.builder.StAXSOAPModelBuilder.iden ifySOAPVersion(StAXSOAPModelBuilder.java:144) [java] at org.apache.axiom.soap.impl.builder.StAXSOAPModelBuilder.ini (StAXSOAPModelBuilder.java:108) [java] at org.apache.axis2.transport.TransportUtils.createSOAPMessage( ransportUtils.java:120) [java] ... 5 more Following is my SOAP client code: package com.gryphonnetworks.ws; import java.rmi.RemoteException; import com.gryphonnetworks.ws.CertifyServiceStub; import com.gryphonnetworks.common.xsd.ChannelDetails; import com.gryphonnetworks.common.xsd.CertificationData; import com.gryphonnetworks.ws.xsd.CertifyClient; import com.gryphonnetworks.ws.CertifyClientFaultException; import com.gryphonnetworks.ws.xsd.CertifyClientFault; import com.gryphonnetworks.ws.xsd.CertifyClientResponse; public class GryphonClient { /** * If account# == 13, then you will get a AccountNotExistFault. * otherwise if you provide an amount 1000, you will get a InsufficientFundFaultMessageException, * otherwise you will get a response with a balance equal to 1000 - amountWithdrawn. */ private static String URL = http://localhost:8080/axis2/services/CertifyService;; public static void main(String[] args) { CertifyServiceStub stub = null; System.out.println(Entering: GryphonClient); try { stub = new CertifyServiceStub(URL); CertificationData[] certificationData = new CertificationData[2]; CertificationData cdTemp = new CertificationData(); ChannelDetails [] cahnnelDetails = new ChannelDetails[1]; ChannelDetails temp = new ChannelDetails(); temp.setChannelType(EMAIL); temp.setChannelDetails(12345); cahnnelDetails[0] = temp; cdTemp.setChannelDetails(cahnnelDetails); cdTemp.setClientId(124); certificationData[0] = cdTemp; cdTemp = new CertificationData(); temp = new ChannelDetails(); cahnnelDetails = new ChannelDetails[1]; temp.setChannelType(FAX); temp.setChannelDetails(6789); cahnnelDetails[0] = temp; cdTemp.setChannelDetails(cahnnelDetails); cdTemp.setClientId(2489); certificationData[1] = cdTemp;
Re: [axis2] problem with 'enableRESTInAxis2MainServlet' flag
Hi Nalini ; As I can see you are using Axis2 1.1 release , any possibility of checking with nightly builds ? Even in current code base we are no loner use that parameter as well , only one parameter to control the REST support. Thanks Deepal Hi, I am trying to enable my webservice to handle both REST and SOAP. I am currently using ADB for databinding. Also I changed the ' 'enableRESTInAxis2MainServlet' flag to true in axis2.xml file. Please see the file snippet below: *!--parameters help to tweak the message handling of two main servlets. --* * * *!-- If the enableRESTInAxis2MainServlet is true, then Axis2MainServlet will handle both SOAP and REST messages --* *parameter name=enableRESTInAxis2MainServlet locked=truetrue/parameter* * * *!-- Following parameter will completely disable REST handling in both the servlets--* *parameter name=disableREST locked=truefalse/parameter* * * *!-- This will disable the separate servlet we have for REST handling. --* *parameter name=disableSeparateEndpointForREST locked=truetrue/parameter* * * After changing the file I regenerated the wsdl and created the aar file again. When I deployed it on the server(JBoss) and tried invoke the service using REST I was able to do so. But when I tried to invoke the service using SOAP client(with the help of stub). I get the following error. * [java] org.apache.axis2.AxisFault: Transport level information does not ma* *ch with SOAP Message namespace URI; nested exception is:* * [java] org.apache.axiom.soap.SOAPProcessingException: Transport level* *nformation does not match with SOAP Message namespace URI* * [java] at org.apache.axis2.transport.TransportUtils.createSOAPMessage(* *ransportUtils.java:126)* * [java] at org.apache.axis2.transport.TransportUtils.createSOAPMessage(* *ransportUtils.java:67)* * [java] at org.apache.axis2.description.OutInAxisOperationClient.send(O* *tInAxisOperation.java:252)* * [java] at org.apache.axis2.description.OutInAxisOperationClient.execut* *(OutInAxisOperation.java:202)* * [java] at com.gryphonnetworks.ws.CertifyServiceStub.certifyClient(Cert* *fyServiceStub.java:344)* * [java] at com.gryphonnetworks.ws.GryphonClient.main(GryphonClient.java* *56)* * [java] Caused by: org.apache.axiom.soap.SOAPProcessingException: Transport* *level information does not match with SOAP Message namespace URI* * [java] at org.apache.axiom.soap.impl.builder.StAXSOAPModelBuilder.iden* *ifySOAPVersion(StAXSOAPModelBuilder.java:144)* * [java] at org.apache.axiom.soap.impl.builder.StAXSOAPModelBuilder.ini* *(StAXSOAPModelBuilder.java:108)* * [java] at org.apache.axis2.transport.TransportUtils.createSOAPMessage(* *ransportUtils.java:120)* * [java] ... 5 more* Following is my SOAP client code: package com.gryphonnetworks.ws; import java.rmi.RemoteException; import com.gryphonnetworks.ws.CertifyServiceStub; import com.gryphonnetworks.common.xsd.ChannelDetails; import com.gryphonnetworks.common.xsd.CertificationData; import com.gryphonnetworks.ws.xsd.CertifyClient; import com.gryphonnetworks.ws.CertifyClientFaultException; import com.gryphonnetworks.ws.xsd.CertifyClientFault; import com.gryphonnetworks.ws.xsd.CertifyClientResponse; public class GryphonClient { /** * If account# == 13, then you will get a AccountNotExistFault. * otherwise if you provide an amount 1000, you will get a InsufficientFundFaultMessageException, * otherwise you will get a response with a balance equal to 1000 - amountWithdrawn. */ private static String URL = http://localhost:8080/axis2/services/CertifyService;; public static void main(String[] args) { CertifyServiceStub stub = null; System.out.println(Entering: GryphonClient); try { stub = new CertifyServiceStub(URL); CertificationData[] certificationData = new CertificationData[2]; CertificationData cdTemp = new CertificationData(); ChannelDetails [] cahnnelDetails = new ChannelDetails[1]; ChannelDetails temp = new ChannelDetails(); temp.setChannelType(EMAIL); temp.setChannelDetails(12345); cahnnelDetails[0] = temp; cdTemp.setChannelDetails(cahnnelDetails); cdTemp.setClientId(124); certificationData[0] = cdTemp; cdTemp = new CertificationData(); temp = new ChannelDetails();