DeVice, Dana | 25 May 19:19

Axis2 - Upgrading from 1.3 to 1.6.2

Hi,

I would like to upgrade our Axis2 version from 1.3 to 1.6.2 to fix a bug that we are experiencing.

 

We currently have this dependency in our project:

<groupId>org.apache.axis2</groupId>

<artifactId>axis2</artifactId>

<version>1.3</version>

 

If I change the version to 1.6.2, are there any backwards compatibility issues or new configurations needed that I should be aware of? I can’t find anything on the Axis2 website that address these concerns. Would it be as easy as replacing the version number in our POM, and the transition would be seamless?

 

Thanks in advance,

Dana


CONFIDENTIALITY NOTICE: This e-mail message, including any attachments, is for the sole use of the intended recipient(s) and may contain confidential and privileged information or otherwise protected by law. Any unauthorized review, use, disclosure or distribution is prohibited. If you are not the intended recipient, please contact the sender by reply e-mail and destroy all copies of the original message.
Trenton D. Adams | 24 May 18:46
Picon
Favicon

exception messages

Hello,

I'm using axis 1.6.1.  Is there a way that I can have an exception 
message get through to the client?  All I get is a notification that 
there was an exception, but it does not contain the actual message of 
the exception, even though the response shows an exception.

Here's an example response, in which an axis generated client (from 
WSDL) does not display the actual message returned.  We just receive a 
stack trace with no actual message.

<?xml version="1.0" encoding="utf-8"?>
<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/">
   <soapenv:Body>
     <soapenv:Fault>
       <faultcode>soapenv:Server</faultcode>
       <faultstring>java.sql.SQLException: ORA-02291: integrity 
constraint (SATURN.SYS_C0065841) violated - parent key not found
ORA-06512: at "WEBBANNER.WEB_EXAMS", line 447
ORA-06512: at line 1
</faultstring>
       <detail>
         <ns:ExamRequestUpdateSQLException 
xmlns:ns="http://update.request.exam.athabascau.ca">
           <SQLException 
xmlns="http://update.request.exam.athabascau.ca" 
xmlns:ax29="http://rmi.java/xsd" xmlns:ax213="http://sql.java/xsd" 
xmlns:ax210="http://io.java/xsd" 
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" 
xsi:type="ax213:SQLException">
             <ax213:SQLState xsi:nil="true"/>
             <ax213:errorCode>0</ax213:errorCode>
             <ax213:nextException xsi:nil="true"/>
           </SQLException>
         </ns:ExamRequestUpdateSQLException>
       </detail>
     </soapenv:Fault>
   </soapenv:Body>
</soapenv:Envelope>

We get a stack trace like this...

ca.athabascau.exam.request.update.ExamRequestUpdateSQLExceptionException: ExamRequestUpdateSQLExceptionException
	at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
	at 
sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:39)
	at 
sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:27)
	at java.lang.reflect.Constructor.newInstance(Constructor.java:513)
	at java.lang.Class.newInstance0(Class.java:355)
	at java.lang.Class.newInstance(Class.java:308)
	at 
ca.athabascau.exam.request.update.ExamRequestUpdateStub.update(ExamRequestUpdateStub.java:222)
	at 
ca.athabascau.exam.request.transfer.cronjob.Main.updateRequest(Main.java:204)
	at ca.athabascau.exam.request.transfer.cronjob.Main.main(Main.java:123)

Thanks.

-- 
Trenton D. Adams
Senior Systems Analyst/Web Software Developer
Navy Penguins at your service!
Athabasca University
(780) 675-6195
:wq!

--

-- 
    This communication is intended for the use of the recipient to whom it
    is addressed, and may contain confidential, personal, and or privileged
    information. Please contact us immediately if you are not the intended
    recipient of this communication, and do not copy, distribute, or take
    action relying on it. Any communications received in error, or
    subsequent reply, should be deleted or destroyed.
---
Nandeesh Kaggere | 23 May 15:53

Problem in generating client stub

Hi,

This is one of those things.. that worked before. Now I am trying to generate stub from a WSDL file as below. I have tried tweaking configuration files unders \axis2\conf as well. If some one has an answer, can you please share.

 

C:\ax2-1.6.0BD\bin>WSDL2Java -uri C:\tryStubs\CARDCLOS.wsdl -p com.com.xx.wsclient.closeCard -d adb -s -Eosv

 

Using AXIS2_HOME:   C:\ax2-1.6.0BD

Using JAVA_HOME:    C:\j2skd1.6_27

 

Retrieving document at 'C:\tryStubs\CARDCLOS.wsdl'.

log4j:WARN No appenders could be found for logger (org.apache.axis2.description.

WSDL11ToAllAxisServicesBuilder).

log4j:WARN Please initialize the log4j system properly.

 

Thanks,

Nandeesh

 

Antonio Bocci | 23 May 07:30
Picon
Favicon

(unknown)

http://sabdekho.com/lastnews/28MarkMacdonald/

aaron.stromas | 22 May 17:41
Picon

JDOM XPath does not work with Axis

Hi,

 

I tried both JDOM and now JDOM2.

 

For JDOM2,

XPathFactory xpfac = XPathFactory.instance();

XPathExpression xp = xpfac.compile("//foo/bar");

 

The xp is null.

 

For JDOM,

XPath xp = XPath.newInstance("//foo/bar");

The xp is null.

 

Both work in the simple java application.

 

I tried to putting the JDOM jar in webapps/axis2/WEB-INF/lib along with Jaxen – doesn’t do a thing.

Any ideas?

 

Best regards,

 

-a

Picon

[Axis2] Log of soap messages creates mutiple logs, instead of just one.

Hello all,
  I just upgraded my webservices client from Axis1 to Axis2. With Axis1 I was able to log the HTTP requests and responses just by adding the following line to my log4j.properties

log4j.logger.org.apache.axis.transport.http=DEBUG

and it created nice logs where all the body of the http request was shown using just one log (The content could be multiline, but there was just one call to the logger)

8C499036B8A58B99B6BDB01792F3C2897CD828A7 2012-04-17 08:26:28,575 DEBUG org.apache.axis.transport.http.HTTPSender  - Enter:  HTTPSender::invoke
8C499036B8A58B99B6BDB01792F3C2897CD828A7 2012-04-17 08:26:28,745 DEBUG org.apache.axis.transport.http.HTTPSender  - XML sent:
8C499036B8A58B99B6BDB01792F3C2897CD828A7 2012-04-17 08:26:28,745 DEBUG org.apache.axis.transport.http.HTTPSender  - ---------------------------------------------------
8C499036B8A58B99B6BDB01792F3C2897CD828A7 2012-04-17 08:26:28,745 DEBUG org.apache.axis.transport.http.HTTPSender  - POST /aa HTTP/1.0
Content-Type: text/xml; charset=utf-8
Accept: application/soap+xml, application/dime, multipart/related, text/*
User-Agent: Axis/1.4
Host: 180.213.103.133:83
Cache-Control: no-cache
Pragma: no-cache
SOAPAction: "aa:query:Query_6_0"
Content-Length: 1878
<?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>*** hidden ***</soapenv:Body></soapenv:Envelope>

On Axis2 I changed the line to:

log4j.logger.org.apache.axis2.transport.http=DEBUG

But now Axis2 is using a bunch of calls to the logger to show the HTTP request and responses

590AEACBF7F76E6912414FD0ED1AB0187543A98B 2012-05-21 21:59:47,007 DEBUG httpclient.wire.content  - << "[\n]"
590AEACBF7F76E6912414FD0ED1AB0187543A98B 2012-05-21 21:59:47,007 DEBUG httpclient.wire.content  - << "</ns1:reasonDescription><ns1:statusCode>200</ns1:statusCode></ns1:statusHeader></ns1:queryReturn></ns1:queryResponse>"
590AEACBF7F76E6912414FD0ED1AB0187543A98B 2012-05-21 21:59:47,009 DEBUG httpclient.wire.content  - << "[\r]"
590AEACBF7F76E6912414FD0ED1AB0187543A98B 2012-05-21 21:59:47,009 DEBUG httpclient.wire.content  - << "[\n]"
590AEACBF7F76E6912414FD0ED1AB0187543A98B 2012-05-21 21:59:47,009 DEBUG httpclient.wire.content  - << "0"
590AEACBF7F76E6912414FD0ED1AB0187543A98B 2012-05-21 21:59:47,009 DEBUG httpclient.wire.content  - << "0"
590AEACBF7F76E6912414FD0ED1AB0187543A98B 2012-05-21 21:59:47,009 DEBUG httpclient.wire.content  - << "2"
590AEACBF7F76E6912414FD0ED1AB0187543A98B 2012-05-21 21:59:47,009 DEBUG httpclient.wire.content  - << "2"
590AEACBF7F76E6912414FD0ED1AB0187543A98B 2012-05-21 21:59:47,009 DEBUG httpclient.wire.content  - << "[\r]"
590AEACBF7F76E6912414FD0ED1AB0187543A98B 2012-05-21 21:59:47,009 DEBUG httpclient.wire.content  - << "[\n]"
590AEACBF7F76E6912414FD0ED1AB0187543A98B 2012-05-21 21:59:47,010 DEBUG httpclient.wire.content  - << "</soapenv:Body></soapenv:Envelope>"
590AEACBF7F76E6912414FD0ED1AB0187543A98B 2012-05-21 21:59:47,010 DEBUG httpclient.wire.content  - << "[\r]"
590AEACBF7F76E6912414FD0ED1AB0187543A98B 2012-05-21 21:59:47,010 DEBUG httpclient.wire.content  - << "[\n]"
590AEACBF7F76E6912414FD0ED1AB0187543A98B 2012-05-21 21:59:47,010 DEBUG httpclient.wire.content  - << "0"
590AEACBF7F76E6912414FD0ED1AB0187543A98B 2012-05-21 21:59:47,010 DEBUG httpclient.wire.content  - << "0"
590AEACBF7F76E6912414FD0ED1AB0187543A98B 2012-05-21 21:59:47,010 DEBUG httpclient.wire.content  - << "0"
590AEACBF7F76E6912414FD0ED1AB0187543A98B 2012-05-21 21:59:47,010 DEBUG httpclient.wire.content  - << "0"
590AEACBF7F76E6912414FD0ED1AB0187543A98B 2012-05-21 21:59:47,010 DEBUG httpclient.wire.content  - << "[\r]"
590AEACBF7F76E6912414FD0ED1AB0187543A98B 2012-05-21 21:59:47,010 DEBUG httpclient.wire.content  - << "[\n]"
590AEACBF7F76E6912414FD0ED1AB0187543A98B 2012-05-21 21:59:47,010 DEBUG httpclient.wire.content  - << "[\r]"
590AEACBF7F76E6912414FD0ED1AB0187543A98B 2012-05-21 21:59:47,010 DEBUG httpclient.wire.content  - << "[\n]"
590AEACBF7F76E6912414FD0ED1AB0187543A98B 2012-05-21 21:59:47,010 DEBUG httpclient.wire.header  - << "[\r][\n]"


Is there any way to make it behave like it did with Axis1?

Thanks



eric johnson | 21 May 22:10
Picon

axis2 mtom attach document to response - help please

Hi,

I'm having some trouble adding an attachment to my response after
attempting to follow the instructions here:
http://axis.apache.org/axis2/java/core/docs/mtom-guide.html#

The example from that url I am following is:

        OMElement imageElement = fac.createOMElement("image", omNs);

        // Creating the Data Handler for the file.  Any implementation of
        // javax.activation.DataSource interface can fit here.
        javax.activation.DataHandler dataHandler = new
javax.activation.DataHandler(new FileDataSource("SomeFile"));

        //create an OMText node with the above DataHandler and set
optimized to true
        OMText textData = fac.createOMText(dataHandler, true);

        imageElement.addChild(textData);

I suspect I am making a mistake in the creation of OMElement and
OMNameSpace in my code below.

      OMFactory factory = OMAbstractFactory.getOMFactory();
      OMNamespace omNs = factory.createOMNamespace("I put the
targetNamespace from the wsdl here", "ns");
      OMElement documentElement = factory.createOMElement("document", omNs);
      OMText textData = factory.createOMText(documentDataHandler, true);

      documentElement.addChild(textData);

So what should I be using for the URI and prefix values?  (I realize
this is probably web services 101, but this is all new to me and a bit
overwhelming).

The document element is really part of a GetDocumentResponse type
defined in my wsdl as:
      <xs:element name="GetDocumentResponse"
type="tns:GetDocumentResponseType" />

      <xs:complexType name="GetDocumentResponseType">
        <xs:sequence>
          <xs:element name="mimeType" type="xs:string" minOccurs="1"
maxOccurs="1"/>
          <xs:element name="documentName" type="xs:string"
minOccurs="1" maxOccurs="1"/>
          <xs:element name="storageTimestamp" type="tns:sDateTime"
minOccurs="1" maxOccurs="1"/>
          <xs:element name="document" type="xs:base64Binary"
minOccurs="1" maxOccurs="1"/>
        </xs:sequence>
      </xs:complexType>

should I use "tns:GetDocumentResponse" for the prefix when creating
the OMNamespace object?

Should I be using the soap:address from the wsdl:service/wsdl:port as the uri?

Is there anything besides the code example I need to do to complete
the addition of the attachment?

Thanks!

Eric
josephina | 18 May 00:47
Picon
Favicon

connecting AXIS 2 HANDLER with JDOM parser-Dissertation


Please help!!! Does anyone know how to change the Axis 2 Handler plugins (of
an existing Axis 2 Handler) in order to call the JDOM parser before calling
the web services????

Any recommendations???
--

-- 
View this message in context: http://old.nabble.com/connecting-AXIS-2-HANDLER-with-JDOM-parser-Dissertation-tp33867615p33867615.html
Sent from the Axis - User mailing list archive at Nabble.com.
eric johnson | 18 May 00:21
Picon

axis2 - file cache for attachments - file name?

Hi,


I've set up file caching for attachments by following these instructions:


I need a way to programmatically know what the name of the file that was created is so that in my web services skeleton I can process the file. How can this be accomplished?

I have seen the files that are generated have names such as:

axiomfc4c46332e06dfee16108281aab8ab7c5f1685e8d6ea7ca8.att

Thanks,

Eric
Oliver Heard | 11 May 11:59
Picon

Bug #AXIS2-4445; Workaround?

Hi java-user(s),

I have a question related to the bug here: 
https://issues.apache.org/jira/browse/AXIS2-4445

We're trying to use Axis2 to generate a service from a WSDL that uses 
the wrapped array pattern. wsdl2java does its half of the job fine, but 
while trying to deploy the AAR Axis2 gives a stack trace virtually 
identical to the one at the above link.

I notice this bug hasn't been fixed since 2009 so does anybody know a 
workaround that doesn't involve forking Axis2 or having to maintain 
custom patches?

Thanks in advance,
Oli

--

-- 
Oliver Heard
Developer
Order of Magnitude

Round Foundry Media Centre | Foundry Street | Leeds | LS11 5QP

E : oliver <at> orderofmagnitude.co.uk
T : 0113 394 4599
Asen | 10 May 18:34
Picon

Axis2-1.6.2 generated stubs fails to use module rampart

Hi there,

I am trying to use wsdl2ejava Axis-1.6.2 generated stubs and including
Rampart-1.6.2 for the WS-Sec.
I have copied in to my application all the required Axis/Rampart jars,
modules and created the required directory structure when building it.
All my web services and generated code clients are deployed, visible
and ready to go.

But here is what I am experiencing when I try to invoke a client stub
and make him engage 'rampart' module to pass the WCF exposed service
with UsernameToken security.
"Unable to engage module : rampart"

Hmm, looked at the code and this seems to make sense even though all
axis2 and rampart modules are deployed during startup form the
WarBasedAxisConfigurator.
When the stub's service client is configured a null
ConfigurationContext is used as in previous versions but here the
check for if (MessageContext.getCurrentMessageContext() == null)
always
is true and new ConfigurationContext is created from file system which
uses the default axis2.xml and since a repository location is not
specified it seems that fails to find the deployed modules in
WEB-INF/modules
In other words I am receiving a AxisConfiguration without any modules.

What I am doing wrong here?
I had not have the issue with Axis-1.5 since there it was using a
Listener instead of MessageContext.getCurrentMessageContext()

My axis2.xml is the same as it comes from the distribution, but with
added two more globally engaged modules.

<module ref="addressing"/>
    <module ref="soapmonitor" />
    <module ref="rampart"/>

private void configureServiceClient(ConfigurationContext
configContext, AxisService axisService)
            throws AxisFault {
        if (configContext == null) {
            if (MessageContext.getCurrentMessageContext() == null) {
                configContext = ConfigurationContextFactory.
                        createConfigurationContextFromFileSystem(null, null);
                createConfigCtx = true;
            } else {
                configContext =
MessageContext.getCurrentMessageContext().getConfigurationContext();
            }
        }
        this.configContext = configContext;
        hashCode = (int)anonServiceCounter.incrementAndGet();

        // Initialize transports
        ListenerManager transportManager = configContext.getListenerManager();
        if (transportManager == null) {
            transportManager = new ListenerManager();
            transportManager.init(this.configContext);
        }

        // save the axisConfig and service
        axisConfig = configContext.getAxisConfiguration();

        if (axisService == null) {
            axisService = createAnonymousService();
        }

Gmane