wrapped vs. document

2005-05-02 Thread Dave Overbeck
Hello,
I have the following deployment file and resulting wsdl. I can't figure 
out why the wsdl is coming out with style=document when it should be 
wrapped. Any ideas?

Thanks,
Dave
http://xml.apache.org/axis/wsdd/";
   xmlns:java="http://xml.apache.org/axis/wsdd/providers/java";>
 
   
   
   http://jws.rtl.turnkey.com"/>
   
   
   
 



http://jws.rtl.turnkey.com"; 
xmlns:apachesoap="http://xml.apache.org/xml-soap";
xmlns:impl="http://jws.rtl.turnkey.com";
xmlns:intf="http://jws.rtl.turnkey.com";
xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/"; 
xmlns:wsdlsoap="http://schemas.xmlsoap.org/wsdl/soap/"; 
xmlns:xsd="http://www.w3.org/2001/XMLSchema";>


 http://jws.rtl.turnkey.com"; 
xmlns="http://www.w3.org/2001/XMLSchema";>
  
   

 
 
 
 

   
  
  
   

 

   
  
 


  
 
  
  
 
  
  
 


 
  
  
 http://schemas.xmlsoap.org/soap/http"/>
 


   


   

 
  
  
 
http://192.168.1.6:8080/axis/services/ItemInq"/>
 
  





Add session id to SOAP Header

2005-05-02 Thread James Chiu








Hi,

 

I have a question about how to retrieve/insert a session while
working on WSDL2Java-generated client classes. By looking at the debugging
messages, the first call returns a SOAP message that has a session id in the
SOAP header. In the second call, I would like to use the same session id and
also put it in the SOAP header. Since I am using WSDL2Java-generated client
classes, I am not sure how to achieve this goal. I also follow http://wiki.apache.org/ws/FrontPage/Axis/AxisClientConfiguration
to add a client config to a service, but does not work. Please let me know if
you have any suggestions.

 

Thanks very much,

 

 

James








Re: newbie help

2005-05-02 Thread Anne Thomas Manes
Also remove the namespace attribute from the 
definitions. (This attribute should be used only with style="rpc")

On 5/2/05, Davanum Srinivas <[EMAIL PROTECTED]> wrote:
> add elementFormDefault="qualified" as an attribute in your schema
> element and re-generate the server.
> 
> -- dims
> 
> On 5/2/05, shantanu chawla <[EMAIL PROTECTED]> wrote:
> > Hi
> >
> > I am new to webservices and axis.
> > I am trying to use axis with tomcat using eclipse wtp plugin to create
> > webservices.
> > I create a simple java class that has two methods one returning string
> > and another returning an array of string. My client is in java is
> > giving the following error.
> >
> > Exception:
> > org.xml.sax.SAXException: SimpleDeserializer encountered a child
> > element, which is NOT expected, in something it was trying to
> > deserialize.
> >at 
> > org.apache.axis.encoding.ser.SimpleDeserializer.onStartChild(SimpleDeserializer.java:189)
> >at 
> > org.apache.axis.encoding.DeserializationContextImpl.startElement(DeserializationContextImpl.java:963)
> >at 
> > org.apache.axis.message.SAX2EventRecorder.replay(SAX2EventRecorder.java:198)
> >at 
> > org.apache.axis.message.MessageElement.publishToHandler(MessageElement.java:722)
> >at 
> > org.apache.axis.message.RPCElement.deserialize(RPCElement.java:233)
> >at org.apache.axis.message.RPCElement.getParams(RPCElement.java:347)
> >at org.apache.axis.client.Call.invoke(Call.java:2272)
> >at org.apache.axis.client.Call.invoke(Call.java:2171)
> >at org.apache.axis.client.Call.invoke(Call.java:1691)
> >at 
> > com.shantanu.HelloTestSoapBindingStub.getMsgs(HelloTestSoapBindingStub.java:139)
> >at com.shantanu.ClientTest.main(ClientTest.java:15)
> >
> > Though using soap monitor i can see that i am receiving 3 items in the
> > response. my soap message returned is:
> >
> > HTTP/1.1 200 OK
> >
> > Content-Type: text/xml;charset=utf-8
> >
> > Date: Mon, 02 May 2005 17:05:19 GMT
> >
> > Server: Apache-Coyote/1.1
> >
> > Connection: close
> >
> >  > xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/";
> > xmlns:xsd="http://www.w3.org/2001/XMLSchema";
> > xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance";>
> > 
> > http://shantanu.com";>
> > 
> > msg1
> > msg2
> > msg3
> > 
> > 
> > 
> > --
> >
> > my wsdl is.
> >
> > 
> > http://shantanu.com";
> > xmlns:impl="http://shantanu.com"; xmlns:intf="http://shantanu.com";
> > xmlns:apachesoap="http://xml.apache.org/xml-soap";
> > xmlns:wsdlsoap="http://schemas.xmlsoap.org/wsdl/soap/";
> > xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/";
> > xmlns:xsd="http://www.w3.org/2001/XMLSchema";
> > xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/";
> > xmlns="http://schemas.xmlsoap.org/wsdl/";>
> > 
> >  http://www.w3.org/2001/XMLSchema";
> > targetNamespace="http://shantanu.com";>
> >   
> >
> >   
> >   
> >
> > 
> >  
> > 
> >
> >   
> >   
> >
> >   
> >   
> >
> > 
> >   > maxOccurs="unbounded"/>
> > 
> >
> >   
> >  
> > 
> >
> >   
> >
> >  
> >
> >   
> >
> >   
> >
> >  
> >
> >   
> >
> >   
> >
> >  
> >
> >   
> >
> >   
> >
> >  
> >
> >   
> >
> >   
> >
> >  
> >
> >  > message="impl:getWelcomeMsgRequest"/>
> >
> >  > message="impl:getWelcomeMsgResponse"/>
> >
> >  
> >
> >  
> >
> > 
> >
> > 
> >
> >  
> >
> >   
> >
> >   
> >
> >   > transport="http://schemas.xmlsoap.org/soap/http"/>
> >
> >  
> >
> >  > soapAction="http://localhost:9090/axis/services/HelloTest/getWelcomeMsg"/>
> >
> > 
> >
> >http://shantanu.com"/>
> >
> > 
> >
> > 
> >
> >http://shantanu.com"/>
> >
> > 
> >
> >  
> >
> >  
> >
> >  > soapAction="http://localhost:9090/axis/services/HelloTest/getMsgs"/>
> >
> > 
> >
> >http://shantanu.com"/>
> >
> > 
> >
> > 
> >
> >http://shantanu.com"/>
> >
> > 
> >
> >  
> >
> >   
> >
> >   
> >
> >  
> >
> >  > location="http://localhost:9090/axis/services/HelloTest"/>
> >
> >  
> >
> >   
> >
> > 
> >
> > If i create a client in .net I can receive only first item in the string 
> > array.
> > any comments
> >
> > Shantanu Chawla
> >
> > Graduate Student
> > Department of Computer Science,
> > San Diego State University
> >
> 
> --
> Davanum Srinivas - http://webservices.apache.org/~dims/
>


Re: newbie help

2005-05-02 Thread Davanum Srinivas
add elementFormDefault="qualified" as an attribute in your schema
element and re-generate the server.

-- dims

On 5/2/05, shantanu chawla <[EMAIL PROTECTED]> wrote:
> Hi
> 
> I am new to webservices and axis.
> I am trying to use axis with tomcat using eclipse wtp plugin to create
> webservices.
> I create a simple java class that has two methods one returning string
> and another returning an array of string. My client is in java is
> giving the following error.
> 
> Exception:
> org.xml.sax.SAXException: SimpleDeserializer encountered a child
> element, which is NOT expected, in something it was trying to
> deserialize.
>at 
> org.apache.axis.encoding.ser.SimpleDeserializer.onStartChild(SimpleDeserializer.java:189)
>at 
> org.apache.axis.encoding.DeserializationContextImpl.startElement(DeserializationContextImpl.java:963)
>at 
> org.apache.axis.message.SAX2EventRecorder.replay(SAX2EventRecorder.java:198)
>at 
> org.apache.axis.message.MessageElement.publishToHandler(MessageElement.java:722)
>at org.apache.axis.message.RPCElement.deserialize(RPCElement.java:233)
>at org.apache.axis.message.RPCElement.getParams(RPCElement.java:347)
>at org.apache.axis.client.Call.invoke(Call.java:2272)
>at org.apache.axis.client.Call.invoke(Call.java:2171)
>at org.apache.axis.client.Call.invoke(Call.java:1691)
>at 
> com.shantanu.HelloTestSoapBindingStub.getMsgs(HelloTestSoapBindingStub.java:139)
>at com.shantanu.ClientTest.main(ClientTest.java:15)
> 
> Though using soap monitor i can see that i am receiving 3 items in the
> response. my soap message returned is:
> 
> HTTP/1.1 200 OK
> 
> Content-Type: text/xml;charset=utf-8
> 
> Date: Mon, 02 May 2005 17:05:19 GMT
> 
> Server: Apache-Coyote/1.1
> 
> Connection: close
> 
>  xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/";
> xmlns:xsd="http://www.w3.org/2001/XMLSchema";
> xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance";>
> 
> http://shantanu.com";>
> 
> msg1
> msg2
> msg3
> 
> 
> 
> --
> 
> my wsdl is.
> 
> 
> http://shantanu.com";
> xmlns:impl="http://shantanu.com"; xmlns:intf="http://shantanu.com";
> xmlns:apachesoap="http://xml.apache.org/xml-soap";
> xmlns:wsdlsoap="http://schemas.xmlsoap.org/wsdl/soap/";
> xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/";
> xmlns:xsd="http://www.w3.org/2001/XMLSchema";
> xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/";
> xmlns="http://schemas.xmlsoap.org/wsdl/";>
> 
>  http://www.w3.org/2001/XMLSchema";
> targetNamespace="http://shantanu.com";>
>   
>
>   
>   
>
> 
>  
> 
>
>   
>   
>
>   
>   
>
> 
>   maxOccurs="unbounded"/>
> 
>
>   
>  
> 
> 
>   
> 
>  
> 
>   
> 
>   
> 
>  
> 
>   
> 
>   
> 
>  
> 
>   
> 
>   
> 
>  
> 
>   
> 
>   
> 
>  
> 
>  message="impl:getWelcomeMsgRequest"/>
> 
>  message="impl:getWelcomeMsgResponse"/>
> 
>  
> 
>  
> 
> 
> 
> 
> 
>  
> 
>   
> 
>   
> 
>   transport="http://schemas.xmlsoap.org/soap/http"/>
> 
>  
> 
>  soapAction="http://localhost:9090/axis/services/HelloTest/getWelcomeMsg"/>
> 
> 
> 
>http://shantanu.com"/>
> 
> 
> 
> 
> 
>http://shantanu.com"/>
> 
> 
> 
>  
> 
>  
> 
>  soapAction="http://localhost:9090/axis/services/HelloTest/getMsgs"/>
> 
> 
> 
>http://shantanu.com"/>
> 
> 
> 
> 
> 
>http://shantanu.com"/>
> 
> 
> 
>  
> 
>   
> 
>   
> 
>  
> 
>  location="http://localhost:9090/axis/services/HelloTest"/>
> 
>  
> 
>   
> 
> 
> 
> If i create a client in .net I can receive only first item in the string 
> array.
> any comments
> 
> Shantanu Chawla
> 
> Graduate Student
> Department of Computer Science,
> San Diego State University
> 


-- 
Davanum Srinivas - http://webservices.apache.org/~dims/


newbie help

2005-05-02 Thread shantanu chawla
Hi

I am new to webservices and axis.
I am trying to use axis with tomcat using eclipse wtp plugin to create
webservices.
I create a simple java class that has two methods one returning string
and another returning an array of string. My client is in java is
giving the following error.

Exception:
org.xml.sax.SAXException: SimpleDeserializer encountered a child
element, which is NOT expected, in something it was trying to
deserialize.
   at 
org.apache.axis.encoding.ser.SimpleDeserializer.onStartChild(SimpleDeserializer.java:189)
   at 
org.apache.axis.encoding.DeserializationContextImpl.startElement(DeserializationContextImpl.java:963)
   at 
org.apache.axis.message.SAX2EventRecorder.replay(SAX2EventRecorder.java:198)
   at 
org.apache.axis.message.MessageElement.publishToHandler(MessageElement.java:722)
   at org.apache.axis.message.RPCElement.deserialize(RPCElement.java:233)
   at org.apache.axis.message.RPCElement.getParams(RPCElement.java:347)
   at org.apache.axis.client.Call.invoke(Call.java:2272)
   at org.apache.axis.client.Call.invoke(Call.java:2171)
   at org.apache.axis.client.Call.invoke(Call.java:1691)
   at 
com.shantanu.HelloTestSoapBindingStub.getMsgs(HelloTestSoapBindingStub.java:139)
   at com.shantanu.ClientTest.main(ClientTest.java:15)

Though using soap monitor i can see that i am receiving 3 items in the
response. my soap message returned is:

HTTP/1.1 200 OK

Content-Type: text/xml;charset=utf-8

Date: Mon, 02 May 2005 17:05:19 GMT

Server: Apache-Coyote/1.1

Connection: close

http://schemas.xmlsoap.org/soap/envelope/";
xmlns:xsd="http://www.w3.org/2001/XMLSchema";
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance";>

http://shantanu.com";>

msg1
msg2
msg3



--

my wsdl is.


http://shantanu.com";
xmlns:impl="http://shantanu.com"; xmlns:intf="http://shantanu.com";
xmlns:apachesoap="http://xml.apache.org/xml-soap";
xmlns:wsdlsoap="http://schemas.xmlsoap.org/wsdl/soap/";
xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/";
xmlns:xsd="http://www.w3.org/2001/XMLSchema";
xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/";
xmlns="http://schemas.xmlsoap.org/wsdl/";>

 http://www.w3.org/2001/XMLSchema";
targetNamespace="http://shantanu.com";>
  
   
  
  
   

 

   
  
  
   
  
  
   

 

   
  
 


  

 

  

  

 

  

  

 

  

  

 

  

  

 





 

 





 

  

  

 http://schemas.xmlsoap.org/soap/http"/>

 

http://localhost:9090/axis/services/HelloTest/getWelcomeMsg"/>



   http://shantanu.com"/>





   http://shantanu.com"/>



 

 

http://localhost:9090/axis/services/HelloTest/getMsgs"/>



   http://shantanu.com"/>





   http://shantanu.com"/>



 

  

  

 

http://localhost:9090/axis/services/HelloTest"/>

 

  



If i create a client in .net I can receive only first item in the string array.
any comments

Shantanu Chawla

Graduate Student
Department of Computer Science,
San Diego State University


Re: client default constructor ?

2005-05-02 Thread lio axis
I was suspected so...
Notice this bean has been generated by axis itself ...
Moreover it works with other clients...
Is the enumeration type has a kind of special treatment?

here the generated code by axis :

/**
 * EnumerationStatus.java
 *
 * This file was auto-generated from WSDL
 * by the Apache Axis WSDL2Java emitter.
 */

package ipcfm.GetConfigurationV2;

public class EnumerationStatus implements java.io.Serializable {
private java.lang.String _value_;
private static java.util.HashMap _table_ = new java.util.HashMap();

// Constructor
protected EnumerationStatus(java.lang.String value) {
_value_ = value;
_table_.put(_value_,this);
}

public static final java.lang.String _Success = "Success";
public static final java.lang.String _Warning = "Warning";
public static final java.lang.String _Failure = "Failure";
public static final EnumerationStatus Success = new
EnumerationStatus(_Success);
public static final EnumerationStatus Warning = new
EnumerationStatus(_Warning);
public static final EnumerationStatus Failure = new
EnumerationStatus(_Failure);
public java.lang.String getValue() { return _value_;}
public static EnumerationStatus fromValue(java.lang.String value)
  throws java.lang.IllegalStateException {
EnumerationStatus enum = (EnumerationStatus)
_table_.get(value);
if (enum==null) throw new java.lang.IllegalStateException();
return enum;
}
public static EnumerationStatus fromString(java.lang.String value)
  throws java.lang.IllegalStateException {
return fromValue(value);
}
public boolean equals(java.lang.Object obj) {return (obj == this);}
public int hashCode() { return toString().hashCode();}
public java.lang.String toString() { return _value_;}
public java.lang.Object readResolve() throws
java.io.ObjectStreamException { return fromValue(_value_);}
}




On 5/2/05, Anne Thomas Manes <[EMAIL PROTECTED]> wrote:
> You must define the bean with a default constructor.
> 
> On 5/2/05, lio axis <[EMAIL PROTECTED]> wrote:
> > Hello World,
> >
> > My web-services genrated with axis crashes (see the stack trace) after
> > received the whole response structure.
> >
> > the constructor of the mentionned class is ;
> >
> >  // Constructor
> > protected EnumerationStatus(java.lang.String value) {
> > _value_ = value;
> > _table_.put(_value_,this);
> > }
> >
> > I don't understand why as this class has been used by other clients
> > with other web-services ...
> >
> > What's wrong?
> > Any body could help?
> >
> > Thx,
> >
> > org.xml.sax.SAXException: Unable to create JavaBean of type
> > com.equant.refce.ipcfm.bouchon.getConfiguration.EnumerationStatus.
> > Missing default constructor?  Error was:
> > java.lang.InstantiationException:
> > com.equant.refce.ipcfm.bouchon.getConfiguration.EnumerationStatus.
> > at 
> > org.apache.axis.encoding.ser.BeanDeserializer.startElement(BeanDeserializer.java:159)
> > at 
> > org.apache.axis.encoding.DeserializationContextImpl.startElement(DeserializationContextImpl.java:976)
> > at 
> > org.apache.axis.message.SAX2EventRecorder.replay(SAX2EventRecorder.java:198)
> > at 
> > org.apache.axis.message.MessageElement.publishToHandler(MessageElement.java:722)
> > at 
> > org.apache.axis.message.RPCElement.deserialize(RPCElement.java:233)
> > at org.apache.axis.message.RPCElement.getParams(RPCElement.java:347)
> > at org.apache.axis.client.Call.invoke(Call.java:2272)
> > at org.apache.axis.client.Call.invoke(Call.java:2171)
> > at org.apache.axis.client.Call.invoke(Call.java:1691)
> > at 
> > com.equant.refce.ipcfm.bouchon.getConfiguration.GetConfigurationV2SOAPBindingStub.getConfiguration(GetConfigurationV2SOAPBindingStub.java:228)
> > at 
> > com.equant.refce.ipcfm.bouchon.testu.GetConfigurationV2ServiceTestCase.test1GetConfigurationV2GetConfiguration(GetConfigurationV2ServiceTestCase.java:52)
> > 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:324)
> > at junit.framework.TestCase.runTest(TestCase.java:154)
> > at junit.framework.TestCase.runBare(TestCase.java:127)
> > at junit.framework.TestResult$1.protect(TestResult.java:106)
> > at junit.framework.TestResult.runProtected(TestResult.java:124)
> > at junit.framework.TestResult.run(TestResult.java:109)
> > at junit.framework.TestCase.run(TestCase.java:118)
> > at 
> > org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:421)
> > at 
> > org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.

Re: client default constructor ?

2005-05-02 Thread Anne Thomas Manes
You must define the bean with a default constructor.

On 5/2/05, lio axis <[EMAIL PROTECTED]> wrote:
> Hello World,
> 
> My web-services genrated with axis crashes (see the stack trace) after
> received the whole response structure.
> 
> the constructor of the mentionned class is ;
> 
>  // Constructor
> protected EnumerationStatus(java.lang.String value) {
> _value_ = value;
> _table_.put(_value_,this);
> }
> 
> I don't understand why as this class has been used by other clients
> with other web-services ...
> 
> What's wrong?
> Any body could help?
> 
> Thx,
> 
> org.xml.sax.SAXException: Unable to create JavaBean of type
> com.equant.refce.ipcfm.bouchon.getConfiguration.EnumerationStatus.
> Missing default constructor?  Error was:
> java.lang.InstantiationException:
> com.equant.refce.ipcfm.bouchon.getConfiguration.EnumerationStatus.
> at 
> org.apache.axis.encoding.ser.BeanDeserializer.startElement(BeanDeserializer.java:159)
> at 
> org.apache.axis.encoding.DeserializationContextImpl.startElement(DeserializationContextImpl.java:976)
> at 
> org.apache.axis.message.SAX2EventRecorder.replay(SAX2EventRecorder.java:198)
> at 
> org.apache.axis.message.MessageElement.publishToHandler(MessageElement.java:722)
> at org.apache.axis.message.RPCElement.deserialize(RPCElement.java:233)
> at org.apache.axis.message.RPCElement.getParams(RPCElement.java:347)
> at org.apache.axis.client.Call.invoke(Call.java:2272)
> at org.apache.axis.client.Call.invoke(Call.java:2171)
> at org.apache.axis.client.Call.invoke(Call.java:1691)
> at 
> com.equant.refce.ipcfm.bouchon.getConfiguration.GetConfigurationV2SOAPBindingStub.getConfiguration(GetConfigurationV2SOAPBindingStub.java:228)
> at 
> com.equant.refce.ipcfm.bouchon.testu.GetConfigurationV2ServiceTestCase.test1GetConfigurationV2GetConfiguration(GetConfigurationV2ServiceTestCase.java:52)
> 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:324)
> at junit.framework.TestCase.runTest(TestCase.java:154)
> at junit.framework.TestCase.runBare(TestCase.java:127)
> at junit.framework.TestResult$1.protect(TestResult.java:106)
> at junit.framework.TestResult.runProtected(TestResult.java:124)
> at junit.framework.TestResult.run(TestResult.java:109)
> at junit.framework.TestCase.run(TestCase.java:118)
> at 
> org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:421)
> at 
> org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.run(RemoteTestRunner.java:305)
> at 
> org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.main(RemoteTestRunner.java:186)
>


client default constructor ?

2005-05-02 Thread lio axis
Hello World,

My web-services genrated with axis crashes (see the stack trace) after
received the whole response structure.

the constructor of the mentionned class is ;

 // Constructor
protected EnumerationStatus(java.lang.String value) {
_value_ = value;
_table_.put(_value_,this);
}

I don't understand why as this class has been used by other clients
with other web-services ...

What's wrong? 
Any body could help?

Thx,



org.xml.sax.SAXException: Unable to create JavaBean of type
com.equant.refce.ipcfm.bouchon.getConfiguration.EnumerationStatus. 
Missing default constructor?  Error was:
java.lang.InstantiationException:
com.equant.refce.ipcfm.bouchon.getConfiguration.EnumerationStatus.
at 
org.apache.axis.encoding.ser.BeanDeserializer.startElement(BeanDeserializer.java:159)
at 
org.apache.axis.encoding.DeserializationContextImpl.startElement(DeserializationContextImpl.java:976)
at 
org.apache.axis.message.SAX2EventRecorder.replay(SAX2EventRecorder.java:198)
at 
org.apache.axis.message.MessageElement.publishToHandler(MessageElement.java:722)
at org.apache.axis.message.RPCElement.deserialize(RPCElement.java:233)
at org.apache.axis.message.RPCElement.getParams(RPCElement.java:347)
at org.apache.axis.client.Call.invoke(Call.java:2272)
at org.apache.axis.client.Call.invoke(Call.java:2171)
at org.apache.axis.client.Call.invoke(Call.java:1691)
at 
com.equant.refce.ipcfm.bouchon.getConfiguration.GetConfigurationV2SOAPBindingStub.getConfiguration(GetConfigurationV2SOAPBindingStub.java:228)
at 
com.equant.refce.ipcfm.bouchon.testu.GetConfigurationV2ServiceTestCase.test1GetConfigurationV2GetConfiguration(GetConfigurationV2ServiceTestCase.java:52)
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:324)
at junit.framework.TestCase.runTest(TestCase.java:154)
at junit.framework.TestCase.runBare(TestCase.java:127)
at junit.framework.TestResult$1.protect(TestResult.java:106)
at junit.framework.TestResult.runProtected(TestResult.java:124)
at junit.framework.TestResult.run(TestResult.java:109)
at junit.framework.TestCase.run(TestCase.java:118)
at 
org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:421)
at 
org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.run(RemoteTestRunner.java:305)
at 
org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.main(RemoteTestRunner.java:186)


attn dims please : RE: Axis 1.1 vs Axis 1.2rc3 and derived types

2005-05-02 Thread Dovholuk, Clint
dims,

It seems that this issue doesn't relate only to derived types, but to
the beanMapping as supplied by the server-config.wsdd...

In axis 1.1, axis would write out all the objects mapped in the
server-config.wsdd... for instance, if you had this in your
server-config.wsdd:


  
  
  
  


the output wsdl would write a type for both the Test1 and Test2
objects...

in Axis 1.2rc3, this is no longer true.  Is this expected behavior?

Thanks,
-Clint




-Original Message-
From: Dovholuk, Clint [mailto:[EMAIL PROTECTED] 
Sent: Tuesday, April 26, 2005 4:22 PM
To: axis-user@ws.apache.org
Subject: RE: Axis 1.1 vs Axis 1.2rc3 and derived types

thanks dims,

bug 1955 created : http://issues.apache.org/jira/browse/AXIS-1955

-clint

(posted to the mailing list in case anyone else wants to view)



-Original Message-
From: Davanum Srinivas [mailto:[EMAIL PROTECTED]
Sent: Tuesday, April 26, 2005 3:26 PM
To: axis-user@ws.apache.org
Subject: Re: Axis 1.1 vs Axis 1.2rc3 and derived types

this is definitely looks like a bug. do you have a stripped down test
case that can be used to recreate the bug? (please open a bug report)

thanks,
dims

On 4/26/05, Dovholuk, Clint <[EMAIL PROTECTED]> wrote:
> Hello all,
> 
> We are trying to switch to Axis 1.2rc3 in order to move to J2SE 5.0 
> (unless there's another workaround for the package "enum" that I 
> didn't find?).
> 
> I have a web service which uses abstract classes/types but when I 
> switched to the axis 1.2rc3 jars, all of a sudden the wsdl that axis 
> creates is no longer representing many (mostly all) of the derived 
> classes... The abstract classes are still created but the classes 
> derived from the abstract class no longer get written to the wsdl...
> 
> If I expose another method to axis (via server-config.wsdd) in the 
> same class which uses the base type, only THEN will the derived types 
> get written to the wsdl properly...
> 
> I've searched through the mailing lists to the best of my ability but 
> I can't find this exact issue. Could anybody point me in the right 
> direction or has anybody seen similar issues?
> 
> I can provide some simple sample classes if people wish but every time

> I post a 'lengthy' message, I get no replies... :)
> 
> Thanks,
> -Clint
> 


--
Davanum Srinivas - http://webservices.apache.org/~dims/


auto generated WSDL with soapAction OPERATION

2005-05-02 Thread Ilias Bartolini
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

Is possible to set in the autogenerated WSDL ( the one retrieved with ?wsdl ) 
the soapAction value at the equivalent Java2WSDL OPERATION ?

Does exists any WSDD parameter ?

Thank you,
   Ilias
- -- 
/**
 * Reply to: ilias.bartolini(at)studio.unibo.it  
 * ICQ# 42797710 - FeSToso n°143 - PGP Key-IDs:0x6A951A45
 * http://www.brainetwork.net/homepage - https://www.universibo.unibo.it
 * http://www.icalx.com/html/brain79/week.php?cal=brain79.public
 */
-BEGIN PGP SIGNATURE-
Version: GnuPG v1.2.4 (GNU/Linux)

iD8DBQFCdjgc+CP4pmqVGkURAngYAJ9nPXU77idcsZJyUidaT2T1chJjuACfbnj/
2nqGHPS0hBWYDoyxGXEE/JE=
=4/Zx
-END PGP SIGNATURE-


Re: correct method to get attachments from a soap response?

2005-05-02 Thread Tom Ziemer
Hi Paul,
I've asked a similar question some time ago, but didn't get an answer. 
The code I eventually came up with looks like this:

XlsExport xlsExport = null;
try
{
	xlsExport = locator.getXlsExport();
String msg = xlsExport.exportExperiment(id, zipped);
MessageContext mx = locator.getCall().getMessageContext();
	Message m = mx.getCurrentMessage();
	logger.info("[client]: Found attachments: "+m.countAttachments());
	
}
...
This way I can access the attachments without having to cast. I don't 
know if this is better than your approach or even it's okay to do it 
like that - but as in your case - it works.

Hope it helps.
Regards,
Tom
Paul Duran wrote:
Hi all,
I'm writing a java application that calls a .NET web service. I have
generated the java-side code using the wsdl2java ant task.
The .NET web service generates a pdf document and sends it back to the
client as a SOAP attachment.
I am wondering what the 'correct' way of obtaining soap attachments
from a call to a web service is. The code I currently have (that
works) involves casting the 'soap' object to a 'soap stub' object.. as
the soap stub has methods to get the attachments.
see the code below for what i mean.
-
ReportGeneratorLocator rgl = new ReportGeneratorLocator();
ReportGeneratorSoapStub reportGeneratorSoap =
(ReportGeneratorSoapStub) rgl.getReportGeneratorSoap();
reportGeneratorSoap.doReport(new DoReportDataSet(result.get_any()), "pdf");
Object[] attachments = reportGeneratorSoap.getAttachments();
-
As I said, this code actually works but I'm concerned that i'm having
to cast to the stub object to get the attachments.
The documentation i've found so far mentions the MessageContext
class.. but when i call MessageContext.getCurrentContext(), i receive
a null value.
Can anybody clue me in as to whether i'm doing the right thing? Or if
not, what the 'right thing' actually is?
thanks,
Paul.


Re: Axis and "canonical representation"

2005-05-02 Thread Anne Thomas Manes
I suspect in this situation you will have to use a custom serializer
to force the mapping of the second source to the appropriate scale.

Anne

On 5/2/05, Fabio Insaccanebbia <[EMAIL PROTECTED]> wrote:
> Hi everybody,
> 
> is there someone who can explain me if Axis manages in an explicit way
> if the SOAP message you sent is in lexical representation or in a
> canonical representation?
> 
>  From what I've read, the canonical representation should guarantee a
> better interoperability between different SOAP implementations.
> 
> It is my responsability to write software that, for every field, create
> a "canonical" representation or there's an Axis configuration that makes
> every field converted to "canonical representation".
> 
> An example: I've a "decimal" field that in my software is a BigDecimal.
> This data arrives to us form two different sources.
> The first source send us a BigDecimal always with scale 3, the second
> adapts the scale to the number of meaningful decimals.
> This means that if we have the number 130, the first source will send
> "130.000" and the second "130".
> If I've to send this data via SOAP to another software, the
> representation will be different in the two case (even though the value
> is the same). Now, the mantainers of the other software are complaining
> about incoherence of the representation (???).
> 
> I haven't yet understood clearly why the different representation should
> bother them, but reading the specs I found out that using "canonical
> representation" there wouldn't be different ways to express the same
> value, thus eliminating the incoherence(???).
> 
> How can I obtain "canonical representation"? I've to "normalize" all the
> data in my application (setting the scale for all the BigDecimal I
> pass)? Or is there a switch in Axis to say "canonize all the data I'm
> passing"? Or is something else I'm missing (some "adapter" classes to
> implement)?
> 
> The "decimal representation" specs:
> http://www.w3.org/TR/xmlschema-2/#decimal-lexical-representation
> http://www.w3.org/TR/xmlschema-2/#decimal-canonical-representation
> 
> Thanks in advance,
> Fabio
> 
> P.S.: I searched the mailing list, the docs, the FAQ, google, jira and
> couldn't find a clear answer.. if it turns out it is a beginner question
> (quite likely, since I'm a beginner :-), could you point out a resource
> where I can find the requested info?
> 
>


correct method to get attachments from a soap response?

2005-05-02 Thread Paul Duran
Hi all,

I'm writing a java application that calls a .NET web service. I have
generated the java-side code using the wsdl2java ant task.

The .NET web service generates a pdf document and sends it back to the
client as a SOAP attachment.

I am wondering what the 'correct' way of obtaining soap attachments
from a call to a web service is. The code I currently have (that
works) involves casting the 'soap' object to a 'soap stub' object.. as
the soap stub has methods to get the attachments.

see the code below for what i mean.

-
ReportGeneratorLocator rgl = new ReportGeneratorLocator();

ReportGeneratorSoapStub reportGeneratorSoap =
(ReportGeneratorSoapStub) rgl.getReportGeneratorSoap();

reportGeneratorSoap.doReport(new DoReportDataSet(result.get_any()), "pdf");

Object[] attachments = reportGeneratorSoap.getAttachments();
-

As I said, this code actually works but I'm concerned that i'm having
to cast to the stub object to get the attachments.

The documentation i've found so far mentions the MessageContext
class.. but when i call MessageContext.getCurrentContext(), i receive
a null value.

Can anybody clue me in as to whether i'm doing the right thing? Or if
not, what the 'right thing' actually is?

thanks,
Paul.


SOAPBody.addDocument() returns elements with empty xmlns

2005-05-02 Thread LiChung Liu
Hi, someone found this problem in Axis 1.2RC2.  And from the Axis
Developer's List, it was mentioned that it's resolved.  However, I am
still experiencing this problem in 1.2RC3.  Is the fix include in the
RC3?

-Will


Re: Deserialization problem for an inner class

2005-05-02 Thread thomas
Reply to myself, for people that will have the same troubles :
the InnerBean class should be static
On May 2, 2005, at 11:02 AM, thomas wrote:
Hello I have no problem for writing Java clients for "normal" beans 
returned, but, I have a problem with a bean that is an inner class.

So my bean is something like that :
package my.package;
public class FirstClass
{
...

//my inner class
public class InnerBean
{

}

}
Note that FirstClass is also a a webservice class, with a method that 
will return an instance of InnerBean.

The wsdd :
http://xml.apache.org/axis/wsdd/";
xmlns:java="http://xml.apache.org/axis/wsdd/providers/java";
xmlns:esis="urn:my.package.FirstClass"
>



urn:my.package.FirstClass

Now the client :
I declare as usual all the stuff, except for the return type :
QName qn = new QName("urn:my.package.FirstClass","InnerBean");

call.registerTypeMapping(my.package.FirstClass.InnerBean.class,qn,
new 
BeanSerializerFactory(my.package.FirstClass.InnerBean.class,qn),
new 
BeanDeserializerFactory(my.package.FirstClass.InnerBean.class,qn));
call.setReturnType(qn);
FirstClass.InnerBean 
beanReturned=(FirstClass.InnerBean)call.invoke(objectArray);

The problem is that there are no problems server-side, I can watch the 
SOAP message that return what i want.
Client-side, I get an exception :
org.xml.sax.SAXException: Unable to create JavaBean of type 
my.package.FirstClass$InnerBean.  Missing default constructor?  Error 
was: java.lang.InstantiationException: 
my.package.FirstClass$InnerBean.

(and of course, both classes FirstClass and InnerBean have a default 
constructor).

I don't know where is the problem, in the wsdd, on the client, on the 
server?




Axis and "canonical representation"

2005-05-02 Thread Fabio Insaccanebbia
Hi everybody,
is there someone who can explain me if Axis manages in an explicit way 
if the SOAP message you sent is in lexical representation or in a 
canonical representation?

From what I've read, the canonical representation should guarantee a 
better interoperability between different SOAP implementations.

It is my responsability to write software that, for every field, create 
a "canonical" representation or there's an Axis configuration that makes 
every field converted to "canonical representation".

An example: I've a "decimal" field that in my software is a BigDecimal. 
This data arrives to us form two different sources.
The first source send us a BigDecimal always with scale 3, the second 
adapts the scale to the number of meaningful decimals.
This means that if we have the number 130, the first source will send 
"130.000" and the second "130".
If I've to send this data via SOAP to another software, the 
representation will be different in the two case (even though the value 
is the same). Now, the mantainers of the other software are complaining 
about incoherence of the representation (???).

I haven't yet understood clearly why the different representation should 
bother them, but reading the specs I found out that using "canonical 
representation" there wouldn't be different ways to express the same 
value, thus eliminating the incoherence(???).

How can I obtain "canonical representation"? I've to "normalize" all the 
data in my application (setting the scale for all the BigDecimal I 
pass)? Or is there a switch in Axis to say "canonize all the data I'm 
passing"? Or is something else I'm missing (some "adapter" classes to 
implement)?

The "decimal representation" specs:
http://www.w3.org/TR/xmlschema-2/#decimal-lexical-representation
http://www.w3.org/TR/xmlschema-2/#decimal-canonical-representation
Thanks in advance,
Fabio
P.S.: I searched the mailing list, the docs, the FAQ, google, jira and 
couldn't find a clear answer.. if it turns out it is a beginner question 
(quite likely, since I'm a beginner :-), could you point out a resource 
where I can find the requested info?




Deserialization problem for an inner class

2005-05-02 Thread thomas
Hello I have no problem for writing Java clients for "normal" beans 
returned, but, I have a problem with a bean that is an inner class.

So my bean is something like that :
package my.package;
public class FirstClass
{
...

//my inner class
public class InnerBean
{

}

}
Note that FirstClass is also a a webservice class, with a method that 
will return an instance of InnerBean.

The wsdd :
http://xml.apache.org/axis/wsdd/";
xmlns:java="http://xml.apache.org/axis/wsdd/providers/java";
xmlns:esis="urn:my.package.FirstClass"
>



urn:my.package.FirstClass

Now the client :
I declare as usual all the stuff, except for the return type :
QName qn = new QName("urn:my.package.FirstClass","InnerBean");

call.registerTypeMapping(my.package.FirstClass.InnerBean.class,qn,
new 
BeanSerializerFactory(my.package.FirstClass.InnerBean.class,qn),
new 
BeanDeserializerFactory(my.package.FirstClass.InnerBean.class,qn));
call.setReturnType(qn);
FirstClass.InnerBean 
beanReturned=(FirstClass.InnerBean)call.invoke(objectArray);

The problem is that there are no problems server-side, I can watch the 
SOAP message that return what i want.
Client-side, I get an exception :
org.xml.sax.SAXException: Unable to create JavaBean of type 
my.package.FirstClass$InnerBean.  Missing default constructor?  Error 
was: java.lang.InstantiationException: my.package.FirstClass$InnerBean.

(and of course, both classes FirstClass and InnerBean have a default 
constructor).

I don't know where is the problem, in the wsdd, on the client, on the 
server?



RE: Axis and Castor - newbie question

2005-05-02 Thread Tysnes Are Thobias

Hello!

Some inputs on question 1)

a) You can use the TCPMonitor to alter the incoming XML
b) In my Axis + Castor project I do use JUnit TestCases with non-castor
generated client code

Cheers,
Are T. Tysnes

-Original Message-
From: David Easley [mailto:[EMAIL PROTECTED] 
Sent: 1. mai 2005 19:00
To: axis-user@ws.apache.org
Subject: Axis and Castor - newbie question


I've been experimenting using Axis and Castor along the lines described
in the IBM article:
http://www-106.ibm.com/developerworks/webservices/library/ws-castor/
Everything's working fine, but I have a few questions:

1. I want to test that the WS messages are being validated against my
schema (after all, this is one of the main reasons I'm using Castor
rather than plain old WSDL2Java). My test set-up involves using the
Castor generated code on the client and server side, so it's impossible
to generate invalid XML! What's the simplest way to test this?

2. On the server side, I already have a set of DTOs that I must use
internal to the app. So I'm currently having to translate between the
Castor generated objects and my own DTOs, which is a pain. Ideally, I'd
like Castor to unmarshall/marshall directly to/from my DTOs. I've read
the provided Castor XML Mapping documentation but I can't see how to
integrate my Castor XML mapping file into my Axis+Castor solution. Can
this be done?

3. If the answer to 2. is yes, can the incoming WS request messages and
the outgoing WS response messages still be validated against my schema?

If the answer to 2 & 3 is yes, yipp!

Thanks for any help,
David