Re: [Axis2 0.95]Stub problem.

2006-04-06 Thread Martin Gainty



Good Morning KenBinding errors are 
*usually* the result of datatype conversion errors or possibly client using any 
definition *not* specifically defined (in your wsdl)Do you post the 
 WSDL (and the xsd) so we can view the datatypes as well as the operations 
you are using?
 
Take a look at this page on how to properly format 
your parameters *(according to QName spec)* herehttp://www.w3.org/TR/wsdl#_document-n
as well as PortSpecifier
 
Your XML Schema document should look something 
like
http://example.com/stockquote/stockquote.xsd
   
xmlns="http://www.w3.org/2000/10/XMLSchema">   
    
    
    
    
    
    
        
    
    
    
    
    

WSDL (client) should look something 
like
http://example.com/stockquote/stockquote.wsdl


   











   
   




(Service definition for SoapService should look something 
like)http://example.com/stockquote/stockquoteservice.wsdl


   




   
   
   
   
   
   
   




My first service

   




 
In other words all bindings -where to go as well as port, as well as 
functions as well as what is passed and definitions of same are stated in 
detail
Makes sense?Martin--

  - Original Message - 
  From: 
  Ken 
  Campbell 
  To: axis-user@ws.apache.org 
  Sent: Thursday, April 06, 2006 9:40 
  AM
  Subject: [Axis2 0.95]Stub problem.
  
  
  Hi,
   
  I’ve deployed a skeleton service 
   with an xmlbeans data binding which handles five types of operation: 
  login,format, search,metadata and page. I know the service is working because 
  I’ve accessed it from .NET and it returns correct responses. However, when I 
  try to use the generated Stub class in the following way:
   
    
     PAFStub stub = new PAFStub(null, 
  "http://localhost:8080/axis2/services/PAF");
   
  LoginRequestDocument ld = 
  LoginRequestDocument.Factory.newInstance();
   
  ld.addNewLoginRequest();
   
   
  // Populate the request
   
  
     
    ld.getLoginRequest().setUserID("test");
   
  ld.getLoginRequest().setPassword("test");
   
  
   
  LoginResponseDocument loginResponse = stub.login(ld);
   
  it throws an AxisFault telling me 
  that there is a data binding error;
  The nested XmlException 
  says: 
  document is not a [EMAIL PROTECTED]://www.edp.co.uk/ws/PAF/: document element 
  local name mismatch expected FormatRequest got LoginRequest
   
  This has me very 
  puzzled bearing in mind that a login request works fine when using a NET web 
  reference to the service. As far as I can work out problems arise in 
  MessageReceiverInOut fromOM(OMElement param, Class type) 
  method.
   
  Any 
  ideas?
   
  Regards,
  Ken


[Axis2 0.95]Stub problem.

2006-04-06 Thread Ken Campbell








Hi,

 

I’ve deployed a skeleton service  with an
xmlbeans data binding which handles five types of operation: login,format,
search,metadata and page. I know the service is working because I’ve
accessed it from .NET and it returns correct responses. However, when I try to
use the generated Stub class in the following way:

 

     PAFStub
stub = new PAFStub(null, "http://localhost:8080/axis2/services/PAF");


LoginRequestDocument ld = LoginRequestDocument.Factory.newInstance();


ld.addNewLoginRequest();

 

 //
Populate the request

 

     ld.getLoginRequest().setUserID("test");


ld.getLoginRequest().setPassword("test");

 


LoginResponseDocument loginResponse = stub.login(ld);

 

it throws an AxisFault telling me that there is a
data binding error;

The nested XmlException says: document is not a
[EMAIL PROTECTED]://www.edp.co.uk/ws/PAF/: document element local name
mismatch expected FormatRequest got LoginRequest

 

This has me very puzzled
bearing in mind that a login request works fine when using a .NET web reference
to the service. As far as I can work out problems arise in MessageReceiverInOut
fromOM(OMElement param, Class type) method.

 

Any ideas?

 

Regards,

Ken