Re: Handling Large data in a method call

2009-05-12 Thread Sudhir Mongia
Hi Amila,
I am waiting to hear from you. We are bound to use xmlbeans and its eating
memory like anything. I thought of seeing another binding approach, tried
with Jibx but that too seems very complex.

Any help.pointer appreciated.

Thanks,
Sudhir

On Fri, May 8, 2009 at 10:14 AM, Sudhir Mongia sudhir.mon...@gmail.comwrote:

 Hi Amila,
 We are using Axis21.4.1 and it doesn't seems to support Complex type and
 extensions.  I have not tried on Jibx yet.

 Sudhir


 On Thu, May 7, 2009 at 1:07 PM, Amila Suriarachchi 
 amilasuriarach...@gmail.com wrote:



 On Wed, May 6, 2009 at 10:12 AM, Sudhir Mongia 
 sudhir.mon...@gmail.comwrote:

 Hi Dennis,
 We are not using WS-Security. Still its paining us.

 The problem we are facing is memory consumption while  serialization.

 We are using xmlbeans databinding, we couldn't go for ADB as it doesn't
 supports Complex type extension and restrictions and we have not evaluated
 other binding options as of now.


 What is the Axis2 version you use? ADB supports Complex type extension and
 restrictions.  But again there is a possibility it won't support for all
 variations.

 Generally Xmlbeans slower than other data bindings. so you can try jibx
 and jaxbri as well.

 thanks,
 Amila.


 Thanks,
 Sudhir


 On Wed, May 6, 2009 at 3:01 AM, Dennis Sosnoski d...@sosnoski.comwrote:

 Hi Sudhir,

 Are you using WS-Security for the service? WS-Security builds an
 in-memory model of the XML if you're using signatures (and perhaps at other
 times - I haven't checked, but there appeared to be some issues in this
 area).

 If you're not using WS-Security this type of data should not be causing
 problems. What data binding approach are you using? (ADB, XMLBeans, JiBX,
 JAXB?)

  - Dennis

 --
 Dennis M. Sosnoski
 SOA and Web Services in Java
 Axis2 Training and Consulting
 http://www.sosnoski.com - http://www.sosnoski.co.nz
 Seattle, WA +1-425-939-0576 - Wellington, NZ +64-4-298-6117


 Sudhir Mongia wrote:

 Hi,

 Has anyone got any experience in this type of problem ? One possible
 solution we used temporarily is, pass data fragment in in a call and do
 multiple calls to send the complete data.But we are reluctant to go with
 this approach in production.

 Any help/pointer ?

 Thanks,
 Sudhir

 On Mon, May 4, 2009 at 2:23 PM, Sudhir Mongia 
 sudhir.mon...@gmail.commailto:
 sudhir.mon...@gmail.com wrote:

Hi,

We have a web method exposed by .net app and we using client stubs
generated through Axis2. This method accepts an array of objects.
The object is very heavy object containing 25+ members variables
of double and string type.
The calls to this method fails sometimes due to memory when we are
trying to send large number of objects e.g. 10-20.

Any suggestions/idea , how can we compress the size of data to fix
this problem? We have control up to some extent on server side as
well.

Thanks,
Sudhir






 --
 Amila Suriarachchi
 WSO2 Inc.
 blog: http://amilachinthaka.blogspot.com/





rpc/literal webservice with multiple parameters

2009-05-12 Thread krishna.arani

Hi,
I have a rpc/literal webservice with multiple parameters in its response. It
is possible that one of the parameter can be null i.e. the expected soap
response is prefix:name xsi:nil=1 but the ADB Wrapper generated by
wsdl2java tool throws exception while serializing it. If I wrap both the
parameters myself in a xxxResponse element (with second part element
nillable=true) this will change the wsdl which I dont want to do. It was
working fine with axis1. Any suggestion will be of great help. Thanks

Krishna
-- 
View this message in context: 
http://www.nabble.com/rpc-literal-webservice-with-multiple-parameters-tp23497134p23497134.html
Sent from the Axis - User mailing list archive at Nabble.com.



Transport out has not been set error

2009-05-12 Thread Claire Loto

Hi,
I am trying to run a test client in Axis2 but i got this error:
log4j:WARN No appenders could be found for logger 
(org.apache.axis2.util.Loader).

log4j:WARN Please initialize the log4j system properly.
org.apache.axis2.AxisFault: Transport out has not been set
   at org.apache.axis2.engine.AxisEngine.send(AxisEngine.java:439)
   at 
org.apache.axis2.description.OutInAxisOperationClient.send(OutInAxisOperation.java:330)
   at 
org.apache.axis2.description.OutInAxisOperationClient.execute(OutInAxisOperation.java:294)
   at 
org.apache.axis2.client.ServiceClient.sendReceive(ServiceClient.java:520)
   at 
org.apache.axis2.client.ServiceClient.sendReceive(ServiceClient.java:500)

   at org.example.www.helloaxis2.helloClient.main(helloClient.java:37)
   at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
   at 
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
   at 
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)

   at java.lang.reflect.Method.invoke(Method.java:597)
   at com.intellij.rt.execution.application.AppMain.main(AppMain.java:90)

can anyone please help me?

thanks,

Claire


Re: Transport out has not been set error

2009-05-12 Thread Paul Fremantle
It looks like your sample code is wrong. Can you post it so we can see?

Thanks!
Paul

On Tue, May 12, 2009 at 8:05 AM, Claire Loto l...@taosolutions.biz wrote:
 Hi,
 I am trying to run a test client in Axis2 but i got this error:
 log4j:WARN No appenders could be found for logger
 (org.apache.axis2.util.Loader).
 log4j:WARN Please initialize the log4j system properly.
 org.apache.axis2.AxisFault: Transport out has not been set
   at org.apache.axis2.engine.AxisEngine.send(AxisEngine.java:439)
   at
 org.apache.axis2.description.OutInAxisOperationClient.send(OutInAxisOperation.java:330)
   at
 org.apache.axis2.description.OutInAxisOperationClient.execute(OutInAxisOperation.java:294)
   at
 org.apache.axis2.client.ServiceClient.sendReceive(ServiceClient.java:520)
   at
 org.apache.axis2.client.ServiceClient.sendReceive(ServiceClient.java:500)
   at org.example.www.helloaxis2.helloClient.main(helloClient.java:37)
   at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
   at
 sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
   at
 sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
   at java.lang.reflect.Method.invoke(Method.java:597)
   at com.intellij.rt.execution.application.AppMain.main(AppMain.java:90)

 can anyone please help me?

 thanks,

 Claire




-- 
Paul Fremantle
Co-Founder and CTO, WSO2
Apache Synapse PMC Chair
OASIS WS-RX TC Co-chair

blog: http://pzf.fremantle.org
p...@wso2.com

Oxygenating the Web Service Platform, www.wso2.com


Unsupported Encoding

2009-05-12 Thread M1d0

Hi,
I am trying to insert into mysql, retrieve from mysql, then insert into
AS400 (The code is done as a wbservice in Apache Tomcat/Axis2 1.4). I am
able to insert however when I try to select in the Resultset (
columnname.getstring) is not executing and says unsupported encoding Cp1256.

Any help, thanks.
-- 
View this message in context: 
http://www.nabble.com/Unsupported-Encoding-tp23497615p23497615.html
Sent from the Axis - User mailing list archive at Nabble.com.



Re: Transport out has not been set error

2009-05-12 Thread Claire Loto

Hi Paul,
I have attached the files I am using.
thanks a lot

Regards,
Claire

Paul Fremantle wrote:

It looks like your sample code is wrong. Can you post it so we can see?

Thanks!
Paul

On Tue, May 12, 2009 at 8:05 AM, Claire Loto l...@taosolutions.biz wrote:
  

Hi,
I am trying to run a test client in Axis2 but i got this error:
log4j:WARN No appenders could be found for logger
(org.apache.axis2.util.Loader).
log4j:WARN Please initialize the log4j system properly.
org.apache.axis2.AxisFault: Transport out has not been set
  at org.apache.axis2.engine.AxisEngine.send(AxisEngine.java:439)
  at
org.apache.axis2.description.OutInAxisOperationClient.send(OutInAxisOperation.java:330)
  at
org.apache.axis2.description.OutInAxisOperationClient.execute(OutInAxisOperation.java:294)
  at
org.apache.axis2.client.ServiceClient.sendReceive(ServiceClient.java:520)
  at
org.apache.axis2.client.ServiceClient.sendReceive(ServiceClient.java:500)
  at org.example.www.helloaxis2.helloClient.main(helloClient.java:37)
  at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
  at
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
  at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
  at java.lang.reflect.Method.invoke(Method.java:597)
  at com.intellij.rt.execution.application.AppMain.main(AppMain.java:90)

can anyone please help me?

thanks,

Claire






  
package org.example.www.helloaxis2;

/**
 * Created by IntelliJ IDEA.
 * User: Sajal Dutta
 * Date: May 7, 2009
 * Time: 5:04:00 PM
 * To change this template use File | Settings | File Templates.
 */
import java.io.StringWriter;
import javax.xml.stream.*;
import org.apache.axiom.om.*;
import org.apache.axis2.*;
import org.apache.axis2.addressing.EndpointReference;
import org.apache.axis2.client.ServiceClient;
import org.apache.axis2.client.Options;

public class helloClient {
//specify the endpoint reference
private static EndpointReference targetEPR = new EndpointReference(
http://localhost:8080/axis2/services/helloAxis2;);
public static void main(String[] args) {
try {
OMFactory fac = OMAbstractFactory.getOMFactory();
OMNamespace omNs = fac.createOMNamespace(
http://www.example.org/helloAxis2/;, helloAxis2);
//compose the request element
OMElement request = fac.createOMElement(Request, omNs);
request.addChild(fac.createOMText(MADMUC));
Options options = new Options();
//specify sender options: target, transport protocol, and soap 
action
options.setTo(targetEPR);
options.setTransportInProtocol(Constants.TRANSPORT_HTTP);

options.setAction(http://localhost:8080/axis2/services/helloAxis2;);
ServiceClient sender = new ServiceClient();
sender.setOptions(options);
OMElement result = sender.sendReceive(request);
//print out the response
StringWriter writer = new StringWriter();
result.serialize(XMLOutputFactory.newInstance()
.createXMLStreamWriter(writer));
writer.flush();
System.out.println(writer.toString());
} catch (AxisFault axisFault) {
axisFault.printStackTrace();
} catch (XMLStreamException e) {
e.printStackTrace();
}
}
}
/**
* HelloAxis2MessageReceiverInOut.java
*
* This file was auto-generated from WSDL
* by the Apache Axis2 version: 1.2 Apr 27, 2007 (04:14:19 IST)
*/
package org.example.www.helloaxis2;

/**
*  HelloAxis2MessageReceiverInOut message receiver
*/

public class HelloAxis2MessageReceiverInOut extends 
org.apache.axis2.receivers.AbstractInOutSyncMessageReceiver{


public void invokeBusinessLogic(org.apache.axis2.context.MessageContext 
msgContext, org.apache.axis2.context.MessageContext newMsgContext)
throws org.apache.axis2.AxisFault{

try {

// get the implementation class for the Web Service
Object obj = getTheImplementationObject(msgContext);

HelloAxis2Skeleton skel = (HelloAxis2Skeleton)obj;
//Out Envelop
org.apache.axiom.soap.SOAPEnvelope envelope = null;
//Find the axisOperation that has been set by the Dispatch phase.
org.apache.axis2.description.AxisOperation op = 
msgContext.getOperationContext().getAxisOperation();
if (op == null) {
throw new org.apache.axis2.AxisFault(Operation is not located, if this 
is doclit style the SOAP-ACTION should specified via the SOAP Action to use the 
RawXMLProvider);
}

java.lang.String methodName;
if(op.getName() != null  (methodName = 
org.apache.axis2.util.JavaUtils.xmlNameToJava(op.getName().getLocalPart())) != 
null){



if(sayHello.equals(methodName)){


Re: Transport out has not been set error

2009-05-12 Thread Paul Fremantle
Is that your first client!? Its a little more complex than the average
- have you looked at the samples?

I think the problem is that you've set the InProtocol but not the out
protocol. What happens if you simple comment out the line:
options.setTransportInProtocol(Constants.TRANSPORT_HTTP);

Paul

On Tue, May 12, 2009 at 8:53 AM, Claire Loto l...@taosolutions.biz wrote:
 Hi Paul,
 I have attached the files I am using.
 thanks a lot

 Regards,
 Claire

 Paul Fremantle wrote:

 It looks like your sample code is wrong. Can you post it so we can see?

 Thanks!
 Paul

 On Tue, May 12, 2009 at 8:05 AM, Claire Loto l...@taosolutions.biz wrote:


 Hi,
 I am trying to run a test client in Axis2 but i got this error:
 log4j:WARN No appenders could be found for logger
 (org.apache.axis2.util.Loader).
 log4j:WARN Please initialize the log4j system properly.
 org.apache.axis2.AxisFault: Transport out has not been set
   at org.apache.axis2.engine.AxisEngine.send(AxisEngine.java:439)
   at
 org.apache.axis2.description.OutInAxisOperationClient.send(OutInAxisOperation.java:330)
   at
 org.apache.axis2.description.OutInAxisOperationClient.execute(OutInAxisOperation.java:294)
   at
 org.apache.axis2.client.ServiceClient.sendReceive(ServiceClient.java:520)
   at
 org.apache.axis2.client.ServiceClient.sendReceive(ServiceClient.java:500)
   at org.example.www.helloaxis2.helloClient.main(helloClient.java:37)
   at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
   at
 sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
   at
 sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
   at java.lang.reflect.Method.invoke(Method.java:597)
   at com.intellij.rt.execution.application.AppMain.main(AppMain.java:90)

 can anyone please help me?

 thanks,

 Claire





 package org.example.www.helloaxis2;

 /**
  * Created by IntelliJ IDEA.
  * User: Sajal Dutta
  * Date: May 7, 2009
  * Time: 5:04:00 PM
  * To change this template use File | Settings | File Templates.
  */
 import java.io.StringWriter;
 import javax.xml.stream.*;
 import org.apache.axiom.om.*;
 import org.apache.axis2.*;
 import org.apache.axis2.addressing.EndpointReference;
 import org.apache.axis2.client.ServiceClient;
 import org.apache.axis2.client.Options;

 public class helloClient {
    //specify the endpoint reference
    private static EndpointReference targetEPR = new EndpointReference(
    http://localhost:8080/axis2/services/helloAxis2;);
    public static void main(String[] args) {
        try {
            OMFactory fac = OMAbstractFactory.getOMFactory();
            OMNamespace omNs = fac.createOMNamespace(
            http://www.example.org/helloAxis2/;, helloAxis2);
            //compose the request element
            OMElement request = fac.createOMElement(Request, omNs);
            request.addChild(fac.createOMText(MADMUC));
            Options options = new Options();
            //specify sender options: target, transport protocol, and soap
 action
            options.setTo(targetEPR);
            options.setTransportInProtocol(Constants.TRANSPORT_HTTP);

  options.setAction(http://localhost:8080/axis2/services/helloAxis2;);
            ServiceClient sender = new ServiceClient();
            sender.setOptions(options);
            OMElement result = sender.sendReceive(request);
            //print out the response
            StringWriter writer = new StringWriter();
            result.serialize(XMLOutputFactory.newInstance()
            .createXMLStreamWriter(writer));
            writer.flush();
            System.out.println(writer.toString());
        } catch (AxisFault axisFault) {
            axisFault.printStackTrace();
        } catch (XMLStreamException e) {
            e.printStackTrace();
        }
    }
 }

        /**
        * HelloAxis2MessageReceiverInOut.java
        *
        * This file was auto-generated from WSDL
        * by the Apache Axis2 version: 1.2 Apr 27, 2007 (04:14:19 IST)
        */
        package org.example.www.helloaxis2;

        /**
        *  HelloAxis2MessageReceiverInOut message receiver
        */

        public class HelloAxis2MessageReceiverInOut extends
 org.apache.axis2.receivers.AbstractInOutSyncMessageReceiver{


        public void
 invokeBusinessLogic(org.apache.axis2.context.MessageContext msgContext,
 org.apache.axis2.context.MessageContext newMsgContext)
        throws org.apache.axis2.AxisFault{

        try {

        // get the implementation class for the Web Service
        Object obj = getTheImplementationObject(msgContext);

        HelloAxis2Skeleton skel = (HelloAxis2Skeleton)obj;
        //Out Envelop
        org.apache.axiom.soap.SOAPEnvelope envelope = null;
        //Find the axisOperation that has been set by the Dispatch phase.
        org.apache.axis2.description.AxisOperation op =
 msgContext.getOperationContext().getAxisOperation();
        if (op == null) {
        throw new 

Re: Transport out has not been set error

2009-05-12 Thread Claire Loto

Yes, this is my first client. I got it from an Axis2 tutorial site.
I got the same error after commenting out the line:
  


options.setTransportInProtocol(Constants.TRANSPORT_HTTP);

-Claire
Paul Fremantle wrote:

Is that your first client!? Its a little more complex than the average
- have you looked at the samples?

I think the problem is that you've set the InProtocol but not the out
protocol. What happens if you simple comment out the line:
  

   options.setTransportInProtocol(Constants.TRANSPORT_HTTP);



Paul

On Tue, May 12, 2009 at 8:53 AM, Claire Loto l...@taosolutions.biz wrote:
  

Hi Paul,
I have attached the files I am using.
thanks a lot

Regards,
Claire

Paul Fremantle wrote:

It looks like your sample code is wrong. Can you post it so we can see?

Thanks!
Paul

On Tue, May 12, 2009 at 8:05 AM, Claire Loto l...@taosolutions.biz wrote:


Hi,
I am trying to run a test client in Axis2 but i got this error:
log4j:WARN No appenders could be found for logger
(org.apache.axis2.util.Loader).
log4j:WARN Please initialize the log4j system properly.
org.apache.axis2.AxisFault: Transport out has not been set
  at org.apache.axis2.engine.AxisEngine.send(AxisEngine.java:439)
  at
org.apache.axis2.description.OutInAxisOperationClient.send(OutInAxisOperation.java:330)
  at
org.apache.axis2.description.OutInAxisOperationClient.execute(OutInAxisOperation.java:294)
  at
org.apache.axis2.client.ServiceClient.sendReceive(ServiceClient.java:520)
  at
org.apache.axis2.client.ServiceClient.sendReceive(ServiceClient.java:500)
  at org.example.www.helloaxis2.helloClient.main(helloClient.java:37)
  at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
  at
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
  at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
  at java.lang.reflect.Method.invoke(Method.java:597)
  at com.intellij.rt.execution.application.AppMain.main(AppMain.java:90)

can anyone please help me?

thanks,

Claire





package org.example.www.helloaxis2;

/**
 * Created by IntelliJ IDEA.
 * User: Sajal Dutta
 * Date: May 7, 2009
 * Time: 5:04:00 PM
 * To change this template use File | Settings | File Templates.
 */
import java.io.StringWriter;
import javax.xml.stream.*;
import org.apache.axiom.om.*;
import org.apache.axis2.*;
import org.apache.axis2.addressing.EndpointReference;
import org.apache.axis2.client.ServiceClient;
import org.apache.axis2.client.Options;

public class helloClient {
   //specify the endpoint reference
   private static EndpointReference targetEPR = new EndpointReference(
   http://localhost:8080/axis2/services/helloAxis2;);
   public static void main(String[] args) {
   try {
   OMFactory fac = OMAbstractFactory.getOMFactory();
   OMNamespace omNs = fac.createOMNamespace(
   http://www.example.org/helloAxis2/;, helloAxis2);
   //compose the request element
   OMElement request = fac.createOMElement(Request, omNs);
   request.addChild(fac.createOMText(MADMUC));
   Options options = new Options();
   //specify sender options: target, transport protocol, and soap
action
   options.setTo(targetEPR);
   options.setTransportInProtocol(Constants.TRANSPORT_HTTP);

 options.setAction(http://localhost:8080/axis2/services/helloAxis2;);
   ServiceClient sender = new ServiceClient();
   sender.setOptions(options);
   OMElement result = sender.sendReceive(request);
   //print out the response
   StringWriter writer = new StringWriter();
   result.serialize(XMLOutputFactory.newInstance()
   .createXMLStreamWriter(writer));
   writer.flush();
   System.out.println(writer.toString());
   } catch (AxisFault axisFault) {
   axisFault.printStackTrace();
   } catch (XMLStreamException e) {
   e.printStackTrace();
   }
   }
}

   /**
   * HelloAxis2MessageReceiverInOut.java
   *
   * This file was auto-generated from WSDL
   * by the Apache Axis2 version: 1.2 Apr 27, 2007 (04:14:19 IST)
   */
   package org.example.www.helloaxis2;

   /**
   *  HelloAxis2MessageReceiverInOut message receiver
   */

   public class HelloAxis2MessageReceiverInOut extends
org.apache.axis2.receivers.AbstractInOutSyncMessageReceiver{


   public void
invokeBusinessLogic(org.apache.axis2.context.MessageContext msgContext,
org.apache.axis2.context.MessageContext newMsgContext)
   throws org.apache.axis2.AxisFault{

   try {

   // get the implementation class for the Web Service
   Object obj = getTheImplementationObject(msgContext);

   HelloAxis2Skeleton skel = (HelloAxis2Skeleton)obj;
   //Out Envelop
   org.apache.axiom.soap.SOAPEnvelope envelope = null;
   //Find the axisOperation that has been set by the Dispatch phase.
   org.apache.axis2.description.AxisOperation op 

RE: FW: Undeliverable: RE: Getting the corect endpoints in WSDL for POJOs behind a proxy

2009-05-12 Thread Neil Youngman
Deepal jayasinghe wrote:
 I can not understand why that did not solve your problem, if you change
 the correct axis2.xml and restart the server. Anyway I will double check
 the code, may be someone has removed that code.

 Deepal

I've just realised that you didn't get the details of the issue with hostname.

What I wrote in the message rejected by the list was 

Deepal jayasinghe wrote:
 Hi,
 In axis2.xml there is a parameter called hostname, change that to be
 the url of Apache, that will solve your problem.

 Deepal

It doesn't look like it. Using

parameter name=hostname 
locked=truehttps://proxy.example.net/parameter

gives

http:address 
location=http://https://proxy.example.net:4580/axis2/services/ExampleService.ExampleSubmissionServiceHttpEndpoint//

which isn't the result I'm looking for.

Neil Youngman

As you can see it treats it purely as a hostname, not as a URL and adds an 
http://; prefix and a port number.

Neil


Neil Youngman 
Developer
Wirefast Limited
 
Wirefast provides secure corporate messaging services.
See our messaging solutions at http://www.wirefast.com/
Please consider the environment.
Does this email or attachment need to be printed? 
This message contains confidential information and is intended only 
for the individual named. If you are not the named addressee you 
should not disseminate, distribute or copy this email. Please 
notify the sender immediately by email if you have received this 
email by mistake and delete this email from your system.

Email transmission cannot be guaranteed to be secure or error-free 
as information could be intercepted, corrupted, lost, destroyed, 
arrive late or incomplete, or contain viruses. The sender therefore 
does not accept liability for any errors or omissions in the contents 
of this message which arise as a result of email transmission.
Wirefast Limited is registered in England  Wales
Company number: 03865860
Registered Office: 7/10 Chandos Street, Cavendish Square, London, W1G 9DQ

inline: logo.jpg

Re: Transport out has not been set error

2009-05-12 Thread Paul Fremantle
Ok I guess you should try adding:
 options.setTransportOutProtocol(Constants.TRANSPORT_HTTP);

It looks like our tutorial code is too complex!

Paul

On Tue, May 12, 2009 at 9:13 AM, Paul Fremantle pzf...@gmail.com wrote:
 Is that your first client!? Its a little more complex than the average
 - have you looked at the samples?

 I think the problem is that you've set the InProtocol but not the out
 protocol. What happens if you simple comment out the line:
            options.setTransportInProtocol(Constants.TRANSPORT_HTTP);

 Paul

 On Tue, May 12, 2009 at 8:53 AM, Claire Loto l...@taosolutions.biz wrote:
 Hi Paul,
 I have attached the files I am using.
 thanks a lot

 Regards,
 Claire

 Paul Fremantle wrote:

 It looks like your sample code is wrong. Can you post it so we can see?

 Thanks!
 Paul

 On Tue, May 12, 2009 at 8:05 AM, Claire Loto l...@taosolutions.biz wrote:


 Hi,
 I am trying to run a test client in Axis2 but i got this error:
 log4j:WARN No appenders could be found for logger
 (org.apache.axis2.util.Loader).
 log4j:WARN Please initialize the log4j system properly.
 org.apache.axis2.AxisFault: Transport out has not been set
   at org.apache.axis2.engine.AxisEngine.send(AxisEngine.java:439)
   at
 org.apache.axis2.description.OutInAxisOperationClient.send(OutInAxisOperation.java:330)
   at
 org.apache.axis2.description.OutInAxisOperationClient.execute(OutInAxisOperation.java:294)
   at
 org.apache.axis2.client.ServiceClient.sendReceive(ServiceClient.java:520)
   at
 org.apache.axis2.client.ServiceClient.sendReceive(ServiceClient.java:500)
   at org.example.www.helloaxis2.helloClient.main(helloClient.java:37)
   at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
   at
 sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
   at
 sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
   at java.lang.reflect.Method.invoke(Method.java:597)
   at com.intellij.rt.execution.application.AppMain.main(AppMain.java:90)

 can anyone please help me?

 thanks,

 Claire





 package org.example.www.helloaxis2;

 /**
  * Created by IntelliJ IDEA.
  * User: Sajal Dutta
  * Date: May 7, 2009
  * Time: 5:04:00 PM
  * To change this template use File | Settings | File Templates.
  */
 import java.io.StringWriter;
 import javax.xml.stream.*;
 import org.apache.axiom.om.*;
 import org.apache.axis2.*;
 import org.apache.axis2.addressing.EndpointReference;
 import org.apache.axis2.client.ServiceClient;
 import org.apache.axis2.client.Options;

 public class helloClient {
    //specify the endpoint reference
    private static EndpointReference targetEPR = new EndpointReference(
    http://localhost:8080/axis2/services/helloAxis2;);
    public static void main(String[] args) {
        try {
            OMFactory fac = OMAbstractFactory.getOMFactory();
            OMNamespace omNs = fac.createOMNamespace(
            http://www.example.org/helloAxis2/;, helloAxis2);
            //compose the request element
            OMElement request = fac.createOMElement(Request, omNs);
            request.addChild(fac.createOMText(MADMUC));
            Options options = new Options();
            //specify sender options: target, transport protocol, and soap
 action
            options.setTo(targetEPR);
            options.setTransportInProtocol(Constants.TRANSPORT_HTTP);

  options.setAction(http://localhost:8080/axis2/services/helloAxis2;);
            ServiceClient sender = new ServiceClient();
            sender.setOptions(options);
            OMElement result = sender.sendReceive(request);
            //print out the response
            StringWriter writer = new StringWriter();
            result.serialize(XMLOutputFactory.newInstance()
            .createXMLStreamWriter(writer));
            writer.flush();
            System.out.println(writer.toString());
        } catch (AxisFault axisFault) {
            axisFault.printStackTrace();
        } catch (XMLStreamException e) {
            e.printStackTrace();
        }
    }
 }

        /**
        * HelloAxis2MessageReceiverInOut.java
        *
        * This file was auto-generated from WSDL
        * by the Apache Axis2 version: 1.2 Apr 27, 2007 (04:14:19 IST)
        */
        package org.example.www.helloaxis2;

        /**
        *  HelloAxis2MessageReceiverInOut message receiver
        */

        public class HelloAxis2MessageReceiverInOut extends
 org.apache.axis2.receivers.AbstractInOutSyncMessageReceiver{


        public void
 invokeBusinessLogic(org.apache.axis2.context.MessageContext msgContext,
 org.apache.axis2.context.MessageContext newMsgContext)
        throws org.apache.axis2.AxisFault{

        try {

        // get the implementation class for the Web Service
        Object obj = getTheImplementationObject(msgContext);

        HelloAxis2Skeleton skel = (HelloAxis2Skeleton)obj;
        //Out Envelop
        org.apache.axiom.soap.SOAPEnvelope envelope = null;
        //Find 

IRC Channel

2009-05-12 Thread Nir Peled
Hello everyone,



Sorry for posting this again but I posted it in a very late hour on a
weekend last time.



I've opened a new IRC channel in which you can get live Axis2 support. I
think you would all enjoy this if indeed we had a little more support in
there.



The channel name is: ##axis2 and it is located in the freenode network (
irc.freenode.net) -- http://www.freenode.net



Please feel free to join and support / get support, opening an IRC channel
for this purpose is very important as I keep seeing many unsolved Axis2
problems in various other channels.



Thank you,



Nir


[AXIS2] Web service that extends an abstract class

2009-05-12 Thread Laurent Even

Hi all,

Does someone managed to publish a web service in axis 2 that extends an 
abstract class containing the method to call.


Here's an example to illustrate:
package pack;
import pack.MyAbstractClass;
public class MyWebService extends MyAbstractClass{
public MyWebService (){
   };
}


public abstract class MyAbstractClass{
   public OMElement read(OMElement xml){
   ...
   }
}

my services.xml

   service name=mywebservice 
   parameter name=ServiceClasspack.MyWebService/parameter
   operation name=read
   messageReceiver
   class=org.apache.axis2.receivers.RawXMLINOutMessageReceiver/
   /operation
/service


Here an extract of the wsdl generated by axis2
*wsdl:types /*
 wsdl:message name=*readRequest* /
 wsdl:message name=*readResponse* /
- # wsdl:portType name=*soldemvtPortType*


I'm getting the following error when calling the web service:
...
The ServiceClass object does not implement the required method in the 
following form: OMElement read(OMElement e)

...


Is there a constraint with abstract classes?

Thanks in advance






---

Un geste responsable aujourd hui pour preserver demain.
N imprimez ce message que si necessaire.



Please, consider the environment before printing this email.


begin:vcard
fn:Laurent EVEN
n:EVEN;Laurent
org;quoted-printable:SAB Ing=C3=A9nierie Informatique;Service RIC - Bureau 203
adr;dom:Rue Henri Becquerel;;CP27 - P.I.B.S.;VANNES;;56038
email;internet:laurent-e...@sab2i.com
title;quoted-printable:Ing=C3=A9nieur d'=C3=A9tudes
tel;work:+33 (0)2 97 01 59 59
tel;fax:+33 (0)2 97 01 59 50
url:http://www.sab-tm.com
version:2.1
end:vcard



Best Practice for multi-server web service ?

2009-05-12 Thread Jacques46

Hi,

I have a web service which must be deployed on multiple servers.  It's the
same web service, except for a few differences in the services.xml file
(configuration information, such as database connection string, etc...).

I'm coding this web service in Eclipse, and so what I do is I set up
services.xml for the first server, build the service, and then use Axis2's
admin module on the first server to deploy it;  I modify services.xml for
the second server, build, then deploy that one;  and so on for the other
servers.

There must be a better way ?

For example, is there a way for an Axis2 service to get its configuration
from a file outside the .aar, so that it doesn't need to be deployed every
time ?

Or, is there a way in Eclipse I can automate the creation of the different
versions of the service ?

What's the best practice on this ?

Thanks.
-- 
View this message in context: 
http://www.nabble.com/Best-Practice-for-multi-server-web-service---tp23501160p23501160.html
Sent from the Axis - User mailing list archive at Nabble.com.



RE: Web Service Calling Another Web Service

2009-05-12 Thread Mark Darnell
Deepal,

I checked the third-party web service and the soap action is set to an
empty string. What is most baffling by this problem is that a
stand-alone JAVA application, web page, and servlet can all call the
third-party web service without any error. But when we try to call the
third-party web service from our web service, we get the error. Since we
have multiple apps calling the third-party web service, we wrote a
utility class that all the apps use (including our web service) to call
the third-party web service. Any ideas?

Mark Darnell
BIT Systems, Inc.
(703) 742-7660 x110
-Original Message-
From: Deepal Jayasinghe [mailto:dee...@opensource.lk] 
Sent: Monday, May 11, 2009 3:02 PM
To: axis-user@ws.apache.org
Subject: Re: Web Service Calling Another Web Service


As I can understand it should be due to the incorrect soap action,
please check the WSDL of the third party service and set the correct
SOAP action.

Deepal

Mark Darnell wrote:

 We have a web service that needs to call another web service written
 by a third-party. For testing purposes we have both web services
 running under the same Axis2 installation on one server. When we
 attempt to call the third-party web service from our web service, we
 get the following exception (thrown by the third-party web service):

 org.apache.axis2.AxisFault: The server did not recognize the action
 which it received

 We have no idea how to resolve this exception or what is causing it.
 Our configuration is:

 JDK version 1.6.0_11

 Axis2 version 1.3

 Tomcat version 5.5.20 (Servlet version 2.4)

 Does anyone have any ideas on how to resolve this issue? Thanks.

 Mark Darnell

 BIT Systems, Inc.

 (703) 742-7660 x110


-- 
Thank you!


http://blogs.deepal.org
http://deepal.org



Re: Web Service Calling Another Web Service

2009-05-12 Thread Deepal jayasinghe
Mark Darnell wrote:
 Deepal,

 I checked the third-party web service and the soap action is set to an
 empty string. What is most baffling by this problem is that a
 stand-alone JAVA application, web page, and servlet can all call the
 third-party web service without any error. 
DO you use SOAP or REST for those applications ?
 But when we try to call the
 third-party web service from our web service, we get the error. Since we
 have multiple apps calling the third-party web service, we wrote a
 utility class that all the apps use (including our web service) to call
 the third-party web service. Any ideas?
   
try setting correct service url upto the operation, for example

http://host.com/axis2/services/myservice/myop

Deepal
 Mark Darnell
 BIT Systems, Inc.
 (703) 742-7660 x110
 -Original Message-
 From: Deepal Jayasinghe [mailto:dee...@opensource.lk] 
 Sent: Monday, May 11, 2009 3:02 PM
 To: axis-user@ws.apache.org
 Subject: Re: Web Service Calling Another Web Service


 As I can understand it should be due to the incorrect soap action,
 please check the WSDL of the third party service and set the correct
 SOAP action.

 Deepal

 Mark Darnell wrote:
   
 We have a web service that needs to call another web service written
 by a third-party. For testing purposes we have both web services
 running under the same Axis2 installation on one server. When we
 attempt to call the third-party web service from our web service, we
 get the following exception (thrown by the third-party web service):

 org.apache.axis2.AxisFault: The server did not recognize the action
 which it received

 We have no idea how to resolve this exception or what is causing it.
 Our configuration is:

 JDK version 1.6.0_11

 Axis2 version 1.3

 Tomcat version 5.5.20 (Servlet version 2.4)

 Does anyone have any ideas on how to resolve this issue? Thanks.

 Mark Darnell

 BIT Systems, Inc.

 (703) 742-7660 x110

 

   


-- 
Thank you!


http://blogs.deepal.org
http://deepal.org



[axis2-Using Existing APIs]

2009-05-12 Thread Vaibhav Arya
Thanks a lot Deepal, Caristi, Joe,

 

Your link provided useful information for incorporating axis2 web service
into my existing project.

 

Now I have successfully embedded web service into existing project.

 

I have a question: would I be able to call methods of existing java classes
and APIs currently used in my Project? Or would I need to copy those classes
and jars into web service 'myservice.aar'?  

 

I have not done initial RD over this issue. But this question is striking a
lot.

 

Kindly clarify this question.

 

Thanks to all for your valuable help.

 

 

Thanks  Regards,

 

Vaibhav Kumar Arya

Associate Software Engineer

OTS Solutions ,Gurgaon

 

 

 

 



===
Private, Confidential and Privileged. This e-mail and any files and attachments 
transmitted with it are confidential and/or privileged. They are intended 
solely for the use of the intended recipient. The content of this e-mail and 
any file or attachment transmitted with it may have been changed or altered 
without the consent of the author. If you are not the intended recipient, 
please note that any review, dissemination, disclosure, alteration, printing, 
circulation or Transmission of this e-mail and/or any file or attachment 
transmitted with it, is prohibited and may be unlawful. If you have received 
this e-mail or any file or attachment transmitted with it in error please 
notify OTS Solutions at i...@otssolutions.com
===


Synapse and axis2

2009-05-12 Thread Rajneesh Kumar
Hi Deepal,

 

I am new to SOA. I have implemented axis-2 in my application for testing.
Actually in my case, there would be multiple clients (developed in different
platform ASP/ VB/ flex/ swing etc.). I have a web application developed
using JSP/servlets - MVC and a DMS server). Now I have to design a server
component which will take input from various clients in cross platform
manner process it and use the existing web application to show the output. I
understand the need of axis-2. But I am not aware of Synapse. Will it useful
to use it in my case? Please suggest.

 

Thanks,

-Rajneesh



===
Private, Confidential and Privileged. This e-mail and any files and attachments 
transmitted with it are confidential and/or privileged. They are intended 
solely for the use of the intended recipient. The content of this e-mail and 
any file or attachment transmitted with it may have been changed or altered 
without the consent of the author. If you are not the intended recipient, 
please note that any review, dissemination, disclosure, alteration, printing, 
circulation or Transmission of this e-mail and/or any file or attachment 
transmitted with it, is prohibited and may be unlawful. If you have received 
this e-mail or any file or attachment transmitted with it in error please 
notify OTS Solutions at i...@otssolutions.com
===


JAXWSRIWSDLGenerator error

2009-05-12 Thread javier

Hi,

I'm facing some data binding problems when I try to deploy a JAXWS service 
under servicejars directory. When I try to see the generated WSDL from the list 
of services I obtain an error. The following code is the signature of the 
method I tried to expose as WS but the problem occurs using multiple dimension 
arrays as String[][] as input arguments. I'm generating the artifacts using 
wsgen before to package the service including them on the jar. At the end of 
the message you can find the error message. Any clue? 

Thanks in advance
javier

@WebService(serviceName = t5, portName = t5Port, name = t5)
@SOAPBinding(parameterStyle = WRAPPED, style = DOCUMENT, use = LITERAL)
public class T5 {

@WebMethod(operationName = demo)
@WebResult(name = demoResult)
public String demo( @WebParam(name = strings) String[][] strings) {
...
}

javax.xml.ws.WebServiceException: Error occurred generating WSDL file for Web 
service implementation class {sw.ws.T5}: {java.lang.Exception: Error occurred 
while attempting to read generated schema file 
{org.apache.ws.commons.schema.XmlSchemaException: Schema name conflict in 
collection. Namespace: http://jaxb.dev.java.net/array}}
at 
org.apache.axis2.jaxws.description.builder.JAXWSRIWSDLGenerator.generateWsdl(JAXWSRIWSDLGenerator.java:187)
at 
org.apache.axis2.jaxws.description.builder.JAXWSRIWSDLGenerator.initialize(JAXWSRIWSDLGenerator.java:371)
at 
org.apache.axis2.jaxws.description.builder.JAXWSRIWSDLGenerator.getWSDL(JAXWSRIWSDLGenerator.java:364)
at org.apache.axis2.description.AxisService.printWSDL(AxisService.java:1322)
at org.apache.axis2.transport.http.HTTPWorker.service(HTTPWorker.java:146)
at 
org.apache.axis2.transport.http.server.AxisHttpService.doService(AxisHttpService.java:281)
at 
org.apache.axis2.transport.http.server.AxisHttpService.handleRequest(AxisHttpService.java:187)
at 
org.apache.axis2.transport.http.server.HttpServiceProcessor.run(HttpServiceProcessor.java:82)
at 
edu.emory.mathcs.backport.java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1061)
at 
edu.emory.mathcs.backport.java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:575)
at java.lang.Thread.run(Thread.java:619)
Caused by: java.lang.Exception: Error occurred while attempting to read 
generated schema file {org.apache.ws.commons.schema.XmlSchemaException: Schema 
name conflict in collection. Namespace: http://jaxb.dev.java.net/array}
at 
org.apache.axis2.jaxws.description.builder.JAXWSRIWSDLGenerator.readInSchema(JAXWSRIWSDLGenerator.java:330)
at 
org.apache.axis2.jaxws.description.builder.JAXWSRIWSDLGenerator.generateWsdl(JAXWSRIWSDLGenerator.java:180)
... 10 more





RE: Transport out has not been set error

2009-05-12 Thread Aneel.Murari
I faced the exact same issue. The way I resolved was by adding the following 
code ...


TransportOutDescription transOut = new TransportOutDescription(http);
TransportSender sender = (TransportSender) new 
CommonsHTTPTransportSender();
  transOut.setSender(sender);
  Parameter param1 = new Parameter();
  param1.setName(PROTOCOL);
  param1.setValue(HTTP/1.1);

  Parameter param2 = new Parameter();
  param2.setName(Transfer-Encoding);
  param2.setValue(chunked);

  transOut.addParameter(param1);
  transOut.addParameter(param2);

  
stub._getServiceClient().getOptions().setTransportOut(transOut);


I still don't know the root cause of the issue. This is just a work around.

Regards,
Aneel


From: Claire Loto [mailto:l...@taosolutions.biz]
Sent: Tuesday, May 12, 2009 4:23 AM
To: axis-user@ws.apache.org
Subject: Re: Transport out has not been set error

Yes, this is my first client. I got it from an Axis2 tutorial site.
I got the same error after commenting out the line:



options.setTransportInProtocol(Constants.TRANSPORT_HTTP);
-Claire
Paul Fremantle wrote:

Is that your first client!? Its a little more complex than the average

- have you looked at the samples?



I think the problem is that you've set the InProtocol but not the out

protocol. What happens if you simple comment out the line:



   options.setTransportInProtocol(Constants.TRANSPORT_HTTP);





Paul



On Tue, May 12, 2009 at 8:53 AM, Claire Loto 
l...@taosolutions.bizmailto:l...@taosolutions.biz wrote:



Hi Paul,

I have attached the files I am using.

thanks a lot



Regards,

Claire



Paul Fremantle wrote:



It looks like your sample code is wrong. Can you post it so we can see?



Thanks!

Paul



On Tue, May 12, 2009 at 8:05 AM, Claire Loto 
l...@taosolutions.bizmailto:l...@taosolutions.biz wrote:





Hi,

I am trying to run a test client in Axis2 but i got this error:

log4j:WARN No appenders could be found for logger

(org.apache.axis2.util.Loader).

log4j:WARN Please initialize the log4j system properly.

org.apache.axis2.AxisFault: Transport out has not been set

  at org.apache.axis2.engine.AxisEngine.send(AxisEngine.java:439)

  at

org.apache.axis2.description.OutInAxisOperationClient.send(OutInAxisOperation.java:330)

  at

org.apache.axis2.description.OutInAxisOperationClient.execute(OutInAxisOperation.java:294)

  at

org.apache.axis2.client.ServiceClient.sendReceive(ServiceClient.java:520)

  at

org.apache.axis2.client.ServiceClient.sendReceive(ServiceClient.java:500)

  at org.example.www.helloaxis2.helloClient.main(helloClient.java:37)

  at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)

  at

sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)

  at

sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)

  at java.lang.reflect.Method.invoke(Method.java:597)

  at com.intellij.rt.execution.application.AppMain.main(AppMain.java:90)



can anyone please help me?



thanks,



Claire











package org.example.www.helloaxis2;



/**

 * Created by IntelliJ IDEA.

 * User: Sajal Dutta

 * Date: May 7, 2009

 * Time: 5:04:00 PM

 * To change this template use File | Settings | File Templates.

 */

import java.io.StringWriter;

import javax.xml.stream.*;

import org.apache.axiom.om.*;

import org.apache.axis2.*;

import org.apache.axis2.addressing.EndpointReference;

import org.apache.axis2.client.ServiceClient;

import org.apache.axis2.client.Options;



public class helloClient {

   //specify the endpoint reference

   private static EndpointReference targetEPR = new EndpointReference(

   
http://localhost:8080/axis2/services/helloAxis2;http://localhost:8080/axis2/services/helloAxis2);

   public static void main(String[] args) {

   try {

   OMFactory fac = OMAbstractFactory.getOMFactory();

   OMNamespace omNs = fac.createOMNamespace(

   
http://www.example.org/helloAxis2/;http://www.example.org/helloAxis2/, 
helloAxis2);

   //compose the request element

   OMElement request = fac.createOMElement(Request, omNs);

   request.addChild(fac.createOMText(MADMUC));

   Options options = new Options();

   //specify sender options: target, transport protocol, and soap

action

   options.setTo(targetEPR);

   options.setTransportInProtocol(Constants.TRANSPORT_HTTP);



 
options.setAction(http://localhost:8080/axis2/services/helloAxis2;http://localhost:8080/axis2/services/helloAxis2);

   ServiceClient sender = new ServiceClient();

   sender.setOptions(options);

   OMElement result = sender.sendReceive(request);

   //print out the response

   StringWriter writer = new StringWriter();

   result.serialize(XMLOutputFactory.newInstance()


Re: axis 2 unexpected Subelement

2009-05-12 Thread Trenton D. Adams
Oops, I was wrong, it wasn't the code below failing, it was the second attempt 
using the wsdl2java classes that failed...

final APASQueueServiceStub service;
service = new APASQueueServiceStub();
APASQueueServiceStub.GetHostInstitution hostInst;
hostInst = new APASQueueServiceStub.GetHostInstitution();
APASQueueServiceStub.GetHostInstitutionResponse resp = 
service.GetHostInstitution(hostInst);
System.out.println(Institution:  +

resp.getGetHostInstitutionResult().getEducationalInstitutionName());

I can post the WSDL if you like.

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

- Trenton D. Adams tre...@athabascau.ca wrote:

 From: Trenton D. Adams tre...@athabascau.ca
 To: axis-user axis-user@ws.apache.org
 Sent: Tuesday, May 12, 2009 9:49:05 AM GMT -07:00 US/Canada Mountain
 Subject: axis 2 unexpected Subelement

 Hi Guys,
 
 I can't figure out why I'm getting this error; is there something
 wrong with the service's XML output?
 
 ServiceClient client;
 client = new ServiceClient();
 Options options = new Options();
 options.setTo(new
 EndpointReference(https://apasproxy.athabascau.ca/axis/services/APASQueueService;));
 client.setOptions(options);
 OMElement request;
 OMFactory factory;
 factory = OMAbstractFactory.getOMFactory();
 request = factory.createOMElement(new
 QName(http://APASProxy.DataTypes/2007/04/;, GetHostInstitution));
 OMElement response;
 response = client.sendReceive(request);
 System.out.println(response.toString());
 
 GetHostInstitutionResponse
 xmlns=http://APASProxy.DataTypes/2007/04/;ns1:GetHostInstitutionResult
 xmlns:ns1=http://APASProxy.DataTypes/2007/04;ns1:SourceId48002000/ns1:SourceIdns1:EducationalInstitutionNameAthabasca
 University/ns1:EducationalInstitutionName/ns1:GetHostInstitutionResult/GetHostInstitutionResponse
 org.apache.axis2.AxisFault: org.apache.axis2.databinding.ADBException:
 Unexpected subelement GetHostInstitutionResult
   at org.apache.axis2.AxisFault.makeFault(AxisFault.java:430)
   at
 servicecontracts.apasproxy._2007._04.APASQueueServiceStub.fromOM(APASQueueServiceStub.java:35302)
   at
 servicecontracts.apasproxy._2007._04.APASQueueServiceStub.GetHostInstitution(APASQueueServiceStub.java:2467)
   at ca.athabascau.apas.APAS.main(APAS.java:70)
   at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
   at
 sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
   at
 sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
   at java.lang.reflect.Method.invoke(Method.java:597)
   at
 com.intellij.rt.execution.application.AppMain.main(AppMain.java:90)
 Caused by: java.lang.Exception:
 org.apache.axis2.databinding.ADBException: Unexpected subelement
 GetHostInstitutionResult
   at
 servicecontracts.apasproxy._2007._04.APASQueueServiceStub$GetHostInstitutionResponse$Factory.parse(APASQueueServiceStub.java:12645)
   at
 servicecontracts.apasproxy._2007._04.APASQueueServiceStub.fromOM(APASQueueServiceStub.java:35226)
   ... 7 more
 Caused by: org.apache.axis2.databinding.ADBException: Unexpected
 subelement GetHostInstitutionResult
   at
 servicecontracts.apasproxy._2007._04.APASQueueServiceStub$GetHostInstitutionResponse$Factory.parse(APASQueueServiceStub.java:12639)
   ... 8 more
 
 Process finished with exit code 0
 
 
 
 Trenton D. Adams
 Systems Analyst/Web Software Engineer
 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.
 ---


RE: Web Service Calling Another Web Service

2009-05-12 Thread Mark Darnell
Deepal,

We are using SOAP for all the applications. I'll try setting the URL.
Thanks.

Mark Darnell
BIT Systems, Inc.
(703) 742-7660 x110
-Original Message-
From: Deepal jayasinghe [mailto:deep...@gmail.com] 
Sent: Tuesday, May 12, 2009 9:44 AM
To: axis-user@ws.apache.org
Subject: Re: Web Service Calling Another Web Service


Mark Darnell wrote:
 Deepal,

 I checked the third-party web service and the soap action is set to an
 empty string. What is most baffling by this problem is that a
 stand-alone JAVA application, web page, and servlet can all call the
 third-party web service without any error. 
DO you use SOAP or REST for those applications ?
 But when we try to call the
 third-party web service from our web service, we get the error. Since
we
 have multiple apps calling the third-party web service, we wrote a
 utility class that all the apps use (including our web service) to
call
 the third-party web service. Any ideas?
   
try setting correct service url upto the operation, for example

http://host.com/axis2/services/myservice/myop

Deepal
 Mark Darnell
 BIT Systems, Inc.
 (703) 742-7660 x110
 -Original Message-
 From: Deepal Jayasinghe [mailto:dee...@opensource.lk] 
 Sent: Monday, May 11, 2009 3:02 PM
 To: axis-user@ws.apache.org
 Subject: Re: Web Service Calling Another Web Service


 As I can understand it should be due to the incorrect soap action,
 please check the WSDL of the third party service and set the correct
 SOAP action.

 Deepal

 Mark Darnell wrote:
   
 We have a web service that needs to call another web service written
 by a third-party. For testing purposes we have both web services
 running under the same Axis2 installation on one server. When we
 attempt to call the third-party web service from our web service, we
 get the following exception (thrown by the third-party web service):

 org.apache.axis2.AxisFault: The server did not recognize the action
 which it received

 We have no idea how to resolve this exception or what is causing it.
 Our configuration is:

 JDK version 1.6.0_11

 Axis2 version 1.3

 Tomcat version 5.5.20 (Servlet version 2.4)

 Does anyone have any ideas on how to resolve this issue? Thanks.

 Mark Darnell

 BIT Systems, Inc.

 (703) 742-7660 x110

 

   


-- 
Thank you!


http://blogs.deepal.org
http://deepal.org



Re: axis 2 unexpected Subelement (BUG???)

2009-05-12 Thread Trenton D. Adams
Okay, I figured out what is happening.  Is this an axis bug?

It is putting the incorrect schema into the stub code...
if (reader.isStartElement()  new 
javax.xml.namespace.QName(http://APASProxy.ServiceContracts/2007/04,GetHostInstitutionResult;).equals(reader.getName())){


object.setGetHostInstitutionResult(RegisteredEducationalInstitution.Factory.parse(reader));
  
reader.next();

  }  // End of if for expected property start 
element

else {

}
  
That ServiceContracts should read DataTypes.  The wsdl says this...
?xml version=1.0 encoding=UTF-8?
wsdl:definitions targetNamespace=http://APASProxy.ServiceContracts/2007/04; 
xmlns:apachesoap=http://xml.apache.org/xml-soap; 
xmlns:impl=http://APASProxy.ServiceContracts/2007/04; 
xmlns:intf=http://APASProxy.ServiceContracts/2007/04; 
xmlns:tns1=http://APASProxy.DataTypes/2007/04; 
xmlns:tns2=http://_04._2007.APASProxy.DataTypes; 
xmlns:wsdl=http://schemas.xmlsoap.org/wsdl/; 
xmlns:wsdlsoap=http://schemas.xmlsoap.org/wsdl/soap/; 
xmlns:xsd=http://www.w3.org/2001/XMLSchema;
!--WSDL created by Apache Axis version: 1.4
...
...
   element name=GetHostInstitutionResponse
complexType
 sequence
  element name=GetHostInstitutionResult 
type=tns1:RegisteredEducationalInstitution/
 /sequence

/complexType
   /element

You will notice that tns1 is correctly linked to the DataTypes schema, and not 
the ServiceContracts schema.


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

- Trenton D. Adams tre...@athabascau.ca wrote:

 From: Trenton D. Adams tre...@athabascau.ca
 To: axis-user@ws.apache.org, Trenton D. Adams tre...@athabascau.ca
 Sent: Tuesday, May 12, 2009 10:56:12 AM GMT -07:00 US/Canada Mountain
 Subject: Re: axis 2 unexpected Subelement

 Oops, I was wrong, it wasn't the code below failing, it was the second
 attempt using the wsdl2java classes that failed...
 
 final APASQueueServiceStub service;
 service = new APASQueueServiceStub();
 APASQueueServiceStub.GetHostInstitution hostInst;
 hostInst = new APASQueueServiceStub.GetHostInstitution();
 APASQueueServiceStub.GetHostInstitutionResponse resp =
 service.GetHostInstitution(hostInst);
 System.out.println(Institution:  +

 resp.getGetHostInstitutionResult().getEducationalInstitutionName());
 
 I can post the WSDL if you like.
 
 Trenton D. Adams
 Systems Analyst/Web Software Engineer
 Navy Penguins at your service!
 Athabasca University
 (780) 675-6195
 :wq!
 
 - Trenton D. Adams tre...@athabascau.ca wrote:
 
  From: Trenton D. Adams tre...@athabascau.ca
  To: axis-user axis-user@ws.apache.org
  Sent: Tuesday, May 12, 2009 9:49:05 AM GMT -07:00 US/Canada
 Mountain
  Subject: axis 2 unexpected Subelement
 
  Hi Guys,
  
  I can't figure out why I'm getting this error; is there something
  wrong with the service's XML output?
  
  ServiceClient client;
  client = new ServiceClient();
  Options options = new Options();
  options.setTo(new
 
 EndpointReference(https://apasproxy.athabascau.ca/axis/services/APASQueueService;));
  client.setOptions(options);
  OMElement request;
  OMFactory factory;
  factory = OMAbstractFactory.getOMFactory();
  request = factory.createOMElement(new
  QName(http://APASProxy.DataTypes/2007/04/;,
 GetHostInstitution));
  OMElement response;
  response = client.sendReceive(request);
  System.out.println(response.toString());
  
  GetHostInstitutionResponse
 
 xmlns=http://APASProxy.DataTypes/2007/04/;ns1:GetHostInstitutionResult
 
 xmlns:ns1=http://APASProxy.DataTypes/2007/04;ns1:SourceId48002000/ns1:SourceIdns1:EducationalInstitutionNameAthabasca
 
 University/ns1:EducationalInstitutionName/ns1:GetHostInstitutionResult/GetHostInstitutionResponse
  org.apache.axis2.AxisFault:
 org.apache.axis2.databinding.ADBException:
  Unexpected subelement GetHostInstitutionResult
  at org.apache.axis2.AxisFault.makeFault(AxisFault.java:430)
  at
 
 servicecontracts.apasproxy._2007._04.APASQueueServiceStub.fromOM(APASQueueServiceStub.java:35302)
  at
 
 servicecontracts.apasproxy._2007._04.APASQueueServiceStub.GetHostInstitution(APASQueueServiceStub.java:2467)
  at ca.athabascau.apas.APAS.main(APAS.java:70)
  at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
  at
 
 

Re: axis 2 unexpected Subelement (BUG???)

2009-05-12 Thread Andreas Veithen
It is not. The fact that GetHostInstitutionResult is of type
tns1:RegisteredEducationalInstitution doesn't tell anything about the
namespace of GetHostInstitutionResult. This depends on the
targetNamespace and elementFormDefault of the schema, which you don't
show in your post.

Andreas

On Tue, May 12, 2009 at 19:55, Trenton D. Adams tre...@athabascau.ca wrote:
 Okay, I figured out what is happening.  Is this an axis bug?

 It is putting the incorrect schema into the stub code...
                                    if (reader.isStartElement()  new 
 javax.xml.namespace.QName(http://APASProxy.ServiceContracts/2007/04,GetHostInstitutionResult;).equals(reader.getName())){

                                                
 object.setGetHostInstitutionResult(RegisteredEducationalInstitution.Factory.parse(reader));

                                        reader.next();

                              }  // End of if for expected property start 
 element

                                    else {

                                    }

 That ServiceContracts should read DataTypes.  The wsdl says this...
 ?xml version=1.0 encoding=UTF-8?
 wsdl:definitions targetNamespace=http://APASProxy.ServiceContracts/2007/04; 
 xmlns:apachesoap=http://xml.apache.org/xml-soap; 
 xmlns:impl=http://APASProxy.ServiceContracts/2007/04; 
 xmlns:intf=http://APASProxy.ServiceContracts/2007/04; 
 xmlns:tns1=http://APASProxy.DataTypes/2007/04; 
 xmlns:tns2=http://_04._2007.APASProxy.DataTypes; 
 xmlns:wsdl=http://schemas.xmlsoap.org/wsdl/; 
 xmlns:wsdlsoap=http://schemas.xmlsoap.org/wsdl/soap/; 
 xmlns:xsd=http://www.w3.org/2001/XMLSchema;
 !--WSDL created by Apache Axis version: 1.4
 ...
 ...
   element name=GetHostInstitutionResponse
    complexType
     sequence
      element name=GetHostInstitutionResult 
 type=tns1:RegisteredEducationalInstitution/
     /sequence

    /complexType
   /element

 You will notice that tns1 is correctly linked to the DataTypes schema, and 
 not the ServiceContracts schema.


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

 - Trenton D. Adams tre...@athabascau.ca wrote:

 From: Trenton D. Adams tre...@athabascau.ca
 To: axis-user@ws.apache.org, Trenton D. Adams tre...@athabascau.ca
 Sent: Tuesday, May 12, 2009 10:56:12 AM GMT -07:00 US/Canada Mountain
 Subject: Re: axis 2 unexpected Subelement

 Oops, I was wrong, it wasn't the code below failing, it was the second
 attempt using the wsdl2java classes that failed...

             final APASQueueServiceStub service;
             service = new APASQueueServiceStub();
             APASQueueServiceStub.GetHostInstitution hostInst;
             hostInst = new APASQueueServiceStub.GetHostInstitution();
             APASQueueServiceStub.GetHostInstitutionResponse resp =
 service.GetHostInstitution(hostInst);
             System.out.println(Institution:  +

 resp.getGetHostInstitutionResult().getEducationalInstitutionName());

 I can post the WSDL if you like.

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

 - Trenton D. Adams tre...@athabascau.ca wrote:

  From: Trenton D. Adams tre...@athabascau.ca
  To: axis-user axis-user@ws.apache.org
  Sent: Tuesday, May 12, 2009 9:49:05 AM GMT -07:00 US/Canada
 Mountain
  Subject: axis 2 unexpected Subelement
 
  Hi Guys,
 
  I can't figure out why I'm getting this error; is there something
  wrong with the service's XML output?
 
              ServiceClient client;
              client = new ServiceClient();
              Options options = new Options();
              options.setTo(new
 
 EndpointReference(https://apasproxy.athabascau.ca/axis/services/APASQueueService;));
              client.setOptions(options);
              OMElement request;
              OMFactory factory;
              factory = OMAbstractFactory.getOMFactory();
              request = factory.createOMElement(new
  QName(http://APASProxy.DataTypes/2007/04/;,
 GetHostInstitution));
              OMElement response;
              response = client.sendReceive(request);
              System.out.println(response.toString());
 
  GetHostInstitutionResponse
 
 xmlns=http://APASProxy.DataTypes/2007/04/;ns1:GetHostInstitutionResult
 
 xmlns:ns1=http://APASProxy.DataTypes/2007/04;ns1:SourceId48002000/ns1:SourceIdns1:EducationalInstitutionNameAthabasca
 
 University/ns1:EducationalInstitutionName/ns1:GetHostInstitutionResult/GetHostInstitutionResponse
  org.apache.axis2.AxisFault:
 org.apache.axis2.databinding.ADBException:
  Unexpected subelement GetHostInstitutionResult
      at org.apache.axis2.AxisFault.makeFault(AxisFault.java:430)
      at
 
 servicecontracts.apasproxy._2007._04.APASQueueServiceStub.fromOM(APASQueueServiceStub.java:35302)
      at
 
 servicecontracts.apasproxy._2007._04.APASQueueServiceStub.GetHostInstitution(APASQueueServiceStub.java:2467)
      at 

Re: axis 2 unexpected Subelement (BUG???)

2009-05-12 Thread Trenton D. Adams
Okay, thanks Andreas.  I'm not sure I understand completely.  The 
GetHostInstitutionResult is supposed to be of the schema type 
http://APASProxy.DataTypes/2007/04;, no???

Anyhow, here's the items you mentioned...
 wsdl:types
  schema elementFormDefault=qualified 
targetNamespace=http://APASProxy.ServiceContracts/2007/04; 
xmlns=http://www.w3.org/2001/XMLSchema;

If the WSDL is wrong, I'm then wondering if this was an axis1 bug, as according 
to the wsdl comment, it was generated by axis 1.4.

Thanks.

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

- Andreas Veithen andreas.veit...@gmail.com wrote:

 From: Andreas Veithen andreas.veit...@gmail.com
 To: axis-user@ws.apache.org, Trenton D. Adams tre...@athabascau.ca
 Sent: Tuesday, May 12, 2009 12:07:21 PM GMT -07:00 US/Canada Mountain
 Subject: Re: axis 2 unexpected Subelement (BUG???)

 It is not. The fact that GetHostInstitutionResult is of type
 tns1:RegisteredEducationalInstitution doesn't tell anything about the
 namespace of GetHostInstitutionResult. This depends on the
 targetNamespace and elementFormDefault of the schema, which you don't
 show in your post.
 
 Andreas
 
 On Tue, May 12, 2009 at 19:55, Trenton D. Adams tre...@athabascau.ca
 wrote:
  Okay, I figured out what is happening.  Is this an axis bug?
 
  It is putting the incorrect schema into the stub code...
                                     if (reader.isStartElement() 
 new
 javax.xml.namespace.QName(http://APASProxy.ServiceContracts/2007/04,GetHostInstitutionResult;).equals(reader.getName())){
 
                                               
  object.setGetHostInstitutionResult(RegisteredEducationalInstitution.Factory.parse(reader));
 
                                         reader.next();
 
                               }  // End of if for expected property
 start element
 
                                     else {
 
                                     }
 
  That ServiceContracts should read DataTypes.  The wsdl says
 this...
  ?xml version=1.0 encoding=UTF-8?
  wsdl:definitions
 targetNamespace=http://APASProxy.ServiceContracts/2007/04;
 xmlns:apachesoap=http://xml.apache.org/xml-soap;
 xmlns:impl=http://APASProxy.ServiceContracts/2007/04;
 xmlns:intf=http://APASProxy.ServiceContracts/2007/04;
 xmlns:tns1=http://APASProxy.DataTypes/2007/04;
 xmlns:tns2=http://_04._2007.APASProxy.DataTypes;
 xmlns:wsdl=http://schemas.xmlsoap.org/wsdl/;
 xmlns:wsdlsoap=http://schemas.xmlsoap.org/wsdl/soap/;
 xmlns:xsd=http://www.w3.org/2001/XMLSchema;
  !--WSDL created by Apache Axis version: 1.4
  ...
  ...
    element name=GetHostInstitutionResponse
     complexType
      sequence
       element name=GetHostInstitutionResult
 type=tns1:RegisteredEducationalInstitution/
      /sequence
 
     /complexType
    /element
 
  You will notice that tns1 is correctly linked to the DataTypes
 schema, and not the ServiceContracts schema.
 
 
  Trenton D. Adams
  Systems Analyst/Web Software Engineer
  Navy Penguins at your service!
  Athabasca University
  (780) 675-6195
  :wq!
 
  - Trenton D. Adams tre...@athabascau.ca wrote:
 
  From: Trenton D. Adams tre...@athabascau.ca
  To: axis-user@ws.apache.org, Trenton D. Adams
 tre...@athabascau.ca
  Sent: Tuesday, May 12, 2009 10:56:12 AM GMT -07:00 US/Canada
 Mountain
  Subject: Re: axis 2 unexpected Subelement
 
  Oops, I was wrong, it wasn't the code below failing, it was the
 second
  attempt using the wsdl2java classes that failed...
 
              final APASQueueServiceStub service;
              service = new APASQueueServiceStub();
              APASQueueServiceStub.GetHostInstitution hostInst;
              hostInst = new
 APASQueueServiceStub.GetHostInstitution();
              APASQueueServiceStub.GetHostInstitutionResponse resp =
  service.GetHostInstitution(hostInst);
              System.out.println(Institution:  +
 
 
 resp.getGetHostInstitutionResult().getEducationalInstitutionName());
 
  I can post the WSDL if you like.
 
  Trenton D. Adams
  Systems Analyst/Web Software Engineer
  Navy Penguins at your service!
  Athabasca University
  (780) 675-6195
  :wq!
 
  - Trenton D. Adams tre...@athabascau.ca wrote:
 
   From: Trenton D. Adams tre...@athabascau.ca
   To: axis-user axis-user@ws.apache.org
   Sent: Tuesday, May 12, 2009 9:49:05 AM GMT -07:00 US/Canada
  Mountain
   Subject: axis 2 unexpected Subelement
  
   Hi Guys,
  
   I can't figure out why I'm getting this error; is there
 something
   wrong with the service's XML output?
  
               ServiceClient client;
               client = new ServiceClient();
               Options options = new Options();
               options.setTo(new
  
 
 EndpointReference(https://apasproxy.athabascau.ca/axis/services/APASQueueService;));
               client.setOptions(options);
               OMElement request;
               OMFactory factory;
               factory = 

unsubscribe

2009-05-12 Thread Ramesh Vishwanatham




DTCC DISCLAIMER: This email and any files transmitted with it are
confidential and intended solely for the use of the individual or
entity to whom they are addressed. If you have received this email
in error, please notify us immediately and delete the email and any
attachments from your system. The recipient should check this email
and any attachments for the presence of viruses.  The company
accepts no liability for any damage caused by any virus transmitted
by this email.

Re: axis 2 unexpected Subelement (BUG???)

2009-05-12 Thread Andreas Veithen
The namespace of GetHostInstitutionResult doesn't depend on its type.
Since it appears in a sequence and elementFormDefault=qualified, it
must have the namespace of the schema in which it is declared, i.e.
http://APASProxy.ServiceContracts/2007/04;, exactly as the generated
code expects it.

Andreas

On Tue, May 12, 2009 at 20:29, Trenton D. Adams tre...@athabascau.ca wrote:
 Okay, thanks Andreas.  I'm not sure I understand completely.  The 
 GetHostInstitutionResult is supposed to be of the schema type 
 http://APASProxy.DataTypes/2007/04;, no???

 Anyhow, here's the items you mentioned...
  wsdl:types
  schema elementFormDefault=qualified 
 targetNamespace=http://APASProxy.ServiceContracts/2007/04; 
 xmlns=http://www.w3.org/2001/XMLSchema;

 If the WSDL is wrong, I'm then wondering if this was an axis1 bug, as 
 according to the wsdl comment, it was generated by axis 1.4.

 Thanks.

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

 - Andreas Veithen andreas.veit...@gmail.com wrote:

 From: Andreas Veithen andreas.veit...@gmail.com
 To: axis-user@ws.apache.org, Trenton D. Adams tre...@athabascau.ca
 Sent: Tuesday, May 12, 2009 12:07:21 PM GMT -07:00 US/Canada Mountain
 Subject: Re: axis 2 unexpected Subelement (BUG???)

 It is not. The fact that GetHostInstitutionResult is of type
 tns1:RegisteredEducationalInstitution doesn't tell anything about the
 namespace of GetHostInstitutionResult. This depends on the
 targetNamespace and elementFormDefault of the schema, which you don't
 show in your post.

 Andreas

 On Tue, May 12, 2009 at 19:55, Trenton D. Adams tre...@athabascau.ca
 wrote:
  Okay, I figured out what is happening.  Is this an axis bug?
 
  It is putting the incorrect schema into the stub code...
                                     if (reader.isStartElement() 
 new
 javax.xml.namespace.QName(http://APASProxy.ServiceContracts/2007/04,GetHostInstitutionResult;).equals(reader.getName())){
 
 
  object.setGetHostInstitutionResult(RegisteredEducationalInstitution.Factory.parse(reader));
 
                                         reader.next();
 
                               }  // End of if for expected property
 start element
 
                                     else {
 
                                     }
 
  That ServiceContracts should read DataTypes.  The wsdl says
 this...
  ?xml version=1.0 encoding=UTF-8?
  wsdl:definitions
 targetNamespace=http://APASProxy.ServiceContracts/2007/04;
 xmlns:apachesoap=http://xml.apache.org/xml-soap;
 xmlns:impl=http://APASProxy.ServiceContracts/2007/04;
 xmlns:intf=http://APASProxy.ServiceContracts/2007/04;
 xmlns:tns1=http://APASProxy.DataTypes/2007/04;
 xmlns:tns2=http://_04._2007.APASProxy.DataTypes;
 xmlns:wsdl=http://schemas.xmlsoap.org/wsdl/;
 xmlns:wsdlsoap=http://schemas.xmlsoap.org/wsdl/soap/;
 xmlns:xsd=http://www.w3.org/2001/XMLSchema;
  !--WSDL created by Apache Axis version: 1.4
  ...
  ...
    element name=GetHostInstitutionResponse
     complexType
      sequence
       element name=GetHostInstitutionResult
 type=tns1:RegisteredEducationalInstitution/
      /sequence
 
     /complexType
    /element
 
  You will notice that tns1 is correctly linked to the DataTypes
 schema, and not the ServiceContracts schema.
 
 
  Trenton D. Adams
  Systems Analyst/Web Software Engineer
  Navy Penguins at your service!
  Athabasca University
  (780) 675-6195
  :wq!
 
  - Trenton D. Adams tre...@athabascau.ca wrote:
 
  From: Trenton D. Adams tre...@athabascau.ca
  To: axis-user@ws.apache.org, Trenton D. Adams
 tre...@athabascau.ca
  Sent: Tuesday, May 12, 2009 10:56:12 AM GMT -07:00 US/Canada
 Mountain
  Subject: Re: axis 2 unexpected Subelement
 
  Oops, I was wrong, it wasn't the code below failing, it was the
 second
  attempt using the wsdl2java classes that failed...
 
              final APASQueueServiceStub service;
              service = new APASQueueServiceStub();
              APASQueueServiceStub.GetHostInstitution hostInst;
              hostInst = new
 APASQueueServiceStub.GetHostInstitution();
              APASQueueServiceStub.GetHostInstitutionResponse resp =
  service.GetHostInstitution(hostInst);
              System.out.println(Institution:  +
 
 
 resp.getGetHostInstitutionResult().getEducationalInstitutionName());
 
  I can post the WSDL if you like.
 
  Trenton D. Adams
  Systems Analyst/Web Software Engineer
  Navy Penguins at your service!
  Athabasca University
  (780) 675-6195
  :wq!
 
  - Trenton D. Adams tre...@athabascau.ca wrote:
 
   From: Trenton D. Adams tre...@athabascau.ca
   To: axis-user axis-user@ws.apache.org
   Sent: Tuesday, May 12, 2009 9:49:05 AM GMT -07:00 US/Canada
  Mountain
   Subject: axis 2 unexpected Subelement
  
   Hi Guys,
  
   I can't figure out why I'm getting this error; is there
 something
   wrong with the service's XML output?
  
               ServiceClient client;
               client = new 

Installing axis on jboss

2009-05-12 Thread hordine

Hi everyone, 

I'm trying to install axis on JBoss 5 and all I did was download
axis-bin-1_4.zip, unzipped it and coppied the axis directory from webapps
into JBOSS_HOME/server/default/deploy 

When I try to start the server from eclipse, I get the following error: 

java.lang.IllegalArgumentException: Document base
C:\desenvolvimento\jboss-5.0.1.GA\server\default\deploy\axis\WEB-INF\web.xml
does not exist or is not a readable directory 
at
org.apache.naming.resources.FileDirContext.setDocBase(FileDirContext.java:148) 
at
org.apache.catalina.core.StandardContext.resourcesStart(StandardContext.java:4021)
 
at org.apache.catalina.core.StandardContext.start(StandardContext.java:4188) 
at
org.jboss.web.tomcat.service.deployers.TomcatDeployment.performDeployInternal(TomcatDeployment.java:312)
 
at
org.jboss.web.tomcat.service.deployers.TomcatDeployment.performDeploy(TomcatDeployment.java:144)
 
at
org.jboss.web.deployers.AbstractWarDeployment.start(AbstractWarDeployment.java:461)
 
at org.jboss.web.deployers.WebModule.startModule(WebModule.java:118) 
at org.jboss.web.deployers.WebModule.start(WebModule.java:97) 
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) 
at
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) 

The web.xml does exist at that path. Can anyone please help?
-- 
View this message in context: 
http://www.nabble.com/Installing-axis-on-jboss-tp23511126p23511126.html
Sent from the Axis - User mailing list archive at Nabble.com.



Re: axis 2 unexpected Subelement (BUG???)

2009-05-12 Thread Trenton D. Adams
Hi Andrea,

This is really confusing.  How can GetHostInstitutionResult not depend on it's 
type?  If it doesn't depend on it's type, then why have a type?

As far as I can tell, elementFormDefault=qualified doesn't imply anything 
about having the same namespace af the parent.  All it tells parsers and 
validators, is that if you set it to qualified then all of your XML elements 
in a document, related to that schema, MUST be prefixed with a namespace prefix.

From w3c schools...
--QUOTE--
This fragment:
elementFormDefault=qualified

indicates that any elements used by the XML instance document which were 
declared in this schema must be namespace qualified.
--QUOTE--

I have tested this locally with perl validation, and it is correct.  If I have 
formElementDefault=qualified, then this is invalid and fails the xml 
validation...

document xmlns:blah=blah
a_blah_element
/a_blah_element
/document

But this is correct, and would succeed on xml validation...
document xmlns:blah=blah
blah:a_blah_element
/blah:a_blah_element
/document

The qualification setting has nothing to do with what you said it must have 
the namespace of the schema in which it is declared.  The 
GetHostInstitutionResult type was declared in a different schema, and that is 
the namespace that it should have.  So, the XML returned by the service is 
indeed correct, but the stub code generated is incorrect.  It should be 
qualifying it, which it is, but with the type that the element was declared 
with in the WSDL.

I hope that makes some sense.

Thanks.

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

- Andreas Veithen andreas.veit...@gmail.com wrote:

 From: Andreas Veithen andreas.veit...@gmail.com
 To: Trenton D. Adams tre...@athabascau.ca
 Cc: axis-user@ws.apache.org
 Sent: Tuesday, May 12, 2009 12:39:34 PM GMT -07:00 US/Canada Mountain
 Subject: Re: axis 2 unexpected Subelement (BUG???)

 The namespace of GetHostInstitutionResult doesn't depend on its type.
 Since it appears in a sequence and elementFormDefault=qualified, it
 must have the namespace of the schema in which it is declared, i.e.
 http://APASProxy.ServiceContracts/2007/04;, exactly as the generated
 code expects it.
 
 Andreas
 
 On Tue, May 12, 2009 at 20:29, Trenton D. Adams tre...@athabascau.ca
 wrote:
  Okay, thanks Andreas.  I'm not sure I understand completely.  The
 GetHostInstitutionResult is supposed to be of the schema type
 http://APASProxy.DataTypes/2007/04;, no???
 
  Anyhow, here's the items you mentioned...
   wsdl:types
   schema elementFormDefault=qualified
 targetNamespace=http://APASProxy.ServiceContracts/2007/04;
 xmlns=http://www.w3.org/2001/XMLSchema;
 
  If the WSDL is wrong, I'm then wondering if this was an axis1 bug,
 as according to the wsdl comment, it was generated by axis 1.4.
 
  Thanks.
 
  Trenton D. Adams
  Systems Analyst/Web Software Engineer
  Navy Penguins at your service!
  Athabasca University
  (780) 675-6195
  :wq!
 
  - Andreas Veithen andreas.veit...@gmail.com wrote:
 
  From: Andreas Veithen andreas.veit...@gmail.com
  To: axis-user@ws.apache.org, Trenton D. Adams
 tre...@athabascau.ca
  Sent: Tuesday, May 12, 2009 12:07:21 PM GMT -07:00 US/Canada
 Mountain
  Subject: Re: axis 2 unexpected Subelement (BUG???)
 
  It is not. The fact that GetHostInstitutionResult is of type
  tns1:RegisteredEducationalInstitution doesn't tell anything about
 the
  namespace of GetHostInstitutionResult. This depends on the
  targetNamespace and elementFormDefault of the schema, which you
 don't
  show in your post.
 
  Andreas
 
  On Tue, May 12, 2009 at 19:55, Trenton D. Adams
 tre...@athabascau.ca
  wrote:
   Okay, I figured out what is happening.  Is this an axis bug?
  
   It is putting the incorrect schema into the stub code...
                                      if (reader.isStartElement()
 
  new
 
 javax.xml.namespace.QName(http://APASProxy.ServiceContracts/2007/04,GetHostInstitutionResult;).equals(reader.getName())){
  
  
 
  object.setGetHostInstitutionResult(RegisteredEducationalInstitution.Factory.parse(reader));
  
                                          reader.next();
  
                                }  // End of if for expected
 property
  start element
  
                                      else {
  
                                      }
  
   That ServiceContracts should read DataTypes.  The wsdl says
  this...
   ?xml version=1.0 encoding=UTF-8?
   wsdl:definitions
  targetNamespace=http://APASProxy.ServiceContracts/2007/04;
  xmlns:apachesoap=http://xml.apache.org/xml-soap;
  xmlns:impl=http://APASProxy.ServiceContracts/2007/04;
  xmlns:intf=http://APASProxy.ServiceContracts/2007/04;
  xmlns:tns1=http://APASProxy.DataTypes/2007/04;
  xmlns:tns2=http://_04._2007.APASProxy.DataTypes;
  xmlns:wsdl=http://schemas.xmlsoap.org/wsdl/;
  xmlns:wsdlsoap=http://schemas.xmlsoap.org/wsdl/soap/;
  xmlns:xsd=http://www.w3.org/2001/XMLSchema;
 

RE: Installing axis on jboss

2009-05-12 Thread Zouhdi Haffar
Make sure the name of the unzipped file is 'axis2.war'.  You may then
run into classpath issuessome jars may need to be moved to jboss'
lib folder.



-Original Message-
From: hordine [mailto:hord...@gmail.com] 
Sent: Tuesday, May 12, 2009 4:40 PM
To: axis-user@ws.apache.org
Subject: Installing axis on jboss


Hi everyone, 

I'm trying to install axis on JBoss 5 and all I did was download
axis-bin-1_4.zip, unzipped it and coppied the axis directory from
webapps
into JBOSS_HOME/server/default/deploy 

When I try to start the server from eclipse, I get the following error: 

java.lang.IllegalArgumentException: Document base
C:\desenvolvimento\jboss-5.0.1.GA\server\default\deploy\axis\WEB-INF\web
.xml
does not exist or is not a readable directory 
at
org.apache.naming.resources.FileDirContext.setDocBase(FileDirContext.jav
a:148) 
at
org.apache.catalina.core.StandardContext.resourcesStart(StandardContext.
java:4021) 
at
org.apache.catalina.core.StandardContext.start(StandardContext.java:4188
) 
at
org.jboss.web.tomcat.service.deployers.TomcatDeployment.performDeployInt
ernal(TomcatDeployment.java:312) 
at
org.jboss.web.tomcat.service.deployers.TomcatDeployment.performDeploy(To
mcatDeployment.java:144) 
at
org.jboss.web.deployers.AbstractWarDeployment.start(AbstractWarDeploymen
t.java:461) 
at org.jboss.web.deployers.WebModule.startModule(WebModule.java:118) 
at org.jboss.web.deployers.WebModule.start(WebModule.java:97) 
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) 
at
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.jav
a:39) 

The web.xml does exist at that path. Can anyone please help?
-- 
View this message in context:
http://www.nabble.com/Installing-axis-on-jboss-tp23511126p23511126.html
Sent from the Axis - User mailing list archive at Nabble.com.



Re: axis 2 unexpected Subelement (BUG???)

2009-05-12 Thread Trenton D. Adams
By the way, just a reminder, I am a beginner in schemas and such.  So I very 
well might not have a clue. hehe

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

- Trenton D. Adams tre...@athabascau.ca wrote:

 From: Trenton D. Adams tre...@athabascau.ca
 To: Andreas Veithen andreas.veit...@gmail.com
 Cc: axis-user@ws.apache.org
 Sent: Tuesday, May 12, 2009 4:38:49 PM GMT -07:00 US/Canada Mountain
 Subject: Re: axis 2 unexpected Subelement (BUG???)

 Hi Andrea,
 
 This is really confusing.  How can GetHostInstitutionResult not depend
 on it's type?  If it doesn't depend on it's type, then why have a
 type?
 
 As far as I can tell, elementFormDefault=qualified doesn't imply
 anything about having the same namespace af the parent.  All it tells
 parsers and validators, is that if you set it to qualified then all
 of your XML elements in a document, related to that schema, MUST be
 prefixed with a namespace prefix.
 
 From w3c schools...
 --QUOTE--
 This fragment:
 elementFormDefault=qualified
 
 indicates that any elements used by the XML instance document which
 were declared in this schema must be namespace qualified.
 --QUOTE--
 
 I have tested this locally with perl validation, and it is correct. 
 If I have formElementDefault=qualified, then this is invalid and
 fails the xml validation...
 
 document xmlns:blah=blah
 a_blah_element
 /a_blah_element
 /document
 
 But this is correct, and would succeed on xml validation...
 document xmlns:blah=blah
 blah:a_blah_element
 /blah:a_blah_element
 /document
 
 The qualification setting has nothing to do with what you said it
 must have the namespace of the schema in which it is declared.  The
 GetHostInstitutionResult type was declared in a different schema, and
 that is the namespace that it should have.  So, the XML returned by
 the service is indeed correct, but the stub code generated is
 incorrect.  It should be qualifying it, which it is, but with the
 type that the element was declared with in the WSDL.
 
 I hope that makes some sense.
 
 Thanks.
 
 Trenton D. Adams
 Systems Analyst/Web Software Engineer
 Navy Penguins at your service!
 Athabasca University
 (780) 675-6195
 :wq!
 
 - Andreas Veithen andreas.veit...@gmail.com wrote:
 
  From: Andreas Veithen andreas.veit...@gmail.com
  To: Trenton D. Adams tre...@athabascau.ca
  Cc: axis-user@ws.apache.org
  Sent: Tuesday, May 12, 2009 12:39:34 PM GMT -07:00 US/Canada
 Mountain
  Subject: Re: axis 2 unexpected Subelement (BUG???)
 
  The namespace of GetHostInstitutionResult doesn't depend on its
 type.
  Since it appears in a sequence and elementFormDefault=qualified,
 it
  must have the namespace of the schema in which it is declared, i.e.
  http://APASProxy.ServiceContracts/2007/04;, exactly as the
 generated
  code expects it.
  
  Andreas
  
  On Tue, May 12, 2009 at 20:29, Trenton D. Adams
 tre...@athabascau.ca
  wrote:
   Okay, thanks Andreas.  I'm not sure I understand completely.  The
  GetHostInstitutionResult is supposed to be of the schema type
  http://APASProxy.DataTypes/2007/04;, no???
  
   Anyhow, here's the items you mentioned...
    wsdl:types
    schema elementFormDefault=qualified
  targetNamespace=http://APASProxy.ServiceContracts/2007/04;
  xmlns=http://www.w3.org/2001/XMLSchema;
  
   If the WSDL is wrong, I'm then wondering if this was an axis1
 bug,
  as according to the wsdl comment, it was generated by axis 1.4.
  
   Thanks.
  
   Trenton D. Adams
   Systems Analyst/Web Software Engineer
   Navy Penguins at your service!
   Athabasca University
   (780) 675-6195
   :wq!
  
   - Andreas Veithen andreas.veit...@gmail.com wrote:
  
   From: Andreas Veithen andreas.veit...@gmail.com
   To: axis-user@ws.apache.org, Trenton D. Adams
  tre...@athabascau.ca
   Sent: Tuesday, May 12, 2009 12:07:21 PM GMT -07:00 US/Canada
  Mountain
   Subject: Re: axis 2 unexpected Subelement (BUG???)
  
   It is not. The fact that GetHostInstitutionResult is of type
   tns1:RegisteredEducationalInstitution doesn't tell anything
 about
  the
   namespace of GetHostInstitutionResult. This depends on the
   targetNamespace and elementFormDefault of the schema, which you
  don't
   show in your post.
  
   Andreas
  
   On Tue, May 12, 2009 at 19:55, Trenton D. Adams
  tre...@athabascau.ca
   wrote:
Okay, I figured out what is happening.  Is this an axis bug?
   
It is putting the incorrect schema into the stub code...
                                   if (reader.isStartElement()
  
   new
  
 
 javax.xml.namespace.QName(http://APASProxy.ServiceContracts/2007/04,GetHostInstitutionResult;).equals(reader.getName())){
   
   
  
 
  object.setGetHostInstitutionResult(RegisteredEducationalInstitution.Factory.parse(reader));
   
                                       reader.next();
   
                             }  // End of if for expected
  property
   start element
   
                      

[AXIS2] Exception: org.apache.axis2.AxisFault: null

2009-05-12 Thread Lampert, Kevin C (N-Beacon Professional Svs)
I have developed a working web service client on windows configured with

axis2 v1.4.1 and rampart 1.4. On the windows platform, this works great.

I ported everything over to Solaris. Ran wsdl2java on solaris and
followed the same procedure as on my windows platform, (of course making
adjustments for unix).

 

I get this error when I try to run the client:

 

Exception: org.apache.axis2.AxisFault: null

org.apache.axis2.AxisFault: null

at

org.apache.axis2.util.Utils.getInboundFaultFromMessageContext(Utils.java
:512)

at

org.apache.axis2.description.OutInAxisOperationClient.handleResponse(Out
InAxisOperation.java:370)

at

org.apache.axis2.description.OutInAxisOperationClient.send(OutInAxisOper
ation.java:416)

at

org.apache.axis2.description.OutInAxisOperationClient.executeImpl(OutInA
xisOperation.java:228)

at

org.apache.axis2.client.OperationClient.execute(OperationClient.java:163
)

at

com.lmco.lmpeoplephoto.BadgePhotoStub.GETBADGEPHOTO(BadgePhotoStub.java:
194)

at com.lmco.lmpeoplephoto.Client.GetBadgePhoto(Client.java:46)

at com.lmco.lmpeoplephoto.Client.main(Client.java:20)

 

 

I know this exception comes after my PasswordCallbackHandler is being
called and I know the rampart configuration is working.

 

Any ideas on how can I go about debugging this?

 

 

Thanks for any help!

 

 

---

Kevin Lampert

Beacon Professional Services

 

 



Re: axis 2 unexpected Subelement (BUG???)

2009-05-12 Thread Andreas Veithen
--QUOTE--
This fragment:
elementFormDefault=qualified

indicates that any elements used by the XML instance document which
were declared in this schema must be namespace qualified.
--QUOTE--

... and the namespace is the targetNamespace of the schema where the
element has been declared (http://APASProxy.ServiceContracts/2007/04),
not the namespace of the type (http://APASProxy.DataTypes/2007/04).
The type doesn't determine the name of the element, only its content
model.

If you are still not convinced, think about the following element declaration:

  element name=a
   complexType
sequence
 element name=b type=string/
/sequence
   /complexType
  /element

According to your reasoning, the element b should have namespace
http://www.w3.org/2001/XMLSchema. This is definitely not true.

Andreas

On Wed, May 13, 2009 at 00:38, Trenton D. Adams tre...@athabascau.ca wrote:
 Hi Andrea,

 This is really confusing.  How can GetHostInstitutionResult not depend on 
 it's type?  If it doesn't depend on it's type, then why have a type?

 As far as I can tell, elementFormDefault=qualified doesn't imply anything 
 about having the same namespace af the parent.  All it tells parsers and 
 validators, is that if you set it to qualified then all of your XML 
 elements in a document, related to that schema, MUST be prefixed with a 
 namespace prefix.

 From w3c schools...
 --QUOTE--
 This fragment:
 elementFormDefault=qualified

 indicates that any elements used by the XML instance document which were 
 declared in this schema must be namespace qualified.
 --QUOTE--

 I have tested this locally with perl validation, and it is correct.  If I 
 have formElementDefault=qualified, then this is invalid and fails the xml 
 validation...

 document xmlns:blah=blah
 a_blah_element
 /a_blah_element
 /document

 But this is correct, and would succeed on xml validation...
 document xmlns:blah=blah
 blah:a_blah_element
 /blah:a_blah_element
 /document

 The qualification setting has nothing to do with what you said it must have 
 the namespace of the schema in which it is declared.  The 
 GetHostInstitutionResult type was declared in a different schema, and that is 
 the namespace that it should have.  So, the XML returned by the service is 
 indeed correct, but the stub code generated is incorrect.  It should be 
 qualifying it, which it is, but with the type that the element was declared 
 with in the WSDL.

 I hope that makes some sense.

 Thanks.

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

 - Andreas Veithen andreas.veit...@gmail.com wrote:

 From: Andreas Veithen andreas.veit...@gmail.com
 To: Trenton D. Adams tre...@athabascau.ca
 Cc: axis-user@ws.apache.org
 Sent: Tuesday, May 12, 2009 12:39:34 PM GMT -07:00 US/Canada Mountain
 Subject: Re: axis 2 unexpected Subelement (BUG???)

 The namespace of GetHostInstitutionResult doesn't depend on its type.
 Since it appears in a sequence and elementFormDefault=qualified, it
 must have the namespace of the schema in which it is declared, i.e.
 http://APASProxy.ServiceContracts/2007/04;, exactly as the generated
 code expects it.

 Andreas

 On Tue, May 12, 2009 at 20:29, Trenton D. Adams tre...@athabascau.ca
 wrote:
  Okay, thanks Andreas.  I'm not sure I understand completely.  The
 GetHostInstitutionResult is supposed to be of the schema type
 http://APASProxy.DataTypes/2007/04;, no???
 
  Anyhow, here's the items you mentioned...
   wsdl:types
   schema elementFormDefault=qualified
 targetNamespace=http://APASProxy.ServiceContracts/2007/04;
 xmlns=http://www.w3.org/2001/XMLSchema;
 
  If the WSDL is wrong, I'm then wondering if this was an axis1 bug,
 as according to the wsdl comment, it was generated by axis 1.4.
 
  Thanks.
 
  Trenton D. Adams
  Systems Analyst/Web Software Engineer
  Navy Penguins at your service!
  Athabasca University
  (780) 675-6195
  :wq!
 
  - Andreas Veithen andreas.veit...@gmail.com wrote:
 
  From: Andreas Veithen andreas.veit...@gmail.com
  To: axis-user@ws.apache.org, Trenton D. Adams
 tre...@athabascau.ca
  Sent: Tuesday, May 12, 2009 12:07:21 PM GMT -07:00 US/Canada
 Mountain
  Subject: Re: axis 2 unexpected Subelement (BUG???)
 
  It is not. The fact that GetHostInstitutionResult is of type
  tns1:RegisteredEducationalInstitution doesn't tell anything about
 the
  namespace of GetHostInstitutionResult. This depends on the
  targetNamespace and elementFormDefault of the schema, which you
 don't
  show in your post.
 
  Andreas
 
  On Tue, May 12, 2009 at 19:55, Trenton D. Adams
 tre...@athabascau.ca
  wrote:
   Okay, I figured out what is happening.  Is this an axis bug?
  
   It is putting the incorrect schema into the stub code...
                                      if (reader.isStartElement()
 
  new
 
 javax.xml.namespace.QName(http://APASProxy.ServiceContracts/2007/04,GetHostInstitutionResult;).equals(reader.getName())){
  
  
 
  

Re: axis 2 unexpected Subelement (BUG???)

2009-05-12 Thread Trenton D. Adams
Thanks Andreas, I think I get it now.  Right, element b is in fact the same 
namespace of a, just the contents are of a different namespace.  Right?

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

- Andreas Veithen andreas.veit...@gmail.com wrote:

 From: Andreas Veithen andreas.veit...@gmail.com
 To: Trenton D. Adams tre...@athabascau.ca
 Cc: axis-user@ws.apache.org
 Sent: Tuesday, May 12, 2009 5:00:23 PM GMT -07:00 US/Canada Mountain
 Subject: Re: axis 2 unexpected Subelement (BUG???)

 --QUOTE--
 This fragment:
 elementFormDefault=qualified
 
 indicates that any elements used by the XML instance document which
 were declared in this schema must be namespace qualified.
 --QUOTE--
 
 ... and the namespace is the targetNamespace of the schema where the
 element has been declared
 (http://APASProxy.ServiceContracts/2007/04),
 not the namespace of the type (http://APASProxy.DataTypes/2007/04).
 The type doesn't determine the name of the element, only its content
 model.
 
 If you are still not convinced, think about the following element
 declaration:
 
   element name=a
complexType
 sequence
  element name=b type=string/
 /sequence
/complexType
   /element
 
 According to your reasoning, the element b should have namespace
 http://www.w3.org/2001/XMLSchema. This is definitely not true.
 
 Andreas
 
 On Wed, May 13, 2009 at 00:38, Trenton D. Adams tre...@athabascau.ca
 wrote:
  Hi Andrea,
 
  This is really confusing.  How can GetHostInstitutionResult not
 depend on it's type?  If it doesn't depend on it's type, then why have
 a type?
 
  As far as I can tell, elementFormDefault=qualified doesn't imply
 anything about having the same namespace af the parent.  All it tells
 parsers and validators, is that if you set it to qualified then all
 of your XML elements in a document, related to that schema, MUST be
 prefixed with a namespace prefix.
 
  From w3c schools...
  --QUOTE--
  This fragment:
  elementFormDefault=qualified
 
  indicates that any elements used by the XML instance document which
 were declared in this schema must be namespace qualified.
  --QUOTE--
 
  I have tested this locally with perl validation, and it is correct.
  If I have formElementDefault=qualified, then this is invalid and
 fails the xml validation...
 
  document xmlns:blah=blah
  a_blah_element
  /a_blah_element
  /document
 
  But this is correct, and would succeed on xml validation...
  document xmlns:blah=blah
  blah:a_blah_element
  /blah:a_blah_element
  /document
 
  The qualification setting has nothing to do with what you said it
 must have the namespace of the schema in which it is declared.  The
 GetHostInstitutionResult type was declared in a different schema, and
 that is the namespace that it should have.  So, the XML returned by
 the service is indeed correct, but the stub code generated is
 incorrect.  It should be qualifying it, which it is, but with the
 type that the element was declared with in the WSDL.
 
  I hope that makes some sense.
 
  Thanks.
 
  Trenton D. Adams
  Systems Analyst/Web Software Engineer
  Navy Penguins at your service!
  Athabasca University
  (780) 675-6195
  :wq!
 
  - Andreas Veithen andreas.veit...@gmail.com wrote:
 
  From: Andreas Veithen andreas.veit...@gmail.com
  To: Trenton D. Adams tre...@athabascau.ca
  Cc: axis-user@ws.apache.org
  Sent: Tuesday, May 12, 2009 12:39:34 PM GMT -07:00 US/Canada
 Mountain
  Subject: Re: axis 2 unexpected Subelement (BUG???)
 
  The namespace of GetHostInstitutionResult doesn't depend on its
 type.
  Since it appears in a sequence and elementFormDefault=qualified,
 it
  must have the namespace of the schema in which it is declared,
 i.e.
  http://APASProxy.ServiceContracts/2007/04;, exactly as the
 generated
  code expects it.
 
  Andreas
 
  On Tue, May 12, 2009 at 20:29, Trenton D. Adams
 tre...@athabascau.ca
  wrote:
   Okay, thanks Andreas.  I'm not sure I understand completely.
  The
  GetHostInstitutionResult is supposed to be of the schema type
  http://APASProxy.DataTypes/2007/04;, no???
  
   Anyhow, here's the items you mentioned...
    wsdl:types
    schema elementFormDefault=qualified
  targetNamespace=http://APASProxy.ServiceContracts/2007/04;
  xmlns=http://www.w3.org/2001/XMLSchema;
  
   If the WSDL is wrong, I'm then wondering if this was an axis1
 bug,
  as according to the wsdl comment, it was generated by axis 1.4.
  
   Thanks.
  
   Trenton D. Adams
   Systems Analyst/Web Software Engineer
   Navy Penguins at your service!
   Athabasca University
   (780) 675-6195
   :wq!
  
   - Andreas Veithen andreas.veit...@gmail.com wrote:
  
   From: Andreas Veithen andreas.veit...@gmail.com
   To: axis-user@ws.apache.org, Trenton D. Adams
  tre...@athabascau.ca
   Sent: Tuesday, May 12, 2009 12:07:21 PM GMT -07:00 US/Canada
  Mountain
   Subject: Re: axis 2 unexpected Subelement (BUG???)
  
   It is not. The fact that 

Re: axis 2 unexpected Subelement (BUG???)

2009-05-12 Thread Trenton D. Adams
Thanks again Andreas.  Based on what you said, I was able to find that the wsdd 
was incorrect for that particular service.  It is not spitting out the correct 
XML, and axis2 is happy with it.

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

- Trenton D. Adams tre...@athabascau.ca wrote:

 From: Trenton D. Adams tre...@athabascau.ca
 To: Andreas Veithen andreas.veit...@gmail.com
 Cc: axis-user@ws.apache.org
 Sent: Tuesday, May 12, 2009 5:11:43 PM GMT -07:00 US/Canada Mountain
 Subject: Re: axis 2 unexpected Subelement (BUG???)

 Thanks Andreas, I think I get it now.  Right, element b is in fact the
 same namespace of a, just the contents are of a different namespace. 
 Right?
 
 Trenton D. Adams
 Systems Analyst/Web Software Engineer
 Navy Penguins at your service!
 Athabasca University
 (780) 675-6195
 :wq!
 
 - Andreas Veithen andreas.veit...@gmail.com wrote:
 
  From: Andreas Veithen andreas.veit...@gmail.com
  To: Trenton D. Adams tre...@athabascau.ca
  Cc: axis-user@ws.apache.org
  Sent: Tuesday, May 12, 2009 5:00:23 PM GMT -07:00 US/Canada
 Mountain
  Subject: Re: axis 2 unexpected Subelement (BUG???)
 
  --QUOTE--
  This fragment:
  elementFormDefault=qualified
  
  indicates that any elements used by the XML instance document which
  were declared in this schema must be namespace qualified.
  --QUOTE--
  
  ... and the namespace is the targetNamespace of the schema where
 the
  element has been declared
  (http://APASProxy.ServiceContracts/2007/04),
  not the namespace of the type (http://APASProxy.DataTypes/2007/04).
  The type doesn't determine the name of the element, only its
 content
  model.
  
  If you are still not convinced, think about the following element
  declaration:
  
element name=a
 complexType
  sequence
   element name=b type=string/
  /sequence
 /complexType
/element
  
  According to your reasoning, the element b should have namespace
  http://www.w3.org/2001/XMLSchema. This is definitely not true.
  
  Andreas
  
  On Wed, May 13, 2009 at 00:38, Trenton D. Adams
 tre...@athabascau.ca
  wrote:
   Hi Andrea,
  
   This is really confusing.  How can GetHostInstitutionResult not
  depend on it's type?  If it doesn't depend on it's type, then why
 have
  a type?
  
   As far as I can tell, elementFormDefault=qualified doesn't
 imply
  anything about having the same namespace af the parent.  All it
 tells
  parsers and validators, is that if you set it to qualified then
 all
  of your XML elements in a document, related to that schema, MUST be
  prefixed with a namespace prefix.
  
   From w3c schools...
   --QUOTE--
   This fragment:
   elementFormDefault=qualified
  
   indicates that any elements used by the XML instance document
 which
  were declared in this schema must be namespace qualified.
   --QUOTE--
  
   I have tested this locally with perl validation, and it is
 correct.
   If I have formElementDefault=qualified, then this is invalid and
  fails the xml validation...
  
   document xmlns:blah=blah
   a_blah_element
   /a_blah_element
   /document
  
   But this is correct, and would succeed on xml validation...
   document xmlns:blah=blah
   blah:a_blah_element
   /blah:a_blah_element
   /document
  
   The qualification setting has nothing to do with what you said
 it
  must have the namespace of the schema in which it is declared.
  The
  GetHostInstitutionResult type was declared in a different schema,
 and
  that is the namespace that it should have.  So, the XML returned by
  the service is indeed correct, but the stub code generated is
  incorrect.  It should be qualifying it, which it is, but with the
  type that the element was declared with in the WSDL.
  
   I hope that makes some sense.
  
   Thanks.
  
   Trenton D. Adams
   Systems Analyst/Web Software Engineer
   Navy Penguins at your service!
   Athabasca University
   (780) 675-6195
   :wq!
  
   - Andreas Veithen andreas.veit...@gmail.com wrote:
  
   From: Andreas Veithen andreas.veit...@gmail.com
   To: Trenton D. Adams tre...@athabascau.ca
   Cc: axis-user@ws.apache.org
   Sent: Tuesday, May 12, 2009 12:39:34 PM GMT -07:00 US/Canada
  Mountain
   Subject: Re: axis 2 unexpected Subelement (BUG???)
  
   The namespace of GetHostInstitutionResult doesn't depend on its
  type.
   Since it appears in a sequence and
 elementFormDefault=qualified,
  it
   must have the namespace of the schema in which it is declared,
  i.e.
   http://APASProxy.ServiceContracts/2007/04;, exactly as the
  generated
   code expects it.
  
   Andreas
  
   On Tue, May 12, 2009 at 20:29, Trenton D. Adams
  tre...@athabascau.ca
   wrote:
Okay, thanks Andreas.  I'm not sure I understand completely.
   The
   GetHostInstitutionResult is supposed to be of the schema type
   http://APASProxy.DataTypes/2007/04;, no???
   
Anyhow, here's the items you mentioned...
 wsdl:types
 schema 

handling null part Response

2009-05-12 Thread krishna.arani

Hi,
I have a webservice operation response (rpc/lit) with multiple parts, But
the second part of the response can be null. The wsld2java generates wrapper
class with XXXResponse  where XXX is the operation name. But the generated
Wrapper throws exception when any message part is null while serializing. Is
there any way to get the generated ADB Bean Wrapper to handle this as it is
done in the case of Element with nillble=true.

Regards
Krishna
-- 
View this message in context: 
http://www.nabble.com/handling-null-part-Response-tp23515685p23515685.html
Sent from the Axis - User mailing list archive at Nabble.com.