Re: Invalid element/Deserialisation

2005-07-05 Thread John Baker
Or rather, put more simply, I am generating Stub classes from a WDSL which
generate a second LogonToConnector element. The 'commercial app' seems to be
building the SOAP message manually (it's not using stubs) so perhaps that's
why the XML is so different, but I'd like to understand why there are two
LogonToConnector elements from the Stub request.


John

On Tue, Jul 05, 2005 at 08:54:32PM +0100, John Baker wrote:
> I'm generating Stubs and a deploy.wsdd file from the wsdl. I'm then directly
> deploying the stubs (by changing the classname in the deploy.wsdd). I then
> wrote a few lines to invoke the stub and logged the output, giving the
> double LogonToConnector output.
> 
> What I'm trying to achieve is invokation of a deployed webservice, where
> that deployed webservice was derived from the original WSDL.
> 
> 
> John
> 
> On Tue, Jul 05, 2005 at 01:01:29PM -0400, Anne Thomas Manes wrote:
> > According to the WSDL, there should be only one LogonToConnector
> > element. The message should look like the first message you posted
> > (the one generated by your Java application. I have no idea why the
> > stub generates an extra LogonToConnector element, or why that message
> > seems to work. I also don't know why the stub adds the xsi:type
> > attribute to the  element. (It shouldn't.)
> > 
> > Can you review for us again the sequence you went through to create
> > the service and the client?
> > 
> > I also suggest that you edit the WSDD typeMapping to specify:
> > qname="ns:DatabaseID" rather than
> > qname="ns:>UniformLoginCredentialsType>DatabaseID"
> > 
> > Also, what version of Axis are you using?
> > 
> > Anne
> > 
> > On 7/5/05, John Baker <[EMAIL PROTECTED]> wrote:
> > > I should point out that the call which works is being generated by the 
> > > Java
> > > stubs generated from the WSDL, while the offending request is being
> > > generated by another bit of Java building up it's own SOAP message 
> > > (although
> > > it seems to use the axis client libraries). I guess the major question is:
> > > Why did the stubs use two LogonToConnector elements...
> > > 
> > > On Tue, Jul 05, 2005 at 10:58:15AM -0400, Anne Thomas Manes wrote:
> > > > Please post the WSDL.
> > > >
> > > > There is a big difference between the two messages -- one has an extra
> > > >  wrapper element. But if that's the problem, then
> > > > I'd expect the error to occur on that element rather than on
> > > > DatabaseID.
> > > >
> > > > Your WSDD also looks suspect. The qname should be
> > > > qname="ns:DatabaseID" rather than
> > > > qname="ns:>UniformLoginCredentialsType>DatabaseID".
> > > >
> > > > Anne
> > > >
> > > > On 7/5/05, John Baker <[EMAIL PROTECTED]> wrote:
> > > > > Further to my post, I have derived that if I create Stub classes from 
> > > > > WSDL
> > > > > and make a WS call using Axis - to an Axis server - the client 
> > > > > generates
> > > > > this call:
> > > > >
> > > > >  > > > > xmlns="http://www.caps-solutions.co.uk/webservices/connectors/common/messagetypes";>
> > > > >  
> > > > > > > > > xsi:type="ns1:UniformLoginCredentialsType" 
> > > > > xmlns:ns1="http://www.caps-solutions.co.uk/schema/uniform/72b/common/connectortypes";
> > > > >  xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance";>
> > > > >  a
> > > > >  b
> > > > >  c
> > > > >
> > > > >  
> > > > > 
> > > > >
> > > > > Which is unserialised without a problem. So what is different between 
> > > > > that
> > > > > and this:
> > > > >
> > > > >  > > > > 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";>
> > > > >  
> > > > >> > > > xmlns="http://www.caps-solutions.co.uk/webservices/connectors/common/messagetypes";
> > > > >  xmlns:ns1="http://www.caps-solutions.co.uk/schema/unifor
> > > > >
> > > > > a
> > > > > b
> > > > > c
> > > > >
> > > > >   
> > > > >  
> > > > > 
> > > > >
> > > > > Well I can see they are different, but what key fact makes one 
> > > > > unserialisable?
> > > > >
> > > > > Thanks,
> > > > >
> > > > >
> > > > > John
> > > > >
> > > > > On Mon, Jul 04, 2005 at 08:32:16PM +0100, John Baker wrote:
> > > > > > Hi,
> > > > > >
> > > > > > I'm having a small problem when making a SOAP call and I'm getting 
> > > > > > this
> > > > > > exception:
> > > > > >
> > > > > > AxisFault
> > > > > >  faultCode: 
> > > > > > {http://schemas.xmlsoap.org/soap/envelope/}Server.userException
> > > > > >   faultSubcode:
> > > > > >faultString: org.xml.sax.SAXException: Invalid element in
> > > > > > uk.co.caps_solutions.www.schema.uniform._72b.common.connectortypes.UniformLoginRequestType
> > > > > > - DatabaseID
> > > > > >  faultActor:
> > > > > >   faultNode:
> > > > > >faultDetail:
> > > > > >
> > > > > > {http://xml.apache.org/axis/}stackTrace:org.xml.sax.SAXException:
> > > > > > Invalid element in
> > > > > > uk.co.caps_solutions.www

Re: Tomcat Configuration

2005-07-05 Thread John Delaney
If you want axis to operate within an already existing site you need to merge 
the axis web.xml definitions with the web.xml that you have for the existing 
site. This is quite a simple task, but, non trivial. The server.xml, 
workers.properties and other files within the global tomcat configuration need 
no change as axis is not running under its own site.

JWD

>>> [EMAIL PROTECTED] 07/06/05 11:32 AM >>>
Is there anything you need to do configuration-wise with Tomcat (5.5.9)
in order to 
access an Axis web service with client code?  The Tomcat/conf directory
has a web.xml,
server.xml, and a context.xml among others.  Do I need to add anything
to these files
to get my Axis web services to work?
 
Thanks,
 
Jan



Re: RPC/Literal support

2005-07-05 Thread Anne Thomas Manes
Yes, Axis supports rpc/literal.

On 7/5/05, Shantanu Sen <[EMAIL PROTECTED]> wrote:
> Does Axis 1.2 support RPC/Literal? I know it is not
> recommended for interoperability with .NET, but I am
> asking if we can say that Axis 1.2 is compliant with
> Basic Profile 1.0a by supporting RPC/Literal.
> 
> Thanks
> Shantanu
>


Re: Tomcat Configuration

2005-07-05 Thread Mark Leone
Axis is just a web app running in Tomcat, and it requires no special 
treatment per se. Just put your axis folder with all its subfolders 
configured appropriately into your Tomcat context root, and you can then 
access your Axis web services as indicated in the Axis documentation, 
with the URL of your Tomcat root context as the base URL..


-Mark

Miller, Janet wrote:

Is there anything you need to do configuration-wise with Tomcat 
(5.5.9) in order to
access an Axis web service with client code?  The Tomcat/conf 
directory has a web.xml,
server.xml, and a context.xml among others.  Do I need to add anything 
to these files

to get my Axis web services to work?
 
Thanks,
 
Jan




Tomcat Configuration

2005-07-05 Thread Miller, Janet
Title: Message



Is there anything 
you need to do configuration-wise with Tomcat (5.5.9) in order to 

access an Axis web 
service with client code?  The Tomcat/conf directory has a 
web.xml,
server.xml, and a 
context.xml among others.  Do I need to add anything to these 
files
to get my Axis web 
services to work?
 
Thanks,
 
Jan


RE: SOAPMonitor problems in axis 1.2.1 with jboss 3.2.5

2005-07-05 Thread Pantvaidya, Vishwajit
I added the SOAPMonitorApplet.jar to the java plugin classpath and then the
monitor applet worked. Is that the right
or the only way to get it working?


Thanks,

Vish.


-Original Message-
From: Pantvaidya, Vishwajit 
Sent: Friday, July 01, 2005 5:32 PM
To: 'axis-user@ws.apache.org'
Subject: SOAPMonitor problems in axis 1.2.1 with jboss 3.2.5


Hello,

I am trying to use axis 1.2.1 with jboss 3.2.5 but not getting SOAPMonitor
to work. Here are the steps I did:

- created a jar file of the SOAPMonitorApplet classes
- created an axis war file having all files under \axis-1_2_1\webapps\axis
- included the SOAPMonitorApplet.jar in the above war with the path
WEB-INF\lib\
- tried to run the SOAPMonitor in Firefox with java plugin 1.4.2

But I got ClassNotFoundException for the SOAPMonitorApplet class. I also
tried adding the applet jar to the jboss classpath. But even that does not
work.

I guess the browser should be able to load applet through the jboss server.
Am I doing anything wrong here?


- Vish.


RE: Client Code Question

2005-07-05 Thread Steven Smith
Title: Message



Janet,
    There are 2 ways to access a Web Service: Using generic 
classes and using the Service implementation created for you by Axis or 
your client language. Both ways do the same job, but the way you have done it is 
more readable. It is immediately obvious from your code what you are accessing. 
But with the other, generic way, it is very difficult to see what it being 
called.
 

-- Steven Smith <[EMAIL PROTECTED]>Software 
Developer / Analyst

  
  

  


  

  Telephone
  : 
  03 6223 1999

  Facsimile
  : 
  03 6223 1988

  Web
  : 
  www.geometryit.com

  Address
  : 
  31 Salamanca Square, Battery Point, TAS 7004, Australia

  Postal
  : 
  PO Box 844, Sandy Bay, TAS 7006, 
Australia

 

 


From: Miller, Janet 
[mailto:[EMAIL PROTECTED] Sent: Wednesday, 6 July 2005 10:34 
AMTo: axis-user@ws.apache.orgSubject: Client Code 
Question


 Someone just asked a question 
about their client code:
 Service srv = new 
Service("http://localhost:49950/iflowws/services/IFWebServices?wsdl", new 
QName(ns, "IFService"));
Call call = 
(Call)srv.createCall(new QName(ns, "IFPort"), new QName(ns, 
"getWorkItemChoices"));
Object result = 
call.invoke( new Object[] { u, p, new Long(id)} ); 
 
My client code looks like 
this:
  TZCService service = 
new TZCServiceLocator();  TZCServiceSoap port = 
service.getTZCServiceSoap();  test = 
port.getTransactions("Test");

 
 
I'm brand new to Axis and Web Services.  Why does my 
client code look totally different from someone else's?  I'm using Axis 
1.2.1. 
Are different versions of Axis that much different or am I 
doing something completely wrong? I am not able to access the web 
service
that I just deployed with my client and can't figure out 
why.  All the call and invoke stuff is in my Stub.java 
file.
 
Jan  


Client Code Question

2005-07-05 Thread Miller, Janet
Title: Message




 Someone just asked a question 
about their client code:
 Service srv = new 
Service("http://localhost:49950/iflowws/services/IFWebServices?wsdl", new 
QName(ns, "IFService"));
Call call = 
(Call)srv.createCall(new QName(ns, "IFPort"), new QName(ns, 
"getWorkItemChoices"));
Object result = 
call.invoke( new Object[] { u, p, new Long(id)} ); 
 
My client code looks like 
this:
  TZCService service = 
new TZCServiceLocator();  TZCServiceSoap port = 
service.getTZCServiceSoap();  test = 
port.getTransactions("Test");

 
 
I'm brand new to Axis and Web Services.  Why does my 
client code look totally different from someone else's?  I'm using Axis 
1.2.1. 
Are different versions of Axis that much different or am I 
doing something completely wrong? I am not able to access the web 
service
that I just deployed with my client and can't figure out 
why.  All the call and invoke stuff is in my Stub.java 
file.
 
Jan  


Re:RPC/Literal support

2005-07-05 Thread zhangyu
Yes,Axis 1.2 supports RPC/literal.Recommended that you  read the doc about 
class org.apache.axis.constants.Style.

Because Axis 1.2 support RPC/literal and DOCUMENT/literal,so we can say that it 
is compliant with BP1.0a.

Best Regards,

Robert Zhang
Email:[EMAIL PROTECTED]
Tel:86-010-62014411-2437

- 原邮件 -
从: Shantanu Sen <[EMAIL PROTECTED]>
日期: 星期三, 七月 6日, 2005 上午7:12
主题: RPC/Literal support

> Does Axis 1.2 support RPC/Literal? I know it is not
> recommended for interoperability with .NET, but I am
> asking if we can say that Axis 1.2 is compliant with
> Basic Profile 1.0a by supporting RPC/Literal.
> 
> Thanks
> Shantanu
>



String[] return type and ArrayList

2005-07-05 Thread Sameer Pradhan
Title: Message









Hi everyone,

 

I am SURE this question must have been
asked before, but I didn't find it in the recent archives.

 

I have a wrapped service which returns
String[].

 

The WSDD entry for that is

 


   


   


   


 


 

The client code is:

Service srv = new
Service("http://localhost:49950/iflowws/services/IFWebServices?wsdl",
new QName(ns, "IFService"));

Call call = (Call)srv.createCall(new
QName(ns, "IFPort"), new QName(ns, "getWorkItemChoices"));

Object result = call.invoke( new Object[]
{ u, p, new Long(id)} );

 

I found that when the service returns an array
of ONE element, the "result" is a String object.

But when the service returns an array of two
or more elements, the "result" is an ArrayList of Strings.

 

Question 1: Is this normal AXIS behaviour? 

Question 2: I would like it to return the same type of Object (an
ArrayList) whether the service is returning 0, 1, or more elements. How can I
do that?

 

Thanks,

Sameer








Re:some problem regarding invoking web services

2005-07-05 Thread zhangyu
call.addParameter("emp_no", XMLType.XSD_INT,ParameterMode.PARAM_MODE_IN);
call.addParameter("op2", XMLType.XSD_INT, ParameterMode.PARAM_MODE_IN);

These two statements has some errors.The constants variable in class 
ParameterMode are IN,OUT,and INOUT.You can go through ParameterMode's API.

Best Regards,

Robert Zhang
Email:[EMAIL PROTECTED]
Tel:86-010-62014411-2437
Content-Type: multipart/alternative;
boundary="0-1222714899-1120562803=:54008"


--0-1222714899-1120562803=:54008
Content-Type: text/plain; charset=GB2312
Content-Transfer-Encoding: 8bit

hi

I deployed a java class as web service in apache axis and tried calling it 
using a client code. But i encountered some problem which i have listed after 
the code.

 import org.apache.axis.client.Call;
import org.apache.axis.client.Service;
import org.apache.axis.encoding.XMLType;
import org.apache.axis.utils.Options;
import javax.xml.rpc.ParameterMode;
public class client {
   public static void main(String [] args) throws Exception {
   Options options = new Options(args);
   String endpoint = "http://localhost:"; + options.getPort() +
 "/axis/employee.jws";
// Do argument checking
   args = options.getRemainingArgs();
   if (args == null || args.length != 3) {
   System.err.println("Usage: CalcClient 

hi
 
I deployed a java class as web service in apache axis and tried calling it 
using a client code. But i encountered some problem which i have listed 
after the code.
 
 import org.apache.axis.client.Call;import 
org.apache.axis.client.Service;import 
org.apache.axis.encoding.XMLType;import org.apache.axis.utils.Options;
import javax.xml.rpc.ParameterMode;
public class client {   public static void main(String [] 
args) throws Exception {   Options 
options = new Options(args);
   String endpoint = "http://localhost/"; target=_blank>http://localhost:" + options.getPort() 
+
 "/axis/employee.jws";
// Do argument checking   args = 
options.getRemainingArgs();
   if (args == null || args.length != 3) 
{   
System.err.println("Usage: CalcClient Rekindle the Rivalries. Sign up for Fantasy Football



--0-1222714899-1120562803=:54008--


RE: How to replace URLs in generated code

2005-07-05 Thread Miller, Janet
Title: Message



I'm 
getting the following error when I run my client.  I'm trying to create a 
local Web Service and access it via a client.
I've 
successfully deployed my Web Service even though the error below says "The 
requested resource (/axis/TZCService) is not available."
I'm 
using Tomcat 5.5.9 and Axis 1.2.  Does anyone know how to fix 
this?  Do I need to configure Tomcat in some way 
before I can access the Web 
Service?
Or 
does this mean that I haven't deployed properly?
 
 
Exception in thread "main" 
AxisFault faultCode: 
{http://xml.apache.org/axis/}HTTP faultSubcode:  faultString: 
(404)/axis/TZCService faultActor:  faultNode: 
 faultDetail:  {}:return code:  
404Apache 
Tomcat/5.5.9 - Error 
report 

HTTP Status 404 - /axis/TZCService


type Status report

message /axis/TZCService

description The requested resource (/axis/TZCService) is not available.


Apache Tomcat/5.5.9

 {http://xml.apache.org/axis/}HttpErrorCode:404   (404)/axis/TZCService at org.apache.axis.transport.http.HTTPSender.readFromSocket(HTTPSender.java:744) at org.apache.axis.transport.http.HTTPSender.invoke(HTTPSender.java:144) at org.apache.axis.strategies.InvocationStrategy.visit(InvocationStrategy.java:32) at org.apache.axis.SimpleChain.doVisiting(SimpleChain.java:118) at org.apache.axis.SimpleChain.invoke(SimpleChain.java:83) at org.apache.axis.client.AxisClient.invoke(AxisClient.java:165) at org.apache.axis.client.Call.invokeEngine(Call.java:2765) at org.apache.axis.client.Call.invoke(Call.java:2748) at org.apache.axis.client.Call.invoke(Call.java:2424) at org.apache.axis.client.Call.invoke(Call.java:2347) at org.apache.axis.client.Call.invoke(Call.java:1804) at Sirit.ETTM.TZCServiceSoapStub.getTransactions(TZCServiceSoapStub.java:128) at pbf.hot.TestService.main(TestService.java:18)      Thanks for your help,   Jan 

How to replace URLs in generated code

2005-07-05 Thread Miller, Janet
Title: Message



I'm 
using wsdl2java to generate client and server code.  My wsdl has the 
following:
 
xmlns:tns="http://Sirit/ETTM/" 
targetNamespace="http://Sirit/ETTM/"
http://Sirit/ETTM/GetTransactions" 
style="document" />http://Sirit/ETTM/AcknowledgeQueryResults" 
style="document" />http://localhost/ETTMServices/TZCService.asmx" 
/>
 
I'm 
trying to create a Web Service on my localhost using Axis 1.2.  How do I 
replace the URLs in
the 
generated code?  Do I replace "//Sirit/ETTM/" everywhere with 
"//localhost:8080/axis/"?
 
Thanks 
for your help,
 
Jan


  
   


RPC/Literal support

2005-07-05 Thread Shantanu Sen
Does Axis 1.2 support RPC/Literal? I know it is not
recommended for interoperability with .NET, but I am
asking if we can say that Axis 1.2 is compliant with
Basic Profile 1.0a by supporting RPC/Literal.

Thanks
Shantanu


RE: First Web Service

2005-07-05 Thread Miller, Janet
Title: Message



  The generated TZCServiceSoapStub from 
the remote wsdl also has the following 
command:
 
  
_call.setSOAPActionURI("http://Sirit/ETTM/GetTransactions");
 
What do I change the URL to?  http://localhost:8080/axis/GetTransactions?
GetTransactions is the name of the method and TZCService is the name of 
the Web Service.
 
Thanks for your help,
 
Jan


  
  -Original Message-From: Miller, Janet 
  Sent: Tuesday, July 05, 2005 7:03 PMTo: 
  'axis-user@ws.apache.org'Subject: RE: First Web 
  Service
  I deployed the TZCServiceSoapSkeleton and it still doesn't work.  I'm 
  a little confused as to
  how I 
  should replace the xml and target namespaces and the soap URLs.  I'm 
  using wsdl that
  was 
  generated from an outside source (remote wsdl), so the URLs need to be changed 
  in my
  generated 
  code.  The generated code has the following:
   
  TZCServiceLocator:
    
  .
    
  .
      // Use to get a proxy class for 
  TZCServiceSoap    private java.lang.String 
  TZCServiceSoap_address = "http://localhost/ETTMServices/TZCService.asmx";
   
      public java.lang.String getTZCServiceSoapAddress() 
  {    return 
  TZCServiceSoap_address;    }
     .
     .
  TZCServiceSoapSkeleton:
     .
     .
      _params = new 
  org.apache.axis.description.ParameterDesc [] 
  {    new 
  org.apache.axis.description.ParameterDesc(new javax.xml.namespace.QName("http://Sirit/ETTM/", "query"), 
  org.apache.axis.description.ParameterDesc.IN, new 
  javax.xml.namespace.QName("http://www.w3.org/2001/XMLSchema", 
  "string"), java.lang.String.class, false, 
  false),    };
     .
     .
  TZCServiceSoapStub:
    .
    .
      _call.setOperationName(new 
  javax.xml.namespace.QName("http://Sirit/ETTM/", 
  "GetTransactions"));
   .
   .
   
  Is 
  it correct to change the URLs to the following:
   
  FROM 
   http://localhost/ETTMServices/TZCService.asmx    
  TO  http://localhost:8080/axis/TZCService
  FROM  http://Sirit/ETTM/ 
  TO  http://localhost:8080/axis/
  
   
  

-Original Message-From: Paul I Fodor 
[mailto:[EMAIL PROTECTED] Sent: Tuesday, July 05, 2005 6:24 
PMTo: axis-user@ws.apache.orgSubject: Re: First Web 
ServiceYou deploy the 
TZCServiceSoapSkeleton Look over: 
http://ws.apache.org/axis/java/user-guide.html#Java2WSDLBuildingWSDLFromJava 
That is example6 in the userguide and 
it seems to be what you whant to do. Paul Fodor. 

  
  
"Miller, Janet" 
  <[EMAIL PROTECTED]> 
  07/05/2005 06:06 PM 
  


  
Please respond 
toaxis-user

  


  
To
   

  
cc
  

  
Subject
  First Web 
Service
  


  
  I have a basic question about creating a web service.  I'm 
creating myvery first one and I'm starting with wsdl that was 
generated from an outside source.  Iused wsdl2java to generate 
the client stub and skeleton code.  It generated 
aTZCServiceSoapImpl.java file.  I modified that file to return 
a simple string from each of the methodsso that I could test a 
simple web service.  I then deployed the TZCServiceSoapImpl file.Is 
that what I was supposed to deploy?  If so, I don't see how 
theTZCServiceSoapSkeleton is used.  I don't see anything that 
calls it.  Did I do the correct steps?  It's 
notworking.Jan


RE: First Web Service

2005-07-05 Thread Miller, Janet
Title: Message



I deployed the TZCServiceSoapSkeleton and it still doesn't work.  I'm a 
little confused as to
how I should 
replace the xml and target namespaces and the soap URLs.  I'm using wsdl 
that
was 
generated from an outside source (remote wsdl), so the URLs need to be changed 
in my
generated 
code.  The generated code has the following:
 
TZCServiceLocator:
  
.
  
.
    // Use to get a proxy class for 
TZCServiceSoap    private java.lang.String 
TZCServiceSoap_address = "http://localhost/ETTMServices/TZCService.asmx";
 
    public java.lang.String getTZCServiceSoapAddress() 
{    return 
TZCServiceSoap_address;    }
   .
   .
TZCServiceSoapSkeleton:
   .
   .
    _params = new 
org.apache.axis.description.ParameterDesc [] 
{    new 
org.apache.axis.description.ParameterDesc(new javax.xml.namespace.QName("http://Sirit/ETTM/", "query"), 
org.apache.axis.description.ParameterDesc.IN, new javax.xml.namespace.QName("http://www.w3.org/2001/XMLSchema", 
"string"), java.lang.String.class, false, 
false),    };
   .
   .
TZCServiceSoapStub:
  .
  .
    _call.setOperationName(new 
javax.xml.namespace.QName("http://Sirit/ETTM/", 
"GetTransactions"));
 .
 .
 
Is it 
correct to change the URLs to the following:
 
FROM 
 http://localhost/ETTMServices/TZCService.asmx    
TO  http://localhost:8080/axis/TZCService
FROM  http://Sirit/ETTM/ 
TO  http://localhost:8080/axis/

 

  
  -Original Message-From: Paul I Fodor 
  [mailto:[EMAIL PROTECTED] Sent: Tuesday, July 05, 2005 6:24 
  PMTo: axis-user@ws.apache.orgSubject: Re: First Web 
  ServiceYou deploy the 
  TZCServiceSoapSkeleton Look over: 
  http://ws.apache.org/axis/java/user-guide.html#Java2WSDLBuildingWSDLFromJava 
  That is example6 in the userguide and it 
  seems to be what you whant to do. Paul Fodor. 
  


  "Miller, Janet" 
<[EMAIL PROTECTED]> 
07/05/2005 06:06 PM 

  
  

  Please respond 
  toaxis-user
  

  
  

  To
 
  

  cc

  

  Subject
First Web 
  Service

  
  

I have a basic question about creating a web service.  I'm 
  creating myvery first one and I'm starting with wsdl that was 
  generated from an outside source.  Iused wsdl2java to generate 
  the client stub and skeleton code.  It generated 
  aTZCServiceSoapImpl.java file.  I modified that file to return a 
  simple string from each of the methodsso that I could test a simple 
  web service.  I then deployed the TZCServiceSoapImpl file.Is that 
  what I was supposed to deploy?  If so, I don't see how 
  theTZCServiceSoapSkeleton is used.  I don't see anything that 
  calls it.  Did I do the correct steps?  It's 
  notworking.Jan


Re: First Web Service

2005-07-05 Thread Paul I Fodor

You deploy the TZCServiceSoapSkeleton

Look over: http://ws.apache.org/axis/java/user-guide.html#Java2WSDLBuildingWSDLFromJava

That is example6 in the userguide and
it seems to be what you whant to do.

Paul Fodor.






"Miller, Janet"
<[EMAIL PROTECTED]> 
07/05/2005 06:06 PM



Please respond to
axis-user





To



cc



Subject
First Web Service








I have a basic question about creating a web service.
 I'm creating my
very first one 
and I'm starting with wsdl that was generated from an outside source.  I
used wsdl2java to 
generate the client stub and skeleton code.  It generated a
TZCServiceSoapImpl.java file.  
I modified that file to return a simple string from each of the methods
so that I could 
test a simple web service.  I then deployed the TZCServiceSoapImpl
file.
Is that what I 
was supposed to deploy?  If so, I don't see how the
TZCServiceSoapSkeleton is used.  I 
don't see anything that calls it.  Did I do the correct steps?  It's
not
working.

Jan



Basic Newbie Question - Endpoint

2005-07-05 Thread Miller, Janet
I'm trying to create my first web service using wsdl that was generated
from an outside source (remote wsdl).  The wsdl looks like the
following:

http://schemas.xmlsoap.org/wsdl/http/";
xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/";
xmlns:s="http://www.w3.org/2001/XMLSchema";
xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/";
xmlns:tns="http://Sirit/ETTM/";
xmlns:tm="http://microsoft.com/wsdl/mime/textMatching/";
xmlns:mime="http://schemas.xmlsoap.org/wsdl/mime/";
targetNamespace="http://Sirit/ETTM/";
xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/";>
  
http://Sirit/ETTM/";>
  .
  .
  .
  
http://schemas.xmlsoap.org/wsdl/";>External
Access Web Services for Hybrid Tolling

  http://localhost/ETTMServices/TZCService.asmx"; />

  

I ran wsdl2java and generated both the client and server stub and
skeleton code, added my implementation code, and modified the target url
in many places.  Would it be easier to just modify the original wsdl and
change the url to my localhost?

What do I change the soap:address location to?  Should it be
"http://localhost:8080/axis/TZCService";?  And should I change
"http://Sirit/ETTM/"; to "http://localhost:8080";?

Thanks for your help,

Jan


First Web Service

2005-07-05 Thread Miller, Janet
I have a basic question about creating a web service.  I'm creating my
very first one 
and I'm starting with wsdl that was generated from an outside source.  I
used wsdl2java to 
generate the client stub and skeleton code.  It generated a
TZCServiceSoapImpl.java file.  
I modified that file to return a simple string from each of the methods
so that I could 
test a simple web service.  I then deployed the TZCServiceSoapImpl file.
Is that what I 
was supposed to deploy?  If so, I don't see how the
TZCServiceSoapSkeleton is used.  I 
don't see anything that calls it.  Did I do the correct steps?  It's not
working.

Jan


RE: Client error trying to create first Web Service

2005-07-05 Thread Miller, Janet
Title: Message



My 
deployment file has the following:
 
  

 
Do I 
need to specify each method or is this ok?  I thought this was ok.  
I'm using Axis 1.2.
 
Jan

  
  -Original Message-From: Paul I Fodor 
  [mailto:[EMAIL PROTECTED] Sent: Tuesday, July 05, 2005 5:54 
  PMTo: axis-user@ws.apache.orgSubject: Re: Client error 
  trying to create first Web ServiceJanet, Check in 
  your web services deployment file (wsdd) if you allow the method that you use 
  in port.getTransactions(...) In your deployment file it should be something like: 
   In your method port.getTransactions() you probably have something 
  like: call.setOperationName( "methodName" 
  ); See if for this method you allow this 
  call in the deployment file. Paul 
  Fodor. 
  


  "Miller, Janet" 
<[EMAIL PROTECTED]> 
07/05/2005 05:08 PM 

  
  

  Please respond 
  toaxis-user
  

  
  

  To
 
  

  cc

  

  Subject
Client error trying to 
  create first Web Service

  
  

I just created my very first web service.  I did this by 
  retrieving wsdlfor a web service that is currently being developed by 
  another companyand running wsdl2java to generate the client and server 
  stub andskeleton code.  I added some simple implementation into my 
  service Implclass to just return a simple string and successfully deployed 
  my WS.  Icreated a client as follows:package 
  pbf.hot;import Sirit.ETTM.TZCServiceLocator;import 
  Sirit.ETTM.TZCService;import Sirit.ETTM.TZCServiceSoap;public 
  class TestService {                
  public static void main(String[] args) throws Exception {    
                        
         String test = null;        
                        
                     
                   // Make a 
  service                  
                 TZCService service = 
  new TZCServiceLocator();              
                    
                     
                 //Now use the service 
  to get a stub which implements theSDI        
                        
     TZCServiceSoap port = service.getTZCServiceSoap();  
                        
                     
                        
   //Make the actual call            
                      
   test = port.getTransactions("Test");        
                        
     System.out.println("Call Results:" + test);    
              }}but when I run the 
  client, I'm getting the following Axis fault.  My webservice is on 
  the same machine as my client.  Does anyone know what I'mdoing 
  wrong?Exception in thread "main" AxisFaultfaultCode: 
  {http://xml.apache.org/axis/}HTTPfaultSubcode: faultString: 
  (405)Method not allowedfaultActor: faultNode: faultDetail: 
                  {}:return code: 
   405...The page cannot 
  be displayed...    
              
  {http://xml.apache.org/axis/}HttpErrorCode:405(405)Method not 
  allowed                
  atorg.apache.axis.transport.http.HTTPSender.readFromSocket(HTTPSender.java:744)  
                
  atorg.apache.axis.transport.http.HTTPSender.invoke(HTTPSender.java:144)  
                
  atorg.apache.axis.strategies.InvocationStrategy.visit(InvocationStrategy.java:32)  
                at 
  org.apache.axis.SimpleChain.doVisiting(SimpleChain.java:118)    
              at 
  org.apache.axis.SimpleChain.invoke(SimpleChain.java:83)    
              at 
  org.apache.axis.client.AxisClient.invoke(AxisClient.java:165)    
              at 
  org.apache.axis.client.Call.invokeEngine(Call.java:2765)    
              at 
  org.apache.axis.client.Call.invoke(Call.java:2748)      
            at 
  org.apache.axis.client.Call.invoke(Call.java:2424)      
            at 
  org.apache.axis.client.Call.invoke(Call.java:2347)      
            at 
  org.apache.axis.client.Call.invoke(Call.java:1804)      
            
  atSirit.ETTM.TZCServiceSoapStub.getTransactions(TZCServiceSoapStub.java:128)  
                at 
  pbf.hot.TestService.main(TestService.java:18)


Re: Client error trying to create first Web Service

2005-07-05 Thread Paul I Fodor

Janet,
Check in your web services deployment
file (wsdd) if you allow the method that you use in port.getTransactions(...)

In your deployment file it should be
something like: 


In your method port.getTransactions() you probably
have something like:
call.setOperationName( "methodName" );

See if for this method you allow this call in the
deployment file.

Paul Fodor.








"Miller, Janet"
<[EMAIL PROTECTED]> 
07/05/2005 05:08 PM



Please respond to
axis-user





To



cc



Subject
Client error trying to create
first Web Service








I just created my very first web service.  I
did this by retrieving wsdl
for a web service that is currently being developed by another company
and running wsdl2java to generate the client and server stub and
skeleton code.  I added some simple implementation into my service
Impl
class to just return a simple string and successfully deployed my WS.  I
created a client as follows:

package pbf.hot;

import Sirit.ETTM.TZCServiceLocator;
import Sirit.ETTM.TZCService;
import Sirit.ETTM.TZCServiceSoap;

public class TestService {
                
public static void main(String[] args) throws Exception {
                
                 String
test = null;
                
                 
                
                 //
Make a service
                
                 TZCService
service = new TZCServiceLocator();
                
                 
                
                 //Now
use the service to get a stub which implements the
SDI
                
                 TZCServiceSoap
port = service.getTZCServiceSoap();
                
                 
                
                 //Make
the actual call
                
                 test
= port.getTransactions("Test");
                
                 System.out.println("Call
Results:" + test);
                
}
}

but when I run the client, I'm getting the following Axis fault.  My
web
service is on the same machine as my client.  Does anyone know what
I'm
doing wrong?


Exception in thread "main" AxisFault
 faultCode: {http://xml.apache.org/axis/}HTTP
 faultSubcode: 
 faultString: (405)Method not allowed
 faultActor: 
 faultNode: 
 faultDetail: 
                
{}:return code:  405



.
.
.

The page cannot be displayed

.
.
.

                
{http://xml.apache.org/axis/}HttpErrorCode:405

(405)Method not allowed
                
at
org.apache.axis.transport.http.HTTPSender.readFromSocket(HTTPSender.java
:744)
                
at
org.apache.axis.transport.http.HTTPSender.invoke(HTTPSender.java:144)
                
at
org.apache.axis.strategies.InvocationStrategy.visit(InvocationStrategy.j
ava:32)
                
at org.apache.axis.SimpleChain.doVisiting(SimpleChain.java:118)
                
at org.apache.axis.SimpleChain.invoke(SimpleChain.java:83)
                
at org.apache.axis.client.AxisClient.invoke(AxisClient.java:165)
                
at org.apache.axis.client.Call.invokeEngine(Call.java:2765)
                
at org.apache.axis.client.Call.invoke(Call.java:2748)
                
at org.apache.axis.client.Call.invoke(Call.java:2424)
                
at org.apache.axis.client.Call.invoke(Call.java:2347)
                
at org.apache.axis.client.Call.invoke(Call.java:1804)
                
at
Sirit.ETTM.TZCServiceSoapStub.getTransactions(TZCServiceSoapStub.java:12
8)
                
at pbf.hot.TestService.main(TestService.java:18)



Client error trying to create first Web Service

2005-07-05 Thread Miller, Janet
I just created my very first web service.  I did this by retrieving wsdl
for a web service that is currently being developed by another company
and running wsdl2java to generate the client and server stub and
skeleton code.  I added some simple implementation into my service Impl
class to just return a simple string and successfully deployed my WS.  I
created a client as follows:

package pbf.hot;

import Sirit.ETTM.TZCServiceLocator;
import Sirit.ETTM.TZCService;
import Sirit.ETTM.TZCServiceSoap;

public class TestService {
public static void main(String[] args) throws Exception {
String test = null;

// Make a service
TZCService service = new TZCServiceLocator();

//Now use the service to get a stub which implements the
SDI
TZCServiceSoap port = service.getTZCServiceSoap();

//Make the actual call
test = port.getTransactions("Test");
System.out.println("Call Results:" + test);
}
}

but when I run the client, I'm getting the following Axis fault.  My web
service is on the same machine as my client.  Does anyone know what I'm
doing wrong?


Exception in thread "main" AxisFault
 faultCode: {http://xml.apache.org/axis/}HTTP
 faultSubcode: 
 faultString: (405)Method not allowed
 faultActor: 
 faultNode: 
 faultDetail: 
{}:return code:  405



.
.
.

The page cannot be displayed

.
.
.

{http://xml.apache.org/axis/}HttpErrorCode:405

(405)Method not allowed
at
org.apache.axis.transport.http.HTTPSender.readFromSocket(HTTPSender.java
:744)
at
org.apache.axis.transport.http.HTTPSender.invoke(HTTPSender.java:144)
at
org.apache.axis.strategies.InvocationStrategy.visit(InvocationStrategy.j
ava:32)
at org.apache.axis.SimpleChain.doVisiting(SimpleChain.java:118)
at org.apache.axis.SimpleChain.invoke(SimpleChain.java:83)
at org.apache.axis.client.AxisClient.invoke(AxisClient.java:165)
at org.apache.axis.client.Call.invokeEngine(Call.java:2765)
at org.apache.axis.client.Call.invoke(Call.java:2748)
at org.apache.axis.client.Call.invoke(Call.java:2424)
at org.apache.axis.client.Call.invoke(Call.java:2347)
at org.apache.axis.client.Call.invoke(Call.java:1804)
at
Sirit.ETTM.TZCServiceSoapStub.getTransactions(TZCServiceSoapStub.java:12
8)
at pbf.hot.TestService.main(TestService.java:18)


Re: Invalid element/Deserialisation

2005-07-05 Thread John Baker
I'm generating Stubs and a deploy.wsdd file from the wsdl. I'm then directly
deploying the stubs (by changing the classname in the deploy.wsdd). I then
wrote a few lines to invoke the stub and logged the output, giving the
double LogonToConnector output.

What I'm trying to achieve is invokation of a deployed webservice, where
that deployed webservice was derived from the original WSDL.


John

On Tue, Jul 05, 2005 at 01:01:29PM -0400, Anne Thomas Manes wrote:
> According to the WSDL, there should be only one LogonToConnector
> element. The message should look like the first message you posted
> (the one generated by your Java application. I have no idea why the
> stub generates an extra LogonToConnector element, or why that message
> seems to work. I also don't know why the stub adds the xsi:type
> attribute to the  element. (It shouldn't.)
> 
> Can you review for us again the sequence you went through to create
> the service and the client?
> 
> I also suggest that you edit the WSDD typeMapping to specify:
> qname="ns:DatabaseID" rather than
> qname="ns:>UniformLoginCredentialsType>DatabaseID"
> 
> Also, what version of Axis are you using?
> 
> Anne
> 
> On 7/5/05, John Baker <[EMAIL PROTECTED]> wrote:
> > I should point out that the call which works is being generated by the Java
> > stubs generated from the WSDL, while the offending request is being
> > generated by another bit of Java building up it's own SOAP message (although
> > it seems to use the axis client libraries). I guess the major question is:
> > Why did the stubs use two LogonToConnector elements...
> > 
> > On Tue, Jul 05, 2005 at 10:58:15AM -0400, Anne Thomas Manes wrote:
> > > Please post the WSDL.
> > >
> > > There is a big difference between the two messages -- one has an extra
> > >  wrapper element. But if that's the problem, then
> > > I'd expect the error to occur on that element rather than on
> > > DatabaseID.
> > >
> > > Your WSDD also looks suspect. The qname should be
> > > qname="ns:DatabaseID" rather than
> > > qname="ns:>UniformLoginCredentialsType>DatabaseID".
> > >
> > > Anne
> > >
> > > On 7/5/05, John Baker <[EMAIL PROTECTED]> wrote:
> > > > Further to my post, I have derived that if I create Stub classes from 
> > > > WSDL
> > > > and make a WS call using Axis - to an Axis server - the client generates
> > > > this call:
> > > >
> > > >  > > > xmlns="http://www.caps-solutions.co.uk/webservices/connectors/common/messagetypes";>
> > > >  
> > > > > > > xsi:type="ns1:UniformLoginCredentialsType" 
> > > > xmlns:ns1="http://www.caps-solutions.co.uk/schema/uniform/72b/common/connectortypes";
> > > >  xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance";>
> > > >  a
> > > >  b
> > > >  c
> > > >
> > > >  
> > > > 
> > > >
> > > > Which is unserialised without a problem. So what is different between 
> > > > that
> > > > and this:
> > > >
> > > >  > > > 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";>
> > > >  
> > > >> > > xmlns="http://www.caps-solutions.co.uk/webservices/connectors/common/messagetypes";
> > > >  xmlns:ns1="http://www.caps-solutions.co.uk/schema/unifor
> > > >
> > > > a
> > > > b
> > > > c
> > > >
> > > >   
> > > >  
> > > > 
> > > >
> > > > Well I can see they are different, but what key fact makes one 
> > > > unserialisable?
> > > >
> > > > Thanks,
> > > >
> > > >
> > > > John
> > > >
> > > > On Mon, Jul 04, 2005 at 08:32:16PM +0100, John Baker wrote:
> > > > > Hi,
> > > > >
> > > > > I'm having a small problem when making a SOAP call and I'm getting 
> > > > > this
> > > > > exception:
> > > > >
> > > > > AxisFault
> > > > >  faultCode: 
> > > > > {http://schemas.xmlsoap.org/soap/envelope/}Server.userException
> > > > >   faultSubcode:
> > > > >faultString: org.xml.sax.SAXException: Invalid element in
> > > > > uk.co.caps_solutions.www.schema.uniform._72b.common.connectortypes.UniformLoginRequestType
> > > > > - DatabaseID
> > > > >  faultActor:
> > > > >   faultNode:
> > > > >faultDetail:
> > > > >
> > > > > {http://xml.apache.org/axis/}stackTrace:org.xml.sax.SAXException:
> > > > > Invalid element in
> > > > > uk.co.caps_solutions.www.schema.uniform._72b.common.connectortypes.UniformLoginRequestType
> > > > > - DatabaseID
> > > > > at
> > > > > org.apache.axis.encoding.ser.BeanDeserializer.onStartChild(BeanDeserializer.java:255)
> > > > > at
> > > > > org.apache.axis.encoding.DeserializationContext.startElement(DeserializationContext.java:1035)
> > > > >
> > > > > The SOAP request is as follows:
> > > > >
> > > > > 
> > > > >  > > > > 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";>
> > > > >   > > > > xmlns="http://www.xxx.co.uk/webservices/connectors/common/me

RE: Collections classes?

2005-07-05 Thread Flores, Raul
 
Scott,

Save this thread. Someday you might need a good laugh, and when you do,
read it again (if you can handle laughing at yourself).

Raul Flores


-Original Message-
From: Scott Lamb [mailto:[EMAIL PROTECTED] 
Sent: Monday, July 04, 2005 12:23 PM
To: axis-user@ws.apache.org
Subject: Re: Collections classes?

On 4 Jul 2005, at 08:38, Anne Thomas Manes wrote:
> Actually, a list is a specialization of an array, not the other way 
> around. As James says, a list requires more information than an XSD 
> type array. An XSD type array has no sense of order or index. It is 
> simply a repeating element. There's no metadata included in each of 
> the repeating element to indicate indexing or ordering.

Okay, first of all, when I've been describing arrays, I'm talking about
arrays on the Java side. I've been treating the SOAP side as a black
box. I know that Axis is capable of producing a Java array, which has
the same requirements as a Java List. Thus, I don't need to know
_anything_ about SOAP or XSD to know that you are wrong. The ordering
information is there. To give a concrete example, when I do a google
search with their published WSDL, I get my results in order.  
I simply want that to be a with a List rather than a
ResultElement[].

Secondly, of course the XSD does not describe ordering. It doesn't need
to. When you serialize something as a stream of bytes, you're always
putting them in order. It's called serialization for a reason.  
The order of the array/list/whatever is the order that the objects are
written in.

> SOAPpy can easily maps things around because Python is a loosely typed

> language. Java is strongly typed and therefore much more strict about 
> mapping types.

If it can map it to a Java ResultElement[] in advance, why can't it map
it to a Java List in advance? Strong typing is not the
problem.

> In any case, if you want to map the returned array to a Java 
> collection class, then you must write a custom deserializer that does 
> so. You also must define a client config file that tells Axis to use 
> your custom deserializer.

How would I write this custom deserializer? All the information I've
seen on the website - and the articles James Black linked to - seem to
be talking about registering new types: i.e., a "java.foo.Blah <->
Blah". I want to change how XSD x[] to map to Java List rather than
Java x[], for all x.

Once I do that, I'll look into more sophisticated collections: Maps,
Sets. I don't know if that's possible, but I'd like to try.

Scott

--
Scott Lamb 



Re: Query Regarding SOAP Header

2005-07-05 Thread Anne Thomas Manes
I see a couple things wrong in your SOAP Header entry:
1- The  element name is case sensitive. It must be
, not .
2- All SOAP Header entries must be namespace qualified. 

But -- per the specification, there is no requirement that the SOAP
Header entry must be a complexType with child elements. In fact, the
SOAP 1.1 spec shows the following example:


   
  5
   


Nonetheless, if .NET can't process a simple type, then I recommend
that you define your header entry as a complexType.

Anne

On 7/2/05, Amit <[EMAIL PROTECTED]> wrote:
> Hi All,
> I have deployed a web service using AXIS and I am able
> to access the same without any problems from a Java
> client. I was trying to access the same using .NET
> client and I ran into some issues which created doubts
> regarding structure of soap header. I am using
> following header
> 1.0
> Is this a valid header accroding to soap? I am not
> able to create the same using .NET. It seems that you
> can only create the headers that have other elements
> and no values.
> E.g. abcab. Could not put any
> value for the element A. E.g ABC.
> 
> Please let me know if anyone has encountered such
> problem before and any pointers would be very useful.
> 
> Thanks in Advance,
> Amit
> 
> 
> 
> 
> 
> Yahoo! Sports
> Rekindle the Rivalries. Sign up for Fantasy Football
> http://football.fantasysports.yahoo.com
>


Re: deserializer not found

2005-07-05 Thread Anne Thomas Manes
Have you defined a client config file and specified the deserializer
using either a  or  definition?

Anne

On 7/4/05, Patrick Quinn <[EMAIL PROTECTED]> wrote:
>  
> Hi 
>   
> I'm still stuck with my deserializer problem: 
>   
> org.xml.sax.SAXException: Deserializing parameter 'ProvidentResponse': 
> could not find de
> serializer for type
> {http://ProvidentConnector.ProvidentResponseToOrch}ProvidentResponse
>   
> Does anyone know of a resource where I can find out more about the
> intricacies of serializing/deserializing within a SOAP and/or Axis context? 
> 
> I am writing a java client app to communicate with a BizTalk web service, so
> all I really want to do is make sure that I am doing the right thing on the
> client side (although if I could get a working Axis test service simulator
> that would be good too ...) 
>   
> Pat =00This e-mail and any attachments may be confidential and/or legally
> privileged. If you have received this e-mail and you are not a named
> addressee, please inform Evolving Systems TIS at [EMAIL PROTECTED] and then
> delete the e-mail from your system. If you are not a named addressee you
> must not use, disclose, distribute, copy, print or rely on this e-mail. To
> ensure regulatory compliance and for the protection of our clients and
> business, Evolving Systems may monitor and read e-mails sent to and from its
> servers. Although Evolving Systems routinely screens for viruses, addressees
> should scan this e-mail and any attachments for viruses. Evolving Systems
> makes no representation or warranty as to the absence of viruses in this
> e-mail or any attachments.
> 
> Registered Office: One Angel Square, Torrents Street, London. EC1V 1PL.
> Registered number 2325854


Re: Collections classes?

2005-07-05 Thread Anne Thomas Manes
Axis documentation on custom serializers can be found here:
http://ws.apache.org/axis/java/user-guide.html#WhenBeansAreNotEnoughCustomSerialization


On 7/5/05, Keith Hatton <[EMAIL PROTECTED]> wrote:
> Axis uses the JAX-RPC specification for mapping between Java and XSD
> types.
> You can get the JAX-RPC 1.1 specification from here:
> http://java.sun.com/xml/downloads/jaxrpc.html
> 
> Lists (and other collection types) are not supported. End of story.
> You're barking up the wrong tree to try and force sophisticated
> collection objects into SOAP. Really, SOAP is just a way of passing
> messages between systems, not objects.
> http://weblogs.cs.cornell.edu/AllThingsDistributed/archives/000343.html
> 
> Of course, to turn an array into a list is as simple as
> java.util.Arrays.asList(Object[]); to turn a list into an array is as
> simple as java.util.List.toArray(). JDK 1.5 introduced auto-boxing
> between object and primitive types; perhaps you should ask Sun about
> introducing auto-boxing between arrays and Lists!
> 
> Hope this helps
> Keith
> 
> 
> -Original Message-
> From: Scott Lamb [mailto:[EMAIL PROTECTED]
> Sent: 04 July 2005 18:23
> To: axis-user@ws.apache.org
> Subject: Re: Collections classes?
> 
> 
> On 4 Jul 2005, at 08:38, Anne Thomas Manes wrote:
> > Actually, a list is a specialization of an array, not the other way
> > around. As James says, a list requires more information than an XSD
> > type array. An XSD type array has no sense of order or index. It is
> > simply a repeating element. There's no metadata included in each of
> > the repeating element to indicate indexing or ordering.
> 
> Okay, first of all, when I've been describing arrays, I'm talking
> about arrays on the Java side. I've been treating the SOAP side as a
> black box. I know that Axis is capable of producing a Java array,
> which has the same requirements as a Java List. Thus, I don't need to
> know _anything_ about SOAP or XSD to know that you are wrong. The
> ordering information is there. To give a concrete example, when I do
> a google search with their published WSDL, I get my results in order.
> I simply want that to be a with a List rather than a
> ResultElement[].
> 
> Secondly, of course the XSD does not describe ordering. It doesn't
> need to. When you serialize something as a stream of bytes, you're
> always putting them in order. It's called serialization for a reason.
> The order of the array/list/whatever is the order that the objects
> are written in.
> 
> > SOAPpy can easily maps things around because Python is a loosely typed
> 
> > language. Java is strongly typed and therefore much more strict about
> > mapping types.
> 
> If it can map it to a Java ResultElement[] in advance, why can't it
> map it to a Java List in advance? Strong typing is not
> the problem.
> 
> > In any case, if you want to map the returned array to a Java
> > collection class, then you must write a custom deserializer that does
> > so. You also must define a client config file that tells Axis to use
> > your custom deserializer.
> 
> How would I write this custom deserializer? All the information I've
> seen on the website - and the articles James Black linked to - seem
> to be talking about registering new types: i.e., a "java.foo.Blah <->
> Blah". I want to change how XSD x[] to map to Java List rather
> than Java x[], for all x.
> 
> Once I do that, I'll look into more sophisticated collections: Maps,
> Sets. I don't know if that's possible, but I'd like to try.
> 
> Scott
> 
> --
> Scott Lamb 
> 
>


Re: Invalid element/Deserialisation

2005-07-05 Thread Anne Thomas Manes
According to the WSDL, there should be only one LogonToConnector
element. The message should look like the first message you posted
(the one generated by your Java application. I have no idea why the
stub generates an extra LogonToConnector element, or why that message
seems to work. I also don't know why the stub adds the xsi:type
attribute to the  element. (It shouldn't.)

Can you review for us again the sequence you went through to create
the service and the client?

I also suggest that you edit the WSDD typeMapping to specify:
qname="ns:DatabaseID" rather than
qname="ns:>UniformLoginCredentialsType>DatabaseID"

Also, what version of Axis are you using?

Anne

On 7/5/05, John Baker <[EMAIL PROTECTED]> wrote:
> I should point out that the call which works is being generated by the Java
> stubs generated from the WSDL, while the offending request is being
> generated by another bit of Java building up it's own SOAP message (although
> it seems to use the axis client libraries). I guess the major question is:
> Why did the stubs use two LogonToConnector elements...
> 
> On Tue, Jul 05, 2005 at 10:58:15AM -0400, Anne Thomas Manes wrote:
> > Please post the WSDL.
> >
> > There is a big difference between the two messages -- one has an extra
> >  wrapper element. But if that's the problem, then
> > I'd expect the error to occur on that element rather than on
> > DatabaseID.
> >
> > Your WSDD also looks suspect. The qname should be
> > qname="ns:DatabaseID" rather than
> > qname="ns:>UniformLoginCredentialsType>DatabaseID".
> >
> > Anne
> >
> > On 7/5/05, John Baker <[EMAIL PROTECTED]> wrote:
> > > Further to my post, I have derived that if I create Stub classes from WSDL
> > > and make a WS call using Axis - to an Axis server - the client generates
> > > this call:
> > >
> > >  > > xmlns="http://www.caps-solutions.co.uk/webservices/connectors/common/messagetypes";>
> > >  
> > > > > xsi:type="ns1:UniformLoginCredentialsType" 
> > > xmlns:ns1="http://www.caps-solutions.co.uk/schema/uniform/72b/common/connectortypes";
> > >  xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance";>
> > >  a
> > >  b
> > >  c
> > >
> > >  
> > > 
> > >
> > > Which is unserialised without a problem. So what is different between that
> > > and this:
> > >
> > >  > > 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";>
> > >  
> > >> > xmlns="http://www.caps-solutions.co.uk/webservices/connectors/common/messagetypes";
> > >  xmlns:ns1="http://www.caps-solutions.co.uk/schema/unifor
> > >
> > > a
> > > b
> > > c
> > >
> > >   
> > >  
> > > 
> > >
> > > Well I can see they are different, but what key fact makes one 
> > > unserialisable?
> > >
> > > Thanks,
> > >
> > >
> > > John
> > >
> > > On Mon, Jul 04, 2005 at 08:32:16PM +0100, John Baker wrote:
> > > > Hi,
> > > >
> > > > I'm having a small problem when making a SOAP call and I'm getting this
> > > > exception:
> > > >
> > > > AxisFault
> > > >  faultCode: 
> > > > {http://schemas.xmlsoap.org/soap/envelope/}Server.userException
> > > >   faultSubcode:
> > > >faultString: org.xml.sax.SAXException: Invalid element in
> > > > uk.co.caps_solutions.www.schema.uniform._72b.common.connectortypes.UniformLoginRequestType
> > > > - DatabaseID
> > > >  faultActor:
> > > >   faultNode:
> > > >faultDetail:
> > > >
> > > > {http://xml.apache.org/axis/}stackTrace:org.xml.sax.SAXException:
> > > > Invalid element in
> > > > uk.co.caps_solutions.www.schema.uniform._72b.common.connectortypes.UniformLoginRequestType
> > > > - DatabaseID
> > > > at
> > > > org.apache.axis.encoding.ser.BeanDeserializer.onStartChild(BeanDeserializer.java:255)
> > > > at
> > > > org.apache.axis.encoding.DeserializationContext.startElement(DeserializationContext.java:1035)
> > > >
> > > > The SOAP request is as follows:
> > > >
> > > > 
> > > >  > > > 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";>
> > > >   > > > xmlns="http://www.xxx.co.uk/webservices/connectors/common/messagetypes";
> > > > xmlns:ns1="http://www.xxx.co.uk/schema/uniform/72b/common/connectortypes";
> > > > xmlns:xsd="http://www.w3.org/2001/XMLSchema";
> > > > xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance";>
> > > >
> > > >   dbVal
> > > >   userVal
> > > >   passVal
> > > >
> > > > 
> > > >
> > > > 
> > > >
> > > > And the deploy.wsdd refers to DatabaseID as follows:
> > > >
> > > >> > > xmlns:ns="http://www.xxx.co.uk/schema/uniform/72b/common/connectortypes";
> > > > qname="ns:>UniformLoginCredentialsType>DatabaseID"
> > > > type="java:java.lang.String"
> > > > 
> > > > serializer="org.apache.axis.encoding.ser.SimpleSerializerFactory"
> > > > 
> > > > deserial

Re: Invalid element/Deserialisation

2005-07-05 Thread John Baker
I should point out that the call which works is being generated by the Java
stubs generated from the WSDL, while the offending request is being
generated by another bit of Java building up it's own SOAP message (although
it seems to use the axis client libraries). I guess the major question is:
Why did the stubs use two LogonToConnector elements...

On Tue, Jul 05, 2005 at 10:58:15AM -0400, Anne Thomas Manes wrote:
> Please post the WSDL. 
> 
> There is a big difference between the two messages -- one has an extra
>  wrapper element. But if that's the problem, then
> I'd expect the error to occur on that element rather than on
> DatabaseID.
> 
> Your WSDD also looks suspect. The qname should be
> qname="ns:DatabaseID" rather than
> qname="ns:>UniformLoginCredentialsType>DatabaseID".
> 
> Anne
> 
> On 7/5/05, John Baker <[EMAIL PROTECTED]> wrote:
> > Further to my post, I have derived that if I create Stub classes from WSDL
> > and make a WS call using Axis - to an Axis server - the client generates
> > this call:
> > 
> >  > xmlns="http://www.caps-solutions.co.uk/webservices/connectors/common/messagetypes";>
> >  
> > > xmlns:ns1="http://www.caps-solutions.co.uk/schema/uniform/72b/common/connectortypes";
> >  xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance";>
> >  a
> >  b
> >  c
> >
> >  
> > 
> > 
> > Which is unserialised without a problem. So what is different between that
> > and this:
> > 
> > http://schemas.xmlsoap.org/soap/envelope/"; 
> > xmlns:xsd="http://www.w3.org/2001/XMLSchema"; 
> > xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance";>
> >  
> >> xmlns="http://www.caps-solutions.co.uk/webservices/connectors/common/messagetypes";
> >  xmlns:ns1="http://www.caps-solutions.co.uk/schema/unifor
> >
> > a
> > b
> > c
> >
> >   
> >  
> > 
> > 
> > Well I can see they are different, but what key fact makes one 
> > unserialisable?
> > 
> > Thanks,
> > 
> > 
> > John
> > 
> > On Mon, Jul 04, 2005 at 08:32:16PM +0100, John Baker wrote:
> > > Hi,
> > >
> > > I'm having a small problem when making a SOAP call and I'm getting this
> > > exception:
> > >
> > > AxisFault
> > >  faultCode: 
> > > {http://schemas.xmlsoap.org/soap/envelope/}Server.userException
> > >   faultSubcode:
> > >faultString: org.xml.sax.SAXException: Invalid element in
> > > uk.co.caps_solutions.www.schema.uniform._72b.common.connectortypes.UniformLoginRequestType
> > > - DatabaseID
> > >  faultActor:
> > >   faultNode:
> > >faultDetail:
> > >
> > > {http://xml.apache.org/axis/}stackTrace:org.xml.sax.SAXException:
> > > Invalid element in
> > > uk.co.caps_solutions.www.schema.uniform._72b.common.connectortypes.UniformLoginRequestType
> > > - DatabaseID
> > > at
> > > org.apache.axis.encoding.ser.BeanDeserializer.onStartChild(BeanDeserializer.java:255)
> > > at
> > > org.apache.axis.encoding.DeserializationContext.startElement(DeserializationContext.java:1035)
> > >
> > > The SOAP request is as follows:
> > >
> > > 
> > >  > > 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";>
> > >   > > xmlns="http://www.xxx.co.uk/webservices/connectors/common/messagetypes";
> > > xmlns:ns1="http://www.xxx.co.uk/schema/uniform/72b/common/connectortypes";
> > > xmlns:xsd="http://www.w3.org/2001/XMLSchema";
> > > xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance";>
> > >
> > >   dbVal
> > >   userVal
> > >   passVal
> > >
> > > 
> > >
> > > 
> > >
> > > And the deploy.wsdd refers to DatabaseID as follows:
> > >
> > >> > xmlns:ns="http://www.xxx.co.uk/schema/uniform/72b/common/connectortypes";
> > > qname="ns:>UniformLoginCredentialsType>DatabaseID"
> > > type="java:java.lang.String"
> > > serializer="org.apache.axis.encoding.ser.SimpleSerializerFactory"
> > > 
> > > deserializer="org.apache.axis.encoding.ser.SimpleDeserializerFactory"
> > > encodingStyle=""
> > >/>
> > >
> > > Could someone point me in roughly the right direction? Is the SOAP request
> > > badly formed? Why has it failed to look up a method of deserialising the
> > > DatabaseID element?
> > >
> > > Thanks,
> > >
> > >
> > >
> > > John
> >


Re: Invalid element/Deserialisation

2005-07-05 Thread John Baker
wsdd was generated by Axis. 

wsdl is as follows:

http://schemas.xmlsoap.org/wsdl/"; 
xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/"; 
xmlns:xs="http://www.w3.org/2001/XMLSchema"; 
xmlns:tns="http://www.caps-solutions.co.uk/webservices/connectors/servicerequest/service";
 
xmlns:sritf="http://www.caps-solutions.co.uk/webservices/connectors/servicerequest/interface";
 
xmlns:ctypes="http://www.caps-solutions.co.uk/webservices/connectors/common/messagetypes";
 
xmlns:wstypes="http://www.caps-solutions.co.uk/webservices/connectors/servicerequest/messagetypes";
 
targetNamespace="http://www.caps-solutions.co.uk/webservices/connectors/servicerequest/service";
 name="SRConnectorService">

http://www.caps-solutions.co.uk/schema/uniform/72b/common/uniformtypes";
 xmlns:xs="http://www.w3.org/2001/XMLSchema"; 
xmlns="http://www.caps-solutions.co.uk/schema/uniform/72b/common/uniformtypes"; 
elementFormDefault="qualified" attributeFormDefault="unqualified" version="1.0">

Shared UNI-form types and 
elements from the Central Services (CN and SC), Payments (XP) and Property (PR) 
modules.



Property Number/UPRN. 
 Links to a BLPU.







An address derived 
from an LPI in the BS7666 property database.







UNI-form Case Number 
or Technical Key - Primary Key for top-level records







System or user 
generated reference value for the record.







Type describing a 
document associated with a case record.





Reference code for the document.










Description of the document, including relevance to 
application.









MIME 
type of the document.










Original filename of the document.








 

Re: Invalid element/Deserialisation

2005-07-05 Thread Anne Thomas Manes
Please post the WSDL. 

There is a big difference between the two messages -- one has an extra
 wrapper element. But if that's the problem, then
I'd expect the error to occur on that element rather than on
DatabaseID.

Your WSDD also looks suspect. The qname should be
qname="ns:DatabaseID" rather than
qname="ns:>UniformLoginCredentialsType>DatabaseID".

Anne

On 7/5/05, John Baker <[EMAIL PROTECTED]> wrote:
> Further to my post, I have derived that if I create Stub classes from WSDL
> and make a WS call using Axis - to an Axis server - the client generates
> this call:
> 
>  xmlns="http://www.caps-solutions.co.uk/webservices/connectors/common/messagetypes";>
>  
> xmlns:ns1="http://www.caps-solutions.co.uk/schema/uniform/72b/common/connectortypes";
>  xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance";>
>  a
>  b
>  c
>
>  
> 
> 
> Which is unserialised without a problem. So what is different between that
> and this:
> 
> http://schemas.xmlsoap.org/soap/envelope/"; 
> xmlns:xsd="http://www.w3.org/2001/XMLSchema"; 
> xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance";>
>  
>xmlns="http://www.caps-solutions.co.uk/webservices/connectors/common/messagetypes";
>  xmlns:ns1="http://www.caps-solutions.co.uk/schema/unifor
>
> a
> b
> c
>
>   
>  
> 
> 
> Well I can see they are different, but what key fact makes one unserialisable?
> 
> Thanks,
> 
> 
> John
> 
> On Mon, Jul 04, 2005 at 08:32:16PM +0100, John Baker wrote:
> > Hi,
> >
> > I'm having a small problem when making a SOAP call and I'm getting this
> > exception:
> >
> > AxisFault
> >  faultCode: {http://schemas.xmlsoap.org/soap/envelope/}Server.userException
> >   faultSubcode:
> >faultString: org.xml.sax.SAXException: Invalid element in
> > uk.co.caps_solutions.www.schema.uniform._72b.common.connectortypes.UniformLoginRequestType
> > - DatabaseID
> >  faultActor:
> >   faultNode:
> >faultDetail:
> >{http://xml.apache.org/axis/}stackTrace:org.xml.sax.SAXException:
> > Invalid element in
> > uk.co.caps_solutions.www.schema.uniform._72b.common.connectortypes.UniformLoginRequestType
> > - DatabaseID
> > at
> > org.apache.axis.encoding.ser.BeanDeserializer.onStartChild(BeanDeserializer.java:255)
> > at
> > org.apache.axis.encoding.DeserializationContext.startElement(DeserializationContext.java:1035)
> >
> > The SOAP request is as follows:
> >
> > 
> > http://schemas.xmlsoap.org/soap/envelope/";
> > xmlns:xsd="http://www.w3.org/2001/XMLSchema";
> > xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance";>
> >   > xmlns="http://www.xxx.co.uk/webservices/connectors/common/messagetypes";
> > xmlns:ns1="http://www.xxx.co.uk/schema/uniform/72b/common/connectortypes";
> > xmlns:xsd="http://www.w3.org/2001/XMLSchema";
> > xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance";>
> >
> >   dbVal
> >   userVal
> >   passVal
> >
> > 
> >
> > 
> >
> > And the deploy.wsdd refers to DatabaseID as follows:
> >
> >> xmlns:ns="http://www.xxx.co.uk/schema/uniform/72b/common/connectortypes";
> > qname="ns:>UniformLoginCredentialsType>DatabaseID"
> > type="java:java.lang.String"
> > serializer="org.apache.axis.encoding.ser.SimpleSerializerFactory"
> > 
> > deserializer="org.apache.axis.encoding.ser.SimpleDeserializerFactory"
> > encodingStyle=""
> >/>
> >
> > Could someone point me in roughly the right direction? Is the SOAP request
> > badly formed? Why has it failed to look up a method of deserialising the
> > DatabaseID element?
> >
> > Thanks,
> >
> >
> >
> > John
>


Re: Invalid element/Deserialisation

2005-07-05 Thread John Baker
Further to my post, I have derived that if I create Stub classes from WSDL
and make a WS call using Axis - to an Axis server - the client generates
this call:

http://www.caps-solutions.co.uk/webservices/connectors/common/messagetypes";>
 
   http://www.caps-solutions.co.uk/schema/uniform/72b/common/connectortypes";
 xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance";>
 a
 b
 c
   
 


Which is unserialised without a problem. So what is different between that
and this:

http://schemas.xmlsoap.org/soap/envelope/"; 
xmlns:xsd="http://www.w3.org/2001/XMLSchema"; 
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance";>
 
  http://www.caps-solutions.co.uk/webservices/connectors/common/messagetypes";
 xmlns:ns1="http://www.caps-solutions.co.uk/schema/unifor
   
a
b
c
   
  
 


Well I can see they are different, but what key fact makes one unserialisable?

Thanks,


John

On Mon, Jul 04, 2005 at 08:32:16PM +0100, John Baker wrote:
> Hi,
> 
> I'm having a small problem when making a SOAP call and I'm getting this
> exception:
> 
> AxisFault
>  faultCode: {http://schemas.xmlsoap.org/soap/envelope/}Server.userException
>   faultSubcode:
>faultString: org.xml.sax.SAXException: Invalid element in
> uk.co.caps_solutions.www.schema.uniform._72b.common.connectortypes.UniformLoginRequestType
> - DatabaseID
>  faultActor:
>   faultNode:
>faultDetail:
>{http://xml.apache.org/axis/}stackTrace:org.xml.sax.SAXException:
> Invalid element in
> uk.co.caps_solutions.www.schema.uniform._72b.common.connectortypes.UniformLoginRequestType
> - DatabaseID
> at
> org.apache.axis.encoding.ser.BeanDeserializer.onStartChild(BeanDeserializer.java:255)
> at
> org.apache.axis.encoding.DeserializationContext.startElement(DeserializationContext.java:1035)
> 
> The SOAP request is as follows:
> 
> 
> http://schemas.xmlsoap.org/soap/envelope/";
> xmlns:xsd="http://www.w3.org/2001/XMLSchema";
> xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance";>
>   xmlns="http://www.xxx.co.uk/webservices/connectors/common/messagetypes";
> xmlns:ns1="http://www.xxx.co.uk/schema/uniform/72b/common/connectortypes";
> xmlns:xsd="http://www.w3.org/2001/XMLSchema";
> xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance";>
>
>   dbVal
>   userVal
>   passVal
>
> 
> 
> 
> 
> And the deploy.wsdd refers to DatabaseID as follows:
> 
>xmlns:ns="http://www.xxx.co.uk/schema/uniform/72b/common/connectortypes";
> qname="ns:>UniformLoginCredentialsType>DatabaseID"
> type="java:java.lang.String"
> serializer="org.apache.axis.encoding.ser.SimpleSerializerFactory"
> deserializer="org.apache.axis.encoding.ser.SimpleDeserializerFactory"
> encodingStyle=""
>/>
>
> Could someone point me in roughly the right direction? Is the SOAP request
> badly formed? Why has it failed to look up a method of deserialising the
> DatabaseID element?
> 
> Thanks,
> 
> 
> 
> John


Receiving 2 Posts

2005-07-05 Thread Matthew Riches








We have an Tomcat / Axis setup here, processing Web Service
Requests.

 

In Debugging, it appears that the java code is receiving 2
duplicate messages for each request.

 

This happens even if we use a .net, or a NetTool Client to
send the message to the server.

 

The only likely culprit I can find on the web is that I may
need to add a WWW-Authenticate header to my message, but this makes no
difference.

 

Anyone give me some more ideas to try out, configuration
settings to check etc?

 

Matt




**
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
the system manager.

 
This footnote also confirms that this email message has been swept by
MIMEsweeper for the presence of computer viruses.

 
www.clearswift.com
**
 




Re: help with wsdl and google api... Solved

2005-07-05 Thread Moshe Bar-Nachoom




Problem Solved
and i'm not even sure why. i think it might be a problem with calling
the method with a wrong set or type of variables.
i just the same line from a different example and ths works great.
Thanks for the time and partience.


Soactive Inc wrote:

  There seems to be some issue with deserializing the response message
to the GoogleSearchResult object. Not sure what the real issue here
would be since the exception thrown does not seem to reveal the actual
cause.

I like to use dynamic invocations as opposed to static. Here is a code
snippet (feel to use it) that I used  for calling the Google Search
service (without invoking via stubs - you still need the complex types
though).

-Arun

// imports...

import org.apache.axis.encoding.ser.*;
import org.apache.axis.client.Call;
import org.apache.axis.client.Service;
import javax.xml.rpc.ParameterMode;
import javax.xml.namespace.QName;

// also import the google complex type objects...


// in your Java code, use this code snippet (within a try/catch block)
// 

// define qnames
String targetNamespace = "urn:GoogleSearch";
String schemaNamespace = "urn:GoogleSearch";

QName serviceName = new QName(targetNamespace, "GoogleSearchService");

QName portName = new QName(targetNamespace, "GoogleSearchPort");
QName operationName = new QName(schemaNamespace, "doGoogleSearch");

// create service
Service service = new Service();
Call call = (Call) service.createCall();

// set port and operation name
call.setPortTypeName(portName);
call.setOperationName(operationName);

QName strQName = new QName("http://www.w3.org/2001/XMLSchema",
 "string");
QName intQName = new QName("http://www.w3.org/2001/XMLSchema",  "int");
QName boolQName = new
QName("http://www.w3.org/2001/XMLSchema",  "boolean");

call.addParameter("key", strQName, ParameterMode.IN);
call.addParameter("q", strQName, ParameterMode.IN);
call.addParameter("start", intQName, ParameterMode.IN);
call.addParameter("maxResults", intQName, ParameterMode.IN);
call.addParameter("filter", boolQName, ParameterMode.IN);
call.addParameter("restrict", strQName, ParameterMode.IN);
call.addParameter("safeSearch", boolQName, ParameterMode.IN);
call.addParameter("lr", strQName, ParameterMode.IN);
call.addParameter("ie", strQName, ParameterMode.IN);
call.addParameter("oe", strQName, ParameterMode.IN);

// return type
	call.setReturnType(org.apache.axis.Constants.XSD_STRING);
	call.setReturnType(new QName("urn:GoogleSearch",
"GoogleSearchResult"), GoogleSearchResult.class);
	call.setReturnQName(new QName("", "return"));

	// register type mapping
	call.registerTypeMapping(GoogleSearchResult.class, new
QName("urn:GoogleSearch", "GoogleSearchResult"),
BeanSerializerFactory.class, BeanDeserializerFactory.class);
	call.registerTypeMapping(DirectoryCategory.class, new
QName("urn:GoogleSearch", "DirectoryCategory"),
BeanSerializerFactory.class, BeanDeserializerFactory.class);
	call.registerTypeMapping(ResultElement.class, new
QName("urn:GoogleSearch", "ResultElement"),
BeanSerializerFactory.class, BeanDeserializerFactory.class);

	// set end point address
call.setTargetEndpointAddress("http://api.google.com/search/beta2");

	// execute
// Invoke the WebService
String key = ""; // set your key here
String queryStr = "query"; // your search keyword
GoogleSearchResult result = (GoogleSearchResult)
call.invoke(new Object[]{key,
		queryStr, new Integer(0), new Integer(10), new Boolean(false), null,
new Boolean(false),
			null, null, null});

	StringBuffer resultStrBuf = new StringBuffer();
	for (int i = 0; i < result.getResultElements().length; i++) {
		ResultElement element = result.getResultElements()[i];
		resultStrBuf.append((i+1) + ": " + element.getTitle() + "");
	}

	System.out.println("Search Response: " + responseStrBuf.toString());





On 7/4/05, Moshe Bar-Nachoom <[EMAIL PROTECTED]> wrote:
  
  
 Sorry...
 my mistake.
 i tested for nullity (gsr == null) and i got false.
 then i tried to output the gsr, as is, to the screen and got "null"
 but i have the traffic. i can see it in the sniffer.
 what's going on there?
 help!!! :-)

 
 
 
 Moshe Bar-Nachoom wrote: 
 
 thanks Arun.
 1) gsr is not a null. i've tested it in various ways.
 
 2) the stack i get is very simple. it tells me i have an error: "Exception
in thread "Thread-1" java.lang.NullPointerException at
axisThread.run(Glycerine.java:637)".
 this is the line that i use to print some of the values i should'va gotten
in response from the server. although the communication seens to be ok, i
still get this null ppinter exception when trying to: gsr.getEndIndex() (for
example)
 
 an important thing to note is that the gsp.doGoogleSearch(..) method works
and creates a request and gets a response (i've
  monitored th

AW: some problem regarding invoking web services

2005-07-05 Thread Ferruh Zamangoer








I’am not sure but I
have see in another examples ParameterMode.IN instead of ParameterMode.PARAM_MODE_IN, but I don’t know if this is the
problem. Try 

out.

 

Regards

Ferruh

 









Von: Deepak T J
[mailto:[EMAIL PROTECTED] 
Gesendet: Dienstag, 5. Juli 2005
13:28
An: axis-user@ws.apache.org
Betreff: some problem regarding
invoking web services



 









hi





 





I deployed a java class as web service in apache axis and tried calling
it using a client code. But i encountered some problem which i have listed
after the code.





 





 import org.apache.axis.client.Call;
import org.apache.axis.client.Service;
import org.apache.axis.encoding.XMLType;
import org.apache.axis.utils.Options;





import javax.xml.rpc.ParameterMode;





public class client {
   public static void main(String [] args) throws Exception {
   Options options = new Options(args);





   String endpoint = "http://localhost:" +
options.getPort() +

"/axis/employee.jws";





// Do argument checking
   args = options.getRemainingArgs();





   if (args == null || args.length !=
3) {
  
System.err.println("Usage: CalcClient 
   return;
   }





   String method = args[0];
   //if (!(method.equals("add") ||
method.equals("subtract"))) {
   //  System.err.println("Usage:
CalcClient 
   //  return;
   //}





// Make the call
   Integer i1 = new Integer(args[1]);
   Integer i2 = new Integer(args[2]);





   Service  service = new
Service();
   Call call   
= (Call) service.createCall();





   call.setTargetEndpointAddress(new
java.net.URL(endpoint));
   call.setOperationName( method );
   call.addParameter("emp_no",
XMLType.XSD_INT,ParameterMode.PARAM_MODE_IN);
   call.addParameter("op2", XMLType.XSD_INT,
ParameterMode.PARAM_MODE_IN);





   Integer ret = (Integer)
call.invoke( new Object [] { i1, i2 });





   //System.out.println("Got
result : " + ret);





    }





}





 





 





when i compile the code i get the error that the "PARAM_MODE_IN
symbol can be resolved"





 





since i am new to Web services and software oriented architecture, i
have no clue to this error. Can someone help me put in this.





 





bye





deepak















Yahoo! Sports
Rekindle
the Rivalries. Sign up for Fantasy Football 








RE: Dynamically Registering Client Side Handlers

2005-07-05 Thread Roy Willy Haug
Seems to me you are on the right track. 

I use code similar to the following in the
SoapBindingStub.java methods:


... Clip ...

org.apache.axis.handlers.BasicHandler reqHandler = new
com.mycompany.ReqHandler();
org.apache.axis.handlers.BasicHandler respHandler = new
com.myCompany.RespHandler();
_call.setClientHandlers(reqHandler, respHandler);

java.lang.Object _resp = _call.invoke(new java.lang.Object[] {});

... Clip ...


And it works well for me. 

Regards

Roy Willy Haug

 

> -Original Message-
> From: Kumar [mailto:[EMAIL PROTECTED] 
> Sent: 5. juli 2005 13:02
> To: axis-user@ws.apache.org
> Subject: Dynamically Registering Client Side Handlers
> 
> Hi All,
> 
> Can anyone please tell me how to dynamically 
> (programatically) register a request flow and response flow 
> handler. I tried below code
> :
> 
> .setClientHandlers( object>, )
> 
> but I get an exception like "no logfile parameter set". I 
> dont want to use any client_config.wsdd file and put in 
> classpath. Please suggest.
> 
> 
> Thanks & Regards,
> Kumar.
> 


some problem regarding invoking web services

2005-07-05 Thread Deepak T J



hi
 
I deployed a java class as web service in apache axis and tried calling it using a client code. But i encountered some problem which i have listed after the code.
 
 import org.apache.axis.client.Call;import org.apache.axis.client.Service;import org.apache.axis.encoding.XMLType;import org.apache.axis.utils.Options;
import javax.xml.rpc.ParameterMode;
public class client {   public static void main(String [] args) throws Exception {   Options options = new Options(args);
   String endpoint = "http://localhost:" + options.getPort() + "/axis/employee.jws";
// Do argument checking   args = options.getRemainingArgs();
   if (args == null || args.length != 3) {   System.err.println("Usage: CalcClient    return;   }
   String method = args[0];   //if (!(method.equals("add") || method.equals("subtract"))) {   //  System.err.println("Usage: CalcClient    //  return;   //}
// Make the call   Integer i1 = new Integer(args[1]);   Integer i2 = new Integer(args[2]);
   Service  service = new Service();   Call call    = (Call) service.createCall();
   call.setTargetEndpointAddress(new java.net.URL(endpoint));   call.setOperationName( method );   call.addParameter("emp_no", XMLType.XSD_INT,ParameterMode.PARAM_MODE_IN);   call.addParameter("op2", XMLType.XSD_INT, ParameterMode.PARAM_MODE_IN);
   Integer ret = (Integer) call.invoke( new Object [] { i1, i2 });
   //System.out.println("Got result : " + ret);
    }
}
 
 
when i compile the code i get the error that the "PARAM_MODE_IN symbol can be resolved"
 
since i am new to Web services and software oriented architecture, i have no clue to this error. Can someone help me put in this.
 
bye
deepak
		Yahoo! Sports 
Rekindle the Rivalries. Sign up for Fantasy Football




some problem regarding invoking web services

2005-07-05 Thread Deepak T J


hi
 
I deployed a java class as web service in apache axis and tried calling it using a client code. But i encountered some problem which i have listed after the code.
 
 import org.apache.axis.client.Call;import org.apache.axis.client.Service;import org.apache.axis.encoding.XMLType;import org.apache.axis.utils.Options;
import javax.xml.rpc.ParameterMode;
public class client {   public static void main(String [] args) throws Exception {   Options options = new Options(args);
   String endpoint = "http://localhost:" + options.getPort() + "/axis/employee.jws";
// Do argument checking   args = options.getRemainingArgs();
   if (args == null || args.length != 3) {   System.err.println("Usage: CalcClient    return;   }
   String method = args[0];   //if (!(method.equals("add") || method.equals("subtract"))) {   //  System.err.println("Usage: CalcClient    //  return;   //}
// Make the call   Integer i1 = new Integer(args[1]);   Integer i2 = new Integer(args[2]);
   Service  service = new Service();   Call call    = (Call) service.createCall();
   call.setTargetEndpointAddress(new java.net.URL(endpoint));   call.setOperationName( method );   call.addParameter("emp_no", XMLType.XSD_INT,ParameterMode.PARAM_MODE_IN);   call.addParameter("op2", XMLType.XSD_INT, ParameterMode.PARAM_MODE_IN);
   Integer ret = (Integer) call.invoke( new Object [] { i1, i2 });
   //System.out.println("Got result : " + ret);
    }
}
 
 
when i compile the code i get the error that the "PARAM_MODE_IN symbol can be resolved"
 
since i am new to Web services and software oriented architecture, i have no clue to this error. Can someone help me put in this.
 
bye
deepak
		Yahoo! Sports 
Rekindle the Rivalries. Sign up for Fantasy Football




Dynamically Registering Client Side Handlers

2005-07-05 Thread Kumar
Hi All,

Can anyone please tell me how to dynamically (programatically)
register a request flow and response flow handler. I tried below code
:

.setClientHandlers(,
)

but I get an exception like "no logfile parameter set". I dont want to
use any client_config.wsdd file and put in classpath. Please suggest.


Thanks & Regards,
Kumar.


RE: Collections classes?

2005-07-05 Thread Keith Hatton
Axis uses the JAX-RPC specification for mapping between Java and XSD
types.
You can get the JAX-RPC 1.1 specification from here:
http://java.sun.com/xml/downloads/jaxrpc.html

Lists (and other collection types) are not supported. End of story.
You're barking up the wrong tree to try and force sophisticated
collection objects into SOAP. Really, SOAP is just a way of passing
messages between systems, not objects.
http://weblogs.cs.cornell.edu/AllThingsDistributed/archives/000343.html

Of course, to turn an array into a list is as simple as
java.util.Arrays.asList(Object[]); to turn a list into an array is as
simple as java.util.List.toArray(). JDK 1.5 introduced auto-boxing
between object and primitive types; perhaps you should ask Sun about
introducing auto-boxing between arrays and Lists!

Hope this helps
Keith


-Original Message-
From: Scott Lamb [mailto:[EMAIL PROTECTED] 
Sent: 04 July 2005 18:23
To: axis-user@ws.apache.org
Subject: Re: Collections classes?


On 4 Jul 2005, at 08:38, Anne Thomas Manes wrote:
> Actually, a list is a specialization of an array, not the other way 
> around. As James says, a list requires more information than an XSD 
> type array. An XSD type array has no sense of order or index. It is 
> simply a repeating element. There's no metadata included in each of 
> the repeating element to indicate indexing or ordering.

Okay, first of all, when I've been describing arrays, I'm talking  
about arrays on the Java side. I've been treating the SOAP side as a  
black box. I know that Axis is capable of producing a Java array,  
which has the same requirements as a Java List. Thus, I don't need to  
know _anything_ about SOAP or XSD to know that you are wrong. The  
ordering information is there. To give a concrete example, when I do  
a google search with their published WSDL, I get my results in order.  
I simply want that to be a with a List rather than a  
ResultElement[].

Secondly, of course the XSD does not describe ordering. It doesn't  
need to. When you serialize something as a stream of bytes, you're  
always putting them in order. It's called serialization for a reason.  
The order of the array/list/whatever is the order that the objects  
are written in.

> SOAPpy can easily maps things around because Python is a loosely typed

> language. Java is strongly typed and therefore much more strict about 
> mapping types.

If it can map it to a Java ResultElement[] in advance, why can't it  
map it to a Java List in advance? Strong typing is not  
the problem.

> In any case, if you want to map the returned array to a Java 
> collection class, then you must write a custom deserializer that does 
> so. You also must define a client config file that tells Axis to use 
> your custom deserializer.

How would I write this custom deserializer? All the information I've  
seen on the website - and the articles James Black linked to - seem  
to be talking about registering new types: i.e., a "java.foo.Blah <->  
Blah". I want to change how XSD x[] to map to Java List rather  
than Java x[], for all x.

Once I do that, I'll look into more sophisticated collections: Maps,  
Sets. I don't know if that's possible, but I'd like to try.

Scott

-- 
Scott Lamb 



Re: Error in deserialization

2005-07-05 Thread HF/EAB
Hi,
I just stumbled over this question and I guess you have solved the problem 
yourself by now, but in case you haven't, here are some hints...
The EndUserIdentifier is defined in an xml-schema.
You can find this schema at
http://uddi.bt.com/WSDL/parlayx/thirdpartycallservice/rpc-lit/parlayx_common_types.xsd
or download all the files from www.parlay.org 
(but then you need to know which version to select and you will have to edit 
the location URL to point to the correct server)

Anyway, here is what the EndUserIdentifier looks like:


   
  
   


Axis will map this to the java type org.apache.axis.types.URI

And here is what your code might look like:

org.apache.axis.types.URI callingParty = 
new 
org.apache.axis.types.URI("tel:+440123456789;vnd.bt.cli-presentation=available";);

Note that when you compile the wsdl files with axis wsdl2java, all the wsdl and 
xml-schema files must be present in the same directory.
Unfortunately the wsdl2java does, as far as I know, not have any equivalence to 
javas classpath. It just assumes that files imported into a wsdl are in the 
same directory.


Regards,
Andreas Bjarlestam





Hello,

I've tried that but i get a type mismatch error - connot convert a String to 
EndUserIdentifier 

Thanks for your help










From: Anne Thomas Manes <[EMAIL PROTECTED]>
Reply-To: Anne Thomas Manes <[EMAIL PROTECTED]>
To: axis-user@ws.apache.org
Subject: Re: Error in deserialization
Date: Wed, 1 Jun 2005 08:19:36 -0400

Very simple. Change these statements:

String callingparty = " 
;; String calledparty = 
" ;; 

to this:

EndUserIdentifier callingparty =
" ;;
EndUserIdentifier calledparty =
" ;;

Anne

On 5/31/05, Plorks mail <[EMAIL PROTECTED]> wrote:
> Hi Anne,
>
> I've created stubs as you have suggested and I have 4 packages with 
several 
> java in each
>
> There one java file EndUserIdentifier.java
>
> I've then looked at the method i'm trying to call (makeACall) that 
look like 
> this :
>
> public String makeACall(EndUserIdentifier callingParty, 
EndUserIdentifier 
> calledParty, String charging)
>
> The parameters i'm trying to pass are :
>
> callingParty = " 
;;
> calledParty = " 
;;
> String charging ="9F"
>
> By looking at the method callingParty and calledParty must be of type
> EndUserIdentifier, I think this is my problem, I am passing these 
values in > as Strings but I must pass them in as EndUserIdentifier types but 
i'm not 
> sure how i convert to this
>
> Am i looking in the right direction?  Can you help me convert my
> callingParty and calledParty to type EndUserIdentifier?
>
> Thanks very much for your help
>
>
>
>
>
>
>
> >From: Anne Thomas Manes <[EMAIL PROTECTED]>
> >Reply-To: Anne Thomas Manes <[EMAIL PROTECTED]>
> >To: axis-user@ws.apache.org
> >Subject: Re: Error in deserialization
> >Date: Tue, 31 May 2005 08:34:38 -0400
> >
> >Kumar,
> >
> >This WSDL imports another WSDL and two schemas. Can you send us 
those also? 
> >Also, can you tell us how you built and configured your client? I
> >noticed that you're using the call interface. Have you tryied 
creating
> >a stub client and invoking operations on the stub?
> >
> >Anne
> >
> >On 5/31/05, Plorks mail <[EMAIL PROTECTED]> wrote:
> > > Hello again
> > >
> > > Sorry clicked send too soon
> > >
> > > In the 2nd WSDL there's another reference to a WSDL, heres that 
WSDL
> > >
> > > Thanks for any help you can ofer, much apreciated
> > >
> > > P
> > >
> > >
> > >   
> > > - 
> > > -  > > targetNamespace=" 
; 
> > > xmlns=" ;
> > > xmlns:wsdl=" ;
> > > xmlns:xsd=" ;>
> > > - 
> > >   
> > >   
> > > - 
> > >   
> > >   
> > > - 
> > >   
> > >   
> > > - 
> > >   
> > >   
> > > - 
> > >   
> >

[ANN]AXIS2-0.9 released

2005-07-05 Thread Srinath Perera
The Apache Axis2 Team is pleased to announce the 0.9
release of Apache Axis2.

You can download the releases from:
http://www.apache.org/dist/ws/axis2/0_9/axis2-0.9-src.zip
http://www.apache.org/dist/ws/axis2/0_9/axis2-0.9-bin.zip

This Axis2 0.9 release has the following features:

  * AXIOM, a SOAP specific streaming XML infoset model for SOAP 1.1/1.2 Messages
  * Support for One-Way Messaging and Request Response Messaging
  * Modules, mechanism to extend the SOAP Processing Model
  * Archives based deployment Model
  * WSDL Code Generation Tool for Stub and skeltons based on WSDL 1.1
  * XML Beans based data binding support
  * Support for WS-Addressing, both the Submission and Final versions
  * Client API
  * REST Web Service Support
  * HTTP transport Support
  * SMTP transport Support
  * TCP transport Support
  * MTOM/SWA attachments support
  * SAAJ implementation

If you have a vision of how the next generation of Web services middleware
should be, and like to contribute to Axis2, please join us  at
[EMAIL PROTECTED] Any contribution in the form of coding, testing,
submitting improvements to the documentation, and reporting bugs is always
welcome.

More information about Axis2 is available from the Axis2 home:
http://ws.apache.org/axis2

-- The Axis2 Development Team