Endpoint Address
Hi, I try to get the target endpoint address in a services in Axis2c, I put the following code in the invoke function in the skeleton library: axis2_endpoint_ref_t *endpoint_ref = NULL; const axis2_char_t *address = NULL; . . . endpoint_ref = axis2_msg_ctx_get_to(msg_ctx, env); if(endpoint_ref) { AXIS2_LOG_DEBUG(env-log, AXIS2_LOG_SI, %s%s if (endpoint_ref),pdesWebServ-nombre_web,nombreFuncion); address = axis2_endpoint_ref_get_address(endpoint_ref, env); if (address) { AXIS2_LOG_DEBUG(env-log, AXIS2_LOG_SI, %s%s if (address),pdesWebServ-nombre_web,nombreFuncion); } } When I run this, I got NULL in endpoint_ref variable, so I don’t know it was something wrong with this code. It is the correct way to get the endpoint address or exists another way to get that info. Thank in advance. José M. Medina V. Wesam Consulting jose_med...@wesamconsulting.com Mobile: +58(416)613-3302 +58(414)019-0580 Ofc: +58(212)959-4155 Ext. 204 BB pin: 31E562BF Caracas - Venezuela
cdata sections
Hi, the axiom_text_create method can be used to create a text node in Axis2/C. How can I create a CDATA section node? My Axis2/C uses libxml2. Thanks, William
Re: cdata sections
Hi, William, Nagy Vilmos nvil...@gmail.com writes: Hi, the axiom_text_create method can be used to create a text node in Axis2/C. How can I create a CDATA section node? AFAIK, CDATA is not implemented with axiom yet. I may be wrong. thanks, Dinesh
Re: Axis2 - How to write client without using AXIOM API, similar to Axis1
hi, please read the user guide[1]. thanks, Amila. [1]http://ws.apache.org/axis2/1_5/toc.html On Wed, Oct 21, 2009 at 2:16 AM, mule_user s...@aol.com wrote: I am using the post below for learning purses: https://www.wso2.org/library/90 I would like to know how to write client code using the stubs etc. that get created WITHOUT using AXIOM API. I am familiar with Axis1. My questions: 1. Can I write client code similar to Axis1 that does not require using AXIOM API? 2. Could anyone provide some example of doing so? 3. In Axis1, I can write client without importing any Axis1 specific class. An example of client code in Axis1 is similar to the following: MyService service = new MyServiceLocator(); MyObject obj = service.getMyObj(); int ret = obj.add(1, 2); In the client code above for Axis1, I only need to call the corresponding Service and ServiceLocator class. I do not need to know any other class specific to Axis1. Could you please provide similar example of doing so without using the AXIOM API? I tried coding something similar to the following for Axis2 client: CalculatorService service = new CalculatorServiceLocator(); Call call= (Call) service.createCall(); String endpoint=http://localhost:9081/Axis2WebWs/services/CalculatorService; ; call.setTargetEndpointAddress( new java.net.URL(endpoint) ); QName operationName = new QName(add); call.setOperationName(operationName); Integer ret = (Integer) call.invoke( new Object[] { 1, 2} ); It threw exception in invoke method as: The ServiceClass object does not implement the required method in the following form: OMElement add(OMElement e) at org.apache.axis2.receivers.RawXMLINOutMessageReceiver.invokeBusinessLogic(RawXMLINOutMessageReceiver.java:93) at org.apache.axis2.receivers.AbstractInOutSyncMessageReceiver.invokeBusinessLogic(AbstractInOutSyncMessageReceiver.java:42) My services.xml is: service name=CalculatorService scope=application description Simple Calculator Service /description parameter name=ServiceClassorg.server.Calculator/parameter operation name=add messageReceiver class=org.apache.axis2.receivers.RawXMLINOutMessageReceiver/ /operation /service The method add is: Integer add(int i, int j) Is there any way to write client code (similar to Axis1) that does not involve AXIOM API? Please provide an example. 4. In the generated wsdl, I see soapbinding11 and soapbing12. Where are there two different bindings generated? The generated wsdl is: /xs:complexType /xs:element xs:element name=addResponse xs:complexType xs:sequence xs:element minOccurs=0 name=return nillable=true type=xs:anyType / /xs:sequence /xs:complexType /xs:element /xs:schema /wsdl:types wsdl:message name=addRequest wsdl:part name=parameters element=ns:add / /wsdl:message wsdl:message name=addResponse wsdl:part name=parameters element=ns:addResponse / /wsdl:message wsdl:portType name=CalculatorServicePortType wsdl:operation name=add wsdl:input message=ns:addRequest wsaw:Action=urn:add / wsdl:output message=ns:addResponse wsaw:Action=urn:addResponse / /wsdl:operation /wsdl:portType wsdl:binding name=CalculatorServiceSoap11Binding type=ns:CalculatorServicePortType soap:binding transport=http://schemas.xmlsoap.org/soap/http; style=document / wsdl:operation name=add soap:operation soapAction=urn:add style=document / wsdl:input soap:body use=literal / /wsdl:input wsdl:output soap:body use=literal / /wsdl:output /wsdl:operation /wsdl:binding wsdl:binding name=CalculatorServiceSoap12Binding type=ns:CalculatorServicePortType soap12:binding transport=http://schemas.xmlsoap.org/soap/http; style=document / wsdl:operation name=add soap12:operation soapAction=urn:add style=document / wsdl:input soap12:body use=literal / /wsdl:input wsdl:output soap12:body use=literal / /wsdl:output /wsdl:operation /wsdl:binding wsdl:binding name=CalculatorServiceHttpBinding type=ns:CalculatorServicePortType http:binding verb=POST / wsdl:operation name=add http:operation location=CalculatorService/add / wsdl:input mime:content type=text/xml part=add / /wsdl:input wsdl:output mime:content type=text/xml part=add / /wsdl:output /wsdl:operation /wsdl:binding wsdl:service name=CalculatorService wsdl:port name=CalculatorServiceHttpSoap11Endpoint binding=ns:CalculatorServiceSoap11Binding soap:address location= http://localhost:9081/Axis2WebWs/services/CalculatorService.CalculatorServiceHttpSoap11Endpoint/ / /wsdl:port wsdl:port name=CalculatorServiceHttpSoap12Endpoint binding=ns:CalculatorServiceSoap12Binding soap12:address location= http://localhost:9081/Axis2WebWs/services/CalculatorService.CalculatorServiceHttpSoap12Endpoint/ / /wsdl:port wsdl:port name=CalculatorServiceHttpEndpoint
Error page returned instead of Soap Exception when WS-Security Authentication fails in Rampart
Hi, I'm trying to set up WS-Security (just username/password-clear-text) and I'm trying to get the service to return a Soap Exception when the user logs in with the wrong details. Should be easy, right? However, I keep getting HTTP 500 error pages instead of Soap Exceptions, like this one: htmlheadtitleApache Tomcat/6.0.18 - Error report/titlestyle!--H1 {font-family:Tahoma,Arial,sans-serif;color:white;background-color:#525D76;font-size:22px;} H2 {font-family:Tahoma,Arial,sans-serif;color:white;background-color:#525D76;font-size:16px;} H3 {font-family:Tahoma,Arial,sans-serif;color:white;background-color:#525D76;font-size:14px;} BODY {font-family:Tahoma,Arial,sans-serif;color:black;background-color:white;} B {font-family:Tahoqma,Arial,sans-serif;color:white;background-color:#525D76;} P {font-family:Tahoma,Arial,sans-serif;background:white;color:black;font-size:12px;}A {color : black;}A.name {color : black;}HR {color : #525D76;}--/style /headbodyh1HTTP Status 500 - /h1HR size=1 noshade=noshadepbtype/b Status report/ppbmessage/b u/u/ppbdescription/b uThe server encountered an internal error () that prevented it from fulfilling this request./u/pHR size=1 noshade=noshadeh3Apache Tomcat/6.0.18/h3/body/html Now I'm testing using axis 1.4.1, putting the exploded webapp in the tomcat /webapps directory. When I started getting the error pages, I thought removing the mappings for the HTTP 500 error in /WEB-INF/web.xml would fix it, but it didn't. I've now removed everything else in the Tomcat webapps directory, I've cleaned out the Tomcat /work directory, I've even removed the /axis2-web directory in the Axis webapp, just to eliminate the possiblity of any more JSPs - *and the error pages still keep displaying*. I came across a post from July that is having a problem similar to mine: http://marc.info/?l=axis-userm=124662013625695w=2 However, I didn't come across any posts that resolved his problem. The software I'm using is: Axis 1.4.1 Rampart 1.4 Tomcat 6.0.18 Has anyone encountered this problem and what fixed it? I've tried doing it using policy.xml and via basic rampart config, and am getting similar results. Actually, the curious thing is that when I get the error from a service configured with basic rampart config, I get a stacktrace, like this: mhtmlheadtitleApache Tomcat/6.0.18 - Error report/titlestyle!--H1 {font-family:Tahoma,Arial,sans-serif;color:white;background-color:#525D76;font-size:22px;} H2 {font-family:Tahoma,Arial,sans-serif;color:white;background-color:#525D76;font-size:16px;} H3 {font-family:Tahoma,Arial,sans-serif;color:white;background-color:#525D76;font-size:14px;} BODY {font-family:Tahoma,Arial,sans-serif;color:black;background-color:white;} B {font-family:Tahoma,Arial,sans-serif;color:white;background-color:#525D76;} P {font-family:Tahoma,Arial,sans-serif;background:white;color:black;font-size:12px;}A {color : black;}A.name {color : black;}HR {color : #525D76;}--/style /headbodyh1HTTP Status 500 - /h1HR size=1 noshade=noshadepbtype/b Exception report/ppbmessage/b u/u/ppbdescription/b uThe server encountered an internal error () that prevented it from fulfilling this request./u/ppbexception/b prejava.lang.NullPointerException org.apache.rampart.RampartMessageData.lt;initgt;(RampartMessageData.java:308) org.apache.rampart.MessageBuilder.build(MessageBuilder.java:61) org.apache.rampart.handler.RampartSender.invoke(RampartSender.java:64) org.apache.axis2.engine.Phase.invoke(Phase.java:317) org.apache.axis2.engine.AxisEngine.invoke(AxisEngine.java:264) org.apache.axis2.engine.AxisEngine.sendFault(AxisEngine.java:520) org.apache.axis2.transport.http.AxisServlet.handleFault(AxisServlet.java:416) org.apache.axis2.transport.http.AxisServlet.processAxisFault(AxisServlet.java:379) org.apache.axis2.transport.http.AxisServlet.doPost(AxisServlet.java:167) javax.servlet.http.HttpServlet.service(HttpServlet.java:637) javax.servlet.http.HttpServlet.service(HttpServlet.java:717) /pre/ppbnote/b uThe full stack trace of the root cause is available in the Apache Tomcat/6.0.18 logs./u/pHR size=1 noshade=noshadeh3Apache Tomcat/6.0.18/h3/body/html -- and it says Exception report instead of Status report like in the first one. I don't know if this indicates it's a different page that is hardcoded inside of Axis (just guessing here)? Thanks in advance for any ideas and help from all you wonderful members of the mailing list. =) thanks, Ellecer
Re: Axis 2 - Unable to see my new service from Axis2 Admin console
On Tue, Oct 20, 2009 at 3:02 AM, mule_user s...@aol.com wrote: I am using the link for learning: https://www.wso2.org/library/90 Ax2 | ---src | ---samples.demo | ---Book.java BookService.java WebContent | WEB-INF | ---lib (has all jars from Axis 2) | services | BookService | META-INF | ---services.xml /// package samples.demo; public class Book { private String title; private String isbn; private String author; public String getIsbn() { return isbn; } public void setIsbn(String isbn) { this.isbn = isbn; } public String getTitle() { return title; } public void setTitle(String title) { this.title = title; } public String getAuthor() { return author; } public void setAuthor(String author) { this.author = author; } } /// package samples.demo; public class BookService { private Book onlyBook; public BookService() { onlyBook = new Book(); onlyBook.setAuthor(Dan Diephouse); onlyBook.setTitle(Using Axis2); onlyBook.setIsbn(0123456789); } public Book[] getBooks() { return new Book[]{onlyBook}; } public Book findBook(String isbn) { if (isbn.equals(onlyBook.getIsbn())) return onlyBook; return null; } } services.xml serviceGroup service name=BookService description Book sample service /description parameter name=ServiceClass locked=falsesamples.demo.BookService/parameter operation name=getBooks messageReceiver class=org.apache.axis2.rpc.receivers.RPCMessageReceiver/ /operation operation name=findBook messageReceiver class=org.apache.axis2.rpc.receivers.RPCMessageReceiver/ /operation /service /serviceGroup try something like this, service name=TestService messageReceivers messageReceiver mep=http://www.w3.org/2004/08/wsdl/in-only; class=org.apache.axis2.rpc.receivers.RPCInOnlyMessageReceiver/ messageReceiver mep=http://www.w3.org/2004/08/wsdl/in-out; class=org.apache.axis2.rpc.receivers.RPCMessageReceiver/ /messageReceivers parameter name=ServiceClasstest.lockhead.service.TestService/parameter /service thanks, Amila. / web.xml ?xml version=1.0 encoding=UTF-8? web-app id=WebApp_ID version=2.4 xmlns=http://java.sun.com/xml/ns/j2ee; xmlns:xsi=http://www.w3.org/2001/XMLSchema-instance; xsi:schemaLocation=http://java.sun.com/xml/ns/j2ee http://java.sun.com/xml/ns/j2ee/web-app_2_4.xsd; display-name Axis2WebWs/display-name servlet display-nameApache-Axis Servlet/display-name servlet-nameAxisServlet/servlet-name servlet-classorg.apache.axis2.transport.http.AxisServlet/servlet-class load-on-startup1/load-on-startup /servlet servlet-mapping servlet-nameAxisServlet/servlet-name url-pattern/servlet/AxisServlet/url-pattern /servlet-mapping servlet-mapping servlet-nameAxisServlet/servlet-name url-pattern*.jws/url-pattern /servlet-mapping servlet-mapping servlet-nameAxisServlet/servlet-name url-pattern/services/*/url-pattern /servlet-mapping /web-app / I have successfully deployed axis2.war. I can successfully see: http://localhost:9081/axis2/services/listServices which only shows getVersion My question: Why can I not see getBooks and findBooks method of my new service (BookService) in the url above? I can successfully see WSDL under: http://localhost:9081/Ax2/services/BookService?wsdl -- View this message in context: http://www.nabble.com/Axis-2---Unable-to-see-my-new-service-from-Axis2-Admin-console-tp25966041p25966041.html Sent from the Axis - User mailing list archive at Nabble.com. -- Amila Suriarachchi WSO2 Inc. blog: http://amilachinthaka.blogspot.com/
AW: [Axis 2.1.5] Addressing module not found on Websphere
Hello again, it turned out that the error came from installating WebSphere Application Server with administration security on. So I deinstalled it and installed it again without administration security. It could be switched on after the installation without any problem. Hope it helps anyone else, Matthias. Von: Gaiser, Matthias Gesendet: Mittwoch, 14. Oktober 2009 10:32 An: axis-user@ws.apache.org Betreff: [Axis 2.1.5] Addressing module not found on Websphere Hello, we are using Axis2 1.5 on WebSphere Application Server 6.1.0.13 on Windows XP. While it works on one machine it doesn't work on another machine with the same configuration. The only difference is that we installed the Websphere with administration security on the machine where it is not working. We have deactivated it for testing. We get the error message. It seems that the AdminAxisServlet can't be initialized. At both installations we have the addressing module in the same directory (WEB-INF/modules in our web application). [14.10.09 10:00:30:655 CEST] 0015 ServletWrappe E Uncaught init() exception thrown by servlet AxisAdminServlet [14.10.09 10:00:30:655 CEST] 0015 ServletWrappe E Deregister the mbean because of uncaught init() exception thrown by servlet AxisAdminServlet: javax.servlet.ServletException: The system is attempting to engage a module that is not available: addressing at org.apache.axis2.transport.http.AxisServlet.init(AxisServlet.java:449) at org.apache.axis2.webapp.AxisAdminServlet.init(AxisAdminServlet.java:56) at com.ibm.ws.webcontainer.servlet.ServletWrapper.init(ServletWrapper.java: 190) at com.ibm.ws.wswebcontainer.servlet.ServletWrapper.init(ServletWrapper.jav a:317) at com.ibm.ws.webcontainer.servlet.ServletWrapper.initialize(ServletWrapper .java:1142) at com.ibm.ws.wswebcontainer.servlet.ServletWrapper.initialize(ServletWrapp er.java:150) at com.ibm.wsspi.webcontainer.extension.WebExtensionProcessor.createServlet Wrapper(WebExtensionProcessor.java:99) at com.ibm.ws.webcontainer.webapp.WebApp.getServletWrapper(WebApp.java:790) at com.ibm.ws.webcontainer.webapp.WebApp.initializeTargetMappings(WebApp.ja va:470) at com.ibm.ws.webcontainer.webapp.WebApp.commonInitializationFinish(WebApp. java:307) at com.ibm.ws.wswebcontainer.webapp.WebApp.initialize(WebApp.java:289) at com.ibm.ws.wswebcontainer.webapp.WebGroup.addWebApplication(WebGroup.jav a:90) at com.ibm.ws.wswebcontainer.VirtualHost.addWebApplication(VirtualHost.java :157) at com.ibm.ws.wswebcontainer.WebContainer.addWebApp(WebContainer.java:665) at com.ibm.ws.wswebcontainer.WebContainer.addWebApplication(WebContainer.ja va:618) at com.ibm.ws.webcontainer.component.WebContainerImpl.install(WebContainerI mpl.java:335) at com.ibm.ws.webcontainer.component.WebContainerImpl.start(WebContainerImp l.java:551) at com.ibm.ws.runtime.component.ApplicationMgrImpl.start(ApplicationMgrImpl .java:1301) at com.ibm.ws.runtime.component.DeployedApplicationImpl.fireDeployedObjectS tart(DeployedApplicationImpl.java:1138) at com.ibm.ws.runtime.component.DeployedModuleImpl.start(DeployedModuleImpl .java:569) at com.ibm.ws.runtime.component.DeployedApplicationImpl.start(DeployedAppli cationImpl.java:817) at com.ibm.ws.runtime.component.ApplicationMgrImpl.startApplication(Applica tionMgrImpl.java:950) at com.ibm.ws.runtime.component.ApplicationMgrImpl$AppInitializer.run(Appli cationMgrImpl.java:2120) at com.ibm.wsspi.runtime.component.WsComponentImpl$_AsynchInitializer.run(W sComponentImpl.java:342) at com.ibm.ws.util.ThreadPool$Worker.run(ThreadPool.java:1469) Thank you in advance, Matthias.
Re: Error page returned instead of Soap Exception when WS-Security Authentication fails in Rampart
I saw this error and I suppose this is fixed in 1.5..you can look at [1]. [1]. [ https://issues.apache.org/jira/browse/RAMPART-236?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=12739525#action_12739525] HTH, Chinmoy On Wed, Oct 21, 2009 at 12:17 PM, Ellecer Valencia elle...@gmail.comwrote: Hi, I'm trying to set up WS-Security (just username/password-clear-text) and I'm trying to get the service to return a Soap Exception when the user logs in with the wrong details. Should be easy, right? However, I keep getting HTTP 500 error pages instead of Soap Exceptions, like this one: htmlheadtitleApache Tomcat/6.0.18 - Error report/titlestyle!--H1 {font-family:Tahoma,Arial,sans-serif;color:white;background-color:#525D76;font-size:22px;} H2 {font-family:Tahoma,Arial,sans-serif;color:white;background-color:#525D76;font-size:16px;} H3 {font-family:Tahoma,Arial,sans-serif;color:white;background-color:#525D76;font-size:14px;} BODY {font-family:Tahoma,Arial,sans-serif;color:black;background-color:white;} B {font-family:Tahoqma,Arial,sans-serif;color:white;background-color:#525D76;} P {font-family:Tahoma,Arial,sans-serif;background:white;color:black;font-size:12px;}A {color : black;}A.name {color : black;}HR {color : #525D76;}--/style /headbodyh1HTTP Status 500 - /h1HR size=1 noshade=noshadepbtype/b Status report/ppbmessage/b u/u/ppbdescription/b uThe server encountered an internal error () that prevented it from fulfilling this request./u/pHR size=1 noshade=noshadeh3Apache Tomcat/6.0.18/h3/body/html Now I'm testing using axis 1.4.1, putting the exploded webapp in the tomcat /webapps directory. When I started getting the error pages, I thought removing the mappings for the HTTP 500 error in /WEB-INF/web.xml would fix it, but it didn't. I've now removed everything else in the Tomcat webapps directory, I've cleaned out the Tomcat /work directory, I've even removed the /axis2-web directory in the Axis webapp, just to eliminate the possiblity of any more JSPs - *and the error pages still keep displaying*. I came across a post from July that is having a problem similar to mine: http://marc.info/?l=axis-userm=124662013625695w=2 However, I didn't come across any posts that resolved his problem. The software I'm using is: Axis 1.4.1 Rampart 1.4 Tomcat 6.0.18 Has anyone encountered this problem and what fixed it? I've tried doing it using policy.xml and via basic rampart config, and am getting similar results. Actually, the curious thing is that when I get the error from a service configured with basic rampart config, I get a stacktrace, like this: mhtmlheadtitleApache Tomcat/6.0.18 - Error report/titlestyle!--H1 {font-family:Tahoma,Arial,sans-serif;color:white;background-color:#525D76;font-size:22px;} H2 {font-family:Tahoma,Arial,sans-serif;color:white;background-color:#525D76;font-size:16px;} H3 {font-family:Tahoma,Arial,sans-serif;color:white;background-color:#525D76;font-size:14px;} BODY {font-family:Tahoma,Arial,sans-serif;color:black;background-color:white;} B {font-family:Tahoma,Arial,sans-serif;color:white;background-color:#525D76;} P {font-family:Tahoma,Arial,sans-serif;background:white;color:black;font-size:12px;}A {color : black;}A.name {color : black;}HR {color : #525D76;}--/style /headbodyh1HTTP Status 500 - /h1HR size=1 noshade=noshadepbtype/b Exception report/ppbmessage/b u/u/ppbdescription/b uThe server encountered an internal error () that prevented it from fulfilling this request./u/ppbexception/b prejava.lang.NullPointerException org.apache.rampart.RampartMessageData.lt;initgt;(RampartMessageData.java:308) org.apache.rampart.MessageBuilder.build(MessageBuilder.java:61) org.apache.rampart.handler.RampartSender.invoke(RampartSender.java:64) org.apache.axis2.engine.Phase.invoke(Phase.java:317) org.apache.axis2.engine.AxisEngine.invoke(AxisEngine.java:264) org.apache.axis2.engine.AxisEngine.sendFault(AxisEngine.java:520) org.apache.axis2.transport.http.AxisServlet.handleFault(AxisServlet.java:416) org.apache.axis2.transport.http.AxisServlet.processAxisFault(AxisServlet.java:379) org.apache.axis2.transport.http.AxisServlet.doPost(AxisServlet.java:167) javax.servlet.http.HttpServlet.service(HttpServlet.java:637) javax.servlet.http.HttpServlet.service(HttpServlet.java:717) /pre/ppbnote/b uThe full stack trace of the root cause is available in the Apache Tomcat/6.0.18 logs./u/pHR size=1 noshade=noshadeh3Apache Tomcat/6.0.18/h3/body/html -- and it says Exception report instead of Status report like in the first one. I don't know if this indicates it's a different page that is hardcoded inside of Axis (just guessing here)? Thanks in advance for any ideas and help from all you wonderful members of the mailing list. =) thanks, Ellecer
unsubscribe
From: Chinmoy Chakraborty [mailto:cch...@gmail.com] Sent: 21 October 2009 12:09 To: axis-user@ws.apache.org Subject: Re: Error page returned instead of Soap Exception when WS-Security Authentication fails in Rampart I saw this error and I suppose this is fixed in 1.5..you can look at [1]. [1]. [ https://issues.apache.org/jira/browse/RAMPART-236?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=12739525#action_12739525 ] HTH, Chinmoy On Wed, Oct 21, 2009 at 12:17 PM, Ellecer Valencia elle...@gmail.commailto:elle...@gmail.com wrote: Hi, I'm trying to set up WS-Security (just username/password-clear-text) and I'm trying to get the service to return a Soap Exception when the user logs in with the wrong details. Should be easy, right? However, I keep getting HTTP 500 error pages instead of Soap Exceptions, like this one: htmlheadtitleApache Tomcat/6.0.18 - Error report/titlestyle!--H1 {font-family:Tahoma,Arial,sans-serif;color:white;background-color:#525D76;font-size:22px;} H2 {font-family:Tahoma,Arial,sans-serif;color:white;background-color:#525D76;font-size:16px;} H3 {font-family:Tahoma,Arial,sans-serif;color:white;background-color:#525D76;font-size:14px;} BODY {font-family:Tahoma,Arial,sans-serif;color:black;background-color:white;} B {font-family:Tahoqma,Arial,sans-serif;color:white;background-color:#525D76;} P {font-family:Tahoma,Arial,sans-serif;background:white;color:black;font-size:12px;}A {color : black;}A.name {color : black;}HR {color : #525D76;}--/style /headbodyh1HTTP Status 500 - /h1HR size=1 noshade=noshadepbtype/b Status report/ppbmessage/b u/u/ppbdescription/b uThe server encountered an internal error () that prevented it from fulfilling this request./u/pHR size=1 noshade=noshadeh3Apache Tomcat/6.0.18/h3/body/html Now I'm testing using axis 1.4.1, putting the exploded webapp in the tomcat /webapps directory. When I started getting the error pages, I thought removing the mappings for the HTTP 500 error in /WEB-INF/web.xml would fix it, but it didn't. I've now removed everything else in the Tomcat webapps directory, I've cleaned out the Tomcat /work directory, I've even removed the /axis2-web directory in the Axis webapp, just to eliminate the possiblity of any more JSPs - *and the error pages still keep displaying*. I came across a post from July that is having a problem similar to mine: http://marc.info/?l=axis-userm=124662013625695w=2 However, I didn't come across any posts that resolved his problem. The software I'm using is: Axis 1.4.1 Rampart 1.4 Tomcat 6.0.18 Has anyone encountered this problem and what fixed it? I've tried doing it using policy.xml and via basic rampart config, and am getting similar results. Actually, the curious thing is that when I get the error from a service configured with basic rampart config, I get a stacktrace, like this: mhtmlheadtitleApache Tomcat/6.0.18 - Error report/titlestyle!--H1 {font-family:Tahoma,Arial,sans-serif;color:white;background-color:#525D76;font-size:22px;} H2 {font-family:Tahoma,Arial,sans-serif;color:white;background-color:#525D76;font-size:16px;} H3 {font-family:Tahoma,Arial,sans-serif;color:white;background-color:#525D76;font-size:14px;} BODY {font-family:Tahoma,Arial,sans-serif;color:black;background-color:white;} B {font-family:Tahoma,Arial,sans-serif;color:white;background-color:#525D76;} P {font-family:Tahoma,Arial,sans-serif;background:white;color:black;font-size:12px;}A {color : black;}A.name {color : black;}HR {color : #525D76;}--/style /headbodyh1HTTP Status 500 - /h1HR size=1 noshade=noshadepbtype/b Exception report/ppbmessage/b u/u/ppbdescription/b uThe server encountered an internal error () that prevented it from fulfilling this request./u/ppbexception/b prejava.lang.NullPointerException org.apache.rampart.RampartMessageData.lt;initgt;(RampartMessageData.java:308) org.apache.rampart.MessageBuilder.build(MessageBuilder.java:61) org.apache.rampart.handler.RampartSender.invoke(RampartSender.java:64) org.apache.axis2.engine.Phase.invoke(Phase.java:317) org.apache.axis2.engine.AxisEngine.invoke(AxisEngine.java:264) org.apache.axis2.engine.AxisEngine.sendFault(AxisEngine.java:520) org.apache.axis2.transport.http.AxisServlet.handleFault(AxisServlet.java:416) org.apache.axis2.transport.http.AxisServlet.processAxisFault(AxisServlet.java:379) org.apache.axis2.transport.http.AxisServlet.doPost(AxisServlet.java:167) javax.servlet.http.HttpServlet.service(HttpServlet.java:637) javax.servlet.http.HttpServlet.service(HttpServlet.java:717) /pre/ppbnote/b uThe full stack trace of the root cause is available in the Apache Tomcat/6.0.18 logs./u/pHR size=1 noshade=noshadeh3Apache Tomcat/6.0.18/h3/body/html -- and it says Exception report instead of Status report like in the first one. I don't know if this indicates it's a different page that is hardcoded inside of Axis
unsubscribe
unsubscribe _ Hotmail: Trusted email with powerful SPAM protection. http://clk.atdmt.com/GBL/go/177141665/direct/01/
Endpoint in wsdl using wrong ip address
Hi, I've changed my service.xml file to have: parameter name=useOriginalwsdltrue/parameter parameter name=modifyUserWSDLPortAddresstrue/parameter I expected to get a WSDL with the same endpoint address I can see using List Services page. On the List Services page I get endpoint address with hostname but when I load the WSDL I can see IP address. Unfortunately this IP address points to a network interface which is not accessible for me as the client. Could you please help me point me where I could find more information about how to make it use hostname rather than IP address or how to choose the correct network interface? My setup: Axis2 1.5 Deployed war file on Jetty 6.1.11 HP-UX 11 Thanks, Krystian -- KRYSTIAN SZCZESNY This e-mail and any attachments are confidential and may also be legally privileged and/or copyright material of Intec Telecom Systems PLC (or its affiliated companies). If you are not an intended or authorised recipient of this e-mail or have received it in error, please delete it immediately and notify the sender by e-mail. In such a case, reading, reproducing, printing or further dissemination of this e-mail or its contents is strictly prohibited and may be unlawful. Intec Telecom Systems PLC does not represent or warrant that an attachment hereto is free from computer viruses or other defects. The opinions expressed in this e-mail and any attachments may be those of the author and are not necessarily those of Intec Telecom Systems PLC.
Problems in axiom1.2.7 when throwing an Exception (fault) in a method of a web service with axis2-1.4
Hello guys, Im using axiom 1.2.7 with Axis2-1.4 (axiom 1.2.7 is included with Axis2-1.4 distribution). I have a web service with security using username token, with rampart 1.4. I have used Axis Databinding (ADB) to implement the server-side. My problem is that when I launch an Exception in one of the methods of the service (I have declared it as a fault in the wsdl) an exception is thrown in org.apache.rampart.RampartMessageData (line 322) and the server replies with an internal error. This exception is thrown in org.apache.rampart.RampartMessageData in a catch block, where an AxisFault is catched: }catch (AxisFault e){ logger.error(---Error:+e.getMessage(),e);//I added this line throw new RampartException(errorInExtractingMsgProps,e); } So I modified the rampart source code to add an error log as you can see above. My discover was that it comes from an Exception thrown in org.apache.axiom.soap.impl.builder.SOAP11BuilderHelper, in processText(SMLStreamReader parser, OMElement value) method: private void processText(XMLStreamReader parser, OMElement value) { try { int token = parser.next(); while (token != XMLStreamReader.END_ELEMENT) { if (token == XMLStreamReader.CHARACTERS) { factory.createOMText(value, parser.getText()); } else { throw new SOAPProcessingException( Only Characters are allowed here); } token = parser.next(); } } catch (XMLStreamException e) { throw new SOAPProcessingException(e); //THAT IS THE EXCEPCION THROWN } } Adding logs in this method I discover that the first parser.next() call returns a token which (token == XMLStreamReader.START_ELEMENT) is true, so the exception is thrown. So if I modified the method processText as: private void processText(XMLStreamReader parser, OMElement value) { try { int token = parser.next(); while (token != XMLStreamReader.END_ELEMENT) { if (token == XMLStreamReader.CHARACTERS) { factory.createOMText(value, parser.getText()); }else if(token==XMLStreamReader.START_ELEMENT){ //JUST DO NOTHING } else { throw new SOAPProcessingException( Only Characters are allowed here);//THAT IS THE EXCEPCION THROWN } token = parser.next(); } } catch (XMLStreamException e) { throw new SOAPProcessingException(e); } } It works well because I dont get the exception Only Characters are allowed here. Is it a bug of axiom? I have seen in axiom 1.2.8 that the same exception would be thrown. Or is it problem of the next() method of the implementation of the interface XMLStreamReader, org.apache.axiom.om.impl.llom.OMStAXWrapper? Has someone some idea? Thanks, Juan Moratilla Peón Telefonica I+D Madrid, Spain
Retrieving faultString message
Hi Everyone, Got a question for you all, I have an application that uses Axis2 + Rampart, to consume some Secure Webservices, but I'm having troubles to display all the info in the errors the server returns, to ilustrate this I show the SOAP I recive from the server: ?xml version=1.0 encoding=UTF-8 standalone=no? SOAP-ENV:Envelope xmlns:SOAP-ENV=http://schemas.xmlsoap.org/soap/envelope/ SOAP-ENV:Body SOAP-ENV:Fault faultcode xmlns:p=http://schemas.oblix.com/ws/2003/08/Faults p:Client.AuthenticationFault/faultcode faultstring*La autenticación contra el LDAP Falló*/faultstring detail/ /SOAP-ENV:Fault /SOAP-ENV:Body /SOAP-ENV:Envelope This happens because the user/password does not match, in my client app I wish to take this exact message (the one in bold, in the faultstring tag) but I only can get an Axis2 SOAP header missing error that says nothing to my final users... How can I capture this error message? (excuse my English, if better explanation is required just ask) ___ Marcus Sánchez Díaz. Enterprise Developer. SCJP - SCWCD.
Re: Endpoint in wsdl using wrong ip address
On Wed, Oct 21, 2009 at 6:15 PM, Krystian Szczesny krystian.szcze...@intecbilling.com wrote: Hi, I’ve changed my service.xml file to have: parameter name=useOriginalwsdltrue/parameter parameter name=modifyUserWSDLPortAddresstrue/parameter you can keep the correct host name in wsdl file and set above parameter to false. thanks, Amila. I expected to get a WSDL with the same endpoint address I can see using List Services page. On the List Services page I get endpoint address with hostname but when I load the WSDL I can see IP address. Unfortunately this IP address points to a network interface which is not accessible for me as the client. Could you please help me point me where I could find more information about how to make it use hostname rather than IP address or how to choose the correct network interface? My setup: Axis2 1.5 Deployed war file on Jetty 6.1.11 HP-UX 11 Thanks, Krystian *-- * *KRYSTIAN SZCZESNY* This e-mail and any attachments are confidential and may also be legally privileged and/or copyright material of Intec Telecom Systems PLC (or its affiliated companies). If you are not an intended or authorised recipient of this e-mail or have received it in error, please delete it immediately and notify the sender by e-mail. In such a case, reading, reproducing, printing or further dissemination of this e-mail or its contents is strictly prohibited and may be unlawful. Intec Telecom Systems PLC does not represent or warrant that an attachment hereto is free from computer viruses or other defects. The opinions expressed in this e-mail and any attachments may be those of the author and are not necessarily those of Intec Telecom Systems PLC. -- Amila Suriarachchi WSO2 Inc. blog: http://amilachinthaka.blogspot.com/