Can I use Axis-C for http transport?
Hi all, I found there were HTTPTransport.dll and HTTPChannel.dll in axis-c-1.6b-Win32-trace-bin\bin directory. My question is: Can I use Axis-C for http transport? e.g., like windows API URLDownloadToFile[1] or libcurl[2]? If Yes, how to do it? Is there any sample source code? Reference 1. http://msdn.microsoft.com/library/default.asp?url=/workshop/networking/moniker/reference/functions/urldownloadtofile.asp 2. http://curl.haxx.se/libcurl/ Thank you very much! Best Regards, Xie, Bo - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
XML message does not get validated
Hello, when I create the XML message using the Axiom API in my testechoString() method it does not matter whether a valid sub-element is created or not. For example, both of the following lines of code work: correct: OMElement requestElement = OMAbstractFactory.getOMFactory().createOMElement(echoString, defaultNamespace); OMElement paramElement = factory.createOMElement(string, defaultNamespace); incorrect: OMElement requestElement = OMAbstractFactory.getOMFactory().createOMElement(echoString, defaultNamespace); OMElement paramElement = factory.createOMElement(string12, defaultNamespace); My WSDL extract looks like this (with the complex type echoString named string): wsdl:types xs:schema xmlns:xs=http://www.w3.org/2001/XMLSchema; xmlns:types=http://MyService.axis2.wk.test.com/types; targetNamespace=http://MyService.axis2.wk.test.com/types; xmlns:xmime=http://www.w3.org/2005/05/xmlmime; elementFormDefault=unqualified attributeFormDefault=unqualified xs:element name=echoString xs:complexType xs:sequence xs:element type=xs:string name=string / /xs:sequence /xs:complexType /xs:element xs:element name=echoStringResponse xs:complexType xs:sequence xs:element type=xs:string name=return / /xs:sequence /xs:complexType /xs:element /xs:schema /wsdl:types wsdl:message name=echoStringMessage wsdl:part element=ns2:echoString name=part1 / /wsdl:message wsdl:message name=echoStringResponseMessage wsdl:part element=ns2:echoStringResponse name=part1 / /wsdl:message wsdl:portType name=MyServicePortType wsdl:operation name=echoString wsdl:input message=ns:echoStringMessage / wsdl:output message=ns:echoStringResponseMessage / /wsdl:operation /wsdl:portType wsdl:binding type=ns:MyServicePortType name=MyServiceSOAP11Binding soap:binding style=document transport=http://schemas.xmlsoap.org/soap/http; / wsdl:operation name=echoString soap:operation style=document soapAction=urn:echoString / wsdl:input soap:body namespace=http://MyService.axis2.wk.test.com; use=literal / /wsdl:input wsdl:output soap:body namespace=http://MyService.axis2.wk.test.com; use=literal / /wsdl:output /wsdl:operation /wsdl:binding Thus, I would expect that the string12 sub-element would be rejected by the web service but it is not. Can anyone advice me how to enable validation for XML messages when working with the Axiom API? Thank you, Wolfram -- Bis zu 70% Ihrer Onlinekosten sparen: GMX SmartSurfer! Kostenlos downloaden: http://www.gmx.net/de/go/smartsurfer - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
[axis2] Exception at code generation using JAXME databinding
Hi, trying to use Jaxme for databinding causes the following exception during code generation in axis2-1.0: Exception in thread main org.apache.axis2.wsdl.codegen.CodeGenerationException: java.lang.RuntimeException: java.lang.NullPointerException [java] at org.apache.axis2.wsdl.codegen.CodeGenerationEngine.generate(CodeGenerationEngine.java:185) [java] at org.apache.axis2.wsdl.WSDL2Code.main(WSDL2Code.java:32) [java] at org.apache.axis2.wsdl.WSDL2Java.main(WSDL2Java.java:21) [java] Caused by: java.lang.RuntimeException: java.lang.NullPointerException [java] at org.apache.axis2.wsdl.codegen.extension.JaxMeExtension.engage(JaxMeExtension.java:140) [java] at org.apache.axis2.wsdl.codegen.CodeGenerationEngine.generate(CodeGenerationEngine.java:140) [java] ... 2 more [java] Caused by: java.lang.NullPointerException [java] at org.apache.axis2.wsdl.codegen.extension.JaxMeExtension.engage(JaxMeExtension.java:115) [java] ... 3 more Using XMLBeans for instance, everything works fine. So are there any known problems with this type of databinding? Thanks Ted. ___ Telefonate ohne weitere Kosten vom PC zum PC: http://messenger.yahoo.de - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
[Axis1.4] ??!! Why there is no type definition in wsdl generated by the Attachments sample??
hi all, I want to parse the wsdl of the 'attachments' sample by accessing the URL: http://localhost:8080/axis/services/urn:EchoAttachmentsService?wsdl but in the wsdl, there is no type definition of "tns1:DataHandler", so when I use org.apache.axis.wsdl.gen.Parser.run(wsdlURL) to parse it, I got error below : Reading WSDL document from 'http://localhost:8080/axis/services/urn:EchoAttachmentsService?wsdl'java.io.IOException: Type {urn:EchoAttachmentsService}DataHandler is referenced but not defined/ [en]-(Type {urn:EchoAttachmentsService}DataHandler is referenced but not defined.)at org.apache.axis.wsdl.symbolTable.SymbolTable.checkForUndefined(SymbolTable.java:665)at org.apache.axis.wsdl.symbolTable.SymbolTable.add(SymbolTable.java:545)at org.apache.axis.wsdl.symbolTable.SymbolTable.populate(SymbolTable.java:518)at org.apache.axis.wsdl.symbolTable.SymbolTable.populate(SymbolTable.java:495)at org.apache.axis.wsdl.gen.Parser$WSDLRunnable.run(Parser.java:361)at java.lang.Thread.run(Thread.java:534) How to define the type "tns1:DataHandler"? Thank you very much ! - sukie -- Maybe I have time difference of 12 hours, sorry for late reply. :)
Re: axis compile error - package does not exist
yes, the jar files are in the classpathhmm...it looks like an obvious classpath thing but given it compiled with javac under the dos prompt, it doesn't quite make sense. any other ideas would be most welcome. femke -- View this message in context: http://www.nabble.com/axis+compile+error+-+package+does+not+exist-t1698718.html#a4623017 Sent from the Axis - User forum at Nabble.com. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: [Axis2] Multithreaded client, performance degradation.
Hi, My client code spawns n number of threads, In each thread I send 1000 requests in a loop using a HttpUrlConnection handle. I am requesting the same server. Same socket - I have not done anything to force a single socket to be used, but I believe http 1.1 tries to use the same persistent tcp connection to send the requests. Upon checking with ethereal - I find that the requests are not going over a single connection, but over four or five. Does this impact to a great extent ? But then, I find some performance drop even when I ran my client, with 10 threads each and from two-three different machines. Thanks and Regards, Subramanyam -Original Message- From: Morten Steffensen [mailto:[EMAIL PROTECTED] Sent: Monday, May 29, 2006 8:31 PM To: axis-user@ws.apache.org Subject: Re: [Axis2] Multithreaded client, performance degradation. Out of interest - are you requesting the same server. And if so, is the requests using the same socket ? Med venlig hilsen / Kind regards, Morten Steffensen Emercos ApS http://www.emercos.com Ramanathan, Subramanyam skrev: Hi, I've been running a few performance tests on Axis2 to compare it with Axis1. I've found that when I post requests using a multithreaded http client [ that spawns multiple threads each sending a certain number of requests ] , the performance of Axis2 seems to degrade, whereas that of Axis1 seems to be relatively stable when tested using the same client. Here are the figures I have got. Each thread sends 1000 requests. I have measured throughput by measuring the time taken for all the threads to finish and then calculating requests per sec. Axis2(req/sec) Axis1(req/sec) -- --- 10 threads - 1105.530784 545.9761944 20 threads - 635.3480599 556.6025772 30 threads - 411.2374179 550.5108726 40 threads - 215.8165598 570.8683581 Apparently, as the number of threads increases, the performance drops in Axis2 whereas it remains reasonably stable in Axis1. Can someone tell me the reason for this, and is there any way the performance with multiple threads in Axis2 can be made better / stabilized ? My Setup: - Red Hat Enterprise Linux ES release 4 Axis2 version 1.0 Tomcat 5.5.17 jdk 1.5.0_04 Regards, Subramanyam - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] -- Med venlig hilsen / Kind regards, Morten Steffensen Emercos ApS http://www.emercos.com - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: [axis2] Custom security context token
Let me answer your second question first: constructor says Initializes a new instance of the SecurityContextToken class using the security token used to sign the Request Security Token (RST), the security token shared by the security token service and the target Web service, and the specified identifier. I'm not quite sure that means. This means that the client will make a request to a SecurityTokenService (STS) (defined in the WS-Trust specification) to establish the security context. This request is a RequestSecurityToken (RST) request where it will be signed by the token given as the first argument into the constructor. In the case where you pass a UsernameToken the RST will be signed using the UT. The response to RST, RequestSecurityTokenResponse (RSTR) message will contain the SecurityContextToken that will be used to derive keys, which will eventually sign/encrypt the actual request messages to the service. The service will also use the same security context token to derive keys to verify/ decrypt requests from the client and sign/encrypt its responses. There's one issue though: The .NET code is creating a SecurityContextToken with a UsernameToken as its base. Is there any way to do this with WSS4J? This is possible with WSS4J 1.5 and Axis2 (svn head). Right now we have an Axis2 module called rahas in Axis2 which supports WS-SecureConversation only. We can use this to carryout the handshake with the STS and obtain an SCT which can be used to derive keys to sign and encrypt messages. Use of the UsernameToken in signing is only in the case of the initial RST message to the STS and this is supported by rahas right now using the rampart handlers internally in rahas. Here [1] you can find some test cases that tests rahas A word of caution : In a few days the WS-SecureConversation support will be merged into rampart and rahas will disappear, which will allow you to setup your scenario simply with rampart. Thanks, Ruchith [1] http://svn.apache.org/repos/asf/webservices/axis2/trunk/java/modules/integration/test/org/apache/axis2/security/rahas/ - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Problem with WSDL2Java with HTTP POST
I'm trying to create a stub from .wsdl that i had created where the binding is POST and when i executed the wsdl2java command i get an void interface. Why? I had been to search in google and i haven't anything. Thanks in advance. WSDL ?xml version=1.0 encoding=UTF-8? wsdl:definitions xmlns:http=http://schemas.xmlsoap.org/wsdl/http/; xmlns:soap=http://schemas.xmlsoap.org/wsdl/soap/; xmlns:s=http://www.w3.org/2001/XMLSchema; xmlns:soapenc=http://schemas.xmlsoap.org/soap/encoding/; xmlns:tns=http://sencillo; xmlns:tm=http://microsoft.com/wsdl/mime/textMatching/; xmlns:mime=http://schemas.xmlsoap.org/wsdl/mime/; xmlns:wsdl=http://schemas.xmlsoap.org/wsdl/; targetNamespace=http://sencillo; wsdl:message name=mensajesencillo wsdl:part name=Email type=s:string/ wsdl:part name=ServiceName type=s:string/ wsdl:part name=OperationName type=s:string/ /wsdl:message wsdl:portType name=SencilloHttp_Post wsdl:operation name=operacionsencilla wsdl:input message=tns:mensajesencillo/ /wsdl:operation /wsdl:portType wsdl:binding name=SencilloHttp_Post type=tns:SencilloHttp_Post http:binding verb=POST/ wsdl:operation name=operacionsencilla http:operation location=operacionsencilla/ wsdl:input mime:mimeXml part=Body/ /wsdl:input /wsdl:operation /wsdl:binding wsdl:service name=WSDLTester wsdl:port name=SencilloHttp_Post binding=tns:SencilloHttp_Post http:address location=http://192.168.153.100:8080/appProxyAmadeus/servlet/svlProxyAmadeus/ /wsdl:port /wsdl:service /wsdl:definitions INTERFACE package sencillo; public interface WSDLTester extends javax.xml.rpc.Service { } - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Web Service HTTP POST with complex types
I understand that in HTTP GET POST the web service paramaters are passed as protocol parameters but why can i not use this complex types in this calls kinds? Moreover when i have a framework that could work with this object and pass an serialized object in this parameter. Thanks in advance. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
[Axis2] Best way to use skeleton?
Hi, When I generate the server-side code from my wsdl, using wsdl2java, a skeleton class is generated that gets invoked by the (generated) MessageReceiver. From what I read, I understand that I'm supposed to implement my busines logic in the skeleton. But if I would do that, and for whatever reason re-run the wsdl2java, the skeleton is regenerated, hence by business logic implementation is gone! To me, it seems that in general, one should never manually change generated source code. The only thing I can think of to minimise this problem is to treat the skeleton as an entry point, and only call the 'real' business imlementation, that I've created myself. However you would then typically end up with a skeleton and an implementation class that have identical methods (signatures), which doesn't seem very elegant to me. Can't this be prevented somehow, e.g. by specifying the (existing) business class and method when invoking wsdl2java, so that the MessageReceiver will call that method, instead of calling the generated skeleton? Thanks, Tom
[Axis2] Generated element objects vs. business objects
Hi, I'm struggling a bit with the following. Say, I have a web service that allows you to search for customers. It accepts a customer name, and returns a set (any number) of customers. The response xml may look like customerSearchResponse customer number123/number nameJohn Doe/name /customer customer number987/number nameJane Doe/name /customer /customerSearchResponse Obviously, in my application I have a Customer class. Now if I create a wsdl for this web service, and generate the server side code for it, one of the classes that is generated is a customer class, that represents the customer in the xml response. On the other hand, I have the Customer domain object, which is a different one. To generate the response, I have to create 'xml response' customers, and basically copy the information from the Customer class to it. The above example is very simple, but you can imagine more complexe cases that would involve a lot of copying from domain objects to xml representation objects. This is very tedious and error-prone work -- typically work that I would like to avoid. Is there an elegant way to solve this issue? Thanks, Tom
http header
hi! does anybody know how to access the http header in an axis java client if this client is based on the generated stubs out of the wsdl? (e.g. in order to add parameters to this http header) thx, Christian -- - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Fw: Re: [Axis2] Pls help ---- about using stub to writing echoStringclient.
Ajith and Robert, thanks, -d xmlbean did work. the compile was successful, but when I run the echoStringclient.class, my window's cmd didn't get the response Axis2 Echo, instead the following information. But my SOAPMonitor showed successfully both request and response message.Any idea what's wrong ? run: [java] log4j:WARN No appenders could be found for logger (org.apache.axiom.om.impl.builder.StAXOMBuilder). [java] log4j:WARN Please initialize the log4j system properly. [java] java.lang.RuntimeException: Data binding error [java] at org.apache.axis2.userguide.Axis2SampleDocLitServiceStub.fromOM(Axis2SampleDocLitServiceStub.java:877) [java] at org.apache.axis2.userguide.Axis2SampleDocLitServiceStub.echoString(Axis2SampleDocLitServiceStub.java:500) [java] at echoStringClient.main(echoStringClient.java:59) [java] at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) [java] at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) [java] at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) [java] at java.lang.reflect.Method.invoke(Method.java:585) [java] at org.apache.tools.ant.taskdefs.ExecuteJava.run(ExecuteJava.java:202) [java] at org.apache.tools.ant.taskdefs.ExecuteJava.execute(ExecuteJava.java:134) [java] at org.apache.tools.ant.taskdefs.Java.run(Java.java:710) [java] at org.apache.tools.ant.taskdefs.Java.executeJava(Java.java:178) [java] at org.apache.tools.ant.taskdefs.Java.execute(Java.java:84) [java] at org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:275) [java] at org.apache.tools.ant.Task.perform(Task.java:364) [java] at org.apache.tools.ant.Target.execute(Target.java:341) [java] at org.apache.tools.ant.Target.performTasks(Target.java:369) [java] at org.apache.tools.ant.Project.executeSortedTargets(Project.java:1216) [java] at org.apache.tools.ant.Project.executeTarget(Project.java:1185) [java] at org.apache.tools.ant.helper.DefaultExecutor.executeTargets(DefaultExecutor.java:40) [java] at org.apache.tools.ant.Project.executeTargets(Project.java:1068 ) [java] at org.apache.tools.ant.Main.runBuild(Main.java:668) [java] at org.apache.tools.ant.Main.startAnt(Main.java:187) [java] at org.apache.tools.ant.launch.Launcher.run(Launcher.java:246) [java] at org.apache.tools.ant.launch.Launcher.main(Launcher.java:67) [java] Caused by: java.lang.NullPointerException [java] at org.apache.axis2.userguide.Axis2SampleDocLitServiceStub.fromOM(Axis2SampleDocLitServiceStub.java:823) [java] ... 23 more Jenny [EMAIL PROTECTED] 2006-05-30 === 2006-05-30 02:06:57 you wrote:=== If my understanding of the situation is correct The user has a provider of type 'Msg' and is unable to generate the required Stubs with WSDL2Java Could you elaborate on your response that -d xmlbeans will solve this? Thanks, Martin - * This email message and any files transmitted with it contain confidential information intended only for the person(s) to whom this email message is addressed. If you have received this email message in error, please notify the sender immediately by telephone or email and destroy the original message without making a copy. Thank you. - Original Message - From: Ajith Ranabahu [EMAIL PROTECTED] To: axis-user@ws.apache.org; [EMAIL PROTECTED] Sent: Monday, May 29, 2006 10:30 AM Subject: Re: Re: [Axis2] Pls help about using stub to writing echoStringclient. Hi Jenny, Seems you've mixed up the databinding frameworks. try codegenerating with -d xmlbeans flag Ajith On 5/29/06, Jenny ZHANG [EMAIL PROTECTED] wrote: hey Martin, What do you mean by 1.0? I am using Axis2 1.0, is there v1.3 out for Axis2 ? I am actually experimenting using stub (generated by WSDL2Java) to write the client, echoString is just a simple example I started with Do you have any idea where I might find some resources about using stub to writing client ? thanks, Jenny 2006-05-29 === 2006-05-29 08:54:23 you wrote:=== Is there a reason why you are using Axis 1.0 instead of 1.3? The new 1.3 uses class org.soapinterop.EchoString and the specific method call is org.soapinterop.EchoString(java.lang.String) M- This email message and any files transmitted with it contain confidential information intended only for the person(s) to whom this email message is addressed. If you have received this email message in error, please notify the sender immediately by telephone or email and destroy the original message without making a copy. Thank you. - Original Message - From: Jenny ZHANG [EMAIL PROTECTED] To: axis-user
Re: [Axis2] Best way to use skeleton?
For axis2 1.0 and beyond there is a '-ssi' flag you can add that will generate an interface. So you can now code to that instead of the skeleton. See this jira for more info: http://issues.apache.org/jira/browse/AXIS2-655 HTH, Robert http://www.braziloutsource.com/On 5/30/06, [EMAIL PROTECTED] [EMAIL PROTECTED] wrote: Hi, When I generate the server-side code from my wsdl, using wsdl2java, a skeleton class is generated that gets invoked by the (generated) MessageReceiver. From what I read, I understand that I'm supposed to implement my busines logic in the skeleton. But if I would do that, and for whatever reason re-run the wsdl2java, the skeleton is regenerated, hence by business logic implementation is gone! To me, it seems that in general, one should never manually change generated source code. The only thing I can think of to minimise this problem is to treat the skeleton as an entry point, and only call the 'real' business imlementation, that I've created myself. However you would then typically end up with a skeleton and an implementation class that have identical methods (signatures), which doesn't seem very elegant to me. Can't this be prevented somehow, e.g. by specifying the (existing) business class and method when invoking wsdl2java, so that the MessageReceiver will call that method, instead of calling the generated skeleton? Thanks, Tom
Re: [Axis2] Generated element objects vs. business objects
Depends how you've mapped your domain objects. For example, instead of populating your domain object, you could just populate your complex object. And in some cases - such as hibernate - you're going to run into lazy issues as you can't transfer those objects across jvm's. So in the latter case you mostly need to seperate the domain and complex objects anyways. In practice at least for me, the advantages of seperations of concerns have outweighed the tedious gets and sets between your domain and complex objects. This has been especially true in web services work, where there is often more ways than one to get and use the data. Now if your domain objects were xml or could be mapped as xml easily via frameworks such as hyperjaxb, it could open up your options. Just my 2 cents. HTH, Robert http://www.braziloutsource.com/On 5/30/06, [EMAIL PROTECTED] [EMAIL PROTECTED] wrote: Hi, I'm struggling a bit with the following. Say, I have a web service that allows you to search for customers. It accepts a customer name, and returns a set (any number) of customers. The response xml may look like customerSearchResponse customer number123/number nameJohn Doe/name /customer customer number987/number nameJane Doe/name /customer /customerSearchResponse Obviously, in my application I have a Customer class. Now if I create a wsdl for this web service, and generate the server side code for it, one of the classes that is generated is a customer class, that represents the customer in the xml response. On the other hand, I have the Customer domain object, which is a different one. To generate the response, I have to create 'xml response' customers, and basically copy the information from the Customer class to it. The above example is very simple, but you can imagine more complexe cases that would involve a lot of copying from domain objects to xml representation objects. This is very tedious and error-prone work -- typically work that I would like to avoid. Is there an elegant way to solve this issue? Thanks, Tom
Re: [Axis2] Is there a WSDL file editor for Axis2?
Hie, You can easily write wsdl through eclipse web tool's wsdl editor. Here is url, http://download.eclipse.org/webtools/downloads/drops/R-1.0.2-200604200208/ Thanks and Regards Kensky On 5/30/06, Jenny ZHANG [EMAIL PROTECTED] wrote: Hey, I saw a WSDL file editor (in IBM's WSTK) developed by IBM, but with some unwanted binding features. Just curious, is there an editor for Axis2 ? or do you write WSDL manually (although it is not a problem) ? Jenny [EMAIL PROTECTED] 2006-05-30 - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: [Axis2] Generated element objects vs. business objects
Hi Tom, There are some options more or less practical to get what you want. One is to replace your domain class with the generated one. This will probably mean moving the non-bean functionality in your domain Customer to another class, maybe something like CustomerHelper. Of course, this is not always possible, as you may have some internal fields in your domain class you want to keep there. Another option is to make your domain class to subclass the generated class, or include it as an internal field. Copying does not have to be so bad. If you have a fixed mapping between what you have in your domain classes and what you want to return as XML beans, you can implement the copying in a helper class. This will reduce the probability of an error. If you use the same names for your bean attributes in both classes, commons-beanutils maybe of help, as it provides some methods to perform conversions between bean classes. My own experience tells me that using the same object for internal and XML binding purposes is not always a good idea. If your service modifies the state of your domain objects, using them for serialization will probably result in incoherences in your returned data. Think about it. If you return your Customer, Axis 2 starts deserializing it to build the response, and in another request somebody changes some fields in the same object, the response may contain inconsistent data. Take into account that, once you release your object to Axis, you loose control over the transactionality of any operation on that instance. I am not saying this is the end of the world. This scenario might not be possible in your services, or even if possible, it may have little or no importance. But if you do need returned data to be consistent, copying field values into an XML bean may be the only way to get a valid snapshot of your data. Hope this helps, Rodrigo Ruiz [EMAIL PROTECTED] wrote: Hi, I'm struggling a bit with the following. Say, I have a web service that allows you to search for customers. It accepts a customer name, and returns a set (any number) of customers. The response xml may look like customerSearchResponse customer number123/number nameJohn Doe/name /customer customer number987/number nameJane Doe/name /customer /customerSearchResponse Obviously, in my application I have a Customer class. Now if I create a wsdl for this web service, and generate the server side code for it, one of the classes that is generated is a customer class, that represents the customer in the xml response. On the other hand, I have the Customer domain object, which is a different one. To generate the response, I have to create 'xml response' customers, and basically copy the information from the Customer class to it. The above example is very simple, but you can imagine more complexe cases that would involve a lot of copying from domain objects to xml representation objects. This is very tedious and error-prone work -- typically work that I would like to avoid. Is there an elegant way to solve this issue? Thanks, Tom No virus found in this incoming message. Checked by AVG Free Edition. Version: 7.1.394 / Virus Database: 268.7.4/351 - Release Date: 29/05/2006 -- --- 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.394 / Virus Database: 268.7.4/351 - Release Date: 29/05/2006 - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Problem with 'httpChunkStream = true' through VPN
Good Morning Ken- download Axis 1.3 and look at the example in .\samples\attachments\EchoAttachment.java Let me know if you need any help, Martin-- * This email message and any files transmitted with it contain confidential information intended only for the person(s) to whom this email message is addressed. If you have received this email message in error, please notify the sender immediately by telephone or email and destroy the original message without making a copy. Thank you. - Original Message - From: Westelinck, Kenneth [EMAIL PROTECTED] To: axis-user@ws.apache.org; Martin Gainty [EMAIL PROTECTED] Sent: Tuesday, May 30, 2006 1:43 AM Subject: RE: Problem with 'httpChunkStream = true' through VPN Thank you for the quick reply. However, I don't have the setscopedproperty method. In which version of Axis is this available. I'm running 1.2.1. How can I do this in 1.2.1? -Original Message- From: Martin Gainty [mailto:[EMAIL PROTECTED] Sent: 29 May 2006 17:21 To: axis-user@ws.apache.org Subject: Re: Problem with 'httpChunkStream = true' through VPN Good Morning Ken- good news you have been able to determine the workaround.. for configuring the chunking capability you will need to set the HTTP transport version back to 1.0 Service service = new Service(); //A new axis Service. Call call = (Call) service.createCall(); //Create a call to the service. /*Un comment the below statement to do HTTP/1.1 protocol (to enable chunking..)*/ //call.setScopedProperty(MessageContext.HTTP_TRANSPORT_VERSION ,HTTPConstants.HEADER_PROTOCOL_V11); //Hashtable myhttp = new Hashtable(); //myhttp.put(, yyy); //Send extra soap headers //myhttp.put(SOAPAction, dyyy); //myhttp.put(SOAPActions, prova); /*Un comment the below to do http chunking to avoid the need to calculate content-length. (Needs HTTP/1.1)*/ //myhttp.put(HTTPConstants.HEADER_TRANSFER_ENCODING, HTTPConstants.HEADER_TRANSFER_ENCODING_CHUNKED); //this option will disable chunking.. call.setScopedProperty(MessageContext.HTTP_TRANSPOR_VERSION,Ht tpConstants.HEADER_PROTOCOL_V10); HTH Martin -- * This email message and any files transmitted with it contain confidential information intended only for the person(s) to whom this email message is addressed. If you have received this email message in error, please notify the sender immediately by telephone or email and destroy the original message without making a copy. Thank you. - Original Message - From: Westelinck, Kenneth [EMAIL PROTECTED] To: axis-user@ws.apache.org Sent: Monday, May 29, 2006 9:45 AM Subject: Problem with 'httpChunkStream = true' through VPN Hi all, I am using Axis to call webservices storing business objects in Microsoft CRM (works great!!!). I've been developing and calling webservices on a server running local on top of vmware. Now I am trying to call my colleagues development server which I can access through a VPN tunnel ... But it fails. I get the following exception: java.net.SocketException: Connection reset Cool, so I started digging and found that I don't get this exception when setting 'httpChunkStream = false'. This is the testcode: HttpClient httpClient = new HttpClient(); Credentials credentials = new NTCredentials(user, pwd, localhost, domain); httpClient.getState().setCredentials(AuthScope.ANY, credentials); HttpMethodBase method = new PostMethod(http://localhost/mscrmservices/2006/crmservice.asmx;); Message reqMessage = new Message(test); ((PostMethod)method).setRequestEntity(new MessageRequestEntity(method, reqMessage, false)); try { int returnCode = httpClient.executeMethod(method); String response = method.getResponseBodyAsString(); System.out.println(Response: + response); } catch (HttpException e) { e.printStackTrace(); } catch (IOException e) { e.printStackTrace(); } How to propagate this property to Axis (I'm using the stub generated by wsdl2java). Thanks. Regards, Kenneth - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: [Axis2] Generated element objects vs. business objects
Hi Rodrigo, This sure helps. Like you say, there are multiple ways of dealing with it, and it seems to be related to style, ease of implementation, and consistency of data. Each method has some pros and cons. I'll give it some more thought... Thanks, also to Robert Lazarski for his response. Tom Rodrigo Ruiz [EMAIL PROTECTED] wrote on 05/30/2006 02:39:31 PM: Hi Tom, There are some options more or less practical to get what you want. One is to replace your domain class with the generated one. This will probably mean moving the non-bean functionality in your domain Customer to another class, maybe something like CustomerHelper. Of course, this is not always possible, as you may have some internal fields in your domain class you want to keep there. Another option is to make your domain class to subclass the generated class, or include it as an internal field. Copying does not have to be so bad. If you have a fixed mapping between what you have in your domain classes and what you want to return as XML beans, you can implement the copying in a helper class. This will reduce the probability of an error. If you use the same names for your bean attributes in both classes, commons-beanutils maybe of help, as it provides some methods to perform conversions between bean classes. My own experience tells me that using the same object for internal and XML binding purposes is not always a good idea. If your service modifies the state of your domain objects, using them for serialization will probably result in incoherences in your returned data. Think about it. If you return your Customer, Axis 2 starts deserializing it to build the response, and in another request somebody changes some fields in the same object, the response may contain inconsistent data. Take into account that, once you release your object to Axis, you loose control over the transactionality of any operation on that instance. I am not saying this is the end of the world. This scenario might not be possible in your services, or even if possible, it may have little or no importance. But if you do need returned data to be consistent, copying field values into an XML bean may be the only way to get a valid snapshot of your data. Hope this helps, Rodrigo Ruiz [EMAIL PROTECTED] wrote: Hi, I'm struggling a bit with the following. Say, I have a web service that allows you to search for customers. It accepts a customer name, and returns a set (any number) of customers. The response xml may look like customerSearchResponse customer number123/number nameJohn Doe/name /customer customer number987/number nameJane Doe/name /customer /customerSearchResponse Obviously, in my application I have a Customer class. Now if I create a wsdl for this web service, and generate the server side code for it, one of the classes that is generated is a customer class, that represents the customer in the xml response. On the other hand, I have the Customer domain object, which is a different one. To generate the response, I have to create 'xml response' customers, and basically copy the information from the Customer class to it. The above example is very simple, but you can imagine more complexe cases that would involve a lot of copying from domain objects to xml representation objects. This is very tedious and error-prone work -- typically work that I would like to avoid. Is there an elegant way to solve this issue? Thanks, Tom No virus found in this incoming message. Checked by AVG Free Edition. Version: 7.1.394 / Virus Database: 268.7.4/351 - Release Date: 29/05/2006 -- --- GRIDSYSTEMS Rodrigo 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.394 / Virus Database: 268.7.4/351 - Release Date: 29/05/2006 - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Problem with code generated by WSDL2Code
Good Monring In 1.3 the name of the code generator is WSDL2Java Here is the example I use java -classpath $CLASSPATH. org.apache.axis.wsdl.WSDL2Java NameOfService.wsdl Martin -- * This email message and any files transmitted with it contain confidential information intended only for the person(s) to whom this email message is addressed. If you have received this email message in error, please notify the sender immediately by telephone or email and destroy the original message without making a copy. Thank you. - Original Message - From: Paul Gonchar [EMAIL PROTECTED] To: axis-user@ws.apache.org Sent: Thursday, May 25, 2006 6:47 PM Subject: Problem with code generated by WSDL2Code Hi guys, I've just started using Axis2. I need to generate server skeletons. I used the following command: call WSDL2Code.bat -uri C:\project\cvs\gazoo\src\share\xml\webservice\userprofile\ver2.0\userProfile.wsdl -ss -sd -d adb -p com.test.generated -o output/server and I got a bunch of generated code that can't be compiled. I've noticed things like calls to org.apache.axis2.databinding.utils.ConverterUtil.convertToToken(content) (there is no method convertToToken in ConverterUtil) which may be fixed by replacing convertToToken with convertTotoken The same thing with org.apache.axis2.databinding.utils.ConverterUtil.convertToCalendar(content) - must be replaced with convertTodateTime Finally I got into problem I can't fix : private java.lang.Object fromOM( org.apache.axiom.om.OMElement param, java.lang.Class type, java.util.Map extraNamespaces) { try { if (org.apache.axiom.om.OMElement.class.equals(type)){ return org.apache.axiom.om.OMElement.Factory.parse(param.getXMLStreamReaderWithoutCaching()); } } catch (Exception e) { throw new RuntimeException(e); } return null; } The problem is in line org.apache.axiom.om.OMElement.Factory - there is no variable Factory in class OMElement. Am i doing something wrong or Axis2 is indeed that buggy? Thanks! Paul Gonchar __ 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: axis compile error - package does not exist
Good Morning Femke- This is a 2 step process 1) grep -S -l jwo.landserf *.jar note the jar that contains this package 2) in your startup script (such as .profile or .bashrc) apprise your CLASSPATH of the jar which contains SET CLASSPATH=$CLASSPATH:NameOfJarWhichContainsPackage export $CLASSPATH you MUST ensure your CLASSPATH is setup in BOTH your compile and run tasks Martin -- * This email message and any files transmitted with it contain confidential information intended only for the person(s) to whom this email message is addressed. If you have received this email message in error, please notify the sender immediately by telephone or email and destroy the original message without making a copy. Thank you. - Original Message - From: femke [EMAIL PROTECTED] To: axis-user@ws.apache.org Sent: Tuesday, May 30, 2006 4:32 AM Subject: Re: axis compile error - package does not exist yes, the jar files are in the classpathhmm...it looks like an obvious classpath thing but given it compiled with javac under the dos prompt, it doesn't quite make sense. any other ideas would be most welcome. femke -- View this message in context: http://www.nabble.com/axis+compile+error+-+package+does+not+exist-t1698718.html#a4623017 Sent from the Axis - User forum at Nabble.com. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
[Axis v1.4] typeMapping or client-side class generation problem
Hello, I encountered a problem with the client of my axis web service, but I could also be a problem on the server side. A "Date[]" array is beeing transferred and the browser shows the fields correctly (as long as I can tell), but the client receives only one element instead of five. Something with the WSDL typeMapping or the axis client generation is malfunctioning, I would suggest. Three questions arise: 1) Why don't get all Dates from the SOAP xsd:dateTime elements transferred into the date array on client-side? 2) Why is so much manual customization required? 3) Am I doing something wrong in my development process? In the following I provide the necessary information related to this issue: The service has a "History" class as part of the Interface(History class shown below), which has a "java.util.Date[]" field called "allCalibrations". class History (web service): import java.util.Date; public class History { public Date lastCalibration = null; public Date nextCalibration = null; public Date[] allCalibrations = null; ... } If the client sends its request, the response in the browser looks fine (SOAP Message shown below), it shows the five dates from the allCalibrations Date[] field. SOAP Response of the web service request "getHistory" (browser): ?xml version="1.0" encoding="UTF-8"? soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" soapenv:Body getHistoryResponse xmlns="" ns1:getHistoryReturn xmlns:ns1="http://mdmonitor.webservice.qsgrimm.de" ns1:lastCalibration xsi:type="xsd:date"2002-09-11/ns1:lastCalibration ns1:nextCalibration xsi:type="xsd:date"2002-09-11/ns1:nextCalibration ns1:allCalibrations xsi:type="xsd:date"1996-08-03/ns1:allCalibrations ns1:allCalibrations xsi:type="xsd:date"1997-09-16/ns1:allCalibrations ns1:allCalibrations xsi:type="xsd:date"1999-11-02/ns1:allCalibrations ns1:allCalibrations xsi:type="xsd:date"2001-02-09/ns1:allCalibrations ns1:allCalibrations xsi:type="xsd:date"2002-09-11/ns1:allCalibrations ... /ns1:getHistoryReturn /getHistoryResponse /soapenv:Body /soapenv:Envelope The web service WSDL, "History" complex type: complexType name="History" sequence element name="lastCalibration" nillable="true" type="xsd:dateTime"/ element name="nextCalibration" nillable="true" type="xsd:dateTime"/ element name="allCalibrations" nillable="true" type="impl:ArrayOf_xsd_dateTime"/ ... /sequence /complexType The cause of the client only receiving a one field Date object in the allCalibrations field could be due to "deploy.wsdd"-file manipulations. Generating a wsdl file from the web service interface results in many typeMappings like the following. But a "de.qsgrimm.webservice.mdmonitor.GetJobs" class doesn't exist, so I removed all those entries. TypeMapping, automatically generated by axis: typeMapping xmlns:ns="http://mdmonitor.webservice.qsgrimm.de" qname="ns:getJobs" type="java:de.qsgrimm.webservice.mdmonitor.GetJobs" serializer="org.apache.axis.encoding.ser.BeanSerializerFactory" deserializer="org.apache.axis.encoding.ser.BeanDeserializerFactory" encodingStyle="" / One entry was due to the Date array in the History class. The Mapping was the following: ArrayTypeMapping, automatically generated by axis: arrayMapping xmlns:ns="http://mdmonitor.webservice.qsgrimm.de" qname="ns:ArrayOf_xsd_dateTime" type="java:java.util.Calendar[]" innerType="cmp-ns:dateTime" xmlns:cmp-ns="http://www.w3.org/2001/XMLSchema" encodingStyle="" / But leaving the above statement in the deploy.wsdd, the field allCalibrations(Date[]) maps on client-side to: private java.lang.Object[] allCalibrations; Removing also the dateTime array mapping, results in a correct client-side-mapping as: private java.util.Calendar[] allCalibrations; but this configuration of History results in an exception thrown: - Could not convert java.util.Date to bean field 'allCalibrations', type [Ljava.util.Calendar; - Exception: java.lang.IllegalArgumentException: argument type mismatch at org.apache.axis.encoding.ser.BeanPropertyTarget.set(BeanPropertyTarget.java:157) ... So, I altered the History class on the client-side by hand to the following for the client to function properly. But it seems as only a (bad) workaround to me. private java.util.Date[] allCalibrations; while lastCalibration and nextCalibration last as: java.util.Calendar xCalibration ...which seems to me quite weird, but functional. Again the three questions: 1) Why don't get all Dates from the SOAP xsd:dateTime elements transferred into the date array on client-side? 2) Why is so much manual customization required? 3) Am I doing something wrong in my development process? Thanks a lot for your help! kind regards Artur Kraft
Re: Problem with WSDL2Java with HTTP POST
You don't have a message part called Body, so this reference doesn't make sense:mime:mimeXml part=Body/Anne On 5/30/06, Jose Manuel Cercós Moreno [EMAIL PROTECTED] wrote: I'm trying to create a stub from .wsdl that i had created where thebinding is POST and when i executed the wsdl2java command i get anvoid interface. Why? I had been to search in google and i haven'tanything. Thanks in advance.WSDL?xml version=1.0 encoding=UTF-8?wsdl:definitions xmlns:http=http://schemas.xmlsoap.org/wsdl/http/ xmlns:soap=http://schemas.xmlsoap.org/wsdl/soap/xmlns:s=http://www.w3.org/2001/XMLSchema xmlns:soapenc=http://schemas.xmlsoap.org/soap/encoding/xmlns:tns=http://sencilloxmlns:tm= http://microsoft.com/wsdl/mime/textMatching/xmlns:mime=http://schemas.xmlsoap.org/wsdl/mime/ xmlns:wsdl=http://schemas.xmlsoap.org/wsdl/targetNamespace=http://sencillowsdl:message name=mensajesencillo wsdl:part name=Email type=s:string/wsdl:part name=ServiceName type=s:string/wsdl:part name=OperationName type=s:string/ /wsdl:messagewsdl:portType name=SencilloHttp_Postwsdl:operation name=operacionsencillawsdl:input message=tns:mensajesencillo/ /wsdl:operation/wsdl:portTypewsdl:binding name=SencilloHttp_Post type=tns:SencilloHttp_Posthttp:binding verb=POST/ wsdl:operation name=operacionsencillahttp:operation location=operacionsencilla/wsdl:inputmime:mimeXml part=Body/ /wsdl:input/wsdl:operation/wsdl:bindingwsdl:service name=WSDLTesterwsdl:port name=SencilloHttp_Post binding=tns:SencilloHttp_Post http:addresslocation=http://192.168.153.100:8080/appProxyAmadeus/servlet/svlProxyAmadeus/ /wsdl:port/wsdl:service/wsdl:definitionsINTERFACEpackage sencillo;public interface WSDLTester extends javax.xml.rpc.Service {} -To unsubscribe, e-mail: [EMAIL PROTECTED]For additional commands, e-mail: [EMAIL PROTECTED]
Re: Problem with WSDL2Java with HTTP POST
I have changed the input element by mime:content type=application/x-www-form-urlencoded /and get the interface without methods. anyway, thanks Anne. WSDL ?xml version=1.0 encoding=UTF-8? wsdl:definitions xmlns:http=http://schemas.xmlsoap.org/wsdl/http/; xmlns:soap=http://schemas.xmlsoap.org/wsdl/soap/; xmlns:s=http://www.w3.org/2001/XMLSchema; xmlns:soapenc=http://schemas.xmlsoap.org/soap/encoding/; xmlns:tns=http://sencillo; xmlns:tm=http://microsoft.com/wsdl/mime/textMatching/; xmlns:mime=http://schemas.xmlsoap.org/wsdl/mime/; xmlns:wsdl=http://schemas.xmlsoap.org/wsdl/; targetNamespace=http://sencillo; wsdl:message name=mensajesencillo wsdl:part name=Email type=s:string/ wsdl:part name=ServiceName type=s:string/ wsdl:part name=OperationName type=s:string/ /wsdl:message wsdl:portType name=SencilloHttp_Post wsdl:operation name=operacionsencilla wsdl:input message=tns:mensajesencillo/ /wsdl:operation /wsdl:portType wsdl:binding name=SencilloHttp_Post type=tns:SencilloHttp_Post http:binding verb=POST/ wsdl:operation name=operacionsencilla http:operation location=/operacionsencilla/ wsdl:input mime:content type=application/x-www-form-urlencoded / /wsdl:input /wsdl:operation /wsdl:binding wsdl:service name=WSDLTester wsdl:port name=SencilloHttp_Post binding=tns:SencilloHttp_Post http:address location=http://192.168.153.100:8080/appProxyAmadeus/servlet/svlProxyAmadeus/ /wsdl:port /wsdl:service /wsdl:definitions INTERFACE package sencillo; public interface WSDLTester extends javax.xml.rpc.Service { } On 5/30/06, Anne Thomas Manes [EMAIL PROTECTED] wrote: You don't have a message part called Body, so this reference doesn't make sense: mime:mimeXml part=Body/ Anne On 5/30/06, Jose Manuel Cercós Moreno [EMAIL PROTECTED] wrote: I'm trying to create a stub from .wsdl that i had created where the binding is POST and when i executed the wsdl2java command i get an void interface. Why? I had been to search in google and i haven't anything. Thanks in advance. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
AdminClient throws NoClassDefFoundException
Hi there, I am a total Newbie in SOAP. And so I tried to follow the Installation Hints from axis point to point. But as I tried to run the admin client I got the following error message: H:\Tomcat 5.0\webapps\axis\WEB-INF\classes\samples\stockjava -cp %AXISCLASSPATH% org.apache.axis.client.AdminClient -lhttp://localhost:80/axis/services/AdminService deploy.wsdd Exception in thread main java.lang.NoClassDefFoundError: for I set the Classpath correctly and by the way, why is Java looking for a Class called for??? Any ideas? Thanks, Felix -- Felix Jungermann Fraunhofer Institut Software- und Systemtechnik (ISST) http://www.isst.fraunhofer.de - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: AdminClient throws NoClassDefFoundException
If you look for WEB-INF/lib/axis.jar and place that on your CLASSPATH that should help Martin -- * This email message and any files transmitted with it contain confidential information intended only for the person(s) to whom this email message is addressed. If you have received this email message in error, please notify the sender immediately by telephone or email and destroy the original message without making a copy. Thank you. - Original Message - From: Felix Jungermann [EMAIL PROTECTED] To: axis-user@ws.apache.org Sent: Tuesday, May 30, 2006 10:49 AM Subject: AdminClient throws NoClassDefFoundException Hi there, I am a total Newbie in SOAP. And so I tried to follow the Installation Hints from axis point to point. But as I tried to run the admin client I got the following error message: H:\Tomcat 5.0\webapps\axis\WEB-INF\classes\samples\stockjava -cp %AXISCLASSPATH% org.apache.axis.client.AdminClient -lhttp://localhost:80/axis/services/AdminService deploy.wsdd Exception in thread main java.lang.NoClassDefFoundError: for I set the Classpath correctly and by the way, why is Java looking for a Class called for??? Any ideas? Thanks, Felix -- Felix Jungermann Fraunhofer Institut Software- und Systemtechnik (ISST) http://www.isst.fraunhofer.de - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: AdminClient throws NoClassDefFoundException
Thanks, but it still doesn't work! The axis.jar already was in the AXISCLASSPATH, but briniging it into 'normal' CLASSPATH also makes no difference. Felix Martin Gainty wrote: If you look for WEB-INF/lib/axis.jar and place that on your CLASSPATH that should help Martin -- * This email message and any files transmitted with it contain confidential information intended only for the person(s) to whom this email message is addressed. If you have received this email message in error, please notify the sender immediately by telephone or email and destroy the original message without making a copy. Thank you. - Original Message - From: Felix Jungermann [EMAIL PROTECTED] To: axis-user@ws.apache.org Sent: Tuesday, May 30, 2006 10:49 AM Subject: AdminClient throws NoClassDefFoundException Hi there, I am a total Newbie in SOAP. And so I tried to follow the Installation Hints from axis point to point. But as I tried to run the admin client I got the following error message: H:\Tomcat 5.0\webapps\axis\WEB-INF\classes\samples\stockjava -cp %AXISCLASSPATH% org.apache.axis.client.AdminClient -lhttp://localhost:80/axis/services/AdminService deploy.wsdd Exception in thread main java.lang.NoClassDefFoundError: for I set the Classpath correctly and by the way, why is Java looking for a Class called for??? Any ideas? Thanks, Felix -- Felix Jungermann Fraunhofer Institut Software- und Systemtechnik (ISST) http://www.isst.fraunhofer.de - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] -- Felix Jungermann Fraunhofer Institut Software- und Systemtechnik (ISST) Emil-Figge-Str. 91 D-44227 Dortmund Tel: +49 (0) 231 / 97 67 7 - 492 Fax: +49 (0) 231 / 97 67 7 - 198 E-Mail: [EMAIL PROTECTED] http://www.isst.fraunhofer.de - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
[Axis2][xmlbeans] Why so many files?
Hi, I'm generating code for a simple web service using xmlbeans. In the first place, what stunned me was the number of files that are generated for a simple web service: approximately 400 ! The first thing comes to mind (at least my mind, and I presume that of most users) is why on earth would you need so many files? And what kind of files are they? Xsb files... e...? I've tried to figure out what they are, but couldn't find any documentation on them. In fact, I couldn't find any documentation on xmlbeans at all. I presume these generated xsb files are somehow dependent on the wsdl or xsd, since they're generated each time I run wsdl2java. However, I've not seen any differences between the files between subsequent runs of wsdl. Does this mean the files are actually static? If so, can't they be prebuilt, and simply be shipped with axis? Also, with each run, a new directory is created with some unique hex id name, that will contain many xsb files. Since this directory name is different for each run, it means that the collection of xsb files is growing and growing. You have to clean it up manually! Another quirk is the TypeSystemHolder class, that is generated, and placed somewhere between the xsb files. It's not a generated source file that is located with the other, regular source files. You need to have it on the classpath; that's all I know. I'm sure it is possible to use an ant script to do all the required copying and cleaning up, but I see this as a workaround for a not-so-nice solution. Agree, it all works -- but it is all a bit hairy. Thanks for letting me ventilate some frustration ;) Tom
Connection Pooling, HTTPS and nested params
Hi.Lots of questions here :-)I'm writing a client to connect to a SOAP service. The questions are a follows:1. All communication is over HTTPS where the connection is kept alive and synchronous messages sent over the same link. How do I set up a pool of say Call objects which don't close the connection after every use? 2. The parameters passed in can be nested like so:SomeMethod POS Source foo=IPKAK/ /POS Origin Code=foo Context=bar/ Destination Code=baz Context=bar//SomeMethodSometimes, the nesting can be even deeper. How do I addParams to the Call Obj to achieve this? Also, how do I set the attributes of the generated XML. Thanks in advance for all your help--Arsalan
Re: [axis2] Custom security context token
Thanks again, Ruchith. Your help is very much appreciated. It turns out that the UsernameToken was completely superfluous, since the key was being set directly on the SecurityContextToken after the UsernameToken was. No RST request was actually being sent. So what would be the simplest way to implement this using Axis2? I need WS-Addressing, and i'm not confident in Axis1's addressing support. Could i use an OperationClient to sign and encrypt the SOAP DOM using WSS4J? (I'm not clear how this might work.) Or do i need to create my own module? Or should i go with the code in SVN HEAD? Thanks! On Tue, 2006-05-30 at 13:30 +0530, Ruchith Fernando wrote: Let me answer your second question first: constructor says Initializes a new instance of the SecurityContextToken class using the security token used to sign the Request Security Token (RST), the security token shared by the security token service and the target Web service, and the specified identifier. I'm not quite sure that means. This means that the client will make a request to a SecurityTokenService (STS) (defined in the WS-Trust specification) to establish the security context. This request is a RequestSecurityToken (RST) request where it will be signed by the token given as the first argument into the constructor. In the case where you pass a UsernameToken the RST will be signed using the UT. The response to RST, RequestSecurityTokenResponse (RSTR) message will contain the SecurityContextToken that will be used to derive keys, which will eventually sign/encrypt the actual request messages to the service. The service will also use the same security context token to derive keys to verify/ decrypt requests from the client and sign/encrypt its responses. There's one issue though: The .NET code is creating a SecurityContextToken with a UsernameToken as its base. Is there any way to do this with WSS4J? This is possible with WSS4J 1.5 and Axis2 (svn head). Right now we have an Axis2 module called rahas in Axis2 which supports WS-SecureConversation only. We can use this to carryout the handshake with the STS and obtain an SCT which can be used to derive keys to sign and encrypt messages. Use of the UsernameToken in signing is only in the case of the initial RST message to the STS and this is supported by rahas right now using the rampart handlers internally in rahas. Here [1] you can find some test cases that tests rahas A word of caution : In a few days the WS-SecureConversation support will be merged into rampart and rahas will disappear, which will allow you to setup your scenario simply with rampart. Thanks, Ruchith [1] http://svn.apache.org/repos/asf/webservices/axis2/trunk/java/modules/integration/test/org/apache/axis2/security/rahas/ - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Rude newbie question
Hello to the list. I just subscribed today and normally I lurk for a while when I join a group. Not today. I did do a mailing list archive search before asking this question, but since I found nothing there, I'm just leaping right in. I'm doing something people might consider oddball. I'm trying to use the Sun-free java environment on Fedora Core 5 to run Axis. That means I'm using gcj as configured under Fedora Core 5. I've installed the Fedora 5 packages for tomcat5, tomcat5-webapps, axis, axis-manual, and axis-javadoc. I found it odd that the axis webapp wasn't included in these packages (axis must have a standalone mode?), so I downloaded axis1.2.1 (the Fedora axis package is version 1.2.1) and installed the webapp under my tomcat5 environment. I run happyaxis, and it is happy, with the only complaint being the absence of xmlsec.jar, which is not a required package. Any time I try to run a webservice (for example, clicking Call on the axis index page which results in going to this URL: http://localhost:8080/axis/EchoHeaders.jws?method=list ) I get the following error: soapenv:Server.userException java.lang.RuntimeException: No compiler found in your classpath! (you may need to add 'tools.jar') localhost.localdomain Now, tools.jar *is* in the classpath. It is also in the tomcat5 common dir and in the axis webapp/WEB-INF/lib dir. Let me tell you what else I have tried: 1. Putting tools.jar on the -bootclasspath argument to the java invocation of tomcat itsel. 2. I dug in to the Fedora javac script and found that it uses the compiler class from eclipse (org.eclipse.jdt.internal.compiler.batch.Main), so I put that jar file in all the usual places and tried specifying that class as the value of the java.compiler and axis.Compiler system properties. None of these worked. I am within millimeters of having Axis work under FC5, I *know* I am, but I can't for the life of me figure out how to get my Axis webapp instance to find the java compiler! I don't pretend to be a tomcat expert. I dug into the scripts to find out how to do these things. You can, when coming up with suggestions, assume that I know shell scripts and generic Unix sysadmin fairly well, but tomcat and Axis admin hardly at all. I hope someone out there has an answer for me. In any case, hello to the group and thank you to the folks on the Axis project for their fine software! (BTW, my atom bomb solution is to give up on Fedora gcj java and use jpackage packages, but that is actually a royal pain -- which I hope Sun's recent moves will make better. I want to give my client a more turnkey solution, an out of the box Fedora solution if possible.) Any help would be greatly appreciated! -- Michael Schwarz - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: [Axis 2][1.0] RPCMessageReceiver with Document/Literal
Deepal, Problem is resolved now. 1) xmlbeans : I used 25th May 2006 Snapshot, it seemed to be fixed. 2) ADB: In my return object, I had few null values, which was causing NPE. Problem is Axis2 doesnot print complete stack trace, so it is difficult to figure out which line is giving error. I had to intercept all the calls and put error handling (which is right way anyways). I have created JIRA issue for this problem AXIS2-781. Thanks Regards, Suyog -Original Message- From: Deepal Jayasinghe [mailto:[EMAIL PROTECTED] Sent: Saturday, May 27, 2006 11:49 AM To: axis-user@ws.apache.org Subject: Re: [Axis 2][1.0] RPCMessageReceiver with Document/Literal Hi Suyoug; It seems to me that this is a bug in Axis2 need to fix before next release, can u please create JIRA so that we will not forget to fix this Suyog Gandhi wrote: Basically to summerize my problem, 1) I wrote my simple Java class which has few public methods, which returns some complex type objects. 2) I wrote my service.xml with RPCMessageReceiver, cause RAWMessageReceivers will not generate WSDL for me. 3) I deployed the service. 4) Now I generated client-stub by using 2 different data bindings. ( And wrote corresponding clients to test). - xmlbean : Server side has returned my call properly. While unmarshalling, client-stub gives me Data Binding error caused by document element namespace mismatch exception. - ADB : Server side has returned my call properly. While unmarshalling, client-stub gives me NullPointerException. I have not tried another data bindings. I hope the problem is clear, and somebody can make sense out of it to provide me with solution. Thanks Regards, Suyog -Original Message- From: Suyog Gandhi [mailto:[EMAIL PROTECTED] Sent: Wednesday, May 24, 2006 5:27 PM To: axis-user@ws.apache.org Subject: RE: [Axis 2][1.0] RPCMessageReceiver with Document/Literal Some more info: Now I used following code to create client stub: ( ADB databinding, in previous case I was using xmlbeans data binding) C:\WebService\WS_MDSClient2c:\axis2_1.0\bin\WSDL2Java -p com.vistaar.clemenza.shared.webs.stub -uri http://sgandhi2-d:8100/vistaar/services/WS_MDS32 WSDL sholdn't be different, but I am attaching it again. Also attaching new Client. Client Console Log: C:\Program Files\Java\jdk1.5.0_05\bin\java -Didea.launcher.port=7533 -Didea.launcher.bin.path=C:\Program Files\JetBrains\IntelliJ IDEA 5.1\bin -Dfile.encoding=windows-1252 -classpath C:\Program Files\Java\jdk1.5.0_05\jre\lib\charsets.jar;C:\Program Files\Java\jdk1.5.0_05\jre\lib\deploy.jar;C:\Program Files\Java\jdk1.5.0_05\jre\lib\javaws.jar;C:\Program Files\Java\jdk1.5.0_05\jre\lib\jce.jar;C:\Program Files\Java\jdk1.5.0_05\jre\lib\jsse.jar;C:\Program Files\Java\jdk1.5.0_05\jre\lib\plugin.jar;C:\Program Files\Java\jdk1.5.0_05\jre\lib\rt.jar;C:\Program Files\Java\jdk1.5.0_05\jre\lib\ext\dnsns.jar;C:\Program Files\Java\jdk1.5.0_05\jre\lib\ext\localedata.jar;C:\Program Files\Java\jdk1.5.0_05\jre\lib\ext\sunjce_provider.jar;C:\Program Files\Java\jdk1.5.0_05\jre\lib\ext\sunpkcs11.jar;C:\WebService\WS_MDS32 C lient\classes;C:\axis2_1.0\lib\axiom-api-1.0.jar;C:\axis2_1.0\lib\axiom - impl-1.0.jar;C:\axis2_1.0\lib\jaxme2-0.5.1.jar;C:\axis2_1.0\lib\geronim o -spec-jms-1.1-rc4.jar;C:\axis2_1.0\lib\neethi-1.0.1.jar;C:\axis2_1.0\li b \jaxmejs-0.5.1.jar;C:\axis2_1.0\lib\axis2-jibx-1.0.jar;C:\axis2_1.0\lib \ jaxen-1.1-beta-8.jar;C:\axis2_1.0\lib\geronimo-spec-javamail-1.3.1-rc5. j ar;C:\axis2_1.0\lib\jaxmexs-0.5.1.jar;C:\axis2_1.0\lib\wsdl4j-1.5.2.jar ; C:\axis2_1.0\lib\axis2-tools-1.0.jar;C:\axis2_1.0\lib\commons-httpclien t -3.0.jar;C:\axis2_1.0\lib\backport-util-concurrent-2.1.jar;C:\axis2_1.0 \ lib\geronimo-spec-activation-1.0.2-rc4.jar;C:\axis2_1.0\lib\xbean-2.1.0 . jar;C:\axis2_1.0\lib\axis2-codegen-1.0.jar;C:\axis2_1.0\lib\servletapi- 2 .3.jar;C:\axis2_1.0\lib\XmlSchema-1.0.2.jar;C:\axis2_1.0\lib\commons-co d ec-1.3.jar;C:\axis2_1.0\lib\axis2-xmlbeans-1.0.jar;C:\axis2_1.0\lib\ann o gen-0.1.0.jar;C:\axis2_1.0\lib\axis2-kernel-1.0.jar;C:\axis2_1.0\lib\ja x meapi-0.5.1.jar;C:\axis2_1.0\lib\stax-api-1.0.jar;C:\axis2_1.0\lib\log4 j -1.2.13.jar;C:\axis2_1.0\lib\axis2-adb-1.0.jar;C:\axis2_1.0\lib\axiom-d o m-1.0.jar;C:\axis2_1.0\lib\stax-utils-20060501.jar;C:\axis2_1.0\lib\com m ons-logging-1.0.4.jar;C:\axis2_1.0\lib\commons-fileupload-1.0.jar;C:\ax i s2_1.0\lib\wstx-asl-2.9.3.jar;C:\Program Files\JetBrains\IntelliJ IDEA 5.1\lib\idea_rt.jar com.intellij.rt.execution.application.AppMain com.vistaar.clemenza.shared.webs.client.WSClient log4j:WARN No appenders could be found for logger (org.apache.axiom.om.impl.builder.StAXOMBuilder). log4j:WARN Please initialize the log4j system properly. Calling ws_init . After ws_init . return value: Container is up Calling refreshMDSProxiesRequest . After refreshMDSProxiesRequest .retur value true returnexample1:getVersion xmlns:example1=http://example1.org/example1;example1:TextAxis2 Version
RE: [Axis2] How to build aar and Axis2 war with Maven2?
Ajith, Thanks for the reply. I understand that aar is a jar file with a special format. What I am wondering is if maven2 is aware of this 'special format'? As I understand maven2, it uses the packaging tag to 'know' what to do to make the artifact. So can I do the following? packagingaar/packaging Or do I have to use the default packaging of jar and then rename? If this is the case, how do I rename in maven2? Also regarding the services.xml file, is there any help in maven2 to auto generate this? If not, this probably isn't a big deal. Regarding the war, yes I did mean how to package the aar in the war. You state how to do this but I am wondering if there is any maven2 help for this as well. Depending on the answers above, the aar may be known by maven2 as jar and/or aar and have to be copied and/or renamed as aar. It seems this could all be automated possibly. Thanks! -dh -Original Message- From: Ajith Ranabahu [mailto:[EMAIL PROTECTED] Sent: Saturday, May 27, 2006 9:12 AM To: axis-user@ws.apache.org Subject: Re: [Axis2] How to build aar and Axis2 war with Maven2? Hi, an aar is a jar file with a special format. You can copy the compiled classes into the relevant directory structure and use the jar command with maven2 if you want. If you are planning to use generated code then it will be convenient to call the generated ant build script. I don't really get what is meant by Take the Axis2 aar and make the Axis war needed for deployment ! Did you mean to say that you should have a war with your service pre-packed ? If so just package the services/xxx.aar into the web-inf folder of the war file. Ajith On 5/26/06, Deepal Jayasinghe [EMAIL PROTECTED] wrote: Hi Dave ; I dont think you need to compile Axis2 code , what I think is you have to add dependency into your project to pick Axis2 jars from apache repo. Dave Hoffer wrote: I would like to start using Axis2 in a new project. The project will use Maven2 as the build system. How can I integrate Axis2? Specifically, how do I? - Compile my sources into the Axis aar format? Or take my application's jar and create the Axis2 aar format? - Take the Axis2 aar and make the Axis war needed for deployment. I would greatly appreciate info on how to do this. -dh -- Thanks, Deepal ~Future is Open~ - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] -- Ajith Ranabahu - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: [axis2] Custom security context token
Hi, So what would be the simplest way to implement this using Axis2? I need WS-Addressing, and i'm not confident in Axis1's addressing support. Could i use an OperationClient to sign and encrypt the SOAP DOM using WSS4J? (I'm not clear how this might work.) Or do i need to create my own module? Or should i go with the code in SVN HEAD? You can go ahead and use the rahas-SNASHOT.mar (available in the modules/security/target/ dir after the build) and try it out right now. Even though code in wss4j supports both sign and encrypt using SCT and derived keys as of now you can only configure rahas to encrypt the body of the soap messages using SCT/derived key. Please have a look at the follwing this [1] (line 87) to see how one can set the configuration in the ServiceClient's options using the RahasConfiguration class. You must look at the implementation of getClientRahasConfiguration() in the RahasScenario3Test [2] class to see the how a RahasConfiguration instance is used to obtain the parameter to be set in the options in [1]. RahasScenario3Test is a test case similar to your case where the client creates its own SCT and propergates it to the service and uses it to encrypt the soap body. Having said the above please understand that we _will_ be moving all these features (and more) to rampart :-) and there will be no rahas module in a few days. :-) Thanks, Ruchith [1] http://svn.apache.org/repos/asf/webservices/axis2/trunk/java/modules/integration/test/org/apache/axis2/security/rahas/TestClient.java [2] http://svn.apache.org/repos/asf/webservices/axis2/trunk/java/modules/integration/test/org/apache/axis2/security/rahas/RahasScenario3Test.java - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: [Axis2] WSDL2Code ?
I resolved the problem with OMElement.Factory - indeed this was a WSDL problem. I had w:part name=getUserProfileByIdInput element=getRequest/ instead of w:part name=getUserProfileByIdInput type=typens:getRequest/ But still I'm getting problems with generated code. XSD data types token are parsed as ConverterUtil.convertToToken() and calendar are parsed as ConverterUtil.convertToCalendar(). For the token types, I beleive you need to change convertTotoken() (yes, 't' is lowercase) in class ConverterUtil to convertToToken(). As for calendar - change ConverterUtil.convertTodatetime() to convertToCalendar(). As for xmlbeans mode, I don't really like it because it generates bunch of resources and source files in org package. Thanks, Paul --- Ajith Ranabahu [EMAIL PROTECTED] wrote: Hi, Can you post the WSDL ? It seems that your WSDL may have a namespace issue ! On 5/26/06, Paul Gonchar [EMAIL PROTECTED] wrote: Has anyone used WSDL2Code generator successfully? I keep getting code that contains call to org.apache.axiom.om.OMElement.Factory.parse(). Axiom spec says OMElement is an interface and it can't contain any Factory. Any ideas? Thanks! Paul. P.S. Data binding mode does not matter - in all cases I get this code. __ 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] -- Ajith Ranabahu - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] __ 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]
[Axis2] How to design a Java API that is both Java and web-service friendly?
I have some POJO classes that I am designing were I will have both Java clients (using the classes directly thru jar) as well as clients accessing the code through a web-service API (the primary web-service client will be JavaScript/IE). Ideally (not required), I would like both API's to be the same. Here is the proposed Java API: public class Driver implements ISpotMeasurement { /** * This initiates the process of measuring and registers a listener for the measurement results. * * @param listener */ public void addSpotMeasurementListener(ISpotMeasurementListener listener) { } /** * This terminates the process of measuring and removes the registered listener. * * @param listener */ public void removeSpotMeasurementListener(ISpotMeasurementListener listener) { } /** * Enable the instrument to take a measurement now. The actual measurement may be delayed until the * user performs the physical measurement, in the case of instruments with shoe activated measurement. */ public void beginSpotMeasurement() { } } public interface ISpotMeasurementListener { public void onSpotMeasurement( double[] data, int statusCode ); } The client calls beginSpotMeasurement() asynchronously and the data is returned via the listener. This makes sense in the case of the Java application but can Axis2 web-services make this sort of an API? Can a web-service API register listeners? I definitely need state maintained on the server which I understand Axis2 supports; however is there a better way to implement this API for the web-service clients? What about JavaScript? What client proxies are available? I understand, as newbie, that Axis2 can generate synchronous and asynchronous method calls; how does this work given this API, given the JavaScript client? Thanks, -dh - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: [Axis2] How to design a Java API that is both Java and web-service friendly?
I'll try and answer your questions to a point where you can start moving torwards a solution. Some of these I haven't tried yet but I know they exist: 1) For an axis2 _javascript_ service, take a look here: http://issues.apache.org/jira/browse/AXIS2-625?page=all 2) For registering a listener, using JMS as the transport might be what you're after though I haven't used axis2 with JMS. Axis2 supports JMS, and while I didn't find any docs where I thought they would be, there are unit tests in the source such as JMSEchoRawXMLTest . Dims may be able to comment more. 3) I typically use an adapter or a Spring service that sits in between the axis2 / web layer invokations to the business layer that provides the same glue between the layers. 4) WS-Addressing generates an UUID that can be used for session tracking, along with ServiceGroupContext. I often either generate a UUID and store it via EHCache, or use a stateful session bean to generate and expire an ID for me - but I'm strange like that ;-) . HTH, Robert http://www.braziloutsource.com/ On 5/30/06, Dave Hoffer [EMAIL PROTECTED] wrote: I have some POJO classes that I am designing were I will have both Javaclients (using the classes directly thru jar) as well as clientsaccessing the code through a web-service API (the primary web-serviceclient will be _javascript_/IE).Ideally (not required), I would like both API's to be the same.Here is the proposed Java API:public class Driver implements ISpotMeasurement{/** * This initiates the process of measuring and registers a listenerfor the measurement results. * * @param listener */public void addSpotMeasurementListener(ISpotMeasurementListenerlistener){}/** * This terminates the process of measuring and removes the registered listener. * * @param listener */public void removeSpotMeasurementListener(ISpotMeasurementListenerlistener){}/** * Enable the instrument to take a measurement now.The actual measurement may be delayed until the * user performs the physical measurement, in the case ofinstruments with shoe activated measurement. */public void beginSpotMeasurement(){} }public interface ISpotMeasurementListener{public void onSpotMeasurement( double[] data, int statusCode );}The client calls beginSpotMeasurement() asynchronously and the data isreturned via the listener.This makes sense in the case of the Java application but can Axis2 web-services make this sort of an API?Cana web-service API register listeners?I definitely need statemaintained on the server which I understand Axis2 supports; however is there a better way to implement this API for the web-service clients?What about _javascript_?What client proxies are available?I understand, as newbie, that Axis2 can generate synchronous andasynchronous method calls; how does this work given this API, given the _javascript_ client?Thanks,-dh-To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
[Axis2][Current Nightly May 30th] ADB: Array Converter Utility is faulty
Hi there, we have discovered a bug in ADB's array conversion. We are calling a service that returns an array of integers and another one of doubles. We used WSDL2Java to create a client and a service using ADB databinding from a WSDL that contains the following return types: xs:element name=predictEpitopesResponse xs:complexType xs:sequence xs:element minOccurs=0 type=xs:integer name=StartPositions maxOccurs=unbounded/ xs:element minOccurs=0 type=xs:double name=Scores maxOccurs=unbounded/ /xs:sequence /xs:complexType /xs:element Curiously, WSDL2Java wants the integer array to be of type BigInteger, which is not what we expected (long maybe? how can we ensure this?) The code that causes the following exception looks like this: System.err.println(list1); object.setStartPositions( (java.math.BigInteger[]) org.apache.axis2.databinding.utils.ConverterUtil.convertToArray( java.math.BigInteger.class, list1)); This is the output of the err.println and the exception: [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12] java.lang.RuntimeException: java.lang.ArrayStoreException at org.apache.axis2.SVMHCServiceStub.fromOM(SVMHCServiceStub.java:952) at org.apache.axis2.SVMHCServiceStub.predictEpitopes(SVMHCServiceStub.java:149) at org.apache.axis2.schmain.main(schmain.java:24) Caused by: java.lang.ArrayStoreException at java.lang.System.arraycopy(Native Method) at java.util.ArrayList.toArray(Unknown Source) at org.apache.axis2.databinding.utils.ConverterUtil.convertToArray(ConverterUtil.java:697) at org.apache.axis2.SVMHCServiceStub$PredictEpitopesResponse$Factory.parse(SVMHCServiceStub.java:791) at org.apache.axis2.SVMHCServiceStub.fromOM(SVMHCServiceStub.java:944) ... 2 more We think it looks like the numbers are integers... so there's no reason why the ConverterUtil should fail like this. We've logged a JIRA bug at http://issues.apache.org/jira/browse/AXIS2-782 and submitted all relevant files. Please let us know if there's anything we can do to help. -- Sebastian - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Help on creating a MessageElement
Hello! I need help on this! I am trying make an update operation on a web services. I used WSDL2Java to create TestCase class. The testcase class use a method taking in parameter two value, a string and a updateListItemsUpdates... wich is in fact a MessageElement binding.updateListItems(new java.lang.String(), new lists.ws.UpdateListItemsUpdates()); I am changing this line to put value in it and I wanna pass this: Method ID='1' Cmd='New' Field Name='Title'Family name/Field Field Name='FirstName'First Name/Field Field Name='Email'address/Field /Method as my second argument, but I have no idea how to put this in a MessageElement[]. In .NET I was using this and it was working perfectly: Dim xDoc As New System.Xml.XmlDocument Dim xBatch As System.Xml.XmlElement = xDoc.CreateElement("Batch") xBatch.SetAttribute("OnError", "Return") xBatch.InnerXml = "Method ID='1' Cmd='New'Field Name='Title'Last Name/FieldField Name='FirstName'First Name/FieldField Name='Email'address/Field/Method" Dim xReturn As System.Xml.XmlNode = oListWS.UpdateListItems("Contacts", xBatch) Any help would be greatly appreciated! Below is the complex type from my WSDL. s:element name="UpdateListItems" s:complexType s:sequence s:element minOccurs="0" maxOccurs="1" name="listName" type="s:string" / s:element minOccurs="0" maxOccurs="1" name="updates" s:complexType mixed="true" s:sequence s:any / /s:sequence /s:complexType /s:element /s:sequence /s:complexType /s:element Thanks!
[Axis2][Nightly May 30th] XMLBeans databinding still not working -- Classpath problem?
Hi there, Even after *days* of testing and trying different things, we still arrive at the same error with the current nightly (May 30th). We are using Eclipse to build and run our project under Windows XP. Did you ever try to run a client with xmlbeans under windows? How does the classpath have to look like? We always get a class not found exception whenever we DON'T include the xbeans-packaged.jar from the lib directory of the created client. We also have all the jars from the axis2/lib dir in the classpath. Is there anything we shouldn't do? The problem is logged as a JIRA: http://issues.apache.org/jira/browse/AXIS2-720 This is part of the stack trace: org.apache.axis2.AxisFault: Data binding error at org.apache.axis2.description.OutInAxisOperationClient.execute(OutInAxisOperation.java:287) at org.apache.axis2.TextLocServiceStub.predictLocalization(TextLocServiceStub.java:133) at org.apache.axis2.runLoc.main(runLoc.java:26) Caused by: java.lang.Exception: org.apache.axis2.AxisFault: Data binding error; nested exception is: java.lang.RuntimeException: Data binding error at org.apache.axis2.AxisFault.makeFault(AxisFault.java:318) at ... 21 more at org.apache.axis2.AxisFault.init(AxisFault.java:159) ... 3 more Any thoughts or experiences would be greatly appreciated. Out of desparation we now tried to use ADB instead, but found another bug there, see separate email. -- Sebastian - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Rude newbie question
I'm going to try and give some basic advice. Bounce some more questions to th list if you're still stuck Do you have JAVA_HOME etc defined in your .bashrc? Such as: JAVA_HOME=/usr/local/jdk1.5.0_03 JRE_HOME=/usr/local/jdk1.5.0_03/jre export JAVA_HOME JRE_HOME Once that's done, do: . .bashrc Then for testing... echo $JAVA_HOME You may not need JRE_HOME - i'd try without first. Also, tools.jar must be AFAIK only part of the bootloader classloader. I'd try taking your tools.jar out of all the other places. Try: locate tools.jar To know for sure. Also, its important to look carefully at the the files under tomcat/logs - you may find a clue there. Lastly, you may try looking at CATALINA_OPTS to see how to tweak the tomcat config. HTH, Robert http://www.braziloutsource.com/On 5/30/06, Michael Schwarz [EMAIL PROTECTED] wrote:Hello to the list.I just subscribed today and normally I lurk for a while when I join a group. Not today. I did do a mailing list archive search before askingthis question, but since I found nothing there, I'm just leaping right in.I'm doing something people might consider oddball. I'm trying to use the Sun-free java environment on Fedora Core 5 to run Axis. That means I'musing gcj as configured under Fedora Core 5.I've installed the Fedora 5 packages for tomcat5, tomcat5-webapps, axis,axis-manual, and axis-javadoc. I found it odd that the axis webapp wasn't included in these packages(axis must have a standalone mode?), so I downloaded axis1.2.1 (the Fedoraaxis package is version 1.2.1) and installed the webapp under my tomcat5 environment.I run happyaxis, and it is happy, with the only complaint being theabsence ofxmlsec.jar, which is not a required package.Any time I try to run a webservice (for example, clicking Call on the axis index page which results in going to this URL:http://localhost:8080/axis/EchoHeaders.jws?method=list) I get the following error: soapenv:Server.userException java.lang.RuntimeException: No compiler foundin your classpath! (you may need to add 'tools.jar')localhost.localdomainNow, tools.jar *is* in the classpath. It is also in the tomcat5 common dir and in the axis webapp/WEB-INF/lib dir.Let me tell you what else I have tried:1. Putting tools.jar on the -bootclasspath argument to the javainvocation of tomcat itsel. 2. I dug in to the Fedora javac script and found that it uses thecompiler class from eclipse(org.eclipse.jdt.internal.compiler.batch.Main), so I put that jar file inall the usual places and tried specifying that class as the value of the java.compiler and axis.Compiler system properties.None of these worked.I am within millimeters of having Axis work under FC5, I *know* I am, butI can't for the life of me figure out how to get my Axis webapp instance to find the java compiler! I don't pretend to be a tomcat expert. I duginto the scripts to find out how to do these things. You can, when comingup with suggestions, assume that I know shell scripts and generic Unix sysadmin fairly well, but tomcat and Axis admin hardly at all.I hope someone out there has an answer for me. In any case, hello to thegroup and thank you to the folks on the Axis project for their fine software!(BTW, my atom bomb solution is to give up on Fedora gcj java and usejpackage packages, but that is actually a royal pain -- which I hope Sun'srecent moves will make better. I want to give my client a more turnkey solution, an out of the box Fedora solution if possible.)Any help would be greatly appreciated!--Michael Schwarz- To unsubscribe, e-mail: [EMAIL PROTECTED]For additional commands, e-mail: [EMAIL PROTECTED]
Re: Rude newbie question
Thanks robert (and to the list). I have done all the things Robert suggests. The tools.jar file is in fact on my class path. The homes are set correctly. Interestingly, tomcat is able to compile .jsp files (or happyaxis.jsp would not work). But anything that actually involves a webservice (.jws) file, including examples that come with axis will not compile and in fact fail with the error from my original message. REMEMBER: I'm *not* using a real Java SDK at all! I'm not using Sun's or IBM's. I'm using the GCJ suite included with Fedora Core 5. Tomcat is working (compiling jsp's); axis is not (compiling jws's). -- Michael Schwarz I'm going to try and give some basic advice. Bounce some more questions to th list if you're still stuck Do you have JAVA_HOME etc defined in your .bashrc? Such as: JAVA_HOME=/usr/local/jdk1.5.0_03 JRE_HOME=/usr/local/jdk1.5.0_03/jre export JAVA_HOME JRE_HOME Once that's done, do: . .bashrc Then for testing... echo $JAVA_HOME You may not need JRE_HOME - i'd try without first. Also, tools.jar must be AFAIK only part of the bootloader classloader. I'd try taking your tools.jarout of all the other places. Try: locate tools.jar To know for sure. Also, its important to look carefully at the the files under tomcat/logs - you may find a clue there. Lastly, you may try looking at CATALINA_OPTS to see how to tweak the tomcat config. HTH, Robert http://www.braziloutsource.com/ - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Rude newbie question
Taking Robert's advice, I will post the stack trace from catalina.out: java.lang.RuntimeException: No compiler found in your classpath! (you may need to add 'tools.jar') at org.apache.axis.components.compiler.Javac.init (Javac.java:72) at java.lang.Class.newInstance (libgcj.so.7) at org.apache.commons.discovery.tools.ClassUtils.newInstance (ClassUtils.java:157) at org.apache.axis.AxisProperties$1.run (AxisProperties.java:183) at java.security.AccessController.doPrivileged (libgcj.so.7) at org.apache.axis.AxisProperties.newInstance (AxisProperties.java:166) at org.apache.axis.AxisProperties.newInstance (AxisProperties.java:160) at org.apache.axis.components.compiler.CompilerFactory.getCompiler (CompilerFactory.java:43) at org.apache.axis.handlers.JWSHandler.setupService (JWSHandler.java:193) at org.apache.axis.handlers.JWSHandler.invoke (JWSHandler.java:76) at org.apache.axis.strategies.InvocationStrategy.visit (InvocationStrategy.java:33) at org.apache.axis.SimpleChain.doVisiting (SimpleChain.java:119) at org.apache.axis.SimpleChain.invoke (SimpleChain.java:85) at org.apache.axis.server.AxisServer.invoke (AxisServer.java:258) at org.apache.axis.transport.http.QSMethodHandler.invokeEndpointFromGet (QSMethodHandler.java:132) at org.apache.axis.transport.http.QSMethodHandler.invoke (QSMethodHandler.java:97) at java.lang.reflect.Method.invoke (libgcj.so.7) at org.apache.axis.transport.http.AxisServlet.processQuery (AxisServlet.java:1217) at org.apache.axis.transport.http.AxisServlet.doGet (AxisServlet.java:249) at javax.servlet.http.HttpServlet.service (tomcat5-servlet-2.4-api-5.5.15.jar.so) at org.apache.axis.transport.http.AxisServletBase.service (AxisServletBase.java:330) at javax.servlet.http.HttpServlet.service (tomcat5-servlet-2.4-api-5.5.15.jar.so) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter (catalina.jar.so) at org.apache.catalina.core.ApplicationFilterChain.doFilter (catalina.jar.so) at org.apache.catalina.core.StandardWrapperValve.invoke (catalina.jar.so) at org.apache.catalina.core.StandardContextValve.invoke (catalina.jar.so) at org.apache.catalina.core.StandardHostValve.invoke (catalina.jar.so) at org.apache.catalina.valves.ErrorReportValve.invoke (catalina.jar.so) at org.apache.catalina.core.StandardEngineValve.invoke (catalina.jar.so) at org.apache.catalina.connector.CoyoteAdapter.service (catalina.jar.so) at org.apache.coyote.http11.Http11Processor.process (tomcat-http.jar.so) at org.apache.coyote.http11.Http11BaseProtocol$Http11ConnectionHandler.processConnection (tomcat-http.jar.so) at org.apache.tomcat.util.net.PoolTcpEndpoint.processSocket (tomcat-util.jar.so) at org.apache.tomcat.util.net.LeaderFollowerWorkerThread.runIt (tomcat-util.jar.so) at org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run (tomcat-util.jar.so) at java.lang.Thread.run (libgcj.so.7) I guess my next stop would have to be to grab the axis source tarball and see how it decides what class to call for a java compiler, because everything else in Fedora Core 5 calls the eclipse java compiler (which is ALSO on my classpath) -- Michael Schwarz Thanks robert (and to the list). I have done all the things Robert suggests. The tools.jar file is in fact on my class path. The homes are set correctly. Interestingly, tomcat is able to compile .jsp files (or happyaxis.jsp would not work). But anything that actually involves a webservice (.jws) file, including examples that come with axis will not compile and in fact fail with the error from my original message. REMEMBER: I'm *not* using a real Java SDK at all! I'm not using Sun's or IBM's. I'm using the GCJ suite included with Fedora Core 5. Tomcat is working (compiling jsp's); axis is not (compiling jws's). -- Michael Schwarz I'm going to try and give some basic advice. Bounce some more questions to th list if you're still stuck Do you have JAVA_HOME etc defined in your .bashrc? Such as: JAVA_HOME=/usr/local/jdk1.5.0_03 JRE_HOME=/usr/local/jdk1.5.0_03/jre export JAVA_HOME JRE_HOME Once that's done, do: . .bashrc Then for testing... echo $JAVA_HOME You may not need JRE_HOME - i'd try without first. Also, tools.jar must be AFAIK only part of the bootloader classloader. I'd try taking your tools.jarout of all the other places. Try: locate tools.jar To know for sure. Also, its important to look carefully at the the files under tomcat/logs - you may find a clue there. Lastly, you may try looking at CATALINA_OPTS to see how to tweak the tomcat config. HTH, Robert http://www.braziloutsource.com/ - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional
Re: Help on creating a MessageElement
On Tue, 2006-05-30 at 15:10 -0400, Mona Yazbeck wrote: Hello! I need help on this! I am trying make an update operation on a web services. I used WSDL2Java to create TestCase class. The testcase class use a method taking in parameter two value, a string and a updateListItemsUpdates... wich is in fact a MessageElement binding.updateListItems(new java.lang.String(), new lists.ws.UpdateListItemsUpdates()); I am changing this line to put value in it and I wanna pass this: Method ID='1' Cmd='New' Field Name='Title'Family name/Field Field Name='FirstName'First Name/Field Field Name='Email'address/Field /Method as my second argument, but I have no idea how to put this in a MessageElement[]. well, you can always try parsing your XML to DOM, then create a new MessageElement from the root document Element using the appropriate MessageElement constructor. I don't know if that suffices, though... regards, jaKa -- email: [EMAIL PROTECTED] w3:http://fish.homeunix.org/people/jaka - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: [Axis2] How to design a Java API that is both Java and web-service friendly?
Robert, Excellent points, I will look into each suggestion. Regarding item 1, do you know if this requires Mozilla's Rhino usage on the client? I am stuck with MS IE 6.x and later on the client, I wasnt clear if Rhino was a server only requirement or client server. Thanks much! -ch From: robert lazarski [mailto:[EMAIL PROTECTED] Sent: Tuesday, May 30, 2006 2:29 PM To: axis-user@ws.apache.org Subject: Re: [Axis2] How to design a Java API that is both Java and web-service friendly? I'll try and answer your questions to a point where you can start moving torwards a solution. Some of these I haven't tried yet but I know they exist: 1) For an axis2 _javascript_ service, take a look here: http://issues.apache.org/jira/browse/AXIS2-625?page=all 2) For registering a listener, using JMS as the transport might be what you're after though I haven't used axis2 with JMS. Axis2 supports JMS, and while I didn't find any docs where I thought they would be, there are unit tests in the source such as JMSEchoRawXMLTest . Dims may be able to comment more. 3) I typically use an adapter or a Spring service that sits in between the axis2 / web layer invokations to the business layer that provides the same glue between the layers. 4) WS-Addressing generates an UUID that can be used for session tracking, along with ServiceGroupContext. I often either generate a UUID and store it via EHCache, or use a stateful session bean to generate and expire an ID for me - but I'm strange like that ;-) . HTH, Robert http://www.braziloutsource.com/ On 5/30/06, Dave Hoffer [EMAIL PROTECTED] wrote: I have some POJO classes that I am designing were I will have both Java clients (using the classes directly thru jar) as well as clients accessing the code through a web-service API (the primary web-service client will be _javascript_/IE).Ideally (not required), I would like both API's to be the same.Here is the proposed Java API: public class Driver implements ISpotMeasurement { /** * This initiates the process of measuring and registers a listener for the measurement results. * * @param listener */ public void addSpotMeasurementListener(ISpotMeasurementListener listener) { } /** * This terminates the process of measuring and removes the registered listener. * * @param listener */ public void removeSpotMeasurementListener(ISpotMeasurementListener listener) { } /** * Enable the instrument to take a measurement now.The actual measurement may be delayed until the * user performs the physical measurement, in the case of instruments with shoe activated measurement. */ public void beginSpotMeasurement() { } } public interface ISpotMeasurementListener { public void onSpotMeasurement( double[] data, int statusCode ); } The client calls beginSpotMeasurement() asynchronously and the data is returned via the listener.This makes sense in the case of the Java application but can Axis2 web-services make this sort of an API?Can a web-service API register listeners?I definitely need state maintained on the server which I understand Axis2 supports; however is there a better way to implement this API for the web-service clients? What about _javascript_?What client proxies are available? I understand, as newbie, that Axis2 can generate synchronous and asynchronous method calls; how does this work given this API, given the _javascript_ client? Thanks, -dh - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: [Axis2] Generated element objects vs. business objects
Hi Tom, Another option is for to you to use the JiBX data binding option with Axis2. JiBX (http://www.jibx.org) lets you work with you existing data classes, while also providing extensive control over how these classes are converted to and from XML. The downside is that you have to create a binding definition file that tells JiBX how to do these conversions. There are tools to help in going from Java classes to a binding definition and then to the corresponding XML schema, but these are somewhat out of date - meaning they more or less work, but don't really take full advantage of current JiBX features. There's another tool that uses a schema to generate a set of Java classes and a corresponding binding definition, but that's even more out of date. I'll be working on improving these tools in June-July for a JiBX 1.2 release, which will also include integrating the code generation tool with WSDL2Java. Right now the WSDL2Java implementation of JiBX binding requires you to have the Java classes and a binding definition already created, and just links up the Axis2 code to your classes. I'm working on some improvements to the WSDL2Java handling now (unwrapping the top level structures to reduce the number of data classes), and once that's done I'll post some examples. You can view the existing Axis2-JiBX documentation at http://ws.apache.org/axis2/1_0/jibx/jibx-codegen-integration.html - Dennis Dennis M. Sosnoski SOA, Web Services, and XML Training and Consulting http://www.sosnoski.com - http://www.sosnoski.co.nz Seattle, WA +1-425-296-6194 - Wellington, NZ +64-4-298-6117 [EMAIL PROTECTED] wrote: Hi Rodrigo, This sure helps. Like you say, there are multiple ways of dealing with it, and it seems to be related to style, ease of implementation, and consistency of data. Each method has some pros and cons. I'll give it some more thought... Thanks, also to Robert Lazarski for his response. Tom Rodrigo Ruiz [EMAIL PROTECTED] wrote on 05/30/2006 02:39:31 PM: Hi Tom, There are some options more or less practical to get what you want. One is to replace your domain class with the generated one. This will probably mean moving the non-bean functionality in your domain Customer to another class, maybe something like CustomerHelper. Of course, this is not always possible, as you may have some internal fields in your domain class you want to keep there. Another option is to make your domain class to subclass the generated class, or include it as an internal field. Copying does not have to be so bad. If you have a fixed mapping between what you have in your domain classes and what you want to return as XML beans, you can implement the copying in a helper class. This will reduce the probability of an error. If you use the same names for your bean attributes in both classes, commons-beanutils maybe of help, as it provides some methods to perform conversions between bean classes. My own experience tells me that using the same object for internal and XML binding purposes is not always a good idea. If your service modifies the state of your domain objects, using them for serialization will probably result in incoherences in your returned data. Think about it. If you return your Customer, Axis 2 starts deserializing it to build the response, and in another request somebody changes some fields in the same object, the response may contain inconsistent data. Take into account that, once you release your object to Axis, you loose control over the transactionality of any operation on that instance. I am not saying this is the end of the world. This scenario might not be possible in your services, or even if possible, it may have little or no importance. But if you do need returned data to be consistent, copying field values into an XML bean may be the only way to get a valid snapshot of your data. Hope this helps, Rodrigo Ruiz [EMAIL PROTECTED] wrote: Hi, I'm struggling a bit with the following. Say, I have a web service that allows you to search for customers. It accepts a customer name, and returns a set (any number) of customers. The response xml may look like customerSearchResponse customer number123/number nameJohn Doe/name /customer customer number987/number nameJane Doe/name /customer /customerSearchResponse Obviously, in my application I have a Customer class. Now if I create a wsdl for this web service, and generate the server side code for it, one of the classes that is generated is a customer class, that represents the customer in the xml response. On the other hand, I have the Customer domain object, which is a different one. To generate the response, I have to create 'xml response' customers, and basically copy the information from the Customer class to it. The above
Re: Rude newbie question
Hi Michael, Apparently, after a quick look at the source code, Axis relies on an org.apache.axis.components.compiler.AbstractCompiler to perform the compilation. It turns out that there are currently only two concretisations of this: Javac (the default) and Jikes. From what I can see, the Jikes class calls an executable on the command line (not that I would recommend that), so it should be quite straightforward to adapt it to call gcj (well... in theory). However, I've done a few quick tests (outside Axis) and gcj doesn't seem to compile everything that Sun's javac handles yet (I'm using version 4.1.1 of gcj). Interfacing the Eclipse compiler might be a better bet. Presumably, it's also possible to have a org.apache.axis.components.compiler.EclipseCompiler that could call the compiler directly. I would expect an application such as Axis/Tomcat to gain a lot from a just-in-time compiler, so if you manage to have it running with gcj, some benchmarks would be really interesting. Regards, Bruno. Michael Schwarz wrote: Taking Robert's advice, I will post the stack trace from catalina.out: java.lang.RuntimeException: No compiler found in your classpath! (you may need to add 'tools.jar') at org.apache.axis.components.compiler.Javac.init (Javac.java:72) I guess my next stop would have to be to grab the axis source tarball and see how it decides what class to call for a java compiler, because everything else in Fedora Core 5 calls the eclipse java compiler (which is ALSO on my classpath) - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: [Axis2][Nightly May 30th] XMLBeans databinding still not working -- Classpath problem?
Sebastian, I just gave xmlbeans a run from the latest nightly, and its running fine here. I'm the one that actually filed axis2-649 , and it does seem to solve my problem. Here's some links to my test files, if you care to take a look: http://www.braziloutsource.com/random/SimpleServiceSkeleton.java http://www.braziloutsource.com/random/simple.aar http://www.braziloutsource.com/random/simple.wsdl http://www.braziloutsource.com/random/build.properties http://www.braziloutsource.com/random/build.xml My client looks like: package org; import simplens.types.*; import simplens.types.SimpleLoginDocument; import simplens.types.SimpleLoginDocument.*; import simplens.types.SimpleLoginResponseDocument; import simplens.types.SimpleLoginResponseDocument.*; import simplens.types.impl.*; import org.simple.endpoint.*; public class Tester { public static void main(String [] args) throws Exception { SimpleServiceStub stub = new SimpleServiceStub(); SimpleLogin simpleLogin = SimpleLogin.Factory.newInstance(); simpleLogin.setUserName(userName); simpleLogin.setUserPassword(password); SimpleLoginDocument simpleLoginDocument = SimpleLoginDocument.Factory.newInstance(); simpleLoginDocument.setSimpleLogin(simpleLogin); SimpleLoginResponseDocument simpleLoginResponseDocument = stub.simpleLogin(simpleLoginDocument); SimpleLoginResponse simpleLoginResponse = simpleLoginResponseDocument.getSimpleLoginResponse(); String session = simpleLoginResponse.getSoapSessionId(); String user = simpleLoginResponse.getWebUserName(); System.out.println(simpleLoginResponse, session: + session + , user: + user); } } Now you do state you're running windows. Actually, I'm a linux user. I really don't think this is your problem, but do take a look at my build.xml that I use if in doubt. Cheers, Robert On 5/30/06, Sebastian J. Schultheiss [EMAIL PROTECTED] wrote: Hi there,Even after *days* of testing and trying different things, we still arrive at thesame error with the current nightly (May 30th).We are using Eclipse to build and run our project under Windows XP. Did you ever try to run a client with xmlbeans under windows? How does the classpath have tolook like? We always get a class not found exception whenever we DON'T includethe xbeans-packaged.jar from the lib directory of the created client. We also have all the jars from the axis2/lib dir in the classpath. Is there anything weshouldn't do?The problem is logged as a JIRA:http://issues.apache.org/jira/browse/AXIS2-720 This is part of the stack trace:org.apache.axis2.AxisFault: Data binding erroratorg.apache.axis2.description.OutInAxisOperationClient.execute(OutInAxisOperation.java:287)atorg.apache.axis2.TextLocServiceStub.predictLocalization (TextLocServiceStub.java:133)at org.apache.axis2.runLoc.main(runLoc.java:26)Caused by: java.lang.Exception: org.apache.axis2.AxisFault: Data bindingerror; nested exception is:java.lang.RuntimeException : Data binding errorat org.apache.axis2.AxisFault.makeFault(AxisFault.java:318)at... 21 moreat org.apache.axis2.AxisFault.init(AxisFault.java:159)... 3 moreAny thoughts or experiences would be greatly appreciated. Out of desparation we now tried to use ADB instead, but found another bug there, see separate email.-- Sebastian-To unsubscribe, e-mail: [EMAIL PROTECTED]For additional commands, e-mail: [EMAIL PROTECTED] /** * SimpleServiceSkeleton.java * * This file was auto-generated from WSDL * by the Apache Axis2 version: 0.94 Jan 11, 2006 (08:01:58 LKT) */ package org.simple.endpoint; import simplens.types.*; import simplens.types.SimpleLoginResponseDocument; import simplens.types.SimpleLoginResponseDocument.*; import simplens.types.SimpleLoginDocument; import simplens.types.SimpleLoginDocument.*; /** * SimpleServiceSkeleton java skeleton for the axisService */ public class SimpleServiceSkeleton { /** * Auto generated method signature * @param param0 * @param SimpleLoginResponseDocument changed from param0 */ public SimpleLoginResponseDocument simpleLogin (simplens.types.SimpleLoginDocument simpleLoginDocument){ //Todo fill this with the necessary business logic SimpleLoginResponseDocument retDoc = SimpleLoginResponseDocument.Factory.newInstance(); SimpleLoginResponse retElement = SimpleLoginResponse.Factory.newInstance(); // Get parameters passed in SimpleLogin simpleLogin = simpleLoginDocument.getSimpleLogin(); String userName = simpleLogin.getUserName(); String password = simpleLogin.getUserPassword(); retElement.setWebUserName(userName); retElement.setSoapSessionId(my random string); System.out.println(validate retDoc: + retDoc.validate()); retDoc.setSimpleLoginResponse(retElement);
Can I use Axis-C for http transport?
Hi all, I found there were HTTPTransport.dll and HTTPChannel.dll in axis-c-1.6b-Win32-trace-bin\bin directory. My question is: Can I use Axis-C for http transport? e.g., like windows API URLDownloadToFile[1] or libcurl[2]? If Yes, how to do it? Is there any sample source code? Reference 1. http://msdn.microsoft.com/library/default.asp?url=/workshop/networking/moniker/reference/functions/urldownloadtofile.asp 2. http://curl.haxx.se/libcurl/ Thank you very much! Best Regards, Xie, Bo - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: [Axis2][Nightly May 30th] XMLBeans databinding still not working -- Classpath problem?
Hi Sebastian, Don't know why but, mystery is changing elementFormDefault=unqualified to elementFormDefault=qualified. I could manage to successfully run the code against the given WSDL with this change. I added my comments and test files to the http://issues.apache.org/jira/browse/AXIS2-720 Hope this helps. Ali Sadik Kumlali --- Sebastian J. Schultheiss [EMAIL PROTECTED] wrote: Hi there, Even after *days* of testing and trying different things, we still arrive at the same error with the current nightly (May 30th). We are using Eclipse to build and run our project under Windows XP. Did you ever try to run a client with xmlbeans under windows? How does the classpath have to look like? We always get a class not found exception whenever we DON'T include the xbeans-packaged.jar from the lib directory of the created client. We also have all the jars from the axis2/lib dir in the classpath. Is there anything we shouldn't do? The problem is logged as a JIRA: http://issues.apache.org/jira/browse/AXIS2-720 This is part of the stack trace: org.apache.axis2.AxisFault: Data binding error at org.apache.axis2.description.OutInAxisOperationClient.execute(OutInAxisOperation.java:287) at org.apache.axis2.TextLocServiceStub.predictLocalization(TextLocServiceStub.java:133) at org.apache.axis2.runLoc.main(runLoc.java:26) Caused by: java.lang.Exception: org.apache.axis2.AxisFault: Data binding error; nested exception is: java.lang.RuntimeException: Data binding error at org.apache.axis2.AxisFault.makeFault(AxisFault.java:318) at ... 21 more at org.apache.axis2.AxisFault.init(AxisFault.java:159) ... 3 more Any thoughts or experiences would be greatly appreciated. Out of desparation we now tried to use ADB instead, but found another bug there, see separate email. -- Sebastian - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] __ 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]
WSDL2Java generates code but fails compile
Hello, I have created a WSDL file (see below), and I am trying to generate and compile java code for my web service. I can generate code, but ant build fails with complains about org.apache.axiom.om.OMelement. The errors are about the method newXMLStreamReader() and variable Factory within this interface. Specifically, I am trying to add a custom soap header in my request and response. I noticed a mail from Davanum Srinivas for a similar problem to make it a JIRA, but I don't know what JIRA is :-) I appreciate any insights/alternatives. Thanks, Bhaskar I use JDK1.5.03, Axis2-std-1.0-bin and ant 1.6.5 on a windows XP professional. My wsdl: ---sample-address.wsdl- ?xml version=1.0 encoding=UTF-8? wsdl:definitions xmlns:soap=http://schemas.xmlsoap.org/wsdl/soap/; xmlns:tns=http://foo.bar/service; xmlns:wsdl=http://schemas.xmlsoap.org/wsdl/; xmlns:xsd=http://www.w3.org/2001/XMLSchema; name=TtsSgsTitleTransfer targetNamespace=http://foo.bar/service; wsdl:types xsd:schema targetNamespace=http://foo.bar/service; xmlns:xsd=http://www.w3.org/2001/XMLSchema; xmlns:tns=http://foo.bar/service; xmlns=http://foo.bar/service; xsd:simpleType name=AddressLineType xsd:restriction base=xsd:string xsd:maxLength value=50/ /xsd:restriction /xsd:simpleType xsd:simpleType name=CityType xsd:restriction base=xsd:string xsd:maxLength value=25/ /xsd:restriction /xsd:simpleType xsd:simpleType name=StateType xsd:restriction base=xsd:string xsd:maxLength value=2/ /xsd:restriction /xsd:simpleType xsd:simpleType name=ZIPType xsd:restriction base=xsd:string xsd:maxLength value=12/ /xsd:restriction /xsd:simpleType xsd:simpleType name=CountryType xsd:restriction base=xsd:string xsd:maxLength value=3/ /xsd:restriction /xsd:simpleType xsd:complexType name=AddressType xsd:sequence xsd:element name=line1 type=tns:AddressLineType/ xsd:element name=line2 type=tns:AddressLineType minOccurs=0/ xsd:element name=city type=tns:CityType/ xsd:element name=state type=tns:StateType/ xsd:element name=zip type=tns:ZIPType/ xsd:element name=country type=tns:CountryType default=USA minOccurs=0/ /xsd:sequence /xsd:complexType xsd:complexType name=ResponseType xsd:sequence xsd:element name=transmissionId type=xsd:string/ xsd:element name=success type=xsd:string/ xsd:element name=errorMessage type=xsd:string/ /xsd:sequence /xsd:complexType xsd:complexType name=HeaderType xsd:sequence xsd:element name=clientId type=xsd:string/ /xsd:sequence /xsd:complexType xsd:element name=updateAddressResponseElement type=tns:ResponseType/ xsd:element name=updateAddressRequestElement type=tns:AddressType/ xsd:element name=updateAddressResponseHeader type=tns:HeaderType/ xsd:element name=updateAddressRequestHeader type=tns:HeaderType/ /xsd:schema /wsdl:types wsdl:message name=updateAddressRequest wsdl:part element=tns:updateAddressRequestElement name=addressRequest / wsdl:part name=updateAddressRequestHeader element=tns:updateAddressRequestHeader / /wsdl:message wsdl:message name=updateAddressResponse wsdl:part element=tns:updateAddressResponseElement name=addressResponse / wsdl:part name=updateAddressResponseHeader element=tns:updateAddressResponseHeader / /wsdl:message wsdl:portType name=AddressPort wsdl:operation name=updateAddress wsdl:input name=updateAddressRequest message=tns:updateAddressRequest / wsdl:output name=updateAddressResponse message=tns:updateAddressResponse / /wsdl:operation /wsdl:portType wsdl:binding name=addressBinding type=tns:AddressPort soap:binding style=document transport=http://schemas.xmlsoap.org/soap/http; / wsdl:operation name=updateAddress soap:operation soapAction= / wsdl:input soap:header message=tns:updateAddressRequest part=updateAddressRequestHeader use=literal/ soap:body use=literal parts=addressRequest / /wsdl:input wsdl:output soap:header message=tns:updateAddressResponse part=updateAddressResponseHeader use=literal/ soap:body use=literal parts=addressResponse / /wsdl:output /wsdl:operation /wsdl:binding wsdl:service name=AddressService wsdl:port name=SOAPPort binding=tns:addressBinding soap:address location=http://localhost:8080/AddressService; / /wsdl:port /wsdl:service
Re: WSDL2Java generates code but fails compile
I tested your wsdl and it's failing here too with the nightly build ... so to file a jira, go here: http://issues.apache.org/jira/ And create an account. Then create the issue under axis2, and follup up by uploading your wsdl . Robert http://www.braziloutsource.com/On 5/30/06, B R [EMAIL PROTECTED] wrote:Hello,I have created a WSDL file (see below), and I am trying to generate and compile java code for my web service. I can generate code, but antbuild fails with complains about org.apache.axiom.om.OMelement. Theerrors are about the method newXMLStreamReader() and variable Factory within this interface.Specifically, I am trying to add a custom soap header in my requestand response.I noticed a mail from Davanum Srinivas for a similar problem to makeit a JIRA, but I don't know what JIRA is :-) I appreciate any insights/alternatives.Thanks,BhaskarI use JDK1.5.03, Axis2-std-1.0-bin and ant 1.6.5 on a windows XP professional.My wsdl:---sample-address.wsdl- ?xml version=1.0 encoding=UTF-8?wsdl:definitions xmlns:soap=http://schemas.xmlsoap.org/wsdl/soap/xmlns:tns= http://foo.bar/servicexmlns:wsdl=http://schemas.xmlsoap.org/wsdl/xmlns:xsd= http://www.w3.org/2001/XMLSchema name=TtsSgsTitleTransfertargetNamespace=http://foo.bar/service wsdl:types xsd:schema targetNamespace= http://foo.bar/service xmlns:xsd=http://www.w3.org/2001/XMLSchema xmlns:tns= http://foo.bar/service xmlns=http://foo.bar/service xsd:simpleType name=AddressLineTypexsd:restriction base=xsd:string xsd:maxLength value=50//xsd:restriction /xsd:simpleType xsd:simpleType name=CityTypexsd:restriction base=xsd:string xsd:maxLength value=25//xsd:restriction /xsd:simpleType xsd:simpleType name=StateTypexsd:restriction base=xsd:string xsd:maxLength value=2//xsd:restriction /xsd:simpleType xsd:simpleType name=ZIPTypexsd:restriction base=xsd:string xsd:maxLength value=12//xsd:restriction /xsd:simpleType xsd:simpleType name=CountryTypexsd:restriction base=xsd:string xsd:maxLength value=3//xsd:restriction /xsd:simpleType xsd:complexType name=AddressTypexsd:sequence xsd:element name=line1 type=tns:AddressLineType/ xsd:element name=line2 type=tns:AddressLineTypeminOccurs=0/ xsd:element name=city type=tns:CityType/ xsd:element name=state type=tns:StateType/ xsd:element name=zip type=tns:ZIPType/ xsd:element name=country type=tns:CountryTypedefault=USA minOccurs=0//xsd:sequence /xsd:complexType xsd:complexType name=ResponseType xsd:sequence xsd:element name=transmissionId type=xsd:string/ xsd:element name=success type=xsd:string/ xsd:element name=errorMessage type=xsd:string//xsd:sequence /xsd:complexType xsd:complexType name=HeaderType xsd:sequence xsd:element name=clientId type=xsd:string//xsd:sequence /xsd:complexType xsd:element name=updateAddressResponseElement type=tns:ResponseType/ xsd:element name=updateAddressRequestElementtype=tns:AddressType/ xsd:element name=updateAddressResponseHeader type=tns:HeaderType/ xsd:element name=updateAddressRequestHeader type=tns:HeaderType//xsd:schema /wsdl:types wsdl:message name=updateAddressRequest wsdl:part element=tns:updateAddressRequestElementname=addressRequest /wsdl:part name=updateAddressRequestHeaderelement=tns:updateAddressRequestHeader / /wsdl:message wsdl:message name=updateAddressResponsewsdl:part element=tns:updateAddressResponseElementname=addressResponse /wsdl:part name=updateAddressResponseHeader element=tns:updateAddressResponseHeader / /wsdl:message wsdl:portType name=AddressPortwsdl:operation name=updateAddress wsdl:input name=updateAddressRequest message=tns:updateAddressRequest / wsdl:output name=updateAddressResponsemessage=tns:updateAddressResponse //wsdl:operation /wsdl:portType wsdl:binding name=addressBinding type=tns:AddressPortsoap:binding style=documenttransport=http://schemas.xmlsoap.org/soap/http /wsdl:operation name=updateAddress soap:operation soapAction= / wsdl:input soap:header message=tns:updateAddressRequest part=updateAddressRequestHeader use=literal/ soap:body use=literal parts=addressRequest / /wsdl:input wsdl:output soap:header message=tns:updateAddressResponsepart=updateAddressResponseHeader use=literal/soap:body use=literal parts=addressResponse / /wsdl:output/wsdl:operation /wsdl:binding wsdl:service name=AddressService wsdl:port name=SOAPPortbinding=tns:addressBinding soap:address location=http://localhost:8080/AddressService //wsdl:port /wsdl:service/wsdl:definitions---My stack trace on compile error: --C:\devtools\axis2-std-1.0-bin\samples\wsdlWSDL2Java -urisample-address.wsdl -sd -s -ss -d xmlbeans -p test.address -oaddress_srcUsing AXIS2_HOME: c:\devtools\axis2- std-1.0-binUsing JAVA_HOME:C:\devtools\jdk1.5.0_03log4j:WARN No appenders could be found for
Re: WSDL2Java generates code but fails compile
Thanks, Robert. Will do that. Are there any alternatives to create custom headers? Bhaskar On 5/30/06, robert lazarski [EMAIL PROTECTED] wrote: I tested your wsdl and it's failing here too with the nightly build ... so to file a jira, go here: http://issues.apache.org/jira/ And create an account. Then create the issue under axis2, and follup up by uploading your wsdl . Robert http://www.braziloutsource.com/ On 5/30/06, B R [EMAIL PROTECTED] wrote: Hello, I have created a WSDL file (see below), and I am trying to generate and compile java code for my web service. I can generate code, but ant build fails with complains about org.apache.axiom.om.OMelement. The errors are about the method newXMLStreamReader() and variable Factory within this interface. Specifically, I am trying to add a custom soap header in my request and response. I noticed a mail from Davanum Srinivas for a similar problem to make it a JIRA, but I don't know what JIRA is :-) I appreciate any insights/alternatives. Thanks, Bhaskar I use JDK1.5.03, Axis2-std-1.0-bin and ant 1.6.5 on a windows XP professional. My wsdl: ---sample-address.wsdl- ?xml version=1.0 encoding=UTF-8? wsdl:definitions xmlns:soap=http://schemas.xmlsoap.org/wsdl/soap/; xmlns:tns= http://foo.bar/service; xmlns:wsdl=http://schemas.xmlsoap.org/wsdl/; xmlns:xsd= http://www.w3.org/2001/XMLSchema; name=TtsSgsTitleTransfer targetNamespace=http://foo.bar/service; wsdl:types xsd:schema targetNamespace= http://foo.bar/service; xmlns:xsd=http://www.w3.org/2001/XMLSchema; xmlns:tns= http://foo.bar/service; xmlns=http://foo.bar/service; xsd:simpleType name=AddressLineType xsd:restriction base=xsd:string xsd:maxLength value=50/ /xsd:restriction /xsd:simpleType xsd:simpleType name=CityType xsd:restriction base=xsd:string xsd:maxLength value=25/ /xsd:restriction /xsd:simpleType xsd:simpleType name=StateType xsd:restriction base=xsd:string xsd:maxLength value=2/ /xsd:restriction /xsd:simpleType xsd:simpleType name=ZIPType xsd:restriction base=xsd:string xsd:maxLength value=12/ /xsd:restriction /xsd:simpleType xsd:simpleType name=CountryType xsd:restriction base=xsd:string xsd:maxLength value=3/ /xsd:restriction /xsd:simpleType xsd:complexType name=AddressType xsd:sequence xsd:element name=line1 type=tns:AddressLineType/ xsd:element name=line2 type=tns:AddressLineType minOccurs=0/ xsd:element name=city type=tns:CityType/ xsd:element name=state type=tns:StateType/ xsd:element name=zip type=tns:ZIPType/ xsd:element name=country type=tns:CountryType default=USA minOccurs=0/ /xsd:sequence /xsd:complexType xsd:complexType name=ResponseType xsd:sequence xsd:element name=transmissionId type=xsd:string/ xsd:element name=success type=xsd:string/ xsd:element name=errorMessage type=xsd:string/ /xsd:sequence /xsd:complexType xsd:complexType name=HeaderType xsd:sequence xsd:element name=clientId type=xsd:string/ /xsd:sequence /xsd:complexType xsd:element name=updateAddressResponseElement type=tns:ResponseType/ xsd:element name=updateAddressRequestElement type=tns:AddressType/ xsd:element name=updateAddressResponseHeader type=tns:HeaderType/ xsd:element name=updateAddressRequestHeader type=tns:HeaderType/ /xsd:schema /wsdl:types wsdl:message name=updateAddressRequest wsdl:part element=tns:updateAddressRequestElement name=addressRequest / wsdl:part name=updateAddressRequestHeader element=tns:updateAddressRequestHeader / /wsdl:message wsdl:message name=updateAddressResponse wsdl:part element=tns:updateAddressResponseElement name=addressResponse / wsdl:part name=updateAddressResponseHeader element=tns:updateAddressResponseHeader / /wsdl:message wsdl:portType name=AddressPort wsdl:operation name=updateAddress wsdl:input name=updateAddressRequest message=tns:updateAddressRequest / wsdl:output name=updateAddressResponse message=tns:updateAddressResponse / /wsdl:operation /wsdl:portType wsdl:binding name=addressBinding type=tns:AddressPort soap:binding style=document transport=http://schemas.xmlsoap.org/soap/http / wsdl:operation name=updateAddress soap:operation soapAction= / wsdl:input soap:header message=tns:updateAddressRequest
Re: WSDL2Java generates code but fails compile
The only one I know of is by code ... ServiceClient.addHeader() - or in a handler of course but basically the same idea. HTH, Robert http://www.braziloutsource.com/ On 5/30/06, B R [EMAIL PROTECTED] wrote: Thanks, Robert. Will do that.Are there any alternatives to create custom headers?BhaskarOn 5/30/06, robert lazarski [EMAIL PROTECTED] wrote: I tested your wsdl and it's failing here too with the nightly build ... so to file a jira, go here:http://issues.apache.org/jira/ And create an account. Then create the issue under axis2, and follup up by uploading your wsdl .Roberthttp://www.braziloutsource.com/ On 5/30/06, B R [EMAIL PROTECTED] wrote: Hello, I have created a WSDL file (see below), and I am trying to generate and compile java code for my web service. I can generate code, but ant build fails with complains about org.apache.axiom.om.OMelement. The errors are about the method newXMLStreamReader() and variable Factory within this interface. Specifically, I am trying to add a custom soap header in my request and response. I noticed a mail from Davanum Srinivas for a similar problem to make it a JIRA, but I don't know what JIRA is :-) I appreciate any insights/alternatives. Thanks, Bhaskar I use JDK1.5.03, Axis2-std-1.0-bin and ant 1.6.5 on a windows XP professional. My wsdl: ---sample-address.wsdl- ?xml version=1.0 encoding=UTF-8? wsdl:definitions xmlns:soap=http://schemas.xmlsoap.org/wsdl/soap/ xmlns:tns= http://foo.bar/service xmlns:wsdl=http://schemas.xmlsoap.org/wsdl/ xmlns:xsd= http://www.w3.org/2001/XMLSchema name=TtsSgsTitleTransfer targetNamespace=http://foo.bar/servicewsdl:typesxsd:schema targetNamespace= http://foo.bar/servicexmlns:xsd=http://www.w3.org/2001/XMLSchemaxmlns:tns= http://foo.bar/servicexmlns=http://foo.bar/service xsd:simpleType name=AddressLineType xsd:restriction base=xsd:string xsd:maxLength value=50/ /xsd:restriction/xsd:simpleTypexsd:simpleType name=CityType xsd:restriction base=xsd:string xsd:maxLength value=25/ /xsd:restriction/xsd:simpleTypexsd:simpleType name=StateType xsd:restriction base=xsd:string xsd:maxLength value=2/ /xsd:restriction/xsd:simpleTypexsd:simpleType name=ZIPType xsd:restriction base=xsd:string xsd:maxLength value=12/ /xsd:restriction/xsd:simpleTypexsd:simpleType name=CountryType xsd:restriction base=xsd:string xsd:maxLength value=3/ /xsd:restriction/xsd:simpleTypexsd:complexType name=AddressType xsd:sequence xsd:element name=line1 type=tns:AddressLineType/xsd:element name=line2 type=tns:AddressLineType minOccurs=0/xsd:element name=city type=tns:CityType/xsd:element name=state type=tns:StateType/xsd:element name=zip type=tns:ZIPType/xsd:element name=country type=tns:CountryType default=USA minOccurs=0/ /xsd:sequence/xsd:complexType xsd:complexType name=ResponseType xsd:sequencexsd:element name=transmissionId type=xsd:string/xsd:element name=success type=xsd:string/xsd:element name=errorMessage type=xsd:string/ /xsd:sequence/xsd:complexTypexsd:complexType name=HeaderType xsd:sequencexsd:element name=clientId type=xsd:string/ /xsd:sequence/xsd:complexTypexsd:element name=updateAddressResponseElement type=tns:ResponseType/xsd:element name=updateAddressRequestElement type=tns:AddressType/xsd:element name=updateAddressResponseHeader type=tns:HeaderType/xsd:element name=updateAddressRequestHeader type=tns:HeaderType/ /xsd:schema/wsdl:types wsdl:message name=updateAddressRequest wsdl:part element=tns:updateAddressRequestElement name=addressRequest / wsdl:part name=updateAddressRequestHeader element=tns:updateAddressRequestHeader //wsdl:messagewsdl:message name=updateAddressResponse wsdl:part element=tns:updateAddressResponseElement name=addressResponse / wsdl:part name=updateAddressResponseHeader element=tns:updateAddressResponseHeader //wsdl:message wsdl:portType name=AddressPort wsdl:operation name=updateAddresswsdl:input name=updateAddressRequest message=tns:updateAddressRequest / wsdl:output name=updateAddressResponse message=tns:updateAddressResponse / /wsdl:operation/wsdl:portTypewsdl:binding name=addressBinding type=tns:AddressPort soap:binding style=document transport=http://schemas.xmlsoap.org/soap/http / wsdl:operation name=updateAddress soap:operation soapAction= /wsdl:inputsoap:header message=tns:updateAddressRequest part=updateAddressRequestHeader use=literal/ soap:body use=literal parts=addressRequest //wsdl:inputwsdl:output soap:header message=tns:updateAddressResponse part=updateAddressResponseHeader use=literal/ soap:body use=literal parts=addressResponse //wsdl:output /wsdl:operation/wsdl:bindingwsdl:service name=AddressService wsdl:port name=SOAPPort binding=tns:addressBindingsoap:address location=http://localhost:8080/AddressService / /wsdl:port /wsdl:service /wsdl:definitions --- My stack trace on compile error:
Re: WSDL2Java generates code but fails compile
Created JIRA (key: AXIS2-784) as a bug. Please let me know if any more info is needed. Thanks, Bhaskar On 5/30/06, B R [EMAIL PROTECTED] wrote: Thanks, Robert. Will do that. Are there any alternatives to create custom headers? Bhaskar On 5/30/06, robert lazarski [EMAIL PROTECTED] wrote: I tested your wsdl and it's failing here too with the nightly build ... so to file a jira, go here: http://issues.apache.org/jira/ And create an account. Then create the issue under axis2, and follup up by uploading your wsdl . Robert http://www.braziloutsource.com/ On 5/30/06, B R [EMAIL PROTECTED] wrote: Hello, I have created a WSDL file (see below), and I am trying to generate and compile java code for my web service. I can generate code, but ant build fails with complains about org.apache.axiom.om.OMelement. The errors are about the method newXMLStreamReader() and variable Factory within this interface. Specifically, I am trying to add a custom soap header in my request and response. I noticed a mail from Davanum Srinivas for a similar problem to make it a JIRA, but I don't know what JIRA is :-) I appreciate any insights/alternatives. Thanks, Bhaskar I use JDK1.5.03, Axis2-std-1.0-bin and ant 1.6.5 on a windows XP professional. My wsdl: ---sample-address.wsdl- ?xml version=1.0 encoding=UTF-8? wsdl:definitions xmlns:soap=http://schemas.xmlsoap.org/wsdl/soap/; xmlns:tns= http://foo.bar/service; xmlns:wsdl=http://schemas.xmlsoap.org/wsdl/; xmlns:xsd= http://www.w3.org/2001/XMLSchema; name=TtsSgsTitleTransfer targetNamespace=http://foo.bar/service; wsdl:types xsd:schema targetNamespace= http://foo.bar/service; xmlns:xsd=http://www.w3.org/2001/XMLSchema; xmlns:tns= http://foo.bar/service; xmlns=http://foo.bar/service; xsd:simpleType name=AddressLineType xsd:restriction base=xsd:string xsd:maxLength value=50/ /xsd:restriction /xsd:simpleType xsd:simpleType name=CityType xsd:restriction base=xsd:string xsd:maxLength value=25/ /xsd:restriction /xsd:simpleType xsd:simpleType name=StateType xsd:restriction base=xsd:string xsd:maxLength value=2/ /xsd:restriction /xsd:simpleType xsd:simpleType name=ZIPType xsd:restriction base=xsd:string xsd:maxLength value=12/ /xsd:restriction /xsd:simpleType xsd:simpleType name=CountryType xsd:restriction base=xsd:string xsd:maxLength value=3/ /xsd:restriction /xsd:simpleType xsd:complexType name=AddressType xsd:sequence xsd:element name=line1 type=tns:AddressLineType/ xsd:element name=line2 type=tns:AddressLineType minOccurs=0/ xsd:element name=city type=tns:CityType/ xsd:element name=state type=tns:StateType/ xsd:element name=zip type=tns:ZIPType/ xsd:element name=country type=tns:CountryType default=USA minOccurs=0/ /xsd:sequence /xsd:complexType xsd:complexType name=ResponseType xsd:sequence xsd:element name=transmissionId type=xsd:string/ xsd:element name=success type=xsd:string/ xsd:element name=errorMessage type=xsd:string/ /xsd:sequence /xsd:complexType xsd:complexType name=HeaderType xsd:sequence xsd:element name=clientId type=xsd:string/ /xsd:sequence /xsd:complexType xsd:element name=updateAddressResponseElement type=tns:ResponseType/ xsd:element name=updateAddressRequestElement type=tns:AddressType/ xsd:element name=updateAddressResponseHeader type=tns:HeaderType/ xsd:element name=updateAddressRequestHeader type=tns:HeaderType/ /xsd:schema /wsdl:types wsdl:message name=updateAddressRequest wsdl:part element=tns:updateAddressRequestElement name=addressRequest / wsdl:part name=updateAddressRequestHeader element=tns:updateAddressRequestHeader / /wsdl:message wsdl:message name=updateAddressResponse wsdl:part element=tns:updateAddressResponseElement name=addressResponse / wsdl:part name=updateAddressResponseHeader element=tns:updateAddressResponseHeader / /wsdl:message wsdl:portType name=AddressPort wsdl:operation name=updateAddress wsdl:input name=updateAddressRequest message=tns:updateAddressRequest / wsdl:output name=updateAddressResponse message=tns:updateAddressResponse / /wsdl:operation /wsdl:portType wsdl:binding name=addressBinding
Re: [Axis2] Best way to use skeleton?
[EMAIL PROTECTED] wrote: Hi, When I generate the server-side code from my wsdl, using wsdl2java, a skeleton class is generated that gets invoked by the (generated) MessageReceiver. From what I read, I understand that I'm supposed to implement my busines logic in the skeleton. But if I would do that, and for whatever reason re-run the wsdl2java, the skeleton is regenerated, hence by business logic implementation is gone! To me, it seems that in general, one should never manually change generated source code. The skeleton is created for your convienience. It will not overwrite the implementation source code and you will receive a message to indicate that. The only thing I can think of to minimise this problem is to treat the skeleton as an entry point, and only call the 'real' business imlementation, that I've created myself. However you would then typically end up with a skeleton and an implementation class that have identical methods (signatures), which doesn't seem very elegant to me. One is an interface and the other is concrete, this is standard oo remoting practice. Can't this be prevented somehow, e.g. by specifying the (existing) business class and method when invoking wsdl2java, so that the MessageReceiver will call that method, instead of calling the generated skeleton? That would be nice, but at the moment i just use copy in my build file. Crude but effective. Thanks, Tom - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Fw: MTOM Example
Hi, Can anyone else help with this? Thanks Jim - Original Message - From: Jim Collins To: [EMAIL PROTECTED] Sent: Monday, May 29, 2006 7:53 PM Subject: MTOM Example Hi Anne, I have been trying to use MTOM with generated code but I am having no luck. I can send adocument using the AXIS2API but when I try and send the file using the generated Stub it sends the attachment in line within the body. Could you please send an example of MTOM using generated code from a WSDL file. Every example I have seen uses the AXIS API. Many thanks, Jim
Re: Problem with WSDL2Java with HTTP POST
What is the wsdl2java command look like exactley? I can't believe google didn't know the answer ;-( I would expect the wsdl to look like.. wsdl:input name=mensajesencillo wsdlsoap:body use=encoded encodingStyle=http://schemas.xmlsoap.org/soap/encoding/; namespace=urn:http://sencillo/ /wsdl:input why does it not? And it's not a void interface it's just empty or with no members � wrote: I'm trying to create a stub from .wsdl that i had created where the binding is POST and when i executed the wsdl2java command i get an void interface. Why? I had been to search in google and i haven't anything. Thanks in advance. WSDL ?xml version=1.0 encoding=UTF-8? wsdl:definitions xmlns:http=http://schemas.xmlsoap.org/wsdl/http/; xmlns:soap=http://schemas.xmlsoap.org/wsdl/soap/; xmlns:s=http://www.w3.org/2001/XMLSchema; xmlns:soapenc=http://schemas.xmlsoap.org/soap/encoding/; xmlns:tns=http://sencillo; xmlns:tm=http://microsoft.com/wsdl/mime/textMatching/; xmlns:mime=http://schemas.xmlsoap.org/wsdl/mime/; xmlns:wsdl=http://schemas.xmlsoap.org/wsdl/; targetNamespace=http://sencillo; wsdl:message name=mensajesencillo wsdl:part name=Email type=s:string/ wsdl:part name=ServiceName type=s:string/ wsdl:part name=OperationName type=s:string/ /wsdl:message wsdl:portType name=SencilloHttp_Post wsdl:operation name=operacionsencilla wsdl:input message=tns:mensajesencillo/ /wsdl:operation /wsdl:portType wsdl:binding name=SencilloHttp_Post type=tns:SencilloHttp_Post http:binding verb=POST/ wsdl:operation name=operacionsencilla http:operation location=operacionsencilla/ wsdl:input mime:mimeXml part=Body/ /wsdl:input /wsdl:operation /wsdl:binding wsdl:service name=WSDLTester wsdl:port name=SencilloHttp_Post binding=tns:SencilloHttp_Post http:address location=http://192.168.153.100:8080/appProxyAmadeus/servlet/svlProxyAmadeus/ /wsdl:port /wsdl:service /wsdl:definitions INTERFACE package sencillo; public interface WSDLTester extends javax.xml.rpc.Service { } - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Problem with code generated by WSDL2Code
use adb databinding instread of xmlbeans java classname=org.apache.axis2.wsdl.WSDL2Java arg value=-uri/ arg value=callback_endpoint.wsdl/ arg value=-ss/ arg value=-sd/ arg value=-d/ arg value=adb/ arg value=-o/ arg value=callback_endpoint_service/ arg value=-t/ arg value=-p/ arg value=au.com.nec.ssd.rfid.ws/ classpath fileset dir=${axis2.home}/lib includes=*.jar / /classpath /java For some reason the code is bungholeio. Martin Gainty wrote: Good Monring In 1.3 the name of the code generator is WSDL2Java Here is the example I use java -classpath $CLASSPATH. org.apache.axis.wsdl.WSDL2Java NameOfService.wsdl Martin -- * This email message and any files transmitted with it contain confidential information intended only for the person(s) to whom this email message is addressed. If you have received this email message in error, please notify the sender immediately by telephone or email and destroy the original message without making a copy. Thank you. - Original Message - From: Paul Gonchar [EMAIL PROTECTED] To: axis-user@ws.apache.org Sent: Thursday, May 25, 2006 6:47 PM Subject: Problem with code generated by WSDL2Code Hi guys, I've just started using Axis2. I need to generate server skeletons. I used the following command: call WSDL2Code.bat -uri C:\project\cvs\gazoo\src\share\xml\webservice\userprofile\ver2.0\userProfile.wsdl -ss -sd -d adb -p com.test.generated -o output/server and I got a bunch of generated code that can't be compiled. I've noticed things like calls to org.apache.axis2.databinding.utils.ConverterUtil.convertToToken(content) (there is no method convertToToken in ConverterUtil) which may be fixed by replacing convertToToken with convertTotoken The same thing with org.apache.axis2.databinding.utils.ConverterUtil.convertToCalendar(content) - must be replaced with convertTodateTime Finally I got into problem I can't fix : private java.lang.Object fromOM( org.apache.axiom.om.OMElement param, java.lang.Class type, java.util.Map extraNamespaces) { try { if (org.apache.axiom.om.OMElement.class.equals(type)){ return org.apache.axiom.om.OMElement.Factory.parse(param.getXMLStreamReaderWithoutCaching()); } } catch (Exception e) { throw new RuntimeException(e); } return null; } The problem is in line org.apache.axiom.om.OMElement.Factory - there is no variable Factory in class OMElement. Am i doing something wrong or Axis2 is indeed that buggy? Thanks! Paul Gonchar __ 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] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Problem with code generated by WSDL2Code
Good Evening Warren What is bungholeio? Martin - This email message and any files transmitted with it contain confidential information intended only for the person(s) to whom this email message is addressed. If you have received this email message in error, please notify the sender immediately by telephone or email and destroy the original message without making a copy. Thank you. - Original Message - From: Warren Crossing [EMAIL PROTECTED] To: axis-user@ws.apache.org Sent: Tuesday, May 30, 2006 7:07 PM Subject: Re: Problem with code generated by WSDL2Code use adb databinding instread of xmlbeans java classname=org.apache.axis2.wsdl.WSDL2Java arg value=-uri/ arg value=callback_endpoint.wsdl/ arg value=-ss/ arg value=-sd/ arg value=-d/ arg value=adb/ arg value=-o/ arg value=callback_endpoint_service/ arg value=-t/ arg value=-p/ arg value=au.com.nec.ssd.rfid.ws/ classpath fileset dir=${axis2.home}/lib includes=*.jar / /classpath /java For some reason the code is bungholeio. Martin Gainty wrote: Good Monring In 1.3 the name of the code generator is WSDL2Java Here is the example I use java -classpath $CLASSPATH. org.apache.axis.wsdl.WSDL2Java NameOfService.wsdl Martin -- * This email message and any files transmitted with it contain confidential information intended only for the person(s) to whom this email message is addressed. If you have received this email message in error, please notify the sender immediately by telephone or email and destroy the original message without making a copy. Thank you. - Original Message - From: Paul Gonchar [EMAIL PROTECTED] To: axis-user@ws.apache.org Sent: Thursday, May 25, 2006 6:47 PM Subject: Problem with code generated by WSDL2Code Hi guys, I've just started using Axis2. I need to generate server skeletons. I used the following command: call WSDL2Code.bat -uri C:\project\cvs\gazoo\src\share\xml\webservice\userprofile\ver2.0\userProfile.wsdl -ss -sd -d adb -p com.test.generated -o output/server and I got a bunch of generated code that can't be compiled. I've noticed things like calls to org.apache.axis2.databinding.utils.ConverterUtil.convertToToken(content) (there is no method convertToToken in ConverterUtil) which may be fixed by replacing convertToToken with convertTotoken The same thing with org.apache.axis2.databinding.utils.ConverterUtil.convertToCalendar(content) - must be replaced with convertTodateTime Finally I got into problem I can't fix : private java.lang.Object fromOM( org.apache.axiom.om.OMElement param, java.lang.Class type, java.util.Map extraNamespaces) { try { if (org.apache.axiom.om.OMElement.class.equals(type)){ return org.apache.axiom.om.OMElement.Factory.parse(param.getXMLStreamReaderWithoutCaching()); } } catch (Exception e) { throw new RuntimeException(e); } return null; } The problem is in line org.apache.axiom.om.OMElement.Factory - there is no variable Factory in class OMElement. Am i doing something wrong or Axis2 is indeed that buggy? Thanks! Paul Gonchar __ 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] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: [Axis2] How to build aar and Axis2 war with Maven2?
Hi Dave, Unfortunately there is no such maven task right now. But I believe you can write a plugin to do that in maven2 :) Ajith On 5/30/06, Dave Hoffer [EMAIL PROTECTED] wrote: Ajith, Thanks for the reply. I understand that aar is a jar file with a special format. What I am wondering is if maven2 is aware of this 'special format'? As I understand maven2, it uses the packaging tag to 'know' what to do to make the artifact. So can I do the following? packagingaar/packaging Or do I have to use the default packaging of jar and then rename? If this is the case, how do I rename in maven2? Also regarding the services.xml file, is there any help in maven2 to auto generate this? If not, this probably isn't a big deal. Regarding the war, yes I did mean how to package the aar in the war. You state how to do this but I am wondering if there is any maven2 help for this as well. Depending on the answers above, the aar may be known by maven2 as jar and/or aar and have to be copied and/or renamed as aar. It seems this could all be automated possibly. Thanks! -dh -Original Message- From: Ajith Ranabahu [mailto:[EMAIL PROTECTED] Sent: Saturday, May 27, 2006 9:12 AM To: axis-user@ws.apache.org Subject: Re: [Axis2] How to build aar and Axis2 war with Maven2? Hi, an aar is a jar file with a special format. You can copy the compiled classes into the relevant directory structure and use the jar command with maven2 if you want. If you are planning to use generated code then it will be convenient to call the generated ant build script. I don't really get what is meant by Take the Axis2 aar and make the Axis war needed for deployment ! Did you mean to say that you should have a war with your service pre-packed ? If so just package the services/xxx.aar into the web-inf folder of the war file. Ajith On 5/26/06, Deepal Jayasinghe [EMAIL PROTECTED] wrote: Hi Dave ; I dont think you need to compile Axis2 code , what I think is you have to add dependency into your project to pick Axis2 jars from apache repo. Dave Hoffer wrote: I would like to start using Axis2 in a new project. The project will use Maven2 as the build system. How can I integrate Axis2? Specifically, how do I? - Compile my sources into the Axis aar format? Or take my application's jar and create the Axis2 aar format? - Take the Axis2 aar and make the Axis war needed for deployment. I would greatly appreciate info on how to do this. -dh -- Thanks, Deepal ~Future is Open~ - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] -- Ajith Ranabahu - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] -- Ajith Ranabahu - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: [Axis2] WSDL2Code ?
Hi Paul, Thanks for the info. I'll look into this Ajith On 5/30/06, Paul Gonchar [EMAIL PROTECTED] wrote: I resolved the problem with OMElement.Factory - indeed this was a WSDL problem. I had w:part name=getUserProfileByIdInput element=getRequest/ instead of w:part name=getUserProfileByIdInput type=typens:getRequest/ But still I'm getting problems with generated code. XSD data types token are parsed as ConverterUtil.convertToToken() and calendar are parsed as ConverterUtil.convertToCalendar(). For the token types, I beleive you need to change convertTotoken() (yes, 't' is lowercase) in class ConverterUtil to convertToToken(). As for calendar - change ConverterUtil.convertTodatetime() to convertToCalendar(). As for xmlbeans mode, I don't really like it because it generates bunch of resources and source files in org package. Thanks, Paul --- Ajith Ranabahu [EMAIL PROTECTED] wrote: Hi, Can you post the WSDL ? It seems that your WSDL may have a namespace issue ! On 5/26/06, Paul Gonchar [EMAIL PROTECTED] wrote: Has anyone used WSDL2Code generator successfully? I keep getting code that contains call to org.apache.axiom.om.OMElement.Factory.parse(). Axiom spec says OMElement is an interface and it can't contain any Factory. Any ideas? Thanks! Paul. P.S. Data binding mode does not matter - in all cases I get this code. __ 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] -- Ajith Ranabahu - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] __ 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] -- Ajith Ranabahu - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: setting 'holders' or 'sequence'
Hi Anne, Thanks for the reply. But I am quite a newbie in axis programming. Can u point out to me what are the advanced samples? I look thru quite a bit but did not see anything that I can re-use. Thanks, Jeffk. -Original Message- From: Anne Thomas Manes [mailto:[EMAIL PROTECTED] Sent: Monday, May 29, 2006 9:46 PM To: axis-user@ws.apache.org Subject: Re: setting 'holders' or 'sequence' In Java you must define symbol as a bean, and in XML schema, you must define symbol as a complex type. Likewise, you can define the return value to by a bean or an array. Take a look at a few of the more advanced samples. Anne On 5/29/06, Jeffrey Ng [EMAIL PROTECTED] wrote: I am using the Axis source codes - samples\stock codes from Axis setup as a base to start my coding. There are the following codes in the GetQuote.java program: call.setTargetEndpointAddress( url ); call.setOperationName( new QName(urn:xmltoday-delayed-quotes, getQuote) ); call.addParameter( symbol, XMLType.XSD_STRING, ParameterMode.IN ); call.setReturnType( XMLType.XSD_FLOAT ); In this case, symbolXXX/symbol will be sent to the remote web service. I have 2 questions here. 1) How do i add params such that the symbols have children/sequence? i.e. I want to sent symbol as symbol id12/id namexxx/name value999/value /symbol 2) How do i set the return values to more than 1 value? i might need to get a couple of response values from the remote side rather than 1 float value. Are there any examples on the net that i can refer to? thanks in advance. best regards, Jeffrey.