Set Faultcode without namespaces?
Hello, for setting the fault code in AxisFault I use the following methods: AxisFault.setFaultCode(QName) or AxisFault.setFaultCode(String) But I got always a prefix for the fault code like following: faultcodesoapenv:myerrormessage/faultcode or faultcodemyprefix:myerrormessage/faultcode Is it possible to set fault code without any namespaces like faultcodemyerrormessage/faultcode Or it is mandatory to use the prefix here? Thanks in advance. Max -- View this message in context: http://www.nabble.com/Set-Faultcode-without-namespaces--tp21432626p21432626.html Sent from the Axis - User mailing list archive at Nabble.com.
[Axis2] wsdl2java code won't compile
Hi everyone, Hopefully I've found the correct place for my comments, if not, please be so kind as to redirect me to the correct place. While processing a wsdl-file wsdl2java generates code that won't compile, because of non-existing org.apache.axis2.databinding.utils.ConverterUtil.convertTo-calls. After doing some digging I came up with the following. 1) The wsdl-file imports two xsd-schema's: schemaX and schemaY 2) schemaX imports schemaY 3) elementX from schemaX references elementY1 from schemaY 4) elementY1 references elementY2 from schemaY 5) elementX, elementY1 and elementY2 all have anonymous types 6) Removing the import schemaY from the wsdl-file generates correct code 7) Eliminating the reference from elementY1 to elementY2 generates correct code 8) The order of schema processing by org.apache.axis2.schema.SchemaCompiler is: schemaY, schemaX It turns out that while processing the reference, the call to getParentSchema (SchemaCompiler.java:2137) returns the unprocessed import schemaY from schemaX, causing it to register the mapping (line 2147) with a null-value for the schemaTypName (the anon-type from the import has not been processed). This, in turn, causes the the 'ours'-attribute at JavaBeanWriter.java:887 to no be set and thus generating the incorrect code. To solve this, I've changed getparentsch...@schemacompiler.java:2630 to first check to see if the element can be found in a schema that has either been processed or is available. If neither, it then checks the imports. Any ideas/suggestions/comments/better solutions? Cheers, Arnoud -- View this message in context: http://www.nabble.com/-Axis2--wsdl2java-code-won%27t-compile-tp21432597p21432597.html Sent from the Axis - User mailing list archive at Nabble.com.
Does axis2 not respect the order in generation of the stub client ?
Hi, I have a WSDL containing the following part: message name=loginResponse part name=lstlogdt type=xsd:dateTime / part name=lstlogtm type=xsd:dateTime / part name=menu type=xsd:string / part name=operprop type=xsd:string / part name=profile type=xsd:string / part name=profprop type=xsd:string / part name=rejlogin type=xsd:string / part name=retvalue type=xsd:string / part name=sessid type=xsd:string / part name=srvref00 type=osp:ArrayOfstring / /message I expect Axis2 to respect the order, but in the client stub generated I get another order. See part of the code: public static LoginResponse parse(javax.xml.stream.XMLStreamReader reader) throws java.lang.Exception { LoginResponse object = new LoginResponse(); int event; java.lang.String nillableValue = null; java.lang.String prefix = ; java.lang.String namespaceuri = ; try { while (!reader.isStartElement() !reader.isEndElement()) reader.next(); if (reader.getAttributeValue(http://www.w3.org/2001/XMLSchema-instance http://www.w3.org/2001/XMLSchema-instance , type) != null) { java.lang.String fullTypeName = reader.getAttributeValue( http://www.w3.org/2001/XMLSchema-instance http://www.w3.org/2001/XMLSchema-instance , type); if (fullTypeName != null) { java.lang.String nsPrefix = null; if (fullTypeName.indexOf(:) -1) { nsPrefix = fullTypeName.substring(0, fullTypeName.indexOf(:)); } nsPrefix = nsPrefix == null ? : nsPrefix; java.lang.String type = fullTypeName.substring(fullTypeName.indexOf(:) + 1); if (!loginResponse.equals(type)) { // find namespace for the prefix java.lang.String nsUri = reader.getNamespaceContext().getNamespaceURI(nsPrefix); return (LoginResponse) ExtensionMapper.getTypeObject(nsUri, type, reader); } } } // Note all attributes that were handled. Used to differ normal attributes // from anyAttributes. java.util.Vector handledAttributes = new java.util.Vector(); reader.next(); while (!reader.isStartElement() !reader.isEndElement()) reader.next(); if (reader.isStartElement() new javax.xml.namespace.QName(, srvref00).equals(reader.getName())) { object.setSrvref00(ArrayOfstring.Factory.parse(reader)); reader.next(); } // End of if for expected property start element else { // A start element we are not expecting indicates an invalid parameter was passed throw new org.apache.axis2.databinding.ADBException(Unexpected subelement + reader.getLocalName()); } while (!reader.isStartElement() !reader.isEndElement()) reader.next(); if (reader.isStartElement() new javax.xml.namespace.QName(, profprop).equals(reader.getName())) { java.lang.String content = reader.getElementText(); object.setProfprop(org.apache.axis2.databinding.utils.ConverterUtil.conv ertToString(content)); reader.next(); } // End of if for expected property start element ... As you can see, first element to be searched for is element srvref00, then profprop and so on. But in my SOAP definition, I was expecting to get first lstlogdt, then lstlogtm ... Can someone explain me why the ordering is not preserved and how to ensure it ? This lead to unexpected element error when I try to parse the response message ... Thanks a lot for any help. Bruno Delzant DISCLAIMER http://www.proximus.be/maildisclaimer
[Axis2] ADB Tweaking Generate Plain Java Beans compile error in ...MessageReceiverInOut
Dear User list, I have followed the ADB Tweaking Guide to Generate Plain Java Beans instead of ADBBeans. In the axis2-adb-codegen-1.4.1.jar I extracted the schema-compile.properties file and changed the schema.bean.writer property to /org/apache/axis2/schema/template/PlainBeanTemplate.xsl and put the file back in the jar. Then I generated the server side code top-down from my wsdl with the option -d adb. The data binding objects were indeed generated as Plain Java Beans. But the generated ...MessageReceiverInOut class was not generated correctly. This class still wants to call methods like MyDataBingingObject.getOMElement() or MyDataBindingObject.Factory.parse() The method getOMElement() and the inner class Factory are no longer present in the Plain Java Beans. How can I generate the ...MessageReveiverInOut class to use the Plain Java Beans databinding objects? Thanks, Chantal Verhoeven Architect
Axis2 1.5 beta 2 - perms fixed
Philippe Mouawad wrote: Hi everybody, first of all I wish you health and love during year 2009. I don't know if a new link has been published, but I am getting 403 Forbidden when downloading one of the files: http://people.apache.org/~gdaniels/axis2/dist/1.5-beta-2/ Philippe. Hi Philippe: Thanks for the note - my scp session yesterday had the wrong umask, so the files were not world-readable. Fixed, please try again! Thanks, --Glen
Module Operation Parameters
I want to get from a handler (in the inflow messages) of a module the names and values of the parameters passed by the client to the operation request of the web service. Does any body knows how to obtain them? -- View this message in context: http://www.nabble.com/Module-Operation-Parameters-tp21440073p21440073.html Sent from the Axis - User mailing list archive at Nabble.com.
Does Axis2-1.5-beta-2 resolves JIRA AXIS2-4189?
Hi All, I have downloaded 1.5 beta-2 from this link http://people.apache.org/~gdaniels/axis2/dist/1.5-beta-2/. I noticed this build does not address JIRA AXIS2-4189/AXIS2-3777. Is there any possibility that AXIS2-4189 will be addressed in the final release of 1.5? Chinmoy
Axis2 consumer within Axis2 provider classpath issue
I am getting a NoClassDefFoundError when my Axis2 consumer code is executed inside of an Axis2 provided web service. I have an aar file deployed to my web server, the consumer code and generated client stub classes are in separate jar files under the WEB-INF/lib directory. The incoming request processes fine but apparently the classloader that needs to load the consumer Axis2 classes cannot find the Axis2 classes. I appreciate any tips on how I might resolve this issue? Thanks, Rex Hundtofte
Destination Unreachable -- WSE817
I am having a problem with talking to a .NET web service that I did not develop. I am getting the infamous WSE 817 error. The full error message and the code is below. I looked at another post that was similar in here and someone said to set that destination property to the same as the endpoint. The way I did that was client.getOptions().setProperty(destination,https://cdr.ffiec.gov/public/pws/webservices/retrievalservice.asmx;) but that didn't work either. Can someone please help me? Thanks for your time. Josh Exception in thread main org.apache.axis2.AxisFault: Destination Unreachable -- WSE817: The To header must match the Actor attribute on this receiver. The To header contained http://cdr.ffiec.gov/public/pws/webservices/retrievalservice.asmx; whereas the Actor attribute was https://cdr.ffiec.gov/public/pws/webservices/retrievalservice.asmx;. at org.apache.axis2.util.Utils.getInboundFaultFromMessageContext(Utils.java:512) at org.apache.axis2.description.OutInAxisOperationClient.handleResponse(OutInAxisOperation.java:370) at org.apache.axis2.description.OutInAxisOperationClient.send(OutInAxisOperation.java:416) at org.apache.axis2.description.OutInAxisOperationClient.executeImpl(OutInAxisOperation.java:228) at org.apache.axis2.client.OperationClient.execute(OperationClient.java:163) at com.redi.risk.ffiec.RetrievalServiceStub.TestUserAccess(RetrievalServiceStub.java:588) at RetrievalServiceDemo.main(RetrievalServiceDemo.java:25) public class RetrievalServiceDemo { public static void main(String[] args) throws Exception { RetrievalServiceStub stub = new RetrievalServiceStub(https://cdr.ffiec.gov/public/pws/webservices/retrievalservice.asmx;); ServiceClient client = stub._getServiceClient(); client.getOptions().setUserName(jchappelle); client.getOptions().setPassword(Gr8rediadmin); RetrievalServiceStub.TestUserAccess req = new RetrievalServiceStub.TestUserAccess(); RetrievalServiceStub.TestUserAccessResponse res = stub.TestUserAccess(req); System.out.println(res.getTestUserAccessResult()); } } -- View this message in context: http://www.nabble.com/Destination-Unreachable---%3E-WSE817-tp21450435p21450435.html Sent from the Axis - User mailing list archive at Nabble.com.