Re: [Axis0.94] Duplicated xmlns="" added by StAXSOAPModelBuilder
Well, I didn't manage to solve the problem properly.I had to work around it in a pretty ugly way: Reconstruct an envelope with the new signed SOAPHeader and the old untouched SOAPBody... On 3/23/06, Xinjun Chen <[EMAIL PROTECTED]> wrote: There may be some library problem. In my local project folder, I create a project and runs properly. However, when I combine that piece of code with another project, I encounters the same error Duplicated xmlns="" How did you solve the problem? Regards, Xinjun On 3/21/06, sajith <[EMAIL PROTECTED]> wrote: Well it seems like parser is not namespace aware. Quick glance in the XMLInputFactory and saw isNamespaceAware attribute. Try that out Sajith From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]] On Behalf Of Gaël PouzerateSent: Monday, March 20, 2006 10:24 PMTo: axis-user@ws.apache.orgSubject: [Axis0.94] Duplicated xmlns="" added by StAXSOAPModelBuilder Hi,I've got an InputStream containing a soap envelope.When I use StAXSOAPModelBuilder to create a SOAPEnvelope object, some extra strings (xmlns="") are added in the resulting envelope!!! What's the problem here? The code is pretty simple: // InputStream soapStream contains the envelope as a stream javax.xml.stream.XMLInputFactory xmlif = javax.xml.stream.XMLInputFactory.newInstance (); javax.xml.stream.XMLStreamReader xmlr = xmlif.createXMLStreamReader(soapStream); StAXSOAPModelBuilder builder = new StAXSOAPModelBuilder(xmlr,null); SOAPEnvelope newEnvelope = builder.getSOAPEnvelope ();My InputStream contains something like this: http://schemas.xmlsoap.org/soap/envelope/"> http://dmp/search/types "> Acces normal But in the resulting SOAPEnvelope I get: ... Acces normal...What is hapening here?
Re: [Axis2]0.94-Proxy Issues
Yes, I have a 0.94 client working through a proxy with Java 1.4.2.I just do something like that: ProxyProperties proxyProperties = (new HttpTransportProperties()).new ProxyProperties(); proxyProperties.setProxyName("my.proxy.com"); proxyProperties.setProxyPort(3128); proxyProperties.setUserName(""); // no user name on my proxy proxyProperties.setDomain(""); proxyProperties.setPassWord(""); options.setProperty(HTTPConstants.PROXY, proxyProperties); operationClient.setOptions(options); regards,GaëlOn 3/22/06, Habib Ayob <[EMAIL PROTECTED]> wrote: HiCould anyone tell me if axis2 0.94 can get through a proxy. I've triedrunning the same Axis2 Client on java 1.4.2 and java 1.5. It works onJava 1.5 but not 1.4.2. Is this a bug? I need to get it working on Java 1.4. Does anyone know of any sample code which works perfectly with aproxy?ThanksHabibNETCB SOLUTIONS (PTY) LTDThe Innovation Hub, Enterprise Building, 1st Floor, Unit U19Lynnwood, Pretoria P.O. Box 14449, Hatfield, Pretoria, 0028SOUTH AFRICATel. +27 12 844 0744Fax. +27 12 844 0763A NetCB Solutions (Pty) Ltd CompanyReg. 2003/009745/07, Directors: H de Bruin, JC du Toit, LJ Nel, CEO: JP BurgersThis message and any attachments relating to official business of NetCBSolutions (Pty) Ltd (NETCB) is proprietary to NETCB and intended for theoriginal addressee only. The message may contain information that is confidential and subject to legal privilege. Any views expressed in thismessage are those of the individual sender. If you have received thismessage in error, please notify the original sender immediately and destroy the original message. If you are not the intended recipient ofthis message, you are hereby notified that you must not disseminate,copy, use, distribute, or take any action in connection therewith. NETCB cannot ensure that the integrity of this communication has beenmaintained nor that it is free of errors, viruses, interception and/orinterference. NETCB is not liable whatsoever for loss or damageresulting from the opening of this message and/or attachments and/or the use of the information contained in this message and/or attachments.
Re: Axis2 0.94: transfer-encoding: chunked
It works fine this way! Many thanks.On 3/21/06, Eran Chinthaka <[EMAIL PROTECTED]> wrote: put the following entry_operationClient.getOptions().setProperty(MessageContextConstants.CHUNKED ,Constants.VALUE_FALSE);-- ChinthakaGaël Pouzerate wrote:> Hi,> When I send a soap message with Axis2 0.94,> (_operationClient.execute()), I always get a "transfer-encoding: > chunked" in the HTTP header. But I'd like it to be a "normal"> encoding, not a chunked one.> How can I achieve that?> Thanx!> Gaël>>>
Axis2 0.94: transfer-encoding: chunked
Hi,When I send a soap message with Axis2 0.94, (_operationClient.execute()), I always get a "transfer-encoding: chunked" in the HTTP header. But I'd like it to be a "normal" encoding, not a chunked one. How can I achieve that?Thanx!Gaël
[Axis0.94] Duplicated xmlns="" added by StAXSOAPModelBuilder
Hi,I've got an InputStream containing a soap envelope.When I use StAXSOAPModelBuilder to create a SOAPEnvelope object, some extra strings (xmlns="") are added in the resulting envelope!!!What's the problem here? The code is pretty simple: // InputStream soapStream contains the envelope as a stream javax.xml.stream.XMLInputFactory xmlif = javax.xml.stream.XMLInputFactory.newInstance(); javax.xml.stream.XMLStreamReader xmlr = xmlif.createXMLStreamReader(soapStream); StAXSOAPModelBuilder builder = new StAXSOAPModelBuilder(xmlr,null); SOAPEnvelope newEnvelope = builder.getSOAPEnvelope ();My InputStream contains something like this: http://schemas.xmlsoap.org/soap/envelope/">http://dmp/search/types "> Acces normalBut in the resulting SOAPEnvelope I get: ... Acces normal ...What is hapening here?
Axis0.94: Modifying envelope right before sending?
Hi,I'm using Axis 0.94. I want to be able to modify the soap envelope right before it's sent by OperationClient.execute();How can I get access to the envelope from the OperationClient object? I thought the getMessageContext() would enable this but what parameter should I use? My exact need is to sign the envelope (add some signature in the header) right before it's sent: The signature is based on the content of the envelope, so that once the envelope is signed, it mustnt' be changed anymore. I've been trying to do it the following way, but it seems that axis adds extra stuff (wsa: tags) in the header before sending the envelope, so that my signature won't be valid anymore. So I'd like to be able to put my signature when the envelope is complete (with wsa tags) right before it's sent. Here is an extract of the code:public class MySearchEndpointStub extends Stub { public MyResultsDocument search(OperationClient _operationClient = _serviceClient.createClient(_operations[0].getName()); // The envelope created here only contains a body, but an empty headerSOAPEnvelope env = toEnvelope(getFactory(_options.getSoapVersionURI()), requestDoc);// Here we add a signature in the envelope's header based on it's current content env = sign(env);MessageContext _messageContext = new MessageContext();_messageContext.setEnvelope(env);_operationClient.addMessageContext(_messageContext);// The request is sent: I can see in the soap request (by tracing traffic) that some extra stuff have been added // in the header: a couple of wsa: tags. So my signature is not valid anymore_operationClient.execute(true);}Any idea on how I could achieve this?Thanx!Gaël
How to set ?
Hi, I'm using AXIS2 (0.93). I'd like to set the value of the tag in the SOAP request, so that it's DIFFERENT from the endPoint's address where the request is actually sent. How can I do that? My goal is the followong: Client--->Server1--->Server2 The WS is on the Server2, so the must specify Server2's address. But I need to send the request to Server1 that only does some postprocessing on the request and then forwards it. If I just do the basic way, by creating a stub targetting Server1, the request will be received by server1, forwarded to Server2, that will fail 'cause the request contains a server1... But when I try to set the wsa:to in the client (using options.setTo()), then it changes the end Point URL as well, so that the request is send directly to server2, not to server1 anymore... Do you know how I could achieve this? Thanx Gaël
Re: WSDL2Java already contains type 'string Exception
Seem to me that this problem only occurs with AXIS2 v0.94. Please try with 0.93 and see what happens... (worked for me!) 2006/1/19, Torsten Schmidt <[EMAIL PROTECTED]>: > Hi, > > I don't know how to solve this with the types in the shema - > if i generate the .xsd without the second part it generates without > problems: > > 1. the exception > 2. the .xsd > > 1. > > Retrieving document at 'parlayx_common_faults_2_0.wsdl'. > Retrieving schema at 'parlayx_common_types_2_0.xsd', relative to > 'file:/C:/-/-/-/-/-/-/-/Parlay X/annex/third_party_call/parlayx_common_faul > ts_2_0.wsdl'. > Retrieving schema at 'parlayx_common_types_2_0.xsd'. > Retrieving schema at 'parlayx_third_party_call_types_2_0.xsd'. > Exception in thread "main" > org.apache.axis2.wsdl.codegen.CodeGenerationException: > java.lang.RuntimeException: *java.lang.RuntimeException: Schema for > namespace 'http://www.csapi.org/schema/parlayx/thir > d_party_call/v2_0' already contains type 'string* > at > org.apache.axis2.wsdl.codegen.CodeGenerationEngine.generate(CodeGenerationEngine.java:118) > at org.apache.axis2.wsdl.WSDL2Code.main(WSDL2Code.java:31) > at org.apache.axis2.wsdl.WSDL2Java.main(WSDL2Java.java:21) > Caused by: java.lang.RuntimeException: java.lang.RuntimeException: > *Schema for namespace > 'http://www.csapi.org/schema/parlayx/third_party_call/v2_0' already > contains type 'string* > at > org.apache.axis2.wsdl.codegen.extension.SimpleDBExtension.engage(SimpleDBExtension.java:152) > at > org.apache.axis2.wsdl.codegen.CodeGenerationEngine.generate(CodeGenerationEngine.java:80) > ... 2 more > Caused by: java.lang.RuntimeException: Schema for namespace > 'http://www.csapi.org/schema/parlayx/third_party_call/v2_0' already > contains type 'string > at > org.apache.ws.commons.schema.XmlSchema.addType(XmlSchema.java:237) > at > org.apache.ws.commons.schema.SchemaBuilder.handleXmlSchemaElement(SchemaBuilder.java:98) > at > org.apache.ws.commons.schema.XmlSchemaCollection.read(XmlSchemaCollection.java:233) > at > org.apache.axis2.wsdl.codegen.extension.SimpleDBExtension.engage(SimpleDBExtension.java:86) > ... 3 more > > > 2. with the commented part there is no problem generating the code, but > its generated without the stuff represented there... > > > > > targetNamespace="http://www.csapi.org/schema/parlayx/third_party_call/v2_0"; > > xmlns:parlayx_third_party_call_xsd="http://www.csapi.org/schema/parlayx/third_party_call/v2_0"; >xmlns:xsd="http://www.w3.org/2001/XMLSchema";> > > > > type="parlayx_third_party_call_xsd:CallStatus"/> > > > type="parlayx_third_party_call_xsd:CallTerminationCause"/> > > > > > > > > > > > > > >
Re: WSDL2Java fails on simpletype
It seems that the problem only exists with AXIS2 0.94!! I just tried with 0.93 and it works fine... ++ Gaël 2006/1/18, Torsten Schmidt <[EMAIL PROTECTED]>: > Gaël Pouzerate schrieb: > > >Hi, > > > >I'm trying to run WSDL2Java (AXIS2 0.94) on a very simple WSDL file, > >and I get a weird exception: > >"Schema for namespace 'http://dmp/search/types' already contains type 'int" > > > >=> What is that supposed to mean? > > > >The WSDL File is the following: > >--- > > > > > xmlns:tns="http://dmp"; xmlns="http://schemas.xmlsoap.org/wsdl/"; > > xmlns:xsd="http://www.w3.org/2001/XMLSchema"; > > xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/"; > > xmlns:ns2="http://dmp/search/types"; > > name="DmpEndpoint" > > targetNamespace="http://dmp";> > > > > >xmlns:tns="http://dmp/search/types"; > >xmlns:soap11-enc="http://schemas.xmlsoap.org/soap/encoding/"; > >xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"; > >xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/"; > >xmlns:xsd="http://www.w3.org/2001/XMLSchema"; > >xmlns="http://www.w3.org/2001/XMLSchema"; > >targetNamespace="http://dmp/search/types";> > > http://schemas.xmlsoap.org/soap/encoding/"/> > > > > > > > > > > > > > > > > > > > > > > > > > > > >--- > > > >If I remove one of the two "simpleType", then this error doesn't occur > >anymore. (Note that I removed most of the file content to narrow the > >problem). > > > >I didn't find anything in the mailing list archive or on google > >regarding such a problem. > > > >Is anyone able to help me on that? > > > >Thanx > >Gaël > > > > > >PS: Full exception stack: > >-- > >Exception in thread "main" > >org.apache.axis2.wsdl.codegen.CodeGenerationException: > >java.lang.RuntimeException: java.lang.RuntimeException: Schema for > >namespace 'http://dmp/search/types' already contains type 'int > >at > > org.apache.axis2.wsdl.codegen.CodeGenerationEngine.generate(CodeGenerationEngine.java:118) > >at org.apache.axis2.wsdl.WSDL2Code.main(WSDL2Code.java:31) > >at org.apache.axis2.wsdl.WSDL2Java.main(WSDL2Java.java:21) > >Caused by: java.lang.RuntimeException: java.lang.RuntimeException: > >Schema for namespace 'http://dmp/search/types' already contains type > > 'int > >at > > org.apache.axis2.wsdl.codegen.extension.SimpleDBExtension.engage(SimpleDBExtension.java:152) > >at > > org.apache.axis2.wsdl.codegen.CodeGenerationEngine.generate(CodeGenerationEngine.java:80) > >... 2 more > >Caused by: java.lang.RuntimeException: Schema for namespace > >'http://dmp/search/types' already contains type 'int > >at org.apache.ws.commons.schema.XmlSchema.addType(XmlSchema.java:237) > >at > > org.apache.ws.commons.schema.SchemaBuilder.handleXmlSchemaElement(SchemaBuilder.java:98) > >at > > org.apache.ws.commons.schema.XmlSchemaCollection.read(XmlSchemaCollection.java:233) > >at > > org.apache.axis2.wsdl.codegen.extension.SimpleDBExtension.engage(SimpleDBExtension.java:86) > >... 3 more > > > > > > > > > Hi, > I have the same problem on a different type: string > > (@see mail subject: WSDL2Java Exception on valid WSDL) > > if you solve this problem please let me know how... > > thanx > >
WSDL2Java fails on simpletype
Hi, I'm trying to run WSDL2Java (AXIS2 0.94) on a very simple WSDL file, and I get a weird exception: "Schema for namespace 'http://dmp/search/types' already contains type 'int" => What is that supposed to mean? The WSDL File is the following: --- http://dmp"; xmlns="http://schemas.xmlsoap.org/wsdl/"; xmlns:xsd="http://www.w3.org/2001/XMLSchema"; xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/"; xmlns:ns2="http://dmp/search/types"; name="DmpEndpoint" targetNamespace="http://dmp";> http://dmp/search/types"; xmlns:soap11-enc="http://schemas.xmlsoap.org/soap/encoding/"; xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"; xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/"; xmlns:xsd="http://www.w3.org/2001/XMLSchema"; xmlns="http://www.w3.org/2001/XMLSchema"; targetNamespace="http://dmp/search/types";> http://schemas.xmlsoap.org/soap/encoding/"/> --- If I remove one of the two "simpleType", then this error doesn't occur anymore. (Note that I removed most of the file content to narrow the problem). I didn't find anything in the mailing list archive or on google regarding such a problem. Is anyone able to help me on that? Thanx Gaël PS: Full exception stack: -- Exception in thread "main" org.apache.axis2.wsdl.codegen.CodeGenerationException: java.lang.RuntimeException: java.lang.RuntimeException: Schema for namespace 'http://dmp/search/types' already contains type 'int at org.apache.axis2.wsdl.codegen.CodeGenerationEngine.generate(CodeGenerationEngine.java:118) at org.apache.axis2.wsdl.WSDL2Code.main(WSDL2Code.java:31) at org.apache.axis2.wsdl.WSDL2Java.main(WSDL2Java.java:21) Caused by: java.lang.RuntimeException: java.lang.RuntimeException: Schema for namespace 'http://dmp/search/types' already contains type 'int at org.apache.axis2.wsdl.codegen.extension.SimpleDBExtension.engage(SimpleDBExtension.java:152) at org.apache.axis2.wsdl.codegen.CodeGenerationEngine.generate(CodeGenerationEngine.java:80) ... 2 more Caused by: java.lang.RuntimeException: Schema for namespace 'http://dmp/search/types' already contains type 'int at org.apache.ws.commons.schema.XmlSchema.addType(XmlSchema.java:237) at org.apache.ws.commons.schema.SchemaBuilder.handleXmlSchemaElement(SchemaBuilder.java:98) at org.apache.ws.commons.schema.XmlSchemaCollection.read(XmlSchemaCollection.java:233) at org.apache.axis2.wsdl.codegen.extension.SimpleDBExtension.engage(SimpleDBExtension.java:86) ... 3 more