[Axis2] Deploy Axis 2 on Simple Web Server
Hi, I want to use axis2 to implement web services also to implement its client.But I dont want to use any application server like tomcat/Jboss.I have created a server using simpleWeb Server api. Is it possible to use axis 2 on my server
Unauthorized user
Hello everybody,I'm just trying to get to work the StockQuote example.But when I run it, I always get error 401 - unauthorized User 'null' not authenticatedlt; ...If I try it with the names from users.lst it doesn't work too.I've tried to find that topic on the list, but unfortunately the one post that seems to answer it won't load :(Thanks for your help,AmandaSMS schreiben mit WEB.DE FreeMail - einfach, schnell undkostenguenstig. Jetzt gleich testen! http://f.web.de/?mc=021192
Re: [Axis2] Vanishing MTOM attachments
Aaaha. Nice finding... Any comments from SOAP1.2 specialists... Anyway this content type needs to be fixed... Please log a Jira... ~Thilina Content-Type: multipart/related;boundary=MIMEBoundaryurn_uuid_26C55753A5E981E64A11479668765601;type=application/xop+xml; start=0.urn:uuid:[EMAIL PROTECTED];start-info=application/soap+xml; charset=UTF-8;action="" This then presumably blows up on the server inside thejavax.mail.internet.ParameterListconstructor, since the action="" can't be parsed properly - resulting inthe not sohelpful SOAPEnvelope must contain a body element which is either first or second childelement of the SOAPEnvelope a few levels up (masking the OMException with aInvalidContent Type Field in the Mime Message message),1) Is the action parameter supposed to have a value? 2) As other people presumably have this working, am I missing aconfiguration on the client side?My client look pretty much like this at the moment:EndpointReference target = new EndpointReference(url); ServiceClient serviceClient = new ServiceClient();Options options = new Options();options.setProperty(Constants.Configuration.ENABLE_MTOM,Constants.VALUE_TRUE);options.setSoapVersionURI(SOAP12Constants.SOAP_ENVELOPE_NAMESPACE_URI );options.setTransportInProtocol(Constants.TRANSPORT_HTTP);options.setTo(target);serviceClient.setOptions(options);OMElement payload = getOMElement(messageContent);OMElement result = serviceClient.sendReceive (payload);I haven't still had the chance to follow up where the other attachmentsvanish to... anyhelp would be appreciated. :)Kind regards,Timo-Original Message-From: Timo Ahokas [mailto: [EMAIL PROTECTED]]Sent: 18 May 2006 14:07To: Axis UserSubject: [Axis2] Vanishing MTOM attachmentsHi all,We are using Axis2 1.0 (client server) and sending XML and binary MTOM attachments to the server. The XML document and thefirst binary attachment are received without problems, but anyadditional attachments never reach the server (are not availablefrom the OMElement when the server-side code starts executing). I'm sending roughly the following from the client:OMElementOMElement OMElement XML document (constructed via StAXOMBuilder.getDocumentElement()) /OMElement /OMElementOMElement OMText Binary attachment 1 (via factory.createOMText(datahandler, true)) /OMText/OMElementOMElement OMText Binary attachment 2 /OMText/OMElementOMElement OMText Binary attachment n /OMText/OMElement/OMElementThis is sent out without problems from the client (as confirmed by running through the Axis1 SoapMon proxy). The message on the wirelooks like fine, the first part of the multipart contains themessage (SOAP message with a XML payload and include referencesfor all the 1-n binary attachments) and each of the binary attachments are included in separate parts of the message.But when the message reaches the server, only the first binarypart seems to be in the OMElement that the server has constructed.If I return that to the client, again looking at the wire representation, only the first binary attachment is in place.Also (possibly related to how the message is constructed), if I tryto set SOAP version to 1.2 on the client(options.setSoapVersionURI(SOAP12Constants.SOAP_ENVELOPE_NAMESPACE_URI )),I get the following error on the server side:2006-05-18 13:30:11,108 [ERROR][http-80-Processor24][org.apache.catalina.core.ContainerBase.[Catalina].[localhost].[/voxsurf].[AxisServlet]]:Servlet.service () for servlet AxisServlet threw exception org.apache.axiom.om.OMException: SOAPEnvelope must contain a body element which iseither first or second child element of the SOAPEnvelope.atorg.apache.axiom.soap.impl.llom.SOAPEnvelopeImpl.getBody (SOAPEnvelopeImpl.java:142)atorg.apache.axiom.soap.impl.llom.SOAPEnvelopeImpl.addChild(SOAPEnvelopeImpl.java:103)atorg.apache.axiom.soap.impl.llom.SOAPEnvelopeImpl.getHeader(SOAPEnvelopeImpl.java:82) atorg.apache.axis2.engine.AxisEngine.createFaultMessageContext(AxisEngine.java:183)atorg.apache.axis2.transport.http.AxisServlet.handleFault(AxisServlet.java:168)at org.apache.axis2.transport.http.AxisServlet.doPost (AxisServlet.java:153)at javax.servlet.http.HttpServlet.service(HttpServlet.java:763)...But looking at the messages sent over the wire, only the soapenvis different, and both messages start otherwise similarly: ?xml version=1.0 encoding=UTF-8?soapenv:Envelope xmlns:soapenv=http://www.w3.org/2003/05/soap-envelope soapenv:Header/ soapenv:Body ... body contentIs there something fundamentally wrong in our approach for sending themultiple binary attachments in the single message? Has someone been able to do something similar using Axis2 1.0? Are there any debug flags etcI could enable to see what happens when the message from the wire isbeing processed?Kind regards,Timo Ahokas -To unsubscribe, e-mail: [EMAIL PROTECTED]For additional commands, e-mail: [EMAIL PROTECTED]-- May the SourcE be with u
problem installing sample one with IBM Websphere Application Server 5.1 and IBM Rational Software Architect
Title: problem installing sample one with IBM Websphere Application Server 5.1 and IBM Rational Software Architect Dear, I have tried to work with axis 2.0 in a WebSphere environment and I get some trouble. Could you please help me to find what's happening ? Here is my problem: I have tried to install axis 2 in a servlet contained like explained in the installation guide. I use Rational Software Architect to deploy on a test WebSphere application Server 5.1. Like usual I have imported the war file and encapsulated in an ear, then I have published it to the WAS 5.1. Then I have typed the url to see if all is working, in the validate screen all is correct except this: Examining Version Service There was a problem of examine Version service , may be the service not available or some thing has gone wrong. But this does not mean system does not working ! Try to upload a some other service and check to see whether it is working. I have also tried to test the version webservice but I got: Available services Faulty Services C:\Winprog\IBM\Rational\SDP\6.0\runtimes\base_v51\installedApps\localhost\axis2EAR.ear\axis2.war\WEB-INF\services\version.aar and when clicking I got: Error: java.lang.NoSuchMethodError: javax.xml.namespace.QName: method (Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;)V not found at org.apache.ws.java2wsdl.utils.TypeTable.populateSimpleTypes(TypeTable.java:38) at org.apache.ws.java2wsdl.utils.TypeTable.(TypeTable.java:33) at org.apache.ws.java2wsdl.SchemaGenerator.(SchemaGenerator.java:48) at org.apache.axis2.deployment.util.Utils.fillAxisService(Utils.java:209) at org.apache.axis2.deployment.ServiceBuilder.populateService(ServiceBuilder.java:149) at org.apache.axis2.deployment.repository.util.ArchiveReader.buildServiceGroup(ArchiveReader.java:76) at org.apache.axis2.deployment.repository.util.ArchiveReader.processServiceGroup(ArchiveReader.java:118) at org.apache.axis2.deployment.DeploymentEngine.doDeploy(DeploymentEngine.java:620) at org.apache.axis2.deployment.repository.util.WSInfoList.update(WSInfoList.java:195) at org.apache.axis2.deployment.RepositoryListener.update(RepositoryListener.java:207) at org.apache.axis2.deployment.RepositoryListener.checkServices(RepositoryListener.java:155) at org.apache.axis2.deployment.DeploymentEngine.loadServices(DeploymentEngine.java:91) at org.apache.axis2.deployment.WarBasedAxisConfigurator.loadServices(WarBasedAxisConfigurator.java:142) at org.apache.axis2.context.ConfigurationContextFactory.createConfigurationContext(ConfigurationContextFactory.java:42) at org.apache.axis2.transport.http.AxisServlet.initConfigContext(AxisServlet.java:213) at org.apache.axis2.transport.http.AxisServlet.init(AxisServlet.java:182) at com.ibm.ws.webcontainer.servlet.StrictServletInstance.doInit(StrictServletInstance.java:82) at com.ibm.ws.webcontainer.servlet.StrictLifecycleServlet._init(StrictLifecycleServlet.java:147) at com.ibm.ws.webcontainer.servlet.PreInitializedServletState.init(StrictLifecycleServlet.java:270) at com.ibm.ws.webcontainer.servlet.StrictLifecycleServlet.init(StrictLifecycleServlet.java:113) at com.ibm.ws.webcontainer.servlet.ServletInstance.init(ServletInstance.java:189) at javax.servlet.GenericServlet.init(GenericServlet.java:258) at com.ibm.ws.webcontainer.webapp.WebAppServletManager.addServlet(WebAppServletManager.java:876) at com.ibm.ws.webcontainer.webapp.WebAppServletManager.loadServlet(WebAppServletManager.java:224) at com.ibm.ws.webcontainer.webapp.WebAppServletManager.loadAutoLoadServlets(WebAppServletManager.java:542) at com.ibm.ws.webcontainer.webapp.WebApp.loadServletManager(WebApp.java:1279) at com.ibm.ws.webcontainer.webapp.WebApp.init(WebApp.java:283) at com.ibm.ws.webcontainer.srt.WebGroup.loadWebApp(WebGroup.java:392) at com.ibm.ws.webcontainer.srt.WebGroup.init(WebGroup.java:211) at com.ibm.ws.webcontainer.WebContainer.addWebApplication(WebContainer.java:1005) at com.ibm.ws.runtime.component.WebContainerImpl.install(WebContainerImpl.java:136) at com.ibm.ws.runtime.component.WebContainerImpl.start(WebContainerImpl.java:356) at com.ibm.ws.runtime.component.ApplicationMgrImpl.start(ApplicationMgrImpl.java:505) at com.ibm.ws.runtime.component.DeployedApplicationImpl.fireDeployedObjectStart(DeployedApplicationImpl.java:808) at com.ibm.ws.runtime.component.DeployedModuleImpl.start(DeployedModuleImpl.java:354) at com.ibm.ws.runtime.component.DeployedApplicationImpl.start(DeployedApplicationImpl.java:578) at com.ibm.ws.runtime.component.ApplicationMgrImpl.startApplication(ApplicationMgrImpl.java:299) at com.ibm.ws.runtime.component.ApplicationMgrImpl.start(ApplicationMgrImpl.java:256) at com.ibm.ws.runtime.component.ContainerImpl.startComponents(ContainerImpl.java:536) at com.ibm.ws.runtime.component.ContainerImpl.start(ContainerImpl.java:413) at com.ibm.ws.runtime.component.ApplicationServerImpl.start(ApplicationServerImpl.java:152) at
RE: [Axis2] Vanishing MTOM attachments
Hi Thilina, Thanks a lot for the response. Just to confirm what in doing on the server side: public OMElement mediaTransformation(OMElement element) { try { element.build(); element.detach(); Iterator serviceIterator = element.getChildElements(); OMElement servicePayload = (OMElement) serviceIterator.next(); OMElement xmlDoc = (OMElement) servicePayload.getChildElements().next(); // Handle attachments, if there are any. DataHandler attachmentDH; while(serviceIterator.hasNext()) { OMElement attachmentElement = (OMElement) serviceIterator.next(); OMText attachment = (OMText) attachmentElement.getFirstOMChild(); /* extract data and persist */ } processXML(xmlDoc); } catch (Exception e) { e.printStackTrace(); } return createResponseMessage(); } So when I get an element in, and inspect in the Eclipse debugger, I see the XML content and the first binary attachment, but none of the other attachments. When I then let the code run through, it extracts (and successfully saves to disc) the first binary attachment. But the iterator only contains one element, so none of the other attachments are processed. And I'm not currently returning the same content back anyway, I'm constructing a new response element from scratch. I have tried with/without the element.build()/buildNext()/detach(), with no changes in behaviour. I wasn't able to find an omElement.buildAll() though? And if the mime processing is deferred, why would the element contain the first attachment (and not just the soap/xml part), as the on the wire message looks something like this: POST /service HTTP/1.1 User-Agent: Axis/2.0 Host: 127.0.0.1 Transfer-Encoding: chunked Content-Type: multipart/related; boundary=MIMEBoundaryurn_uuid_1B620E94F835278E0E11480314414011; type=application/xop+xml; start=0.urn:uuid:[EMAIL PROTECTED]; start-info=application/soap+xml; charset=UTF-8 --MIMEBoundaryurn_uuid_1B620E94F835278E0E11480314414011 content-type: application/xop+xml; charset=UTF-8; type=application/soap+xml; content-transfer-encoding: binary content-id: 0.urn:uuid:[EMAIL PROTECTED] !-- soap message with embedded XML content and include references to all attachments -- --MIMEBoundaryurn_uuid_1B620E94F835278E0E11480314414011 content-type: image/jpeg content-transfer-encoding: binary content-id: 1.urn:uuid:[EMAIL PROTECTED] !-- binary content -- --MIMEBoundaryurn_uuid_1B620E94F835278E0E11480314414011 content-type: image/jpeg content-transfer-encoding: binary content-id: 2.urn:uuid:[EMAIL PROTECTED] !-- binary content -- --MIMEBoundaryurn_uuid_1B620E94F835278E0E11480314414011 content-type: image/jpeg content-transfer-encoding: binary content-id: 3.urn:uuid:[EMAIL PROTECTED] !-- binary content -- --MIMEBoundaryurn_uuid_1B620E94F835278E0E11480314414011-- To get this to run, I'm starting the client from a debugger and changing the soapActionString (\\) to an empty string (because othervise the parsing fails on the server side). Any ideas? Thanks - really appreciate your help... :) Kind regards, Timo -Original Message- From: Thilina Gunarathne [mailto:[EMAIL PROTECTED] Sent: 19 May 2006 09:20 To: axis-user@ws.apache.org Subject: Re: [Axis2] Vanishing MTOM attachments You need to build the elements if you are going to echo them back to the client.. IIRC you can call omElement.buildAll() to overcome your problem... Axis2 do deffered building of mime parts.. That means mime parts will be read only if the user requests them... In your case you are writing back the response while the attachments are still in the stream which might be the cause for vanishing of other mime parts... ~Thilina On 5/18/06, Timo Ahokas [EMAIL PROTECTED] wrote: Hi all, We are using Axis2 1.0 (client server) and sending XML and binary MTOM attachments to the server. The XML document and the first binary attachment are received without problems, but any additional attachments never reach the server (are not available from the OMElement when the server-side code starts executing). I'm sending roughly the following from the client: OMElement OMElement OMElement XML document (constructed via StAXOMBuilder.getDocumentElement()) /OMElement /OMElement OMElement OMText Binary attachment 1 (via factory.createOMText(datahandler, true)) /OMText /OMElement OMElement OMText Binary attachment 2 /OMText /OMElement OMElement OMText Binary attachment n /OMText /OMElement /OMElement This is sent out without problems from the client (as confirmed by running through the Axis1 SoapMon proxy). The message on the wire looks like fine, the first part of the multipart contains the message (SOAP message with a XML payload and include references for all
[Axis2] How to share a service implementation with Axis 1.x?
Hi all, I am trying to find out if it is possible to publish a service implementation with both Axis 1.x and Axis 2. I need to do this for ensuring compatibility with the current version, as it uses RPC/encoded. The idea is to have a single internal implementation, published as an RPC/encoded service with Axis 1.x, and as a Document/literal service with Axis 2. I am planning to put all the service implementation classes into the shared/lib directory, deploy a separate webapp for each Axis version, and deploy the same service on both webapps. Being still in an analysis phase, I have some technical doubts that, I know, will have to be addressed before deciding the final architecture. 1. Will the support of RPC/encoded be added to Axis 2? If the answer is yes, I would prefer to wait for its availability, depending on when it is planned to be added. 2. Is it possible to use both Axis versions within the same classloader? That is, can the same webapp have an Axis 1.x and an Axis 2 servlets working at the same time? Would this produce class name conflicts? 3. Is there a known best practice for sharing my service beans among both Axis versions? I am considering to generate them with XmlBeans, but I guess the generated classes will only understand document/literal OR rpc/encoded, but not both. 4. The service currently throws an Exception that inherits from AxisFault, and I would like to remove this dependency. It is done so, because we wanted to fill the fault code and details with some internal data (for message i18n support on the client side). Is it possible to control the serialization of all these fields with an Exception that does not inherit from AxisFault? Maybe with custom serializers? Sorry, I know they are too many questions. Thanks in advance, Rodrigo Ruiz -- --- GRIDSYSTEMSRodrigo Ruiz Aguayo Parc Bit - Son Espanyol 07120 Palma de Mallorcamailto:[EMAIL PROTECTED] Baleares - España Tel:+34-971435085 Fax:+34-971435082 http://www.gridsystems.com --- -- No virus found in this outgoing message. Checked by AVG Free Edition. Version: 7.1.392 / Virus Database: 268.6.1/343 - Release Date: 18/05/2006 - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Generating SOAP-Header with WSDL2Java from WSDL file
Hello, I'm trying to generate Java code from WSDL with WSDL2Java. Everything works fine until I try to generate SOAP-Headers in the Input Message. WSDL2Java does not complain, however the generated file xxxStub.java contains references to param4, which is not defined. The buggy code looks like that (beginning with line 124) // add the children only if the parameter is not null if (param4!=null){ env.getHeader().addChild(toOM(param4, optimizeContent(new javax.xml.namespace.QName(, RequestSecurityToken; } I'm using Axis2 Version 1.0 and JDK1.5.0_6. Below you find an example WSDL. Is this an error within WSDL2Java or withing my WSDL file? How can I fix the problem? Thanks a lot, Thomas --- ?xml version=1.0 encoding=UTF-8? definitions targetNamespace=http://localhost:; xmlns:tns=http://localhost:; xmlns:soap=http://schemas.xmlsoap.org/wsdl/soap/; xmlns:xsd=http://www.w3.org/2001/XMLSchema; xmlns:wsse=http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd; xmlns=http://schemas.xmlsoap.org/wsdl/; message name=SecurityTokenInput part name=testInput type=xsd:string/ part name=headerInput type=xsd:string/ /message message name=SecurityTokenOutput part name=testOutput type=xsd:string/ /message portType name=SecurityTokenPortType operation name=RequestSecurityToken input message=tns:SecurityTokenInput/ output message=tns:SecurityTokenOutput/ /operation /portType binding name=SecurityTokenBinding type=tns:SecurityTokenPortType soap:binding style=document transport=http://schemas.xmlsoap.org/soap/http; / operation name=RequestSecurityToken soap:operation soapAction= / input soap:header message=tns:SecurityTokenInput part=headerInput use=encoded encodingStyle=http://schemas.xmlsoap.org/soap/encoding// soap:body parts=testInput use=encoded encodingStyle=http://schemas.xmlsoap.org/soap/encoding// /input output soap:body parts=testOutput use=encoded encodingStyle=http://schemas.xmlsoap.org/soap/encoding// /output /operation /binding service name=SecurityTokenService port binding=tns:SecurityTokenBinding soap:address location=http://localhost:/STS/ /port /service /definitions ___ SMS schreiben mit WEB.DE FreeMail - einfach, schnell und kostenguenstig. Jetzt gleich testen! http://f.web.de/?mc=021192 - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Generating SOAP-Header with WSDL2Java from WSDL file
Your WSDL has errors. Document/encoded is not a valid combination.When using document style, your message parts must reference element definitions (rather than types). That means you must provide a types section and a schema to define your elements. Note, also, that the normal practice is to not include header definitions in the WSDL. Headers are typically managed by handlers rather than the application.AnneOn 5/19/06, Thomas Kippenberg [EMAIL PROTECTED] wrote: Hello,I'm trying to generate Java code from WSDL with WSDL2Java. Everything works fine until I try to generate SOAP-Headers in the Input Message. WSDL2Java does not complain, however the generated file xxxStub.java contains references to param4, which is not defined. The buggy code looks like that (beginning with line 124)// add the children only if the parameter is not null if (param4!=null){env.getHeader().addChild(toOM(param4, optimizeContent(new javax.xml.namespace.QName(, RequestSecurityToken; }I'm using Axis2 Version 1.0 and JDK1.5.0_6. Below you find an example WSDL.Is this an error within WSDL2Java or withing my WSDL file? How can I fix the problem? Thanks a lot,Thomas---?xml version=1.0 encoding=UTF-8?definitions targetNamespace=http://localhost: xmlns:tns=http://localhost:xmlns:soap=http://schemas.xmlsoap.org/wsdl/soap/ xmlns:xsd=http://www.w3.org/2001/XMLSchemaxmlns:wsse= http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsdxmlns=http://schemas.xmlsoap.org/wsdl/ message name=SecurityTokenInputpart name=testInput type=xsd:string/part name=headerInput type=xsd:string//message message name=SecurityTokenOutputpart name=testOutput type=xsd:string//messageportType name=SecurityTokenPortTypeoperation name=RequestSecurityToken input message=tns:SecurityTokenInput/output message=tns:SecurityTokenOutput//operation/portTypebinding name=SecurityTokenBinding type=tns:SecurityTokenPortType soap:binding style=document transport=http://schemas.xmlsoap.org/soap/http /operation name=RequestSecurityToken soap:operation soapAction= /inputsoap:header message=tns:SecurityTokenInput part=headerInput use=encoded encodingStyle= http://schemas.xmlsoap.org/soap/encoding//soap:body parts=testInput use=encoded encodingStyle=http://schemas.xmlsoap.org/soap/encoding/ //inputoutputsoap:body parts=testOutput use=encoded encodingStyle=http://schemas.xmlsoap.org/soap/encoding/ //output/operation/bindingservice name=SecurityTokenServiceport binding=tns:SecurityTokenBindingsoap:address location= http://localhost:/STS//port/service/definitions___ SMS schreiben mit WEB.DE FreeMail - einfach, schnell undkostenguenstig. Jetzt gleich testen! http://f.web.de/?mc=021192- To unsubscribe, e-mail: [EMAIL PROTECTED]For additional commands, e-mail: [EMAIL PROTECTED]
Re: [Axis2] Vanishing MTOM attachments
Hi, See my comments below Thanks a lot for the response. :) WC.. public OMElement mediaTransformation(OMElement element) { try { element.build (); element.detach(); Iterator serviceIterator = element.getChildElements(); OMElement servicePayload = (OMElement) serviceIterator.next(); OMElement xmlDoc = (OMElement) servicePayload.getChildElements().next(); // Handle attachments, if there are any. DataHandler attachmentDH; while(serviceIterator.hasNext()) { OMElement attachmentElement = (OMElement) serviceIterator.next(); OMText attachment = (OMText) attachmentElement.getFirstOMChild(); /* extract data and persist */ } processXML(xmlDoc); } catch (Exception e) { e.printStackTrace(); } return createResponseMessage(); }So when I get an element in, and inspect in the Eclipse debugger, I see the XML contentand the first binary attachment, but none of the other attachments. When Ithen let thecode run through, it extracts (and successfully saves to disc) the firstbinaryattachment. But the iterator only contains one element, so none of the other attachments I doubt the problem is with getting the iterator..IIRC there was aJira regarding this Iterator.. Try traversing the tree manually... Going through each and every Element with getNextSibling, getChild. Just to make sure where the problem is... are processed. And I'm not currently returning the same content back anyway,I'mconstructing a new response element from scratch. I have tried with/without the element.build()/buildNext()/detach(), with nochangesin behaviour. I wasn't able to find an omElement.buildAll() though? Yeahh.. May be it's not there now. But I'm sure build() might be doing the same thing.. I'm in touch with the code base a lot due to my oncoming exams :)... And ifthe mime processing is deferred, why would the element contain the first attachment(and not just the soap/xml part), Can't get your point clearly... ~Thilina as the on the wire message looks something like this:POST /service HTTP/1.1User-Agent: Axis/2.0 Host: 127.0.0.1Transfer-Encoding: chunkedContent-Type: multipart/related;boundary=MIMEBoundaryurn_uuid_1B620E94F835278E0E11480314414011;type=application/xop+xml; start=0.urn:uuid:[EMAIL PROTECTED];start-info=application/soap+xml; charset=UTF-8 --MIMEBoundaryurn_uuid_1B620E94F835278E0E11480314414011content-type: application/xop+xml; charset=UTF-8;type=application/soap+xml;content-transfer-encoding: binarycontent-id: 0.urn:uuid:[EMAIL PROTECTED]!-- soap message with embedded XML content and include references to allattachments MIMEBoundaryurn_uuid_1B620E94F835278E0E11480314414011 content-type: image/jpegcontent-transfer-encoding: binarycontent-id: 1.urn:uuid:[EMAIL PROTECTED] !-- binary content MIMEBoundaryurn_uuid_1B620E94F835278E0E11480314414011content-type: image/jpegcontent-transfer-encoding: binarycontent-id: 2.urn:uuid:[EMAIL PROTECTED]!-- binary content MIMEBoundaryurn_uuid_1B620E94F835278E0E11480314414011content-type: image/jpegcontent-transfer-encoding: binary content-id: 3.urn:uuid:[EMAIL PROTECTED]!-- binary content MIMEBoundaryurn_uuid_1B620E94F835278E0E11480314414011-- To get this to run, I'm starting the client from a debugger and changing thesoapActionString (\\) to an empty string (because othervise the parsingfails on the server side). Any ideas? Thanks - really appreciate your help... :)Kind regards,Timo-Original Message-From: Thilina Gunarathne [mailto:[EMAIL PROTECTED]]Sent: 19 May 2006 09:20 To: axis-user@ws.apache.orgSubject: Re: [Axis2] Vanishing MTOM attachmentsYou need to build the elements if you are going to echo them back to theclient.. IIRC you can call omElement.buildAll()to overcome your problem...Axis2 do deffered building of mime parts.. That means mime parts will beread only if the user requests them...In your case you are writing back the response while the attachments are still in the stream which might be the cause for vanishing of other mimeparts...~ThilinaOn 5/18/06, Timo Ahokas [EMAIL PROTECTED] wrote: Hi all,We are using Axis2 1.0 (client server) and sending XML andbinary MTOM attachments to the server. The XML document and thefirst binary attachment are received without problems, but anyadditional attachments never reach the server (are not available from the OMElement when the server-side code starts executing).I'm sending roughly the following from the client:OMElementOMElementOMElementXML document (constructed via StAXOMBuilder.getDocumentElement())/OMElement/OMElementOMElementOMTextBinary attachment 1 (via factory.createOMText(datahandler, true))/OMText /OMElementOMElementOMTextBinary attachment 2/OMText/OMElementOMElementOMTextBinary attachment n/OMText /OMElement/OMElementThis is sent out without problems from the client (as confirmed byrunning through the Axis1 SoapMon proxy). The message on the wirelooks like fine, the first part of the multipart contains the message (SOAP message with a XML payload and include referencesfor all the 1-n binary
Re: [Axis2] Vanishing MTOM attachments
I'm *not* in touch with the code base :)
[Axis2][1.0] interop with .NET
Hi, I'm testing to call Axis2 service from .NET client. When I used Axis2 0.95, I could do that, but after upgrade to Axis2 1.0, I can't. .NET client can sends request message to Axis2 service, and Axis2 service receives that and sends response message to .NET client. I saw actual in/out XML messages with TCPMon 1.0. Though, .NET client got 'Nothing' object as response. But, I changed 'elementFormDefault' of WSDL schema to 'qualified', and re-generated .NET proxy code, .NET client got response successfully !! It seems elementFormDefault=qualified was default generated WSDL settings at 0.95. With 1.0 elementFormDefault=unqualified seems default. I saw WS-I recommend unqualified, so I'd like to verify unqualified, too. Does anyone succeed interop test between Axis2 1.0 and .NET with WSDL elementFormDefault=unqualified ? Thanks, kinichiro __ Do You Yahoo!? Tired of spam? Yahoo! Mail has the best spam protection around http://mail.yahoo.com - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: [Axis2] Vanishing MTOM attachments
Hi Thilina, I tried what you suggested by doing this on the server side: public OMElement service(OMElement element) { element.build(); element.buildNext(); element.detach(); OMNode firstOMChild = element.getFirstOMChild(); OMNode nextOMSibling = firstOMChild.getNextOMSibling(); if(nextOMSibling != null) { OMNode nextOMSibling2 = nextOMSibling.getNextOMSibling(); if(nextOMSibling2 != null) { OMNode nextOMSibling3 = nextOMSibling2.getNextOMSibling(); } } ... firstOMChild is the XML payload nextOMSibling is the first binary attachment nextOMSibling2 should be the second binary attachment (but is null) nextOMSibling3 should be the third binary attachment (-||-) I'm guessing that something is going wrong when the over-the-wire data is being demarshalled and before the OMElement is even handed down to my service (which would explain why I see the data coming in into Axis, but not when it reaches my service). But I could obviously misinterpret what the debugger is displaying. And if the mime processing is deferred, why would the element contain the first attachment (and not just the soap/xml part), Can't get your point clearly... I think my point was that if all binary mime processing is deferred, then why does one out of the three attachments come through fine? Unless the first one is pre-loaded and any latter ones are deferred... Has anyone successfully received multiple binary attachments with Axis 1.0? :) And Thilina - good luck with the exams... :) Cheers Timo -Original Message- From: Thilina Gunarathne [mailto:[EMAIL PROTECTED] Sent: 19 May 2006 12:50 To: axis-user@ws.apache.org Subject: Re: [Axis2] Vanishing MTOM attachments Hi, See my comments below Thanks a lot for the response. :) WC.. public OMElement mediaTransformation(OMElement element) { try { element.build (); element.detach(); Iterator serviceIterator = element.getChildElements(); OMElement servicePayload = (OMElement) serviceIterator.next(); OMElement xmlDoc = (OMElement) servicePayload.getChildElements().next(); // Handle attachments, if there are any. DataHandler attachmentDH; while(serviceIterator.hasNext()) { OMElement attachmentElement = (OMElement) serviceIterator.next(); OMText attachment = (OMText) attachmentElement.getFirstOMChild(); /* extract data and persist */ } processXML(xmlDoc); } catch (Exception e) { e.printStackTrace(); } return createResponseMessage(); } So when I get an element in, and inspect in the Eclipse debugger, I see the XML content and the first binary attachment, but none of the other attachments. When I then let the code run through, it extracts (and successfully saves to disc) the first binary attachment. But the iterator only contains one element, so none of the other attachments I doubt the problem is with getting the iterator.. IIRC there was a Jira regarding this Iterator.. Try traversing the tree manually... Going through each and every Element with getNextSibling, getChild. Just to make sure where the problem is... are processed. And I'm not currently returning the same content back anyway, I'm constructing a new response element from scratch. I have tried with/without the element.build()/buildNext()/detach(), with no changes in behaviour. I wasn't able to find an omElement.buildAll() though? Yeahh.. May be it's not there now. But I'm sure build() might be doing the same thing.. I'm in touch with the code base a lot due to my oncoming exams :)... And if the mime processing is deferred, why would the element contain the first attachment (and not just the soap/xml part), Can't get your point clearly... ~Thilina as the on the wire message looks something like this: POST /service HTTP/1.1 User-Agent: Axis/2.0 Host: 127.0.0.1 Transfer-Encoding: chunked Content-Type: multipart/related; boundary=MIMEBoundaryurn_uuid_1B620E94F835278E0E11480314414011; type=application/xop+xml; start=0.urn:uuid:[EMAIL PROTECTED]; start-info=application/soap+xml; charset=UTF-8 --MIMEBoundaryurn_uuid_1B620E94F835278E0E11480314414011 content-type: application/xop+xml; charset=UTF-8; type=application/soap+xml; content-transfer-encoding: binary content-id: 0.urn:uuid:[EMAIL PROTECTED] !-- soap message with embedded XML content and include references to all attachments -- --MIMEBoundaryurn_uuid_1B620E94F835278E0E11480314414011 content-type: image/jpeg content-transfer-encoding: binary content-id: 1.urn:uuid:[EMAIL PROTECTED] !-- binary content -- --MIMEBoundaryurn_uuid_1B620E94F835278E0E11480314414011 content-type: image/jpeg content-transfer-encoding: binary content-id: 2.urn:uuid:[EMAIL PROTECTED] !-- binary content -- --MIMEBoundaryurn_uuid_1B620E94F835278E0E11480314414011
Is defining a common type for void messages allowed in document/literal?
Hi all, I am wondering if it is valid to define a common VoidType as: xsd:complexType name=VoidType xsd:sequence/ /xsd:complexType and use it for all the elements that are empty. That is, for an interface like: public interface MyProfile extends Remote { String getMyName(); void setMyName(String name); } Instead of: MyProfilePortType getMyName Input : GetMyNameRequest -- GetMyNameRequestType Output : GetMyNameResponse -- GetMyNameResponseType setMyName Input : SetMyNameRequest -- SetMyNameRequestType Output : SetMyNameResponse -- SetMyNameResponseType where GetMyNameRequestType and SetMyNameResponseType are equivalent, have this WSDL definitions: MyProfilePortType getMyName Input : GetMyNameRequest -- VoidType Output : GetMyNameResponse -- GetMyNameResponseType setMyName Input : SetMyNameRequest -- SetMyNameRequestType Output : SetMyNameResponse -- VoidType Will Axis correctly understand such a WSDL when generating code? Thanks Rodrigo -- --- GRIDSYSTEMSRodrigo Ruiz Aguayo Parc Bit - Son Espanyol 07120 Palma de Mallorcamailto:[EMAIL PROTECTED] Baleares - España Tel:+34-971435085 Fax:+34-971435082 http://www.gridsystems.com --- -- No virus found in this outgoing message. Checked by AVG Free Edition. Version: 7.1.392 / Virus Database: 268.6.1/343 - Release Date: 18/05/2006 - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: [Axis2] Vanishing MTOM attachments
Ok, I think I know what's happening... --[Example 1] Client sends: OMElement OMElementXMLOMELement OMElementattachment 1/OMElement OMElementattachment 2/OMElement OMElementattachment 3/OMElement /OMElement Service receives: OMElement OMElementXMLOMELement OMElementattachment 1/OMElement /OMElement --[Example 2] Client sends: OMElement OMElementXMLOMELement OMElement OMElementattachment 1/OMElement OMElementattachment 2/OMElement OMElementattachment 3/OMElement /OMElement /OMElement Service receives: OMElement OMElementXMLOMELement OMElement OMElementattachment 1/OMElement /OMElement OMElementattachment 2/OMElement /OMElement --[Example 3] Client sends: OMElement OMElementXMLOMELement OMElement OMElement OMElementattachment 1/OMElement OMElementattachment 2/OMElement OMElementattachment 3/OMElement /OMElement /OMElement /OMElement Service receives: OMElement OMElementXMLOMELement OMElement OMElement OMElementattachment 1/OMElement /OMElement OMElementattachment 2/OMElement /OMElement OMElementattachment 3/OMElement /OMElement So it seems that the code that is constructing the OMElement for the service has a bug and it adding the attachments back incorrectly - it seems to be adding any extra ones (2,3,...) to the parent element, instead of the current one. Anyone familiar with the code - where would this be handled? Kind regards, Timo -Original Message- From: Timo Ahokas [mailto:[EMAIL PROTECTED] Sent: 19 May 2006 13:39 To: axis-user@ws.apache.org Subject: RE: [Axis2] Vanishing MTOM attachments Hi Thilina, I tried what you suggested by doing this on the server side: public OMElement service(OMElement element) { element.build(); element.buildNext(); element.detach(); OMNode firstOMChild = element.getFirstOMChild(); OMNode nextOMSibling = firstOMChild.getNextOMSibling(); if(nextOMSibling != null) { OMNode nextOMSibling2 = nextOMSibling.getNextOMSibling(); if(nextOMSibling2 != null) { OMNode nextOMSibling3 = nextOMSibling2.getNextOMSibling(); } } ... firstOMChild is the XML payload nextOMSibling is the first binary attachment nextOMSibling2 should be the second binary attachment (but is null) nextOMSibling3 should be the third binary attachment (-||-) I'm guessing that something is going wrong when the over-the-wire data is being demarshalled and before the OMElement is even handed down to my service (which would explain why I see the data coming in into Axis, but not when it reaches my service). But I could obviously misinterpret what the debugger is displaying. And if the mime processing is deferred, why would the element contain the first attachment (and not just the soap/xml part), Can't get your point clearly... I think my point was that if all binary mime processing is deferred, then why does one out of the three attachments come through fine? Unless the first one is pre-loaded and any latter ones are deferred... Has anyone successfully received multiple binary attachments with Axis 1.0? :) And Thilina - good luck with the exams... :) Cheers Timo -Original Message- From: Thilina Gunarathne [mailto:[EMAIL PROTECTED] Sent: 19 May 2006 12:50 To: axis-user@ws.apache.org Subject: Re: [Axis2] Vanishing MTOM attachments Hi, See my comments below Thanks a lot for the response. :) WC.. public OMElement mediaTransformation(OMElement element) { try { element.build (); element.detach(); Iterator serviceIterator = element.getChildElements(); OMElement servicePayload = (OMElement) serviceIterator.next(); OMElement xmlDoc = (OMElement) servicePayload.getChildElements().next(); // Handle attachments, if there are any. DataHandler attachmentDH; while(serviceIterator.hasNext()) { OMElement attachmentElement = (OMElement) serviceIterator.next(); OMText attachment = (OMText) attachmentElement.getFirstOMChild(); /* extract data and persist */ } processXML(xmlDoc); } catch (Exception e) { e.printStackTrace(); } return createResponseMessage(); } So when I get an element in, and inspect in the Eclipse debugger, I see the XML content and the first binary attachment, but none of the other attachments. When I then let the code run through, it extracts (and successfully saves to disc) the first binary attachment. But the iterator only contains one element, so none of the other attachments I doubt the problem is with getting the iterator.. IIRC there was a Jira regarding this Iterator.. Try traversing the tree manually... Going through each and every Element with getNextSibling, getChild. Just to
Retrieving Attachments in AXIS 2. rel 1.0
Hi Dear Axis Users and Contributors. Before to create a JRA Issue about this topic, I prefer present it briefly in a mail ( cause maybe this bug is not a bug but a misunderstanding ). I developed a Service with AXIS 2 release 0.95 wich involves SOAP with attachment requests. To implement this, I used Axis 2 Online user guide : http://ws.apache.org/axis2/0_95/mtom-guide.html It works well except for encoding problems ( not the subject of this email ). So with 0.95 it is ok. I got my attachments from a MessageContext property and retrieving content ids in my input AXIOM element. The problems occurs when i switched to release 1.0 I used the guide at this link : http://ws.apache.org/axis2/1_0/mtom-guide.html So there were packages refactoring, and now there is an Attachment class wich replaces old MimeHelper. When i have : Attachments attachments = (Attachments) msgcts.getProperty(MTOMConstants.ATTACHMENTS); The result is null. When i make : for (Iterator it = msgcts.getProperties().keySet().iterator(); it.hasNext(); ) { System.out.println(property name : + (String)it.next()); } I obtain nothing, the property map is empty. I noticed the mechanism to transmit / build MessageContext seems to have changed. The method init( MessageContext ) is no longer used, and has been replaced by setOperationContext(OperationContext oc). I am using a client based on javax.mail and HttpClient packages. I have tested the same requests with this client targeting a server using 0.95 API and its works fine, but, when I am targeting a server using 1.00 API no attachments in MessageContext transmitted. All the configuration things seems the same... If U consider it is worthy to submit a JRA about it with more concrete data, fine. Regards, Laurent CELLA Inexbee Software - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Wiki page changes
I have some modifications I'd like to make since I spent about a day researching to clarify this wiki page: http://wiki.apache.org/ws/FrontPage/Axis/GzipCompression How does one go about editing these? Politcally and technically? Thanks. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Decryption of a complex Axis2 SOAP message fails in WSS4J/XmlSec
Hello WSS4J and Axis2 folks, I come back here on this issue which was discussed by Brian and Werner on the WSS4J mailing list in March, and has not been resolved. I am facing exactly the same problem. I believe it is a WSS4J/XMLSec issue, but I send it to both Axis2 and WSSS4J mailing lists. The original thread I copied from the mail archive and added at the bottom. My configuration is as follows: - My webservice is running on Axis2 1.0 deployed on Tomcat 5.5.16 - My client application is a standalone Java application using an Axis2 1.0 client repository - jre1.5.0_06 - relevant jar files in the Axis2 lib directory (both the server and the client): wss4j-1.5.0, xmlsec-1.3.0, xalan-2.7.0 (probably not relevant), various javamail-1.4 jars (in case it has to do with the MTOM attachment??). - the security configuration of both the webservice and the Axis2 client repository is similar to the one in the security sample of Axis2 1.0. I send a simple SOAP message from the client to the service, and get a complex, eventually a very complex, SOAP message containing the data back. The client-server message works fine, both when I configure it to be signed and encrypted and when I don't. The server-client message works fine without signature and encryption, but fails on the same exception as Brian's when the client side has to decrypt it. At first I thought the fault was in our code, as the generated XML was a mixture of XML generated by AXIOM and self-made XML Strings in POJO code (however Axis2 does escape the sign). In the past few days I cleaned our POJO code up completely, now the XML message is generated solely by AXIOM. I still get the following exception: [java] org.apache.axis2.AxisFault: WSDoAllReceiver: security processing failed; nested exception is: [java] org.apache.ws.security.WSSecurityException: Cannot encrypt/decrypt data; nested exception is: [java] org.apache.xml.security.encryption.XMLEncryptionException: Error while decoding [java] Original Exception was org.apache.xml.security.exceptions.Base64DecodingException: Error while decoding [java] at org.apache.axis2.security.WSDoAllReceiver.processMessage(WSDoAllReceiver.java:183) [java] at org.apache.axis2.security.handler.WSDoAllHandler.invoke(WSDoAllHandler.java:82) [java] at org.apache.axis2.engine.Phase.invoke(Phase.java:381) [java] at org.apache.axis2.engine.AxisEngine.invoke(AxisEngine.java:473) [java] at org.apache.axis2.engine.AxisEngine.receive(AxisEngine.java:445) [java] at org.apache.axis2.description.OutInAxisOperationClient.send(OutInAxisOperation.java:355) [java] at org.apache.axis2.description.OutInAxisOperationClient.execute(OutInAxisOperation.java:279) [java] at org.apache.axis2.client.ServiceClient.sendReceive(ServiceClient.java:457) [java] at org.apache.axis2.client.ServiceClient.sendReceive(ServiceClient.java:399) [java] at nitg.dino.dataclient.DataClient.sendDataRequest(Unknown Source) [java] at nitg.dino.dataclient.DataClient.getData(Unknown Source) [java] at nitg.dino.dataclient.DataClient.getData(Unknown Source) [java] at nitg.dino.dataclient.DataClient.main(Unknown Source) [java] Caused by: org.apache.ws.security.WSSecurityException: Cannot encrypt/decrypt data; nested exception is: [java] org.apache.xml.security.encryption.XMLEncryptionException: Error while decoding [java] Original Exception was org.apache.xml.security.exceptions.Base64DecodingException: Error while decoding [java] at org.apache.ws.security.processor.EncryptedKeyProcessor.decryptDataRef(EncryptedKeyProcessor.java:404) [java] at org.apache.ws.security.processor.EncryptedKeyProcessor.handleEncryptedKey(EncryptedKeyProcessor.java:328) [java] at org.apache.ws.security.processor.EncryptedKeyProcessor.handleEncryptedKey(EncryptedKeyProcessor.java:84) [java] at org.apache.ws.security.processor.EncryptedKeyProcessor.handleToken(EncryptedKeyProcessor.java:76) [java] at org.apache.ws.security.WSSecurityEngine.processSecurityHeader(WSSecurityEngine.java:269) [java] at org.apache.ws.security.WSSecurityEngine.processSecurityHeader(WSSecurityEngine.java:191) [java] at org.apache.axis2.security.WSDoAllReceiver.processMessage(WSDoAllReceiver.java:180) [java] ... 12 more [java] Caused by: org.apache.xml.security.encryption.XMLEncryptionException: Error while decoding [java] Original Exception was org.apache.xml.security.exceptions.Base64DecodingException: Error while decoding [java] at org.apache.xml.security.encryption.XMLCipherInput.getDecryptBytes(Unknown Source) [java] at org.apache.xml.security.encryption.XMLCipherInput.getBytes(Unknown Source) [java] at org.apache.xml.security.encryption.XMLCipher.decryptToByteArray(Unknown Source) [java] at
Re: Decryption of a complex Axis2 SOAP message fails in WSS4J/XmlSec
Werner, Roy, Yes ... I think can give it a try by turning off MTOM optimization ... however the thing that troubles me is that the client - service configuration seems to be the same as service -client config and it (client - service) worked with MTOM optimization, where is seems to be replacing the binary content properly to be decrypted at the service. Thoughts?? Thanks, Ruchith On 5/19/06, Dittmann, Werner [EMAIL PROTECTED] wrote: Roy, Axis2 has a feature that optimizes transmission of binary data, AFAIK it convert base64 into real binary and send it over the wire. That save some bandwith. The problem is that the receiver cannot restore the base64 from the binary in exactly the same way as it was. Thus decryption and also signatuire processing have problems. You may switch off this optimization an try again, no optimizeParts parameter. Regards, Werner -Ursprüngliche Nachricht- Von: Reshef Roy [mailto:[EMAIL PROTECTED] Gesendet: Freitag, 19. Mai 2006 17:12 An: wss4j-dev@ws.apache.org; axis-user@ws.apache.org Betreff: Decryption of a complex Axis2 SOAP message fails in WSS4J/XmlSec Hello WSS4J and Axis2 folks, I come back here on this issue which was discussed by Brian and Werner on the WSS4J mailing list in March, and has not been resolved. I am facing exactly the same problem. I believe it is a WSS4J/XMLSec issue, but I send it to both Axis2 and WSSS4J mailing lists. The original thread I copied from the mail archive and added at the bottom. My configuration is as follows: - My webservice is running on Axis2 1.0 deployed on Tomcat 5.5.16 - My client application is a standalone Java application using an Axis2 1.0 client repository - jre1.5.0_06 - relevant jar files in the Axis2 lib directory (both the server and the client): wss4j-1.5.0, xmlsec-1.3.0, xalan-2.7.0 (probably not relevant), various javamail-1.4 jars (in case it has to do with the MTOM attachment??). - the security configuration of both the webservice and the Axis2 client repository is similar to the one in the security sample of Axis2 1.0. I send a simple SOAP message from the client to the service, and get a complex, eventually a very complex, SOAP message containing the data back. The client-server message works fine, both when I configure it to be signed and encrypted and when I don't. The server-client message works fine without signature and encryption, but fails on the same exception as Brian's when the client side has to decrypt it. At first I thought the fault was in our code, as the generated XML was a mixture of XML generated by AXIOM and self-made XML Strings in POJO code (however Axis2 does escape the sign). In the past few days I cleaned our POJO code up completely, now the XML message is generated solely by AXIOM. I still get the following exception: [java] org.apache.axis2.AxisFault: WSDoAllReceiver: security processing failed; nested exception is: [java] org.apache.ws.security.WSSecurityException: Cannot encrypt/decrypt data; nested exception is: [java] org.apache.xml.security.encryption.XMLEncryptionException: Error while decoding [java] Original Exception was org.apache.xml.security.exceptions.Base64DecodingException: Error while decoding [java]at org.apache.axis2.security.WSDoAllReceiver.processMessage(WSDoA llReceiver.java:183) [java]at org.apache.axis2.security.handler.WSDoAllHandler.invoke(WSDoAl lHandler.java:82) [java]at org.apache.axis2.engine.Phase.invoke(Phase.java:381) [java]at org.apache.axis2.engine.AxisEngine.invoke(AxisEngine.java:473) [java]at org.apache.axis2.engine.AxisEngine.receive(AxisEngine.java:445) [java]at org.apache.axis2.description.OutInAxisOperationClient.send(Out InAxisOperation.java:355) [java]at org.apache.axis2.description.OutInAxisOperationClient.execute( OutInAxisOperation.java:279) [java]at org.apache.axis2.client.ServiceClient.sendReceive(ServiceClien t.java:457) [java]at org.apache.axis2.client.ServiceClient.sendReceive(ServiceClien t.java:399) [java]at nitg.dino.dataclient.DataClient.sendDataRequest(Unknown Source) [java]at nitg.dino.dataclient.DataClient.getData(Unknown Source) [java]at nitg.dino.dataclient.DataClient.getData(Unknown Source) [java]at nitg.dino.dataclient.DataClient.main(Unknown Source) [java] Caused by: org.apache.ws.security.WSSecurityException: Cannot encrypt/decrypt data; nested exception is: [java] org.apache.xml.security.encryption.XMLEncryptionException: Error while decoding [java] Original Exception was org.apache.xml.security.exceptions.Base64DecodingException: Error while decoding [java]at org.apache.ws.security.processor.EncryptedKeyProcessor.decrypt
Re: Is defining a common type for void messages allowed in document/literal?
Yes. It's a good practice.AnneOn 5/19/06, Rodrigo Ruiz [EMAIL PROTECTED] wrote: Hi all,I am wondering if it is valid to define a common VoidType as:xsd:complexType name=VoidType xsd:sequence//xsd:complexTypeand use it for all the elements that are empty. That is, for an interface like:public interface MyProfile extends Remote { String getMyName(); void setMyName(String name);}Instead of:MyProfilePortType getMyName Input: GetMyNameRequest -- GetMyNameRequestType Output : GetMyNameResponse-- GetMyNameResponseType setMyName Input: SetMyNameRequest -- SetMyNameRequestType Output : SetMyNameResponse-- SetMyNameResponseType where GetMyNameRequestType and SetMyNameResponseType are equivalent,have this WSDL definitions:MyProfilePortType getMyName Input: GetMyNameRequest -- VoidType Output : GetMyNameResponse-- GetMyNameResponseType setMyName Input: SetMyNameRequest -- SetMyNameRequestType Output : SetMyNameResponse-- VoidTypeWill Axis correctly understand such a WSDL when generating code? ThanksRodrigo-GRIDSYSTEMSRodrigo Ruiz AguayoParc Bit - Son Espanyol07120 Palma de Mallorcamailto: [EMAIL PROTECTED]Baleares - EspañaTel:+34-971435085 Fax:+34-971435082http://www.gridsystems.com--- --No virus found in this outgoing message.Checked by AVG Free Edition.Version: 7.1.392 / Virus Database: 268.6.1/343 - Release Date: 18/05/2006- To unsubscribe, e-mail: [EMAIL PROTECTED]For additional commands, e-mail: [EMAIL PROTECTED]
Client Authentication using Certificates for restricting access to an Axis Web Service
I have an Axis 1.x web service available via Apache using SSL only. Our requirement is that we authenticate users of the service with Apache client authentication using certificates. The URL for the web service is something like: https://www.mydomain.com/l3ci/services/myoperation In my Apache configuration I have the following: --- SSLCACertificateFile /usr/local/apache/conf/ssl.crt/ca-bundle.crt Alias /l3ci /home/dev/myapphome/site/server1/l3ci Directory /home/dev/myapphome/site/server1/l3ci Options MultiViews AllowOverride None Order allow,deny Allow from all SSLRequireSSL SSLVerifyClient require SSLVerifyDepth 1 /Directory --- I have the root certificate in the 'ca-bundle.crt' file and I have both the root cert and a valid client cert signed by that CA imported into my browsers. I use a browser such as Firefox and IE to test the client authentication configuration but I can only get it to work from the URL: https://www.mydomain.com/l3ci but I need authentication to work from the full service URL above. As I understand it, Apache client authentication can at best serve at the Directory directive level. But my web service URL does not correspond to an actual directory on disk! My question is: Has anyone encountered this problem and found a way to do this or does anyone have any ideas to try? --Steve - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Wiki page changes
Click on Login / UserPreferences, create an id and edit away to you hearts' content :) thanks, dims On 5/19/06, Thom Hehl [EMAIL PROTECTED] wrote: I have some modifications I'd like to make since I spent about a day researching to clarify this wiki page: http://wiki.apache.org/ws/FrontPage/Axis/GzipCompression How does one go about editing these? Politcally and technically? Thanks. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] -- Davanum Srinivas : http://wso2.com/blogs/ - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Retrieving Attachments in AXIS 2. rel 1.0
Yes, please add a JIRA. thanks, dims On 5/19/06, Cella Laurent [EMAIL PROTECTED] wrote: Hi Dear Axis Users and Contributors. Before to create a JRA Issue about this topic, I prefer present it briefly in a mail ( cause maybe this bug is not a bug but a misunderstanding ). I developed a Service with AXIS 2 release 0.95 wich involves SOAP with attachment requests. To implement this, I used Axis 2 Online user guide : http://ws.apache.org/axis2/0_95/mtom-guide.html It works well except for encoding problems ( not the subject of this email ). So with 0.95 it is ok. I got my attachments from a MessageContext property and retrieving content ids in my input AXIOM element. The problems occurs when i switched to release 1.0 I used the guide at this link : http://ws.apache.org/axis2/1_0/mtom-guide.html So there were packages refactoring, and now there is an Attachment class wich replaces old MimeHelper. When i have : Attachments attachments = (Attachments) msgcts.getProperty(MTOMConstants.ATTACHMENTS); The result is null. When i make : for (Iterator it = msgcts.getProperties().keySet().iterator(); it.hasNext(); ) { System.out.println(property name : + (String)it.next()); } I obtain nothing, the property map is empty. I noticed the mechanism to transmit / build MessageContext seems to have changed. The method init( MessageContext ) is no longer used, and has been replaced by setOperationContext(OperationContext oc). I am using a client based on javax.mail and HttpClient packages. I have tested the same requests with this client targeting a server using 0.95 API and its works fine, but, when I am targeting a server using 1.00 API no attachments in MessageContext transmitted. All the configuration things seems the same... If U consider it is worthy to submit a JRA about it with more concrete data, fine. Regards, Laurent CELLA Inexbee Software - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] -- Davanum Srinivas : http://wso2.com/blogs/ - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: [Axis2] Vanishing MTOM attachments
Timo, Please create a JIRA issue with some code/wsdl whatever is needed to recreate the problem. thanks, dims On 5/19/06, Timo Ahokas [EMAIL PROTECTED] wrote: Ok, I think I know what's happening... --[Example 1] Client sends: OMElement OMElementXMLOMELement OMElementattachment 1/OMElement OMElementattachment 2/OMElement OMElementattachment 3/OMElement /OMElement Service receives: OMElement OMElementXMLOMELement OMElementattachment 1/OMElement /OMElement --[Example 2] Client sends: OMElement OMElementXMLOMELement OMElement OMElementattachment 1/OMElement OMElementattachment 2/OMElement OMElementattachment 3/OMElement /OMElement /OMElement Service receives: OMElement OMElementXMLOMELement OMElement OMElementattachment 1/OMElement /OMElement OMElementattachment 2/OMElement /OMElement --[Example 3] Client sends: OMElement OMElementXMLOMELement OMElement OMElement OMElementattachment 1/OMElement OMElementattachment 2/OMElement OMElementattachment 3/OMElement /OMElement /OMElement /OMElement Service receives: OMElement OMElementXMLOMELement OMElement OMElement OMElementattachment 1/OMElement /OMElement OMElementattachment 2/OMElement /OMElement OMElementattachment 3/OMElement /OMElement So it seems that the code that is constructing the OMElement for the service has a bug and it adding the attachments back incorrectly - it seems to be adding any extra ones (2,3,...) to the parent element, instead of the current one. Anyone familiar with the code - where would this be handled? Kind regards, Timo -Original Message- From: Timo Ahokas [mailto:[EMAIL PROTECTED] Sent: 19 May 2006 13:39 To: axis-user@ws.apache.org Subject: RE: [Axis2] Vanishing MTOM attachments Hi Thilina, I tried what you suggested by doing this on the server side: public OMElement service(OMElement element) { element.build(); element.buildNext(); element.detach(); OMNode firstOMChild = element.getFirstOMChild(); OMNode nextOMSibling = firstOMChild.getNextOMSibling(); if(nextOMSibling != null) { OMNode nextOMSibling2 = nextOMSibling.getNextOMSibling(); if(nextOMSibling2 != null) { OMNode nextOMSibling3 = nextOMSibling2.getNextOMSibling(); } } ... firstOMChild is the XML payload nextOMSibling is the first binary attachment nextOMSibling2 should be the second binary attachment (but is null) nextOMSibling3 should be the third binary attachment (-||-) I'm guessing that something is going wrong when the over-the-wire data is being demarshalled and before the OMElement is even handed down to my service (which would explain why I see the data coming in into Axis, but not when it reaches my service). But I could obviously misinterpret what the debugger is displaying. And if the mime processing is deferred, why would the element contain the first attachment (and not just the soap/xml part), Can't get your point clearly... I think my point was that if all binary mime processing is deferred, then why does one out of the three attachments come through fine? Unless the first one is pre-loaded and any latter ones are deferred... Has anyone successfully received multiple binary attachments with Axis 1.0? :) And Thilina - good luck with the exams... :) Cheers Timo -Original Message- From: Thilina Gunarathne [mailto:[EMAIL PROTECTED] Sent: 19 May 2006 12:50 To: axis-user@ws.apache.org Subject: Re: [Axis2] Vanishing MTOM attachments Hi, See my comments below Thanks a lot for the response. :) WC.. public OMElement mediaTransformation(OMElement element) { try { element.build (); element.detach(); Iterator serviceIterator = element.getChildElements(); OMElement servicePayload = (OMElement) serviceIterator.next(); OMElement xmlDoc = (OMElement) servicePayload.getChildElements().next(); // Handle attachments, if there are any. DataHandler attachmentDH; while(serviceIterator.hasNext()) { OMElement attachmentElement = (OMElement) serviceIterator.next(); OMText attachment = (OMText) attachmentElement.getFirstOMChild(); /* extract data and persist */ } processXML(xmlDoc); } catch (Exception e) { e.printStackTrace(); } return createResponseMessage(); } So when I get an element in, and inspect in the Eclipse debugger, I see the XML content and the first binary attachment, but none of the other attachments. When I then let the code run through, it extracts (and successfully saves to disc) the first binary attachment. But the iterator only contains one element, so none of the other attachments I doubt the problem is with getting the iterator..
Re: [Axis2][1.0] interop with .NET
With 1.0 elementFormDefault=unqualified seems default. -- This is a bug. Please log a JIRA issue so that we can track and fix it. Please help recreate the problem with some code as well. thanks, dims On 5/19/06, Kinichiro Inoguchi [EMAIL PROTECTED] wrote: Hi, I'm testing to call Axis2 service from .NET client. When I used Axis2 0.95, I could do that, but after upgrade to Axis2 1.0, I can't. .NET client can sends request message to Axis2 service, and Axis2 service receives that and sends response message to .NET client. I saw actual in/out XML messages with TCPMon 1.0. Though, .NET client got 'Nothing' object as response. But, I changed 'elementFormDefault' of WSDL schema to 'qualified', and re-generated .NET proxy code, .NET client got response successfully !! It seems elementFormDefault=qualified was default generated WSDL settings at 0.95. With 1.0 elementFormDefault=unqualified seems default. I saw WS-I recommend unqualified, so I'd like to verify unqualified, too. Does anyone succeed interop test between Axis2 1.0 and .NET with WSDL elementFormDefault=unqualified ? Thanks, kinichiro __ Do You Yahoo!? Tired of spam? Yahoo! Mail has the best spam protection around http://mail.yahoo.com - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] -- Davanum Srinivas : http://wso2.com/blogs/ - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: [Axis2][1.0] interop with .NET
- Original Message - From: Kinichiro Inoguchi [EMAIL PROTECTED] To: axis-user@ws.apache.org Sent: Friday, May 19, 2006 2:27 PM Subject: [Axis2][1.0] interop with .NET Hi, ... Does anyone succeed interop test between Axis2 1.0 and .NET with WSDL elementFormDefault=unqualified ? Thanks, kinichiro I have never seen a .Net client working without elementFormDefault=qualified. I tried with Axis 1.2 and 1.4 and .Net framework 1.0 and 2.0 I suppose it is mandatory for .Net. Rémy - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: [Axis2][1.0] interop with .NET
.NET 1.0 has a bug in that if the schema doesn't specify the elementFormDefault attribute, it defaults to qualified (opposite of XML Schema rules). The problem only occurs if the attribute isn't specified. (e.g ., if you specify elementFormDefault=unqualified, .NET will handle it properly). Therefore, to interoperate with .NET, the schema must specify the elementFormDefault attribute. Previous versions of Axis specify elementFromDefault=qualified by default. I just scanned through the WS-I Basic Profile, and I found no rules or recommendations to specify unqualified. It does indication that the child element of the soap:Body should be qualified, and it states that the child elements of soap:Fault must be unqualified, but I see no recommendation for elementFormDefault=unqualified. IMO, such a recommendation would be inappropriate. I view it as a schema design decision. In any case, my recommendation is that Axis2 should always generate the elementFormDefault attribute -- whether it's qualified or unqualified. AnneOn 5/19/06, Kinichiro Inoguchi [EMAIL PROTECTED] wrote: Hi,I'm testing to call Axis2 service from .NET client.When I used Axis2 0.95, I could do that,but after upgrade to Axis2 1.0, I can't..NET client can sends request message to Axis2service,and Axis2 service receives that and sends response message to .NET client.I saw actual in/out XML messages with TCPMon 1.0.Though, .NET client got 'Nothing' object as response.But, I changed 'elementFormDefault' of WSDL schema to'qualified', and re-generated .NET proxy code, .NET client got response successfully !!It seems elementFormDefault=qualified was defaultgenerated WSDL settings at 0.95.With 1.0 elementFormDefault=unqualified seemsdefault. I saw WS-I recommend unqualified,so I'd like to verify unqualified, too.Does anyone succeed interop test between Axis2 1.0and .NET with WSDL elementFormDefault=unqualified ? Thanks,kinichiro__Do You Yahoo!?Tired of spam?Yahoo! Mail has the best spam protection aroundhttp://mail.yahoo.com -To unsubscribe, e-mail: [EMAIL PROTECTED]For additional commands, e-mail: [EMAIL PROTECTED]
Re: Axis2: REST-Style with HTTP-GET - how to add parameters?
Your WSDL doesn't have a GET binding (just POST).On 5/18/06, Christoph Miksovic [EMAIL PROTECTED] wrote:Hello everybody,I have problems acessing the Axis2SampleDocLitService Sample using REST-Style with HTTP-GET.Can you please tell me what is the correct way to set the parameter?The operation signature is echoString(String echoStringParam) (see WSDLFile below).I tried several things like for instance http://localhost:8080/axis2/rest/Axis2SampleDocLitService/echoString?echoStringParam=helloBut I always get an error as follows: org.apache.axis2.AxisFault: Data binding error; nested exception is:java.lang.RuntimeException: Data binding error; nested exception is:org.apache.axis2.AxisFault: Data binding error; nested exception is: java.lang.RuntimeException: Data binding errororg.apache.axis2.transport.http.util.RESTUtil.processGetRequest(RESTUtil.java:141)org.apache.axis2.transport.http.AxisRESTServlet.doGet(AxisRESTServlet.java :36)javax.servlet.http.HttpServlet.service(HttpServlet.java:689)javax.servlet.http.HttpServlet.service(HttpServlet.java:802)Thanks a lot for any help!Cheers,Christoph_ WSDL File, generated by Axis2 Engine:wsdl:definitions targetNamespace=http://userguide.axis2.apache.org/Axis2SampleDocLit -wsdl:types-schema targetNamespace=http://userguide.axis2.apache.org/xsdelementFormDefault=qualified attributeFormDefault=unqualified -complexType name=ArrayOfstring_literal-sequenceelement type=string name=string maxOccurs=unbounded//sequence /complexType-complexType name=SOAPStruct-allelement type=float name=varFloat/element type=int name=varInt/ element type=string name=varString//all/complexTypeelement type=string name=echoStringParam/element type=int name=echoIntParam/ element type=string name=echoStringReturn/element type=xsd1:ArrayOfstring_literal name=echoStringArrayParam/element type=xsd1:ArrayOfstring_literal name=echoStringArrayReturn/ element type=xsd1:SOAPStruct name=echoStructParam/element type=xsd1:SOAPStruct name=echoStructReturn//schema/wsdl:types- wsdl:message name=echoStringArraywsdl:part element=xsd1:echoStringArrayParam name=part1//wsdl:message-wsdl:message name=echoStringArrayResponse wsdl:part element=xsd1:echoStringArrayReturn name=part1//wsdl:message-wsdl:message name=echoStringwsdl:part element=xsd1:echoStringParam name=part1/ /wsdl:message-wsdl:message name=echoStringResponsewsdl:part element=xsd1:echoStringReturn name=part1//wsdl:message-wsdl:message name=echoStruct wsdl:part element=xsd1:echoStructParam name=part1//wsdl:message-wsdl:message name=echoStructResponsewsdl:part element=xsd1:echoStructReturn name=part1/ /wsdl:message-wsdl:portType name=Axis2SampleDocLitServicePortType-wsdl:operation name=echoStringArraywsdl:input message=tns:echoStringArray/ wsdl:output message=tns:echoStringArrayResponse//wsdl:operation-wsdl:operation name=echoStringwsdl:input message=tns:echoString/ wsdl:output message=tns:echoStringResponse//wsdl:operation-wsdl:operation name=echoStructwsdl:input message=tns:echoStruct/ wsdl:output message=tns:echoStructResponse//wsdl:operation/wsdl:portType-wsdl:binding type=tns:Axis2SampleDocLitServicePortTypename=Axis2SampleDocLitServiceSOAP11Binding soap:binding style=document transport=http://schemas.xmlsoap.org/soap/http/-wsdl:operation name=echoStringArray soap:operation style=document soapAction=echoStringArray/-wsdl:inputsoap:body namespace= http://userguide.axis2.apache.org/Axis2SampleDocLituse=literal//wsdl:input-wsdl:outputsoap:body namespace= http://userguide.axis2.apache.org/Axis2SampleDocLituse=literal//wsdl:output/wsdl:operation-wsdl:operation name=echoStringsoap:operation style=document soapAction=echoString/ -wsdl:inputsoap:body namespace=http://userguide.axis2.apache.org/Axis2SampleDocLituse=literal/ /wsdl:input-wsdl:outputsoap:body namespace=http://userguide.axis2.apache.org/Axis2SampleDocLituse=literal/ /wsdl:output/wsdl:operation-wsdl:operation name=echoStructsoap:operation style=document soapAction=echoStruct/-wsdl:input soap:body namespace=http://userguide.axis2.apache.org/Axis2SampleDocLituse=literal//wsdl:input- wsdl:outputsoap:body namespace=http://userguide.axis2.apache.org/Axis2SampleDocLituse=literal//wsdl:output /wsdl:operation/wsdl:binding-wsdl:binding type=tns:Axis2SampleDocLitServicePortTypename=Axis2SampleDocLitServiceSOAP12Bindingsoap12:binding style=document transport= http://schemas.xmlsoap.org/soap/http/-wsdl:operation name=echoStringArraysoap12:operation style=document soapAction=echoStringArray/ -wsdl:inputsoap12:body namespace=http://userguide.axis2.apache.org/Axis2SampleDocLit use=literal/ /wsdl:input-wsdl:outputsoap12:body namespace=http://userguide.axis2.apache.org/Axis2SampleDocLit use=literal/ /wsdl:output/wsdl:operation-wsdl:operation name=echoStringsoap12:operation style=document soapAction=echoString/-wsdl:input soap12:body namespace=http://userguide.axis2.apache.org/Axis2SampleDocLit use=literal//wsdl:input-
Robust In Only with RPC
Is there a way to use the Robust In Only MEP with a web service generated by using the RPC Receivers? I have a method: void createItem( foo ) { } That may through an exception. I would like the client to get a soap fault if there is an exception? Is this possible. Michael MacFadden Tomax Corp - http://www.tomax.com [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
errors deploying new wsdl
I am running axis-1_3 on jboss-4.0.3SP1. Occasionally, when I try to send the undeploy.wsdd and deploy.wsdd files with the AdminClient ant task, I receive the traceback below. I have an external load balancer, so it is ok to restart each jboss instance one at a time, but if the AdminClient send the wsdd files before anyone connects, I will get the exception again. I presume that I could shut down jboss, edit the server-config.wsdd with my own script, and then start jboss back up, but I am wary of that. I was wondering if there was any way to process the undeploy.wsdd and deploy.wsdd without jboss running. It would also be a possible solution to start up jboss on a different port, so the load balancer doesn't forward it any soap requests, run the AdminClient on the wsdd files, and then restart jboss on the normal port, but that seems prone to break. I would appreciate any ideas on how to deploy new jars and wsdl simultaneously to jboss cleanly. Thanks, Edwin Exceptions when trying to send the undeploy.wsdd and deploy.wsdd via the AdminClient: == Buildfile: build.xml deploy-core2crm-wsdl: [adminclient] Processing file /home/egrubbs/crm-ws/src/com/space/core/crm/core2crm/undeploy.wsdd [adminclient] AxisFault [adminclient] faultCode: {http://schemas.xmlsoap.org/soap/envelope/}Server.userException [adminclient] faultSubcode: [adminclient] faultString: org.apache.axis.ConfigurationException: java.lang.IllegalStateException: removeAttribute: Session already invalidated [adminclient] java.lang.IllegalStateException: removeAttribute: Session already invalidated [adminclient] at org.apache.catalina.session.StandardSession.removeAttribute(StandardSession.java:1165) [adminclient] at org.apache.catalina.session.StandardSession.removeAttribute(StandardSession.java:1140) [adminclient] at org.apache.catalina.session.StandardSessionFacade.removeAttribute(StandardSessionFacade.java:139) [adminclient] at org.apache.axis.transport.http.AxisHttpSession.remove(AxisHttpSession.java:94) [adminclient] at org.apache.axis.handlers.soap.SOAPService.clearSessions(SOAPService.java:136) [adminclient] at org.apache.axis.deployment.wsdd.WSDDUndeployment.undeployFromRegistry(WSDDUndeployment.java:171) [adminclient] at org.apache.axis.deployment.wsdd.WSDDDocument.deploy(WSDDDocument.java:154) [adminclient] at org.apache.axis.utils.Admin.processWSDD(Admin.java:116) [adminclient] at org.apache.axis.utils.Admin.process(Admin.java:158) [adminclient] at org.apache.axis.utils.Admin.AdminService(Admin.java:65) [adminclient] at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) [adminclient] at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) [adminclient] at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) [adminclient] at java.lang.reflect.Method.invoke(Method.java:585) [adminclient] at org.apache.axis.providers.java.MsgProvider.processMessage(MsgProvider.java:126) [adminclient] at org.apache.axis.providers.java.JavaProvider.invoke(JavaProvider.java:323) [adminclient] at org.apache.axis.strategies.InvocationStrategy.visit(InvocationStrategy.java:32) [adminclient] at org.apache.axis.SimpleChain.doVisiting(SimpleChain.java:118) [adminclient] at org.apache.axis.SimpleChain.invoke(SimpleChain.java:83) [adminclient] at org.apache.axis.handlers.soap.SOAPService.invoke(SOAPService.java:453) [adminclient] at org.apache.axis.server.AxisServer.invoke(AxisServer.java:281) [adminclient] at org.apache.axis.transport.http.AxisServlet.doPost(AxisServlet.java:699) [adminclient] at javax.servlet.http.HttpServlet.service(HttpServlet.java:717) [adminclient] at org.apache.axis.transport.http.AxisServletBase.service(AxisServletBase.java:327) [adminclient] at javax.servlet.http.HttpServlet.service(HttpServlet.java:810) [adminclient] at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:252) [adminclient] at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173) [adminclient] at org.jboss.web.tomcat.filters.ReplyHeaderFilter.doFilter(ReplyHeaderFilter.java:81) [adminclient] at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:202) [adminclient] at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173) [adminclient] at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:213) [adminclient] at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:178) [adminclient] at org.jboss.web.tomcat.security.CustomPrincipalValve.invoke(CustomPrincipalValve.java:39) [adminclient] at org.jboss.web.tomcat.security.SecurityAssociationValve.invoke(SecurityAssociationValve.java:159) [adminclient] at org.jboss.web.tomcat.security.JaccContextValve.invoke(JaccContextValve.java:59) [adminclient] at
Re: Decryption of a complex Axis2 SOAP message fails in WSS4J/XmlSec
Ruchith, Werner. Thanks for your (again, fast :) replies. Unfortunately I was already celebrating the weekend when I read them :) Monday morning (CET, I'm in Holland), I'll turn off the MTOM optimization and see where it leads. I'll post the results of course. As for thoughts: what Werner says does make some sense to me. I do not know the MTOM optimization mechanism but the client-service SOAP message (see my original post, here it's truncated already) is rather small. It includes actually the identification of the action and one or two parameters only. The service-client message is much larger and depends on the exact data one is querying for (the entities we ask for have children entities and the message can include these ones as well). Again, I am not familiar with the MTOM optimization algorithm but if it resembles other encoding and compression algorithms I do know, maybe it is more forgiving for small amounts of data; or for a a less complex XML strructure? When Brian complained about it in March he also complained about sending a complex XML document. Like him, my original message also included in the first place as a CDATA an embedded XML document (generated by a POJO object) but I have removed that and now I only work with AXIOM to generate the SOAP message. Friday at midnight I don't have any brighter ideas, more will follow Monday :) Nice weekend, / Roy --- Ruchith Fernando [EMAIL PROTECTED] wrote: Werner, Roy, Yes ... I think can give it a try by turning off MTOM optimization ... however the thing that troubles me is that the client - service configuration seems to be the same as service -client config and it (client - service) worked with MTOM optimization, where is seems to be replacing the binary content properly to be decrypted at the service. Thoughts?? Thanks, Ruchith On 5/19/06, Dittmann, Werner [EMAIL PROTECTED] wrote: Roy, Axis2 has a feature that optimizes transmission of binary data, AFAIK it convert base64 into real binary and send it over the wire. That save some bandwith. The problem is that the receiver cannot restore the base64 from the binary in exactly the same way as it was. Thus decryption and also signatuire processing have problems. You may switch off this optimization an try again, no optimizeParts parameter. Regards, Werner -Urspr�ngliche Nachricht- Von: Reshef Roy [mailto:[EMAIL PROTECTED] Gesendet: Freitag, 19. Mai 2006 17:12 An: wss4j-dev@ws.apache.org; axis-user@ws.apache.org Betreff: Decryption of a complex Axis2 SOAP message fails in WSS4J/XmlSec Hello WSS4J and Axis2 folks, I come back here on this issue which was discussed by Brian and Werner on the WSS4J mailing list in March, and has not been resolved. I am facing exactly the same problem. I believe it is a WSS4J/XMLSec issue, but I send it to both Axis2 and WSSS4J mailing lists. The original thread I copied from the mail archive and added at the bottom. My configuration is as follows: - My webservice is running on Axis2 1.0 deployed on Tomcat 5.5.16 - My client application is a standalone Java application using an Axis2 1.0 client repository - jre1.5.0_06 - relevant jar files in the Axis2 lib directory (both the server and the client): wss4j-1.5.0, xmlsec-1.3.0, xalan-2.7.0 (probably not relevant), various javamail-1.4 jars (in case it has to do with the MTOM attachment??). - the security configuration of both the webservice and the Axis2 client repository is similar to the one in the security sample of Axis2 1.0. I send a simple SOAP message from the client to the service, and get a complex, eventually a very complex, SOAP message containing the data back. The client-server message works fine, both when I configure it to be signed and encrypted and when I don't. The server-client message works fine without signature and encryption, but fails on the same exception as Brian's when the client side has to decrypt it. At first I thought the fault was in our code, as the generated XML was a mixture of XML generated by AXIOM and self-made XML Strings in POJO code (however Axis2 does escape the sign). In the past few days I cleaned our POJO code up completely, now the XML message is generated solely by AXIOM. I still get the following exception: [java] org.apache.axis2.AxisFault: WSDoAllReceiver: security processing failed; nested exception is: [java] org.apache.ws.security.WSSecurityException: Cannot encrypt/decrypt data; nested exception is: [java] org.apache.xml.security.encryption.XMLEncryptionException: Error while decoding [java] Original Exception was org.apache.xml.security.exceptions.Base64DecodingException: Error while decoding [java]at
Question on how to generate faults
Hi, I used wsdl2java to generate server skeleton code. One of my operation can generate fault. The code generated by wsdl2java has a method that throws the faultmessage (subclass of RemoteException). How to throw this exception? Thanks
missing jar file ???
Hello, I would really appreciate if someone will tell me what jar file is missing when I am trying to build Axis 1.4 with Xmlbeans support ( unsder java 1.4.2). compile: [javac] Compiling 4 source files to /home/maxim/software/axis-1_4/build/classes [javac] /home/maxim/software/axis-1_4/src/org/apache/axis/encoding/ser/xbeans/XmlBeanSerializer.java:44: package org.xmlsoap.schemas.wsdl does not exist [javac] import org.xmlsoap.schemas.wsdl.DefinitionsDocument; [javac] ^ [javac] /home/maxim/software/axis-1_4/src/org/apache/axis/encoding/ser/xbeans/XmlBeanSerializer.java:45: package org.xmlsoap.schemas.wsdl does not exist [javac] import org.xmlsoap.schemas.wsdl.TTypes; [javac] ^ [javac] /home/maxim/software/axis-1_4/src/org/apache/axis/encoding/ser/xbeans/XmlBeanSerializer.java:205: cannot resolve symbol [javac] symbol : class DefinitionsDocument [javac] location: class org.apache.axis.encoding.ser.xbeans.XmlBeanSerializer [javac] public static DefinitionsDocument parseWSDL(String wsdlLocation) [javac] ^ [javac] /home/maxim/software/axis-1_4/src/org/apache/axis/encoding/ser/xbeans/XmlBeanSerializer.java:214: cannot resolve symbol [javac] symbol : class DefinitionsDocument [javac] location: class org.apache.axis.encoding.ser.xbeans.XmlBeanSerializer [javac] public static DefinitionsDocument parseWSDL(File wsdlFile) [javac] ^ [javac] /home/maxim/software/axis-1_4/src/org/apache/axis/encoding/ser/xbeans/XmlBeanSerializer.java:219: cannot resolve symbol [javac] symbol : class DefinitionsDocument [javac] location: class org.apache.axis.encoding.ser.xbeans.XmlBeanSerializer [javac] public static DefinitionsDocument parseWSDL(URL wsdlURL) [javac] ^ [javac] /home/maxim/software/axis-1_4/src/org/apache/axis/encoding/ser/xbeans/XmlBeanSerializer.java:224: cannot resolve symbol [javac] symbol : class DefinitionsDocument [javac] location: class org.apache.axis.encoding.ser.xbeans.XmlBeanSerializer [javac] public static DefinitionsDocument parseWSDL(InputStream wsdlStream) [javac] ^ [javac] /home/maxim/software/axis-1_4/src/org/apache/axis/encoding/ser/xbeans/XmlBeanSerializer.java:216: package DefinitionsDocument does not exist [javac] return DefinitionsDocument.Factory.parse(wsdlFile); [javac] ^ [javac] /home/maxim/software/axis-1_4/src/org/apache/axis/encoding/ser/xbeans/XmlBeanSerializer.java:221: package DefinitionsDocument does not exist [javac] return DefinitionsDocument.Factory.parse(wsdlURL); [javac] ^ [javac] /home/maxim/software/axis-1_4/src/org/apache/axis/encoding/ser/xbeans/XmlBeanSerializer.java:226: package DefinitionsDocument does not exist [javac] return DefinitionsDocument.Factory.parse(wsdlStream); [javac] ^ [javac] /home/maxim/software/axis-1_4/src/org/apache/axis/encoding/ser/xbeans/XmlBeanSerializer.java:257: cannot resolve symbol [javac] symbol : class TTypes [javac] location: class org.apache.axis.encoding.ser.xbeans.XmlBeanSerializer [javac] TTypes tt = parseWSDL(stream).getDefinitions().getTypesArray(0); [javac] ^ - Thanks, Maxim. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Exception when trying to send faults
When I try to throw a fault message exception, I see the following exception org.apache.axiom.om.OMException at org.apache.axiom.om.impl.llom.OMElementImpl.getNextOMSibling(OMElementImpl.java:265) at org.apache.axiom.om.impl.traverse.OMChildrenQNameIterator.hasNext(OMChildrenQNameIterator.java:75) at org.apache.axiom.om.impl.llom.OMElementImpl.getFirstChildWithName(OMElementImpl.java:222) at org.apache.axiom.soap.impl.llom.SOAPEnvelopeImpl.getHeader(SOAPEnvelopeImpl.java:76) at org.apache.axis2.engine.AxisEngine.createFaultMessageContext(AxisEngine.java:183) at org.apache.axis2.transport.http.AxisServlet.handleFault(AxisServlet.java:168) at org.apache.axis2.transport.http.AxisServlet.doPost(AxisServlet.java:153) at javax.servlet.http.HttpServlet.service(HttpServlet.java:716) at javax.servlet.http.HttpServlet.service(HttpServlet.java:809) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:200) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:146) at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:209) at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:596) Any help is really appreciated
Re: [Axis2] Vanishing MTOM attachments
Can you post your client code for the creation of the OMElements... And the XML payload of the root MIME part... Your earlier posted code and the message snaphots does not contain any valuable thing... I think you are talking about the XOP:Include element as the extra added element... ~Thilina On 5/19/06, Davanum Srinivas [EMAIL PROTECTED] wrote: Timo,Please create a JIRA issue with some code/wsdl whatever is needed torecreate the problem. thanks,dimsOn 5/19/06, Timo Ahokas [EMAIL PROTECTED] wrote: Ok, I think I know what's happening... --[Example 1] Client sends: OMElement OMElementXMLOMELement OMElementattachment 1/OMElement OMElementattachment 2/OMElement OMElementattachment 3/OMElement /OMElement Service receives: OMElement OMElementXMLOMELement OMElementattachment 1/OMElement /OMElement --[Example 2] Client sends: OMElement OMElementXMLOMELement OMElement OMElementattachment 1/OMElement OMElementattachment 2/OMElement OMElementattachment 3/OMElement /OMElement /OMElement Service receives: OMElement OMElementXMLOMELement OMElement OMElementattachment 1/OMElement /OMElement OMElementattachment 2/OMElement /OMElement --[Example 3] Client sends: OMElement OMElementXMLOMELement OMElement OMElement OMElementattachment 1/OMElement OMElementattachment 2/OMElement OMElementattachment 3/OMElement /OMElement /OMElement /OMElement Service receives: OMElement OMElementXMLOMELement OMElement OMElement OMElementattachment 1/OMElement /OMElement OMElementattachment 2/OMElement /OMElement OMElementattachment 3/OMElement /OMElement So it seems that the code that is constructing the OMElement for the service has a bug and it adding the attachments back incorrectly - it seems to be adding any extra ones (2,3,...) to the parent element, instead of the current one. Anyone familiar with the code - where would this be handled? Kind regards, Timo -Original Message- From: Timo Ahokas [mailto: [EMAIL PROTECTED]] Sent: 19 May 2006 13:39 To: axis-user@ws.apache.org Subject: RE: [Axis2] Vanishing MTOM attachments Hi Thilina, I tried what you suggested by doing this on the server side: public OMElement service(OMElement element) { element.build(); element.buildNext (); element.detach(); OMNode firstOMChild = element.getFirstOMChild(); OMNode nextOMSibling = firstOMChild.getNextOMSibling(); if(nextOMSibling != null) { OMNode nextOMSibling2 = nextOMSibling.getNextOMSibling(); if(nextOMSibling2 != null) { OMNode nextOMSibling3 = nextOMSibling2.getNextOMSibling(); } } ... firstOMChild is the XML payload nextOMSibling is the first binary attachment nextOMSibling2 should be the second binary attachment (but is null) nextOMSibling3 should be the third binary attachment (-||-) I'm guessing that something is going wrong when the over-the-wire data is being demarshalled and before the OMElement is even handed down to my service (which would explain why I see the data coming in into Axis, but not when it reaches my service). But I could obviously misinterpret what the debugger is displaying. And if the mime processing is deferred, why would the element contain the first attachment (and not just the soap/xml part), Can't get your point clearly... I think my point was that if all binary mime processing is deferred, then why does one out of the three attachments come through fine? Unless the first one is pre-loaded and any latter ones are deferred... Has anyone successfully received multiple binary attachments with Axis 1.0? :) And Thilina - good luck with the exams... :) Cheers Timo -Original Message- From: Thilina Gunarathne [mailto:[EMAIL PROTECTED]] Sent: 19 May 2006 12:50 To: axis-user@ws.apache.org Subject: Re: [Axis2] Vanishing MTOM attachments Hi, See my comments below Thanks a lot for the response. :) WC..public OMElement mediaTransformation(OMElement element) { try {element.build ();element.detach();Iterator serviceIterator = element.getChildElements();OMElement servicePayload = (OMElement) serviceIterator.next();OMElement xmlDoc = (OMElement) servicePayload.getChildElements().next();// Handle attachments, if there are any.DataHandler attachmentDH; while(serviceIterator.hasNext()) {OMElement attachmentElement = (OMElement) serviceIterator.next();OMText attachment = (OMText) attachmentElement.getFirstOMChild();/* extract data and persist */}processXML(xmlDoc);} catch (Exception e) { e.printStackTrace();}return createResponseMessage();} So when I get an element in, and inspect in the Eclipse debugger, I see the XML content and the first binary attachment, but none of the other attachments. When I then let the code run through, it extracts (and successfully saves to disc) the first binary attachment. But the iterator only contains one element, so none of the other attachments I doubt the problem is with getting the iterator.. IIRC there was a Jira regarding this Iterator.. Try traversing the tree manually... Going through each and
Re: Exception when trying to send faults
This has been fixed in latest SVN. Could u please try a nightly build? thanks, dims On 5/19/06, Venkat Gyambavantha [EMAIL PROTECTED] wrote: When I try to throw a fault message exception, I see the following exception org.apache.axiom.om.OMException at org.apache.axiom.om.impl.llom.OMElementImpl.getNextOMSibling(OMElementImpl.java:265) at org.apache.axiom.om.impl.traverse.OMChildrenQNameIterator.hasNext(OMChildrenQNameIterator.java:75) at org.apache.axiom.om.impl.llom.OMElementImpl.getFirstChildWithName(OMElementImpl.java:222) at org.apache.axiom.soap.impl.llom.SOAPEnvelopeImpl.getHeader(SOAPEnvelopeImpl.java:76) at org.apache.axis2.engine.AxisEngine.createFaultMessageContext(AxisEngine.java:183) at org.apache.axis2.transport.http.AxisServlet.handleFault(AxisServlet.java:168) at org.apache.axis2.transport.http.AxisServlet.doPost(AxisServlet.java:153) at javax.servlet.http.HttpServlet.service(HttpServlet.java:716) at javax.servlet.http.HttpServlet.service(HttpServlet.java:809) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:200) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:146) at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:209) at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:596) Any help is really appreciated -- Davanum Srinivas : http://wso2.com/blogs/ - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Help me with Axis
Hello All, I have this WSDL service ?xml version=1.0 encoding=UTF-8? wsdl:definitions xmlns:soap=http://schemas.xmlsoap.org/wsdl/soap/; xmlns:tns=http://co.com.www.avisortech/MPPWebServices/; xmlns:wsdl=http://schemas.xmlsoap.org/wsdl/; xmlns:xsd=http://www.w3.org/2001/XMLSchema; name=MPPWebServices targetNamespace=http://co.com.www.avisortech/MPPWebServices/; wsdl:types xsd:schema targetNamespace=http://co.com.www.avisortech/MPPWebServices/; xsd:element name=getBankListRequest xsd:complexType xsd:sequence xsd:element name=EntityCode type=xsd:string minOccurs=0 maxOccurs=1 /xsd:element /xsd:sequence /xsd:complexType /xsd:element xsd:complexType name=ArrayOfGetBankList xsd:sequence xsd:element name=financialInstitutionCode type=xsd:string minOccurs=0 maxOccurs=1 /xsd:element xsd:element name=financialInstitutionName type=xsd:string minOccurs=0 maxOccurs=1 /xsd:element /xsd:sequence /xsd:complexType xsd:element name=getBabkListResponse type=tns:ArrayOfGetBankList /xsd:element xsd:complexType name=getBankListResponseType xsd:sequence xsd:element ref=tns:getBabkListResponse/xsd:element /xsd:sequence /xsd:complexType xsd:complexType name=getBankListRequestType xsd:sequence xsd:element ref=tns:getBankListRequest/xsd:element /xsd:sequence /xsd:complexType xsd:element name=createTransactionPaymentResponse xsd:complexType xsd:sequence xsd:element name=createResponse type=tns:createTransactionPaymentResponseType /xsd:element /xsd:sequence /xsd:complexType /xsd:element xsd:element name=createTransactionPaymentRequest xsd:complexType xsd:sequence xsd:element name=createRequest type=tns:createTransactionPaymentRequestType /xsd:element /xsd:sequence /xsd:complexType /xsd:element xsd:complexType name=createTransactionPaymentRequestType xsd:sequence xsd:element name=EntityCode type=xsd:string minOccurs=0 maxOccurs=1 /xsd:element xsd:element name=TicketId type=xsd:string minOccurs=0 maxOccurs=1 /xsd:element xsd:element name=SrvCode type=xsd:string minOccurs=0 maxOccurs=1 /xsd:element xsd:element name=PaymentDesc type=xsd:string minOccurs=0 maxOccurs=1 /xsd:element xsd:element name=TransValue type=xsd:decimal minOccurs=0 maxOccurs=1 /xsd:element xsd:element name=TransVatValue type=xsd:decimal minOccurs=0 maxOccurs=1 /xsd:element xsd:element name=UserType type=xsd:string minOccurs=0 maxOccurs=1 /xsd:element xsd:element name=Reference1 type=xsd:string minOccurs=0 maxOccurs=1 /xsd:element xsd:element name=Reference2 type=xsd:string minOccurs=0 maxOccurs=1 /xsd:element xsd:element name=Reference3 type=xsd:string minOccurs=0 maxOccurs=1 /xsd:element xsd:element name=PaymentSystem type=xsd:string minOccurs=0 maxOccurs=1 /xsd:element xsd:element name=URLResponse type=xsd:string minOccurs=0 maxOccurs=1 /xsd:element xsd:element name=FICode type=xsd:string minOccurs=0 maxOccurs=1 /xsd:element /xsd:sequence /xsd:complexType xsd:complexType name=createTransactionPaymentResponseType xsd:sequence xsd:element name=ReturnCode type=xsd:string minOccurs=0 maxOccurs=1 /xsd:element xsd:element name=Url type=xsd:string minOccurs=0 maxOccurs=1 /xsd:element
Help Me!!
Hello All, I have this WSDL service ?xml version=1.0 encoding=UTF-8? wsdl:definitions xmlns:soap=http://schemas.xmlsoap.org/wsdl/soap/; xmlns:tns=http://co.com.www.avisortech/MPPWebServices/; xmlns:wsdl=http://schemas.xmlsoap.org/wsdl/; xmlns:xsd=http://www.w3.org/2001/XMLSchema; name=MPPWebServices targetNamespace=http://co.com.www.avisortech/MPPWebServices/; wsdl:types xsd:schema targetNamespace=http://co.com.www.avisortech/MPPWebServices/; xsd:element name=getBankListRequest xsd:complexType xsd:sequence xsd:element name=EntityCode type=xsd:string minOccurs=0 maxOccurs=1 /xsd:element /xsd:sequence /xsd:complexType /xsd:element xsd:complexType name=ArrayOfGetBankList xsd:sequence xsd:element name=financialInstitutionCode type=xsd:string minOccurs=0 maxOccurs=1 /xsd:element xsd:element name=financialInstitutionName type=xsd:string minOccurs=0 maxOccurs=1 /xsd:element /xsd:sequence /xsd:complexType xsd:element name=getBabkListResponse type=tns:ArrayOfGetBankList /xsd:element xsd:complexType name=getBankListResponseType xsd:sequence xsd:element ref=tns:getBabkListResponse/xsd:element /xsd:sequence /xsd:complexType xsd:complexType name=getBankListRequestType xsd:sequence xsd:element ref=tns:getBankListRequest/xsd:element /xsd:sequence /xsd:complexType xsd:element name=createTransactionPaymentResponse xsd:complexType xsd:sequence xsd:element name=createResponse type=tns:createTransactionPaymentResponseType /xsd:element /xsd:sequence /xsd:complexType /xsd:element xsd:element name=createTransactionPaymentRequest xsd:complexType xsd:sequence xsd:element name=createRequest type=tns:createTransactionPaymentRequestType /xsd:element /xsd:sequence /xsd:complexType /xsd:element xsd:complexType name=createTransactionPaymentRequestType xsd:sequence xsd:element name=EntityCode type=xsd:string minOccurs=0 maxOccurs=1 /xsd:element xsd:element name=TicketId type=xsd:string minOccurs=0 maxOccurs=1 /xsd:element xsd:element name=SrvCode type=xsd:string minOccurs=0 maxOccurs=1 /xsd:element xsd:element name=PaymentDesc type=xsd:string minOccurs=0 maxOccurs=1 /xsd:element xsd:element name=TransValue type=xsd:decimal minOccurs=0 maxOccurs=1 /xsd:element xsd:element name=TransVatValue type=xsd:decimal minOccurs=0 maxOccurs=1 /xsd:element xsd:element name=UserType type=xsd:string minOccurs=0 maxOccurs=1 /xsd:element xsd:element name=Reference1 type=xsd:string minOccurs=0 maxOccurs=1 /xsd:element xsd:element name=Reference2 type=xsd:string minOccurs=0 maxOccurs=1 /xsd:element xsd:element name=Reference3 type=xsd:string minOccurs=0 maxOccurs=1 /xsd:element xsd:element name=PaymentSystem type=xsd:string minOccurs=0 maxOccurs=1 /xsd:element xsd:element name=URLResponse type=xsd:string minOccurs=0 maxOccurs=1 /xsd:element xsd:element name=FICode type=xsd:string minOccurs=0 maxOccurs=1 /xsd:element /xsd:sequence /xsd:complexType xsd:complexType name=createTransactionPaymentResponseType xsd:sequence xsd:element name=ReturnCode type=xsd:string minOccurs=0 maxOccurs=1 /xsd:element xsd:element name=Url type=xsd:string minOccurs=0 maxOccurs=1 /xsd:element