Getting request IP address
Hello. I am using axis2c 1.6 and I am trying to get the ip address (or hostname) of the host that generate the web service requests. I was attempting to use axis2_msg_ctx_get_from and then axis2_endpoint_ref_get_address to do this. Unfortunately this is giving me the address of the server, not the client. Am I mis-using this API call? Is there a better/different way to get this information? This is how my code looks: fromRef = axis2_msg_ctx_get_from(pMsgCtx, pEnv); if (fromRef) { from = (axis2_char_t*)axis2_endpoint_ref_get_address(fromRef, pEnv); } Any help is greatly appreciated. Thanks, Murphey
Re: Getting request IP address
Hello Murphey, I got the address using axis2_msg_ctx_get_property. For that I needed a pointer to axis2_msg_ctx_t, which i updated in my axis2_skel_xx.h file Sample: axis2_skel_KeyExchange.h adb_DoKeyExchangeResponse_t* axis2_skel_KeyExchange_DoKeyExchange (const axutil_env_t *env , adb_DoKeyExchange_t* doKeyExchange,axis2_msg_ctx_t *msg_ctx); Similarly in my axis2_skel_KeyExchange.c file updated the call, adb_DoKeyExchangeResponse_t* axis2_skel_KeyExchange_DoKeyExchange (const axutil_env_t *env, adb_DoKeyExchange_t* doKeyExchange,axis2_msg_ctx_t *msg_ctx) { and with the following code got the address axutil_property_t *peer = axis2_msg_ctx_get_property (msg_ctx, env, AXIS2_SVR_PEER_IP_ADDR); char *remote_ip = (char *) axutil_property_get_value (peer, env); AXIS2_LOG_INFO (env-log, Got a call from %s, remote_ip); Regards, Nabeel Ahsan On Fri, Dec 11, 2009 at 1:24 AM, Murphey McCloy mmcc...@webroot.com wrote: Hello. I am using axis2c 1.6 and I am trying to get the ip address (or hostname) of the host that generate the web service requests. I was attempting to use axis2_msg_ctx_get_from and then axis2_endpoint_ref_get_address to do this. Unfortunately this is giving me the address of the server, not the client. Am I mis-using this API call? Is there a better/different way to get this information? This is how my code looks: fromRef = axis2_msg_ctx_get_from(pMsgCtx, pEnv); if (fromRef) { from = (axis2_char_t*)axis2_endpoint_ref_get_address(fromRef, pEnv); } Any help is greatly appreciated. Thanks, Murphey
how to change propority of geronimo-javamail_1.4_spec-1.2.jar lower than mail.jar
hi, as we know, in Tomcat/Axis2 Lib there is a lib confict between geronimo-javamail_1.4_spec-1.2.jar and mail.jar. geronimo-javamail_1.4_spec-1.2.jar has a higher priority than mail.jar. if i delete geronimo-javamail_1.4_spec-1.2.jar, my web service works fine and the mail subject will be also received by enduser. otherweise the mail subject will not be sended. but i don't want to delete geronimo-javamail_1.4_spec-1.2.jar, can anyone tell me, how can i decreased priority of geronimo-javamail_1.4_spec-1.2.jar, so that mail.jar will be used at first. thanks. dishmily -- View this message in context: http://old.nabble.com/how-to-change-propority-of-geronimo-javamail_1.4_spec-1.2.jar-lower-than-mail.jar-tp26726205p26726205.html Sent from the Axis - User mailing list archive at Nabble.com.
[Axis2] Abstract types and ADB
Hi all, currently I'm trying to generate a client stub for this WSDL: https://hosted.datascopeapi.reuters.com/datascopeapi/v1/extractionservice.asmx?wsdl The SOAP 1.2 Binding in this WSDL seems to contain a few errors, so I removed it and the respective port before calling wsdl2java. The WSDL still contains a valid SOAP 1.1 binding as well as a port using it. I'm using axis2 1.5.1 and use the following command line: jens:~/tmpfs /home/jens/tools/axis2-1.5.1/bin/wsdl2java.sh -uw -u -uri extractionservice.wsdl Using AXIS2_HOME: /home/jens/tools/axis2-1.5.1 Using JAVA_HOME: /home/jens/.gentoo/java-config-2/current-user-vm Retrieving document at 'extractionservice.wsdl'. [WARN] Type {http://reuters.com/datascopeselect/ExtractionService/v1/}anyType missing! jens:~/tmpfs After that there are only classes for the abstract types, but not for the complex types inheriting from the abstract types. Example (from the WSDL, lines 680-695): s:complexType name=InstrumentSearchRequest abstract=true s:sequence s:element minOccurs=0 maxOccurs=1 name=PreferredIdentifierType type=s:string / /s:sequence /s:complexType s:complexType name=InstrumentSearchRequestAll s:complexContent mixed=false s:extension base=tns:InstrumentSearchRequest s:sequence s:element minOccurs=0 maxOccurs=1 name=IdentifierSearchValue type=s:string / s:element minOccurs=0 maxOccurs=1 name=IdentifierType type=s:string / s:element minOccurs=0 maxOccurs=1 name=InstrumentTypes type=tns:ArrayOfString / /s:sequence /s:extension /s:complexContent /s:complexType wsdl2java only generated a class for InstrumentSearchRequest but not for InstrumentSearchRequestAll. Furthermore the generated stub interface contains errors: (ExtractionService.java, lines 29-32) public com.reuters.datascopeselect.extractionservice.v1.ArrayOfValueInfo getInstrumentTypes( ,com.reuters.datascopeselect.extractionservice.v1.CredentialsHeaderE credentialsHeader44) throws java.rmi.RemoteException Obviously that won't compile. Is there anything i can do to create a functional client stub for that service using axis2 ? Thanks a lot in advance, Jens
Does Axiom support element ref attribute
Hi all, I had a element in a schema that referred another element like this xsd:element ref=eyb:MessageBoard minOccurs=0 / So when I when I called my service and this element was returned the serialization through an exception like this [ERROR] Could not get parser from data source for element { http://esysbio.org/service/UserManagement}GetUserResponse javax.xml.stream.XMLStreamException: the prefix == Already exists for namespace == http://esysbio.org/common/schema I then changed my element to take the type instead of referring to the element xsd:element name=MessageBoard type=eyb:MessageBoardType minOccurs=0 / Then the service returned the correct response. So i was wondering if this is a limitation of axiom? I use axis2 .5 and axiom 1.2.8, also tried with axiom-1.2.9-SNAPSHOT but same issue. Any hint cheers, Håkon --
Re: Does Axiom support element ref attribute
This issue has been discussed here: http://markmail.org/thread/w5yziktixvjn7ubl Andreas 2009/12/10 Håkon Sagehaug hakon.sageh...@uni.no: Hi all, I had a element in a schema that referred another element like this xsd:element ref=eyb:MessageBoard minOccurs=0 / So when I when I called my service and this element was returned the serialization through an exception like this [ERROR] Could not get parser from data source for element {http://esysbio.org/service/UserManagement}GetUserResponse javax.xml.stream.XMLStreamException: the prefix == Already exists for namespace == http://esysbio.org/common/schema I then changed my element to take the type instead of referring to the element xsd:element name=MessageBoard type=eyb:MessageBoardType minOccurs=0 / Then the service returned the correct response. So i was wondering if this is a limitation of axiom? I use axis2 .5 and axiom 1.2.8, also tried with axiom-1.2.9-SNAPSHOT but same issue. Any hint cheers, Håkon --
RE: Configure SSL config for Axis2 1.4.1 client to connect to SOAP/ssl WS
The source of solution was: http://osdir.com/ml/axis-user-ws.apache.org/2009-06/msg00307.html The solution is to set up the following properties for the JVM: javax.net.ssl.keyStore=fully qualified path to keystore file javax.net.ssl.keyStoreType=type of keystore, i.e, JKS javax.net.ssl.keyStorePassword=keystore password javax.net.ssl.trustStore=fully qualified path to truststore file javax.net.ssl.trustStoreType=type of truststore, i.e, JKS javax.net.ssl.trustStorePassword=truststore password javax.net.ssl.contextProvider=provider, i.e. JSSE This is basically the same as depicted by Thilina Mahesh Buddhika: It can be achieved either ny using the -Dpropname=propvalue pattern on the command line, by setting appropriate JVM startup properties using the administration interface of your choice or by explicitly setting that in the Java code. Using system properties for the JVM may be more useful since this way it is guaranteed that the values are present from the time the JVM starts. This is difficult to achieve with explicit Java in a J2EE environment. Regards, Christian -Original Message- From: Christian Gosch Sent: Thursday, December 03, 2009 1:06 PM To: axis-user Subject: Configure SSL config for Axis2 1.4.1 client to connect to SOAP/ssl WS Hi, I have an Axis2 1.4.1 SOAP client (code generated with wsdl2java using XMLBeans) and can use this client successfully to execute operations on a remote server which only accepts SOAP/ssl (https) requests. I do not configure something special: I simply take the https:... URL as it is, and use it, and Axis2 together with the accompanying libraries does the remaining. But the client code is part of a J2EE application deployed on IBM WebSphere 6.0.2, and this application also has to make calls to the IBM WebSphere AdminClient interface to deal with some specific things on the local server. The IBM WebSphere AdminClient also makes use of SOAP/ssl to contact the desired server which is simply the local host in this case. Now I encounter a silly phenomenon: When the first SOAP/ssl connection during VM life time is initiated by the AdminClient (which is not configurable regarding the SSL connection setup) and Axis2 comes behind, everything works fine. But when the first SOAP/ssl connection during VM life time is initiated by Axis2 (which simply uses its default scheme of operation to establish a https connection to a remote host), then AdminClient fails to connect permanently, but Axis2 keeps being fine all the time. I raised a PMR at IBM on this issue, but it languishes, and currently they suspect that the application's client code is to be blamed. I have no problem with that generally, but I cannot see any way to influence the actual ssl configuration or setup for Axis2 1.4.1 SOAP client operation so as to consort better with the AdminClient. Does anyone know how to configure Axis2 1.4.1 to explicitly select the cipher, algorithm, keystore or the like for ssl? What about that magic axis2.xml config file? I did not figure out yet what to put in there at all, where to put the file and how to locate it then to make it work for a *client*... its all nebulous to me... Thanks in advance, -- Dipl.-Inform. Christian Gosch, PMI PMP Systems Architecture, Project Management inovex GmbH Büro Pforzheim Karlsruher Strasse 71 D-75179 Pforzheim Tel: +49 (0)7231 3191-85 Fax: +49 (0)7231 3191-91 c.go...@inovex.de www.inovex.de Sitz der Gesellschaft: Pforzheim AG Mannheim, HRB 502126 Geschäftsführer: Stephan Müller !DSPAM:4b17a9e8326661182215571!
RE: SOAP/ssl: Axis2 1.4.1 (client to remote) vs. IBM WebSphere 6.0.2 AdminClient (to local)
The source of solution was: http://osdir.com/ml/axis-user-ws.apache.org/2009-06/msg00307.html The solution is to set up the following properties for the JVM: javax.net.ssl.keyStore=fully qualified path to keystore file javax.net.ssl.keyStoreType=type of keystore, i.e, JKS javax.net.ssl.keyStorePassword=keystore password javax.net.ssl.trustStore=fully qualified path to truststore file javax.net.ssl.trustStoreType=type of truststore, i.e, JKS javax.net.ssl.trustStorePassword=truststore password javax.net.ssl.contextProvider=provider, i.e. JSSE This is basically the same as depicted by Thilina Mahesh Buddhika: It can be achieved either ny using the -Dpropname=propvalue pattern on the command line, by setting appropriate JVM startup properties using the administration interface of your choice or by explicitly setting that in the Java code. Using system properties for the JVM may be more useful since this way it is guaranteed that the values are present from the time the JVM starts. This is difficult to achieve with explicit Java in a J2EE environment. Regards, Christian -Original Message- From: Christian Gosch Sent: Thursday, December 03, 2009 2:56 PM To: axis-user Subject: SOAP/ssl: Axis2 1.4.1 (client to remote) vs. IBM WebSphere 6.0.2 AdminClient (to local) Hi, in a J2EE web application running on IBM WebSphere 6.0.2 we use Axis2 1.4.1 as WS client to execute SOAP calls to a remote host via SSL *and* the IBM WebSphere AdminClient (from inside the app) to execute tasks on the local host. When AdminClient is used first *before* first use of Axis2 client (ssl), everything is fine and both clients work also on subsequent operations. BUT: When Axis2 client (ssl) is used first *before* first use of AdminClient, then AdminClient fails to connect permanently, but Axis2 runs fine. Has anybody experienced similar things? This may include using CXF or other WS client libraries *for ssl connections* together with IBM WebSphere AdminClient. Thanks for any help on this topic. (Yes, there is another instance of this topic, but this one is shorter :-) Regards, -- Dipl.-Inform. Christian Gosch, PMI PMP Systems Architecture, Project Management inovex GmbH Büro Pforzheim Karlsruher Strasse 71 D-75179 Pforzheim Tel: +49 (0)7231 3191-85 Fax: +49 (0)7231 3191-91 c.go...@inovex.de www.inovex.de Sitz der Gesellschaft: Pforzheim AG Mannheim, HRB 502126 Geschäftsführer: Stephan Müller !DSPAM:4b17c3bb326661492514722!
RE: How to configure SSL key store / trust store location to use for AXIS2 1.4.1 as SOAP/ssl client?
The source of solution was: http://osdir.com/ml/axis-user-ws.apache.org/2009-06/msg00307.html The solution is to set up the following properties for the JVM: javax.net.ssl.keyStore=fully qualified path to keystore file javax.net.ssl.keyStoreType=type of keystore, i.e, JKS javax.net.ssl.keyStorePassword=keystore password javax.net.ssl.trustStore=fully qualified path to truststore file javax.net.ssl.trustStoreType=type of truststore, i.e, JKS javax.net.ssl.trustStorePassword=truststore password javax.net.ssl.contextProvider=provider, i.e. JSSE This is basically the same as depicted by Thilina Mahesh Buddhika: It can be achieved either ny using the -Dpropname=propvalue pattern on the command line, by setting appropriate JVM startup properties using the administration interface of your choice or by explicitly setting that in the Java code. Using system properties for the JVM may be more useful since this way it is guaranteed that the values are present from the time the JVM starts. This is difficult to achieve with explicit Java in a J2EE environment. Regards, Christian -Original Message- From: Christian Gosch Sent: Wednesday, December 09, 2009 7:46 PM To: axis-user Subject: How to configure SSL key store / trust store location to use for AXIS2 1.4.1 as SOAP/ssl client? Hi, how can I configure which SSL key store trust store is used when AXIS2 1.4.1 is the first running code requesting a SSL connection as a SOAP client in a given 1.4 JVM? Problem: IBM WebSphere 6.0 (JDK/JRE 1.4.2) uses a defaultSSLSocketFactory which is a singleton and once it's initialized with some particular value, it'll be reused. (info from IBM L3) If nothing special is said about what to do how, AXIS2 1.4.1 simply requests .../java/jre/lib/security/cacerts as key store trust store file. This is fatal if later (other) SOAP clients require key pairs not present in this JVM default store. Is there some way to tell AXIS2 1.4.1 to request another file for key store / trust store? Are there some JVM properties which can be used? Is there any possibility to achieve that via the magic Options object? Can this be achieved using the magic axis2.xml configuration file? (Again: Where is this file, or where is it looked for, and what is allowed to be inside?) Desperate, -- Dipl.-Inform. Christian Gosch, PMI PMP Systems Architecture, Project Management inovex GmbH Büro Pforzheim Karlsruher Strasse 71 D-75179 Pforzheim Tel: +49 (0)7231 3191-85 Fax: +49 (0)7231 3191-91 c.go...@inovex.de www.inovex.de Sitz der Gesellschaft: Pforzheim AG Mannheim, HRB 502126 Geschäftsführer: Stephan Müller !DSPAM:4b1ff09b326661456082889!
Axis2 Rampart - Key Rotation
I am using Rampart 1.4 with Axis2 1.4.1. We are signing and encryption the soap body. On the server side to support multiple clients, we have specified the value useReqSigCert for the parameter ramp:encryptionUser. On the client side, we have specified the alias of server certificate as the value for the parameter ramp:encryptionUser. My question is around key rotation. Case 1: Client has a new certificate. --- As per my understanding this should be as simple as importing the new client certificate in the server keystore with a new alias. Since we don't use client certificate alias names on the server side, as and when client starts sending us request signed with new certificate, the server will start using the new certificate to verify signature and encrypt the response. Please confirm if my understanding is correct. Case 2: Server has a new certificate --- Without the need to synchronize client and server deployment activities, I am not sure how this can be done without a downtime as the server certificate alias name, which is tied to old certificate, is used in rampart configuration. Any suggestions? Is there any best practices document available with details on this topic. Thanks in advance, Rajan
AXIS not serializing body of response
I've generated AXIS 1.4 bindings using the Maven plug in so I can re-implement a service. We currently have the same service running with AXIS 1.4 on an old system that is being replaced. We're staying with AXIS 1.4 as AXIS 2 has issues with Weblogic and I thought it would be faster to reimplement on a known platform. All deploys fine but when I return from the service with a valid object I get the following. 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/ /soapenv:Envelope I have returned a object from my service implementation and if I step through the Axis code I can see that it has my expected value.At the following piece of code in the RPCProvider class I can see the objRes is the object I expect. objRes = invokeMethod(msgContext, operation.getMethod(), obj, argValues); At no stage does it attempt to serialize the objRes to XML. Anyone have any ideas as to why this would be happening. Summarized server-config.wsdd below. Using spring ServletEndpointSupport if this makes any difference. ?xml version=1.0 encoding=UTF-8? deployment xmlns=http://xml.apache.org/axis/wsdd/; xmlns:java=http://xml.apache.org/axis/wsdd/providers/java; globalConfiguration parameter name=attachments.Directory value=/j2ee/tmp/attachments / parameter name=attachments.implementation value=org.apache.axis.attachments.AttachmentsImpl / parameter name=sendXsiTypes value=true / parameter name=sendMultiRefs value=false / parameter name=sendXMLDeclaration value=true / parameter name=axis.sendMinimizedElements value=true / /globalConfiguration service name=XrPort provider=java:RPC style=document use=literal parameter name=allowedMethods value=* / parameter name=typeMappingVersion value=1.2 / parameter name=wsdlPortType value=XrPortType / parameter name=className value=my.endpoint.class / parameter name=wsdlServicePort value=XrPort / parameter name=schemaQualified value=uri:ns / parameter name=wsdlTargetNamespace value=nsdefinitions / parameter name=wsdlServiceElement value=XrService / operation name=send qname=Send returnQName=retNS:snapshotMessage xmlns:retNS=uri:ns returnType=rtns:snapshotComplexType xmlns:rtns=uri:ns soapAction= parameter qname=pns:snapshotMessage xmlns:pns=uri:ns type=tns:snapshotComplexType xmlns:tns=uri:ns/ /operation wsdlFile /xrservice.wsdl /wsdlFile TypeMappings /service transport name=http requestFlow handler type=java:org.apache.axis.handlers.http.URLMapper name=URLMapper/ handler type=java:org.apache.axis.handlers.http.HTTPAuthHandler / /requestFlow /transport transport name=local responseFlow handler type=LocalResponder / /responseFlow /transport /deployment -- Ian Kettle - Software Engineer Mobile: +64 21 406 461 Email: ian.ket...@fmit.co.nz | Web: www.fmit.co.nz Level 6, 92 Albert Street, Auckland, NZ
JAX-WS, Axis2 1.5.1, and javax.xml.bind.UnmarshalException
Hi guys, I am new to this mailing list although I have been using Axis for many years now. Recently I have been working on a project trying to implement a JAX-WS style web service. I have banged my head on it for a couple days now and am out of ideas. I think that somehow the classes I need are not being loaded properly or something. Or maybe there is a namespace problem? Anyway, before I go on, here is the actual exception: Caused by: javax.xml.bind.UnmarshalException: unexpected element (uri:http://my.own.domain/;, local:getDACList). Expected elements are (none) at com.sun.xml.bind.v2.runtime.unmarshaller.UnmarshallingContext.handleEvent(Un marshallingContext.java:609) at com.sun.xml.bind.v2.runtime.unmarshaller.Loader.reportError(Loader.java:244) at com.sun.xml.bind.v2.runtime.unmarshaller.Loader.reportError(Loader.java:239) at com.sun.xml.bind.v2.runtime.unmarshaller.Loader.reportUnexpectedChildElement (Loader.java:116) at com.sun.xml.bind.v2.runtime.unmarshaller.UnmarshallingContext$DefaultRootLoa der.childElement(UnmarshallingContext.java:1015) at com.sun.xml.bind.v2.runtime.unmarshaller.UnmarshallingContext._startElement( UnmarshallingContext.java:452) at com.sun.xml.bind.v2.runtime.unmarshaller.UnmarshallingContext.startElement(U nmarshallingContext.java:433) at com.sun.xml.bind.v2.runtime.unmarshaller.MTOMDecorator.startElement(MTOMDeco rator.java:107) at com.sun.xml.bind.v2.runtime.unmarshaller.StAXStreamConnector.handleStartElem ent(StAXStreamConnector.java:275) at com.sun.xml.bind.v2.runtime.unmarshaller.StAXStreamConnector.bridge(StAXStre amConnector.java:209) at com.sun.xml.bind.v2.runtime.unmarshaller.UnmarshallerImpl.unmarshal0(Unmarsh allerImpl.java:358) ... 35 more Caused by: javax.xml.bind.UnmarshalException: unexpected element (uri:http://my.own.domain/;, local:getDACList). Expected elements are (none) ... 46 more Funny thing is, this was originally happening the first time but then would work on subsequent tries. Then after a reboot it died completely and now always gives me this error. I have @RequestWrapper and @ResponseWrapper annotations on my web method and the wrapper classes exist and are stored in a jar file. I am still getting this error. Anyone have any ideas? --Kamran
RE: JAX-WS, Axis2 1.5.1, and javax.xml.bind.UnmarshalException
Incidentally, here is a code snippet defining my method: WebResult(targetNamespace = ) @RequestWrapper(localName = getDACList, targetNamespace = http://my.own.domain/;, className = domain.own.my.GetDACList) @ResponseWrapper(localName = getDACListResponse, targetNamespace = http://my.own.domain/;, className = domain.own.my.GetDACListResponse) public ListDataAssetCatalog getDACList() { return serviceHandler.getDACList(); } I am deploying this into Tomcat 6.0.18.. Thanks for the help. --Kamran From: Kamran Shah [mailto:kam...@mythsoftware.com] Sent: Thursday, December 10, 2009 10:17 PM To: axis-user@ws.apache.org Subject: JAX-WS, Axis2 1.5.1, and javax.xml.bind.UnmarshalException Hi guys, I am new to this mailing list although I have been using Axis for many years now. Recently I have been working on a project trying to implement a JAX-WS style web service. I have banged my head on it for a couple days now and am out of ideas. I think that somehow the classes I need are not being loaded properly or something. Or maybe there is a namespace problem? Anyway, before I go on, here is the actual exception: Caused by: javax.xml.bind.UnmarshalException: unexpected element (uri:http://my.own.domain/;, local:getDACList). Expected elements are (none) at com.sun.xml.bind.v2.runtime.unmarshaller.UnmarshallingContext.handleEvent(Un marshallingContext.java:609) at com.sun.xml.bind.v2.runtime.unmarshaller.Loader.reportError(Loader.java:244) at com.sun.xml.bind.v2.runtime.unmarshaller.Loader.reportError(Loader.java:239) at com.sun.xml.bind.v2.runtime.unmarshaller.Loader.reportUnexpectedChildElement (Loader.java:116) at com.sun.xml.bind.v2.runtime.unmarshaller.UnmarshallingContext$DefaultRootLoa der.childElement(UnmarshallingContext.java:1015) at com.sun.xml.bind.v2.runtime.unmarshaller.UnmarshallingContext._startElement( UnmarshallingContext.java:452) at com.sun.xml.bind.v2.runtime.unmarshaller.UnmarshallingContext.startElement(U nmarshallingContext.java:433) at com.sun.xml.bind.v2.runtime.unmarshaller.MTOMDecorator.startElement(MTOMDeco rator.java:107) at com.sun.xml.bind.v2.runtime.unmarshaller.StAXStreamConnector.handleStartElem ent(StAXStreamConnector.java:275) at com.sun.xml.bind.v2.runtime.unmarshaller.StAXStreamConnector.bridge(StAXStre amConnector.java:209) at com.sun.xml.bind.v2.runtime.unmarshaller.UnmarshallerImpl.unmarshal0(Unmarsh allerImpl.java:358) ... 35 more Caused by: javax.xml.bind.UnmarshalException: unexpected element (uri:http://my.own.domain/;, local:getDACList). Expected elements are (none) ... 46 more Funny thing is, this was originally happening the first time but then would work on subsequent tries. Then after a reboot it died completely and now always gives me this error. I have @RequestWrapper and @ResponseWrapper annotations on my web method and the wrapper classes exist and are stored in a jar file. I am still getting this error. Anyone have any ideas? --Kamran No virus found in this incoming message. Checked by AVG - www.avg.com Version: 8.5.426 / Virus Database: 270.14.102/2556 - Release Date: 12/10/09 07:36:00
Re: [Axis2] Abstract types and ADB
use -g option to generate inherited classes. to other problem it seems to be a bug with Axis2. so either 1. try without -uw option 2. try with a build from the current trunk. thanks, Amila. On Thu, Dec 10, 2009 at 8:21 PM, Jens Rutschmann jens.rutschm...@gmx.infowrote: Hi all, currently I'm trying to generate a client stub for this WSDL: https://hosted.datascopeapi.reuters.com/datascopeapi/v1/extractionservice.asmx?wsdl The SOAP 1.2 Binding in this WSDL seems to contain a few errors, so I removed it and the respective port before calling wsdl2java. The WSDL still contains a valid SOAP 1.1 binding as well as a port using it. I'm using axis2 1.5.1 and use the following command line: jens:~/tmpfs /home/jens/tools/axis2-1.5.1/bin/wsdl2java.sh -uw -u -uri extractionservice.wsdl Using AXIS2_HOME: /home/jens/tools/axis2-1.5.1 Using JAVA_HOME: /home/jens/.gentoo/java-config-2/current-user-vm Retrieving document at 'extractionservice.wsdl'. [WARN] Type { http://reuters.com/datascopeselect/ExtractionService/v1/}anyTypehttp://reuters.com/datascopeselect/ExtractionService/v1/%7DanyTypemissing! jens:~/tmpfs After that there are only classes for the abstract types, but not for the complex types inheriting from the abstract types. Example (from the WSDL, lines 680-695): s:complexType name=InstrumentSearchRequest abstract=true s:sequence s:element minOccurs=0 maxOccurs=1 name=PreferredIdentifierType type=s:string / /s:sequence /s:complexType s:complexType name=InstrumentSearchRequestAll s:complexContent mixed=false s:extension base=tns:InstrumentSearchRequest s:sequence s:element minOccurs=0 maxOccurs=1 name=IdentifierSearchValue type=s:string / s:element minOccurs=0 maxOccurs=1 name=IdentifierType type=s:string / s:element minOccurs=0 maxOccurs=1 name=InstrumentTypes type=tns:ArrayOfString / /s:sequence /s:extension /s:complexContent /s:complexType wsdl2java only generated a class for InstrumentSearchRequest but not for InstrumentSearchRequestAll. Furthermore the generated stub interface contains errors: (ExtractionService.java, lines 29-32) public com.reuters.datascopeselect.extractionservice.v1.ArrayOfValueInfo getInstrumentTypes( ,com.reuters.datascopeselect.extractionservice.v1.CredentialsHeaderE credentialsHeader44) throws java.rmi.RemoteException Obviously that won't compile. Is there anything i can do to create a functional client stub for that service using axis2 ? Thanks a lot in advance, Jens -- Amila Suriarachchi WSO2 Inc. blog: http://amilachinthaka.blogspot.com/
Re: axis2 1.5.1 wsdl2java --all-ports
On Thu, Dec 10, 2009 at 12:34 PM, Alex devns...@gmail.com wrote: hi all, as I read on the web, there is no posibility to generate server skeleton from an wsdl which has multiple ports defined, is this correct? yes. Is there an other possibility to combine all ports in one webService, or is it better to generate one service for each port. please try using one portType per service. thanks, Amila. here is my ant-task target name=wsdl2java depends=clean,prepare delete dir=${output} / java classname=org.apache.axis2.wsdl.WSDL2Java fork=true classpath refid=axis.classpath / arg value=-d / arg value=none / arg value=-uri / arg file=${PATH2WSDL} / arg value=-ss / arg value=-g / arg value=-sd / arg value=-or / arg value=-o / arg file=${output} / arg value=-p / arg value=${package} / arg value=-ap / /java !-- Move the schema folder to classpath-- move todir=${build.classes} fileset dir=${output}/resources include name=**/*schema*/**/*.class / include name=**/*schema*/**/*.xsb / /fileset /move /target as you can see i use the -ap or --all-ports option but only one port is generatet. I am using axis2 1.5.1 and tomcat 6.0.20 thank you, so long alex -- Amila Suriarachchi WSO2 Inc. blog: http://amilachinthaka.blogspot.com/
Re: WSDL4J help
On Wed, Dec 9, 2009 at 7:22 PM, Stefano Tranquillini stefano.tranquill...@gmail.com wrote: Hi. i think maybe someone here can help me. there's someone that has experience in WSDL4J? i needo to insert element, not only to read, but it seems to ignore my classes. Better: i'm not able to add any type of element in my wsdl. any idea how to insert operation or porttype? have a look here[1]. thanks, Amila. [1] http://svn.apache.org/viewvc/webservices/axis2/trunk/java/modules/rmi/src/org/apache/axis2/rmi/wsdl/WSDL11DefinitionBuilder.java?revision=637447view=markup PS: there's a mailing list (or similar) for wsdl4j thanks -- Stefano -- Amila Suriarachchi WSO2 Inc. blog: http://amilachinthaka.blogspot.com/
Re: HI :How to add Empty soap header element to SOAP envelope using AXIS2 client API
use operational client to send a soap envelop. have a look at here[1]. thanks, Amila. [1] http://amilachinthaka.blogspot.com/2009/09/sending-arbitrary-soap-message-with.html On Tue, Dec 8, 2009 at 3:22 PM, Vishnu Vardhan Reddy vre...@radiantinfo.com wrote: HI all How to add empty SOAP Header element to SOAP request , using AXIS2 API. Soap Request should be like this ?xml version=1.0 encoding=http://schemas.xmlsoap.org/soap/envelope/; standalone=no? soapenv:Envelope xmlns:soapenv=http://schemas.xmlsoap.org/soap/envelope/ soapenv:Header /soapenv:Header soapenv:Body /soapenv:Body /soapenv:Envelope How to add empty SOAP header element to SOAP envelope ..? Thanks in advance for kind support. Thanks regards, Vishnu. -- Amila Suriarachchi WSO2 Inc. blog: http://amilachinthaka.blogspot.com/
Re: How to forward a soap envelope between webservices in axis2
On Tue, Dec 8, 2009 at 8:17 AM, Hasini Gunasinghe hasi7...@gmail.comwrote: Hi, I am using axis2 stand alone server to deploy the web services. And I need to forward the same soap envelope between several web services by only changing the header of the soap envelope. When I searched for a way to achieve that I found that detaching the existing header and adding a new header would do. But it didn't work. I use OperationClient API to invoke web services along the communication path. When I set the action in the options of service client in a intermediate web service and forward the soap envelope, axis2 throws an exception saying that soap action and wsa:action mismatch. That is because the original header contains a different action put by the WS-addressing. try removing the Addressing headers. thanks, Amila. Can you please tell me the correct way to forward a soap envelope through several web services deployed in one or more axis2 servers? Thank you very much. regards, Hasini. -- Amila Suriarachchi WSO2 Inc. blog: http://amilachinthaka.blogspot.com/