Versioning Techniques

2005-11-22 Thread Todd Orr
What is the best way(s) to version SOAP applications. Since these are externally facing APIs, they must provide a reliable means for third parties to consume services. I must ensure that the wsdl that I provide will not change. However, change is inevitable. Therefore, there must be a way to version SOAP applications. I can imagine that this has mostly something to do with the wsdl url. If so, what would a typical project structure look like? Are there any other ways that you've overcome this problem?



Re: Required Fields

2005-11-22 Thread Todd Orr
I don't know how. I imagine a world where I can put a little @required annotation next to a property in my pojo. The java2wsdl would recognize this and produce the correct schema. Forgive me, I'm still getting a handle on SOAP. Maybe I've got pie in the sky hopes. I've gotten used to working with (what I've found to be) highly productive frameworks like ejb3, spring, and tapestry. I feel like something is missing here. I will hand code this stuff if I have to, but this solution has improvement written all over it. I've looked around a little bit (
http://ws.apache.org/axis/java/releases.html, for example) and I don't see any roadmap for these type of conveniences.  Are there any plans to ease our burdens?
On 11/22/05, Ron Reynolds <[EMAIL PROTECTED]> wrote:
AH!  that's backwards from the way i build my services.  sorry, dunnothat one - how WOULD Java2WSDL be able to tell that a field is requiredvs optional?  it seems to use primitives for required fields,object-wrappers for optional.  but i'm not sure if it works in reverse.
good luck.Todd Orr wrote:> I'm trying to produce wsdl's from my service pojos. How do I specify> which properties are mandatory so that when the java2wsdl runs the> schema will be correct?
>> On 11/22/05, * Ron Reynolds* <[EMAIL PROTECTED]> [EMAIL PROTECTED]>> wrote:>> when did pojo's come into the picture?
> i was referring to the client-side api classes generated by> WSDL2Java -> the  section of the WSDL is XML Schema, which has all the rules> for "required", "optional", and so forth.  WSDL2Java consumes the XSD
> and produces Java code (in the form of the client api data> classes) that> enforce those rules.  it sounded like you wanted to change those rules> post-WSDL2Java.  but now it sounds like you're not using WSDL2Java at
> all?  i guess i'm not sure how you generated your service or your> client> - is the client-side hand-written (thus pojo) or generated?  or> are you> talking straight XML to your service?  sorry, it's getting late - i'm
> rambling...> ...ron.> Todd Orr wrote:>> > Really, how? Do I annotate the methods or something? How does the> > Java2WSDL generate a WSDL that reflects the constraints on my pojo?
> >> > On 11/22/05, *Ron Reynolds * <[EMAIL PROTECTED]> [EMAIL PROTECTED]>> > [EMAIL PROTECTED] [EMAIL PROTECTED]>>> wrote:> >> > that sort of info is normally contained in the XSD and embedded
> > into the code> > via WSDL2Java...  you're trying to change a WSDD so that the> > generated WSDL's> > XSD has requirements that aren't mirrored in the original WSDL
> > from which the> > WSDD was generated? :-?  from what i've seen the client-side> > validation is> > embedded into the client-side stub code and that also is
> extracted> > from the> > WSDL/XSD from which it was generated.> >> > > Pardon my noobiness, but I've googled the hell out of this> to no
> > avail. Is> > > there a way to specify required properties in the wsdd file so> > that the> > > schema gets generated accordingly? All I want to do is
> specify> > required> > > elements so that the validation can occur at XML> validation time> > before> > > hitting the code.
> > >> > > Thanks,> > > T> > >> >> >> >>>


Re: Required Fields

2005-11-22 Thread Ron Reynolds
AH!  that's backwards from the way i build my services.  sorry, dunno 
that one - how WOULD Java2WSDL be able to tell that a field is required 
vs optional?  it seems to use primitives for required fields, 
object-wrappers for optional.  but i'm not sure if it works in reverse.  
good luck.

Todd Orr wrote:

I'm trying to produce wsdl's from my service pojos. How do I specify 
which properties are mandatory so that when the java2wsdl runs the 
schema will be correct?


On 11/22/05, * Ron Reynolds* <[EMAIL PROTECTED] 
> wrote:


when did pojo's come into the picture?
i was referring to the client-side api classes generated by
WSDL2Java -
the  section of the WSDL is XML Schema, which has all the rules
for "required", "optional", and so forth.  WSDL2Java consumes the XSD
and produces Java code (in the form of the client api data
classes) that
enforce those rules.  it sounded like you wanted to change those rules
post-WSDL2Java.  but now it sounds like you're not using WSDL2Java at
all?  i guess i'm not sure how you generated your service or your
client
- is the client-side hand-written (thus pojo) or generated?  or
are you
talking straight XML to your service?  sorry, it's getting late - i'm
rambling...
...ron.
Todd Orr wrote:

> Really, how? Do I annotate the methods or something? How does the
> Java2WSDL generate a WSDL that reflects the constraints on my pojo?
>
> On 11/22/05, *Ron Reynolds * <[EMAIL PROTECTED]

> >> wrote:
>
> that sort of info is normally contained in the XSD and embedded
> into the code
> via WSDL2Java...  you're trying to change a WSDD so that the
> generated WSDL's
> XSD has requirements that aren't mirrored in the original WSDL
> from which the
> WSDD was generated? :-?  from what i've seen the client-side
> validation is
> embedded into the client-side stub code and that also is
extracted
> from the
> WSDL/XSD from which it was generated.
>
> > Pardon my noobiness, but I've googled the hell out of this
to no
> avail. Is
> > there a way to specify required properties in the wsdd file so
> that the
> > schema gets generated accordingly? All I want to do is
specify
> required
> > elements so that the validation can occur at XML
validation time
> before
> > hitting the code.
> >
> > Thanks,
> > T
> >
>
>
>






Re: Required Fields

2005-11-22 Thread Todd Orr
I'm trying to produce wsdl's from my service pojos. How do I specify which properties are mandatory so that when the java2wsdl runs the schema will be correct?On 11/22/05, 
Ron Reynolds <[EMAIL PROTECTED]> wrote:
when did pojo's come into the picture?i was referring to the client-side api classes generated by WSDL2Java -the  section of the WSDL is XML Schema, which has all the rulesfor "required", "optional", and so forth.  WSDL2Java consumes the XSD
and produces Java code (in the form of the client api data classes) thatenforce those rules.  it sounded like you wanted to change those rulespost-WSDL2Java.  but now it sounds like you're not using WSDL2Java at
all?  i guess i'm not sure how you generated your service or your client- is the client-side hand-written (thus pojo) or generated?  or are youtalking straight XML to your service?  sorry, it's getting late - i'm
rambling..ron.Todd Orr wrote:> Really, how? Do I annotate the methods or something? How does the> Java2WSDL generate a WSDL that reflects the constraints on my pojo?>
> On 11/22/05, *Ron Reynolds * <[EMAIL PROTECTED]> [EMAIL PROTECTED]>> wrote:>> that sort of info is normally contained in the XSD and embedded
> into the code> via WSDL2Java...  you're trying to change a WSDD so that the> generated WSDL's> XSD has requirements that aren't mirrored in the original WSDL> from which the
> WSDD was generated? :-?  from what i've seen the client-side> validation is> embedded into the client-side stub code and that also is extracted> from the> WSDL/XSD from which it was generated.
>> > Pardon my noobiness, but I've googled the hell out of this to no> avail. Is> > there a way to specify required properties in the wsdd file so> that the> > schema gets generated accordingly? All I want to do is specify
> required> > elements so that the validation can occur at XML validation time> before> > hitting the code.> >> > Thanks,> > T
> 


Re: Required Fields

2005-11-22 Thread Ron Reynolds
when did pojo's come into the picture? 
i was referring to the client-side api classes generated by WSDL2Java - 
the  section of the WSDL is XML Schema, which has all the rules 
for "required", "optional", and so forth.  WSDL2Java consumes the XSD 
and produces Java code (in the form of the client api data classes) that 
enforce those rules.  it sounded like you wanted to change those rules 
post-WSDL2Java.  but now it sounds like you're not using WSDL2Java at 
all?  i guess i'm not sure how you generated your service or your client 
- is the client-side hand-written (thus pojo) or generated?  or are you 
talking straight XML to your service?  sorry, it's getting late - i'm 
rambling...

...ron.
Todd Orr wrote:

Really, how? Do I annotate the methods or something? How does the 
Java2WSDL generate a WSDL that reflects the constraints on my pojo?


On 11/22/05, *Ron Reynolds * <[EMAIL PROTECTED] 
> wrote:


that sort of info is normally contained in the XSD and embedded
into the code
via WSDL2Java...  you're trying to change a WSDD so that the
generated WSDL's
XSD has requirements that aren't mirrored in the original WSDL
from which the
WSDD was generated? :-?  from what i've seen the client-side
validation is
embedded into the client-side stub code and that also is extracted
from the
WSDL/XSD from which it was generated.

> Pardon my noobiness, but I've googled the hell out of this to no
avail. Is
> there a way to specify required properties in the wsdd file so
that the
> schema gets generated accordingly? All I want to do is specify
required
> elements so that the validation can occur at XML validation time
before
> hitting the code.
>
> Thanks,
> T
>







Re: Passing parameters via URL

2005-11-22 Thread pratima gogineni
Title: Nachricht
Yes I had used this facility to test some axis webservices in a webbrowser.  The URL is of the form: http://host:port/endpoint?method=¶mA=valueA¶mB=valueBPratimaDenis Schlesinger <[EMAIL PROTECTED]> wrote:  Hallo   everybody!     Is it possible to   pass parameters to an Axis web service via its URL?      I want to do   something like: http://host:port/endpoint?paramA=valueA¶mB=valueB     Any experiences on   that?     Thanks in   advance!     Denis
		 Yahoo! FareChase - Search multiple travel sites in one click.

 

 

Re: Required Fields

2005-11-22 Thread Todd Orr
Really, how? Do I annotate the methods or something? How does the Java2WSDL generate a WSDL that reflects the constraints on my pojo?On 11/22/05, Ron Reynolds
 <[EMAIL PROTECTED]> wrote:that sort of info is normally contained in the XSD and embedded into the code
via WSDL2Java...  you're trying to change a WSDD so that the generated WSDL'sXSD has requirements that aren't mirrored in the original WSDL from which theWSDD was generated? :-?  from what i've seen the client-side validation is
embedded into the client-side stub code and that also is extracted from theWSDL/XSD from which it was generated.> Pardon my noobiness, but I've googled the hell out of this to no avail. Is> there a way to specify required properties in the wsdd file so that the
> schema gets generated accordingly? All I want to do is specify required> elements so that the validation can occur at XML validation time before> hitting the code.>> Thanks,> T
>


Re: axis1.3-ClassCast Exception at call.invoke

2005-11-22 Thread Ketan Deshpande
Can you look at the SOAP response - use tcpmon or some other n/w sniffer to
actually look at the SOAP request/response between client and server? 

The other way to debug that I can think of is to debug the call.invoke -
download the source for 1.3 and step thru... 

-K 

--- jsri <[EMAIL PROTECTED]> wrote:

> Thanks for responding. yes, bean mappings are defined.
> 
> On 11/22/05, Developer Developer <[EMAIL PROTECTED]> wrote:
> >
> > you have defined the bean mappings required for serialization and
> > deserialization at the server and client side ?
> >
> >
> >  On 11/21/05, jsri <[EMAIL PROTECTED]> wrote:
> > >
> > >
> > >  Hello all
> > > >
> > > > I'm a newbie to webservices. I'm trying to consume webservices. I'm
> > > > using axis1.3 ,Eclipse IDE. Using axis i got the java & stub classes
> > > > generated. I'm able to receive string literals from webservice. Problem
> > > > comes with objects..bean. This is the scenairo of the
> application...When i
> > > > send an Patient ID to the webservices it returns demographic
> information
> > > > related to the Patient ID.
> > > >
> > > > (a) Query record -method returns Patient record for the requested
> > > > Patient-MPI ID
> > > > 1. I sent an invalid MPI ID. I got msg from webservice- "MPI ID
> > > > doesn't exists" .
> > > > 2.When i send the existing MPI ID i get ClassCastException.
> > >
> > >
> > > It show the error at call.invoke().I tried using the same jar files used
> > > > by the webservice provider to generate java calsses &stubs.still got
> the
> > > > same errors. I attached wsdl and soapbindingstub class.I'm pasting the
> > > > code snippets&stack trace below.
> > > >
> > > > Generated SoapBindingStub.java
> > > > *
> > > > public com.stchome.mpi.MPIQueryReply queryRecord(java.lang.String in0,
> > > > long in1) throws java.rmi.RemoteException {
> > > >
> > > >
> > > > if (super.cachedEndpoint == null) {
> > > > throw new org.apache.axis.NoEndPointException();
> > > > }
> > > >
> > > >
> > > > org.apache.axis.client.Call _call = createCall();
> > > > _call.setOperation(_operations[0]);
> > > > _call.setUseSOAPAction(true);
> > > > _call.setSOAPActionURI("");
> > > > _call.setSOAPVersion(
> > > > org.apache.axis.soap.SOAPConstants.SOAP11_CONSTANTS);
> > > > _call.setOperationName(new javax.xml.namespace.QName("urn:mpi",
> > > > "queryRecord"));
> > > >
> > > > setRequestHeaders(_call);
> > > >  setAttachments(_call);
> > > >
> > > > try {
> > > >
> > > > java.lang.Object _resp = _call.invoke(new java.lang.Object [] {in0,
> > > > new java.lang.Long(in1)});
> > > >
> > > > if (_resp instanceof java.rmi.RemoteException) {
> > > > throw (java.rmi.RemoteException)_resp;
> > > > }
> > > > else {
> > > > extractAttachments(_call);
> > > > try {
> > > > return (com.stchome.mpi.MPIQueryReply) _resp;
> > > > }
> > > > catch (java.lang.Exception _exception) {
> > > > return (com.stchome.mpi.MPIQueryReply)
> > > > org.apache.axis.utils.JavaUtils.convert(_resp,
> > > > com.stchome.mpi.MPIQueryReply.class);
> > > > }
> > > > }
> > > > } catch (org.apache.axis.AxisFault axisFaultException) {
> > > > throw axisFaultException;
> > > > }
> > > >
> > > > }
> > > > *
> > > > ClientTest.java Query Record
> > > > **
> > > > public void QueryMPI() throws Exception {
> > > >
> > > > java.lang.String in0String = new String("system"); //mpi user
> > > > long in1Long = 17831;
> > > >
> > > > try{
> > > >
> > > > MPIServiceLocator temp = new MPIServiceLocator();
> > > > MPI mpi = temp.getMPI();
> > > >
> > > > com.stchome.mpi.MPIQueryReply x = mpi.queryRecord(in0String,in1Long);
> > > >
> > >
> > >  System.out.println((x.getRecord()).getFirstName());
> > > >
> > > > System.out.println("Status : " + x.getStatus ());
> > > > System.out.println("Status String : " + x.getStatusString());
> > > > }
> > > >
> > > >
> *
> > > > AxisFault
> > > > faultCode: {
> http://schemas.xmlsoap.org/soap/envelope/}Server.userException
> > > > 
> > > >  faultSubcode:
> > > > faultString: java.lang.ClassCastException
> > > > faultActor:
> > > > faultNode:
> > > > faultDetail:
> > > >  {http://xml.apache.org/axis/}stackTrace:java.lang.ClassCastException
> > > > 
> > > > at org.apache.axis.message.SOAPFaultBuilder.createFault(
> > > > SOAPFaultBuilder.java:222)
> > > > at org.apache.axis.message.SOAPFaultBuilder.endElement(
> > > > SOAPFaultBuilder.java:129)
> > > > at org.apache.axis.encoding.DeserializationContext.endElement (
> > > > DeserializationContext.java:1087)
> > > > at org.apache.xerces.parsers.AbstractSAXParser.endElement(Unknown
> > > > Source)
> > > >  at
> org.apache.xerces.impl.X

Re: Required Fields

2005-11-22 Thread Ron Reynolds
that sort of info is normally contained in the XSD and embedded into the code
via WSDL2Java...  you're trying to change a WSDD so that the generated WSDL's
XSD has requirements that aren't mirrored in the original WSDL from which the
WSDD was generated? :-?  from what i've seen the client-side validation is
embedded into the client-side stub code and that also is extracted from the
WSDL/XSD from which it was generated.

> Pardon my noobiness, but I've googled the hell out of this to no avail. Is
> there a way to specify required properties in the wsdd file so that the
> schema gets generated accordingly? All I want to do is specify required
> elements so that the validation can occur at XML validation time before
> hitting the code.
>
> Thanks,
> T
>




Required Fields

2005-11-22 Thread Todd Orr
Pardon my noobiness, but I've googled the hell out of this to no avail. Is there a way to specify required properties in the wsdd file so that the schema gets generated accordingly? All I want to do is specify required elements so that the validation can occur at XML validation time before hitting the code.
Thanks,T


RE: Control Character Woes :)

2005-11-22 Thread gary . si . grewal

Yes and that is where it may be time to re-visit this and see since XML has
been widely adopted to support a variety of information and with Databases
adding direct XML support, we may want to see if the restriction needs to
be changed.

Gary Grewal
-



  
  "Jesse Pelton"
  
  <[EMAIL PROTECTED]>To:   

   cc:  
  
  11/22/2005 02:57 Subject:  RE: Control Character 
Woes :)
  PM
  
  Please respond to 
  
  axis-user 
  

  

  




XML is eXtensible Markup Language, and I think it was originally thought
of as a way to mark up text.  In that context, it makes sense to
disallow characters that amount to old-style markup.  If an element
might contain control codes, it probably seemed reasonable to assume
that it was some sort of binary data that could be base64 encoded.

In practice XML has turned out to be be very useful for storing
structured data of all kinds, so XML 1.1 has relaxed the restriction.
You still can't include the raw control characters "for reasons of
robustness" (according to
http://www.stylusstudio.com/w3c/xml11/sec-xml11.htm).

> -Original Message-
> From: [EMAIL PROTECTED]
> [mailto:[EMAIL PROTECTED]
> Sent: Tuesday, November 22, 2005 3:20 PM
> To: axis-user@ws.apache.org
> Subject: Re: Control Character Woes :)
>
>
> Yes specially when you interfacing with a native or a legacy
> application
> having historical Data, this problem always surfaces and
> there is no fix as
> of now.
>
> may be in the next iteration of XML we can get all of these back in
>
> Thanks and Regards,
>
> Gary Grewal




This communication is for informational purposes only. It is not intended
as an offer or solicitation for the purchase or sale of any financial
instrument or as an official confirmation of any transaction. All market prices,
data and other information are not warranted as to completeness or accuracy and
are subject to change without notice. Any comments or statements made herein 
do not necessarily reflect those of JPMorgan Chase & Co., its subsidiaries 
and affiliates.



Re: axis1.3-ClassCast Exception at call.invoke

2005-11-22 Thread jsri
Thanks for responding. yes, bean mappings are defined.On 11/22/05, Developer Developer <[EMAIL PROTECTED]
> wrote:you have defined the bean mappings required for serialization and deserialization at the server and client side ?

 
On 11/21/05, jsri <[EMAIL PROTECTED]> wrote:



Hello allI'm
a newbie to webservices. I'm trying to consume webservices. I'm using
axis1.3
,Eclipse IDE. Using axis i got the java & stub classes generated.
I'm able to receive string literals from webservice. Problem comes with
objects..bean. This is the scenairo of the application...When i send an
Patient ID to the webservices it returns demographic information
related to the Patient ID.
(a) Query record -method returns Patient record for the requested Patient-MPI ID 1. I sent an invalid MPI ID. I got msg from webservice- "MPI ID doesn't exists" .2.When i send the existing MPI ID i get ClassCastException. 

It
show the error at call.invoke().I tried using the same jar files used
by the webservice provider to generate java calsses &stubs.still
got the same errors. I attached wsdl and soapbindingstub class.I'm
pasting the code snippets&stack trace below.  Generated SoapBindingStub.java *
 public com.stchome.mpi.MPIQueryReply queryRecord(java.lang.String in0, long in1) throws java.rmi.RemoteException {

                            if (super.cachedEndpoint
 == null) {
          throw new org.apache.axis.NoEndPointException();
    }
              

    org.apache.axis.client.Call _call = createCall();    _call.setOperation(_operations[0]);

    _call.setUseSOAPAction(true);    _call.setSOAPActionURI(""); 

    _call.setSOAPVersion(org.apache.axis.soap.SOAPConstants.SOAP11_CONSTANTS);   _call.setOperationName(new javax.xml.namespace.QName
("urn:mpi", "queryRecord"));
        setRequestHeaders(_call);

    setAttachments(_call);    

 try {          java.lang.Object _resp = _call.invoke(new 
java.lang.Object
[] {in0, new java.lang.Long(in1)});       if (_resp instanceof 
java.rmi.RemoteException) {    throw (java.rmi.RemoteException)_resp;

    }    else {       extractAttachments(_call);

 try {   
return (com.stchome.mpi.MPIQueryReply) _resp;
       }    catch (java.lang.Exception
 _exception) {
   
return (com.stchome.mpi.MPIQueryReply) org.apache.axis.utils.JavaUtils.convert(_resp, com.stchome.mpi.MPIQueryReply.class);
    }    }

  } catch (org.apache.axis.AxisFault axisFaultException) {  throw axisFaultException;

}      }*
ClientTest.java Query Record**

public  void  QueryMPI() throws Exception {            
java.lang.String
 in0String = new String("system"); //mpi user    long in1Long =  17831;

            try{ 

  MPIServiceLocator temp = new MPIServiceLocator();  MPI mpi = temp.getMPI();

   com.stchome.mpi.MPIQueryReply x = mpi.queryRecord(in0String,in1Long); 
  System.out.println((x.getRecord()).getFirstName());
 
            System.out.println("Status : " + 
x.getStatus
());  System.out.println("Status String : " + x.getStatusString());

} *AxisFault
 faultCode: {
http://schemas.xmlsoap.org/soap/envelope/}Server.userException 

 faultSubcode:  faultString: java.lang.ClassCastException

 faultActor:  faultNode:  faultDetail: 

    {http://xml.apache.org/axis/}stackTrace:java.lang.ClassCastException 
    at org.apache.axis.message.SOAPFaultBuilder.createFault(SOAPFaultBuilder.java:222)

    at org.apache.axis.message.SOAPFaultBuilder.endElement(SOAPFaultBuilder.java:129)    at org.apache.axis.encoding.DeserializationContext.endElement

(DeserializationContext.java:1087)    at org.apache.xerces.parsers.AbstractSAXParser.endElement(Unknown Source)

    at org.apache.xerces.impl.XMLNSDocumentScannerImpl.scanEndElement(Unknown Source)    at org.apache.xerces.impl.XMLDocumentFragmentScannerImpl$FragmentContentDispatcher.dispatch

(Unknown Source)    at org.apache.xerces.impl.XMLDocumentFragmentScannerImpl.scanDocument(Unknown Source)

    at org.apache.xerces.parsers.XML11Configuration.parse(Unknown Source)    at org.apache.xerces.parsers.DTDConfiguration.parse(Unknown Source)

    at org.apache.xerces.parsers.XMLParser.parse(Unknown Source)    at 
org.apache.xerces.parsers.AbstractSAXParser.parse
(Unknown Source)    at javax.xml.parsers.SAXParser.parse(SAXParser.java:345)

    at org.apache.axis.encoding.DeserializationContext.parse(DeserializationContext.java:227)    at org.apache.axis.SOAPPart.getAsSOAPEnvelope
(SOAPPart.java
:696)    at org.apache.axis.Message.getSOAPEnvelope(Message.java:435)
    at 
org.apache.axis.handlers.soap.MustUnderstandChecker.invoke(MustUnderstandC

Re: axis1.3-ClassCast Exception at call.invoke

2005-11-22 Thread Developer Developer
you have defined the bean mappings required for serialization and deserialization at the server and client side ?
 
On 11/21/05, jsri <[EMAIL PROTECTED]> wrote:


Hello allI'm a newbie to webservices. I'm trying to consume webservices. I'm using axis1.3
,Eclipse IDE. Using axis i got the java & stub classes generated. I'm able to receive string literals from webservice. Problem comes with objects..bean. This is the scenairo of the application...When i send an Patient ID to the webservices it returns demographic information related to the Patient ID.
(a) Query record -method returns Patient record for the requested Patient-MPI ID 1. I sent an invalid MPI ID. I got msg from webservice- "MPI ID doesn't exists" .2.When i send the existing MPI ID i get ClassCastException. 

It show the error at call.invoke().I tried using the same jar files used by the webservice provider to generate java calsses &stubs.still got the same errors. I attached wsdl and soapbindingstub 
class.I'm pasting the code snippets&stack trace below.  Generated SoapBindingStub.java *
 public com.stchome.mpi.MPIQueryReply queryRecord(java.lang.String in0, long in1) throws java.rmi.RemoteException {
                            if (super.cachedEndpoint == null) {
          throw new org.apache.axis.NoEndPointException();    }
              
    org.apache.axis.client.Call _call = createCall();    _call.setOperation(_operations[0]);
    _call.setUseSOAPAction(true);    _call.setSOAPActionURI(""); 
    _call.setSOAPVersion(org.apache.axis.soap.SOAPConstants.SOAP11_CONSTANTS);   _call.setOperationName(new javax.xml.namespace.QName("urn:mpi", "queryRecord"));
        setRequestHeaders(_call);
    setAttachments(_call);    
 try {          java.lang.Object _resp = _call.invoke(new java.lang.Object
[] {in0, new java.lang.Long(in1)});       if (_resp instanceof 
java.rmi.RemoteException) {    throw (java.rmi.RemoteException)_resp;
    }    else {       extractAttachments(_call);
 try {    return (com.stchome.mpi.MPIQueryReply) _resp;
       }    catch (java.lang.Exception _exception) {
    return (com.stchome.mpi.MPIQueryReply) org.apache.axis.utils.JavaUtils.convert(_resp, com.stchome.mpi.MPIQueryReply.class);
    }    }
  } catch (org.apache.axis.AxisFault axisFaultException) {  throw axisFaultException;
}      }*
ClientTest.java Query Record**
public  void  QueryMPI() throws Exception {            java.lang.String
 in0String = new String("system"); //mpi user    long in1Long =  17831;
            try{ 
  MPIServiceLocator temp = new MPIServiceLocator();  MPI mpi = temp.getMPI();
   com.stchome.mpi.MPIQueryReply x = mpi.queryRecord(in0String,in1Long); 
  System.out.println((x.getRecord()).getFirstName()); 
            System.out.println("Status : " + x.getStatus
());  System.out.println("Status String : " + x.getStatusString());
} *AxisFault faultCode: {
http://schemas.xmlsoap.org/soap/envelope/}Server.userException 
 faultSubcode:  faultString: java.lang.ClassCastException
 faultActor:  faultNode:  faultDetail: 
    {http://xml.apache.org/axis/}stackTrace:java.lang.ClassCastException 
    at org.apache.axis.message.SOAPFaultBuilder.createFault(SOAPFaultBuilder.java:222)
    at org.apache.axis.message.SOAPFaultBuilder.endElement(SOAPFaultBuilder.java:129)    at org.apache.axis.encoding.DeserializationContext.endElement
(DeserializationContext.java:1087)    at org.apache.xerces.parsers.AbstractSAXParser.endElement(Unknown Source)
    at org.apache.xerces.impl.XMLNSDocumentScannerImpl.scanEndElement(Unknown Source)    at org.apache.xerces.impl.XMLDocumentFragmentScannerImpl$FragmentContentDispatcher.dispatch
(Unknown Source)    at org.apache.xerces.impl.XMLDocumentFragmentScannerImpl.scanDocument(Unknown Source)
    at org.apache.xerces.parsers.XML11Configuration.parse(Unknown Source)    at org.apache.xerces.parsers.DTDConfiguration.parse(Unknown Source)
    at org.apache.xerces.parsers.XMLParser.parse(Unknown Source)    at org.apache.xerces.parsers.AbstractSAXParser.parse
(Unknown Source)    at javax.xml.parsers.SAXParser.parse(SAXParser.java:345)
    at org.apache.axis.encoding.DeserializationContext.parse(DeserializationContext.java:227)    at org.apache.axis.SOAPPart.getAsSOAPEnvelope(SOAPPart.java
:696)    at org.apache.axis.Message.getSOAPEnvelope(Message.java:435)    at 
org.apache.axis.handlers.soap.MustUnderstandChecker.invoke(MustUnderstandChecker.java:62)    at org.apache.axis.client.AxisClient.invoke(AxisClient.java
:206)    at org.apache.axis.client.Call.invokeEngine(Call.java:2784)    a

Re: Return more than one parameters

2005-11-22 Thread Developer Developer
You need to use holder classes.
 
Eg:- if you want to pass objects of type myclass back and forth in soap web services  ( JAX RPC method) then here is what you need to do.
 
1. define holder class for myclass
2.alter your webservices to take holder class object  instead of myclass class object as input. ( Note that from the client you will still pass the actual object, not the holder class object).
 
 
 
There are a lot of articles about it on the web. One such is the following - Pay attention to the naming  convention and package definition . 
 
http://www.developer.com/java/web/article.php/10935_2237251_2
 
 
 
On 11/22/05, Eric Chow <[EMAIL PROTECTED]> wrote:
hello,How can I use JAXRPC call to return more than one parameters ?I tried to use ParameterMode.INOUT
, but nothing return ?Any example ?Best regards,Eric


RE: Control Character Woes :)

2005-11-22 Thread Jesse Pelton
XML is eXtensible Markup Language, and I think it was originally thought
of as a way to mark up text.  In that context, it makes sense to
disallow characters that amount to old-style markup.  If an element
might contain control codes, it probably seemed reasonable to assume
that it was some sort of binary data that could be base64 encoded.

In practice XML has turned out to be be very useful for storing
structured data of all kinds, so XML 1.1 has relaxed the restriction.
You still can't include the raw control characters "for reasons of
robustness" (according to
http://www.stylusstudio.com/w3c/xml11/sec-xml11.htm).

> -Original Message-
> From: [EMAIL PROTECTED] 
> [mailto:[EMAIL PROTECTED] 
> Sent: Tuesday, November 22, 2005 3:20 PM
> To: axis-user@ws.apache.org
> Subject: Re: Control Character Woes :)
> 
> 
> Yes specially when you interfacing with a native or a legacy 
> application
> having historical Data, this problem always surfaces and 
> there is no fix as
> of now.
> 
> may be in the next iteration of XML we can get all of these back in
> 
> Thanks and Regards,
> 
> Gary Grewal


RE: Can't Auto-Generate WSDL

2005-11-22 Thread Shelli D. Orton
Hi Denis,

I went looking in the server-config.wsdd and found a reference to a
 element.  I commented that out and can now get my auto-generated
wsdl.  Thank you for pointing me in the right direction!

Shelli

-Original Message-
From: Denis Schlesinger [mailto:[EMAIL PROTECTED]
Sent: Tuesday, November 22, 2005 11:46 AM
To: axis-user@ws.apache.org
Subject: AW: Can't Auto-Generate WSDL


Hi Shelli,

It would help to see your deployment descriptor files (*.wsdd) for each
service. There either the location of the WSDL must be specified or you need
to have typemappings/beanmappings specified in there.

Cheers,
Denis

-Ursprüngliche Nachricht-
Von: Shelli D. Orton [mailto:[EMAIL PROTECTED]
Gesendet: Dienstag, 22. November 2005 19:01
An: axis-user@ws.apache.org
Betreff: Can't Auto-Generate WSDL


Hi,

I have two services deployed in Axis 1.2.1 but can only get the
auto-generated wsdl for one of them.  For both services, if I go to the url

http://mydomain.com/myservice/services/ManagerApp

or

http://mydomain.com/myservice/services/ClientApp

I receive the page that says

"AppName"
Hi there, this is an AXIS service!
Perhaps there will be a form for invoking the service here...

But if I append "?wsdl" to the urls, I only get the wsdl for the manager
service.  For client service I get the following:

AXIS error
Sorry, something seems to have gone wrong... here are the details:

Fault - Unable to find WSDL file or resource myservice.wsdl AxisFault
 faultCode:
{http://schemas.xmlsoap.org/soap/envelope/}Server.generalException
 faultSubcode:
 faultString: Unable to find WSDL file or resource myservice.wsdl
 faultActor:
 faultNode:
 faultDetail:
{http://xml.apache.org/axis/}hostname:mydomain.com

I'm making the assumption that both services are deployed since I get the
first page for both (maybe that's a wrong assumption?).  Can anyone tell me
why I cannot get the wsdl for the second service?

Thanks in advance,
Shelli





Re: Control Character Woes :)

2005-11-22 Thread gary . si . grewal

Yes specially when you interfacing with a native or a legacy application
having historical Data, this problem always surfaces and there is no fix as
of now.

may be in the next iteration of XML we can get all of these back in

Thanks and Regards,

Gary Grewal
-



  
  Eric Anderson 
  
  <[EMAIL PROTECTED]>  To:   
axis-user@ws.apache.org  
  Sent by: newscc:  
  
  <[EMAIL PROTECTED]Subject:  Re: Control Character 
Woes :)
  rg>   
  

  

  
  11/22/2005 01:53  
  
  PM
  
  Please respond to 
  
  axis-user 
  

  

  




[EMAIL PROTECTED] wrote:
> On that note. I have always wondered why do we have some characters as
> "Invalid XML characters"  ? Any reason why the XML standards decided to
> filter these out ?

 From what I understand is that they removed the control characters
because there is no point to some of them in today's environment. You
don't use form feed anymore. If you want to control page breaking you
use stylesheets. Sending a BEL (bell) or NUL character doesn't mean
anything in a document and was really just an overloading of ASCII for
the teletype purposes. So the idea was the throw off that baggage. Of
course since they added some of them back in XML 1.1 I guess they
realized that XML is often generated from sources that allow these
control characters and the problem of removing them was more of a
headache than just keeping them in the spec.

Eric





This communication is for informational purposes only. It is not intended
as an offer or solicitation for the purchase or sale of any financial
instrument or as an official confirmation of any transaction. All market prices,
data and other information are not warranted as to completeness or accuracy and
are subject to change without notice. Any comments or statements made herein 
do not necessarily reflect those of JPMorgan Chase & Co., its subsidiaries 
and affiliates



Re: Control Character Woes :)

2005-11-22 Thread Eric Anderson

Jesse Pelton wrote:



[...snipped part of rant...]

 In
your shoes, I'd ask whether I absolutely had to deal with such clowns.



I have asked this myself for a few weeks now to try to get them to fix 
their stuff. After much pestering the decision finally came back as 
"sorry, that's what you get for not using .NET. Java sucks, etc". 
Unfortunately we have to work with this company so simply not 
interacting with them is not an option.



You can use character entities for control codes in XML 1.1.  The
simplest way for them to fix their bug may be for them to change the XML
declaration in their documents to specify XML 1.1 rather than XML 1.0.


There are a number of simple things they could do on their side to fix 
the problem. None of which they will do. From what I can tell they are 
so scared of modifying their code/environment that they would rather 
have this bug then risk introducing new bugs. Talk about fragile 
code/environment.


I appreciate you advice anyway. It's nice to know after fighting with 
their developers that I'm not the only one who things the problem needs 
to be fixed on their end. :)


Eric



Re: Control Character Woes :)

2005-11-22 Thread Eric Anderson

[EMAIL PROTECTED] wrote:

On that note. I have always wondered why do we have some characters as
"Invalid XML characters"  ? Any reason why the XML standards decided to
filter these out ?


From what I understand is that they removed the control characters 
because there is no point to some of them in today's environment. You 
don't use form feed anymore. If you want to control page breaking you 
use stylesheets. Sending a BEL (bell) or NUL character doesn't mean 
anything in a document and was really just an overloading of ASCII for 
the teletype purposes. So the idea was the throw off that baggage. Of 
course since they added some of them back in XML 1.1 I guess they 
realized that XML is often generated from sources that allow these 
control characters and the problem of removing them was more of a 
headache than just keeping them in the spec.


Eric



Re: Control Character Woes :)

2005-11-22 Thread Eric Anderson

[EMAIL PROTECTED] wrote:

On that note. I have always wondered why do we have some characters as
"Invalid XML characters"  ? Any reason why the XML standards decided to
filter these out ?


From what I understand is that they removed the control characters 
because there is no point to some of them in today's environment. You 
don't use form feed anymore. If you want to control page breaking you 
use stylesheets. Sending a BEL (bell) or NUL character doesn't mean 
anything in a document and was really just an overloading of ASCII for 
the teletype purposes. So the idea was the throw off that baggage. Of 
course since they added some of them back in XML 1.1 I guess they 
realized that XML is often generated from sources that allow these 
control characters and the problem of removing them was more of a 
headache than just keeping them in the spec.


Eric



RE: Control Character Woes :)

2005-11-22 Thread gary . si . grewal

On that note. I have always wondered why do we have some characters as
"Invalid XML characters"  ? Any reason why the XML standards decided to
filter these out ?

I can understand about the  ">" or "<"  characters, but never about the
others
Gary Grewal
-



  
  "Jesse Pelton"
  
  <[EMAIL PROTECTED]>To:   

   cc:  
  
  11/22/2005 01:23 Subject:  RE: Control Character 
Woes :)
  PM
  
  Please respond to 
  
  axis-user 
  

  

  




The only control characters permitted by XML 1.0 are CR, LF, and tab.
In other words, if someone sends control codes in XML 1.0 documents,
even as entities, they have a bug.


The company you are dealing with needs to understand that what they are
sending you does not comply with the spec, is consequently not XML, and
has none of the interoperability benefits of XML.  Refusing to address
the problem now simply means more trouble for themselves (and others)
later.  If hiding their heads in the sand is their approach to technical
problems in general, they'll eventually either wise up or disappear.  In
your shoes, I'd ask whether I absolutely had to deal with such clowns.


You can use character entities for control codes in XML 1.1.  The
simplest way for them to fix their bug may be for them to change the XML
declaration in their documents to specify XML 1.1 rather than XML 1.0.

If you can't convince them to do that, you're forced to play with fire
by performing some transformation on data that claims to be XML but is
not.  This is not a great idea, as you are facilitating the spread of
invalid documents.  Make sure you isolate your code so that it does not
attempt this transformation on genuine XML such as you may get from
other sources.

I don't know if anyone has implemented your proposed workaround.  (I
wouldn't characterize it as a solution.  To actually solve a problem you
have to address it where it occurs, which is not in your domain in this
case.)

> -Original Message-
> From: news [mailto:[EMAIL PROTECTED] On Behalf Of Eric Anderson
> Sent: Tuesday, November 22, 2005 10:27 AM
> To: axis-user@ws.apache.org
> Subject: Control Character Woes :)
>
> I have a problem that I need a bit of help in solving. We are working
> with a company that is providing web services to export data out of a
> hosted application we are using. Their web services are built using
> .NET. We are writing an application to export that data and import it
> into another hosted application.
>
> Our problem is that occasionally some data will contain a control
> character encoded as an character reference that is invalid
> in XML (for
> example a form feed character). It is my understanding that certain
> control characters are not valid in XML 1.0 and Microsoft's XML
> generator should not be producing them. From what I
> understand Microsoft
> has even fixed this in recent versions of their XML library but our
> problem is the company we are interacting with will do absolutely
> nothing to resolve the problem. Their solution if for us to switch to
> .NET. This is not possible for us because there is already a
> significant
> about of code written under Sun's Java. So we are getting
> these invalid
> XML soap messages whether we like it or not and need to
> figure out a way
> to deal with it.
>
> My thought is since SOAP is built on HTTP perhaps we could put a HTTP
> proxy between our application and their web service to remove these
> invalid control characters. My questions are the following:
>
> 1) Does anybody know of any existing solutions out there
> already to deal
> with this problem (perhaps an existing proxy to sanitize the XML).
>
> 2) Am I correct in my understanding that these control characters are
> not allowed in XML (even though they are encoded as character
> references) and that this is really a bug on their side that we are
> having to work around?
>
> 3) Are there any other ways to fix this that might be easier
> (cheaper)?
>
> Our current system involves us generating java source code

RE: Control Character Woes :)

2005-11-22 Thread Jesse Pelton
The only control characters permitted by XML 1.0 are CR, LF, and tab.
In other words, if someone sends control codes in XML 1.0 documents,
even as entities, they have a bug.


The company you are dealing with needs to understand that what they are
sending you does not comply with the spec, is consequently not XML, and
has none of the interoperability benefits of XML.  Refusing to address
the problem now simply means more trouble for themselves (and others)
later.  If hiding their heads in the sand is their approach to technical
problems in general, they'll eventually either wise up or disappear.  In
your shoes, I'd ask whether I absolutely had to deal with such clowns.


You can use character entities for control codes in XML 1.1.  The
simplest way for them to fix their bug may be for them to change the XML
declaration in their documents to specify XML 1.1 rather than XML 1.0.

If you can't convince them to do that, you're forced to play with fire
by performing some transformation on data that claims to be XML but is
not.  This is not a great idea, as you are facilitating the spread of
invalid documents.  Make sure you isolate your code so that it does not
attempt this transformation on genuine XML such as you may get from
other sources.

I don't know if anyone has implemented your proposed workaround.  (I
wouldn't characterize it as a solution.  To actually solve a problem you
have to address it where it occurs, which is not in your domain in this
case.)

> -Original Message-
> From: news [mailto:[EMAIL PROTECTED] On Behalf Of Eric Anderson
> Sent: Tuesday, November 22, 2005 10:27 AM
> To: axis-user@ws.apache.org
> Subject: Control Character Woes :)
> 
> I have a problem that I need a bit of help in solving. We are working 
> with a company that is providing web services to export data out of a 
> hosted application we are using. Their web services are built using 
> .NET. We are writing an application to export that data and import it 
> into another hosted application.
> 
> Our problem is that occasionally some data will contain a control 
> character encoded as an character reference that is invalid 
> in XML (for 
> example a form feed character). It is my understanding that certain 
> control characters are not valid in XML 1.0 and Microsoft's XML 
> generator should not be producing them. From what I 
> understand Microsoft 
> has even fixed this in recent versions of their XML library but our 
> problem is the company we are interacting with will do absolutely 
> nothing to resolve the problem. Their solution if for us to switch to 
> .NET. This is not possible for us because there is already a 
> significant 
> about of code written under Sun's Java. So we are getting 
> these invalid 
> XML soap messages whether we like it or not and need to 
> figure out a way 
> to deal with it.
> 
> My thought is since SOAP is built on HTTP perhaps we could put a HTTP 
> proxy between our application and their web service to remove these 
> invalid control characters. My questions are the following:
> 
> 1) Does anybody know of any existing solutions out there 
> already to deal 
> with this problem (perhaps an existing proxy to sanitize the XML).
> 
> 2) Am I correct in my understanding that these control characters are 
> not allowed in XML (even though they are encoded as character 
> references) and that this is really a bug on their side that we are 
> having to work around?
> 
> 3) Are there any other ways to fix this that might be easier 
> (cheaper)?
> 
> Our current system involves us generating java source code 
> from the wsdl 
> file via wsdl2java included with Axis. So we never really 
> interact with 
> the Java's XML parser or Java's HTTP libraries directly. Is 
> there anyway 
> we could put some sort of input stream filter on the HTTP 
> input stream?
> 
> Also just for completeness I have copy and pasted the error 
> message we 
> are receiving below to ensure that I am understanding the 
> problem correctly:
> 
> org.xml.sax.SAXParseException: Character reference "" is 
> an invalid 
> XML character
> 
> I appreciate any help you guys an give.
> 
> Eric
> 
> 


AW: Can't Auto-Generate WSDL

2005-11-22 Thread Denis Schlesinger
Hi Shelli,

It would help to see your deployment descriptor files (*.wsdd) for each 
service. There either the location of the WSDL must be specified or you need to 
have typemappings/beanmappings specified in there.

Cheers,
Denis

-Ursprüngliche Nachricht-
Von: Shelli D. Orton [mailto:[EMAIL PROTECTED] 
Gesendet: Dienstag, 22. November 2005 19:01
An: axis-user@ws.apache.org
Betreff: Can't Auto-Generate WSDL


Hi,

I have two services deployed in Axis 1.2.1 but can only get the auto-generated 
wsdl for one of them.  For both services, if I go to the url

http://mydomain.com/myservice/services/ManagerApp

or

http://mydomain.com/myservice/services/ClientApp

I receive the page that says

"AppName"
Hi there, this is an AXIS service!
Perhaps there will be a form for invoking the service here...

But if I append "?wsdl" to the urls, I only get the wsdl for the manager 
service.  For client service I get the following:

AXIS error
Sorry, something seems to have gone wrong... here are the details:

Fault - Unable to find WSDL file or resource myservice.wsdl AxisFault
 faultCode: {http://schemas.xmlsoap.org/soap/envelope/}Server.generalException
 faultSubcode:
 faultString: Unable to find WSDL file or resource myservice.wsdl
 faultActor:
 faultNode:
 faultDetail:
{http://xml.apache.org/axis/}hostname:mydomain.com

I'm making the assumption that both services are deployed since I get the first 
page for both (maybe that's a wrong assumption?).  Can anyone tell me why I 
cannot get the wsdl for the second service?

Thanks in advance,
Shelli





Control Character Woes :)

2005-11-22 Thread Eric Anderson
I have a problem that I need a bit of help in solving. We are working 
with a company that is providing web services to export data out of a 
hosted application we are using. Their web services are built using 
.NET. We are writing an application to export that data and import it 
into another hosted application.


Our problem is that occasionally some data will contain a control 
character encoded as an character reference that is invalid in XML (for 
example a form feed character). It is my understanding that certain 
control characters are not valid in XML 1.0 and Microsoft's XML 
generator should not be producing them. From what I understand Microsoft 
has even fixed this in recent versions of their XML library but our 
problem is the company we are interacting with will do absolutely 
nothing to resolve the problem. Their solution if for us to switch to 
.NET. This is not possible for us because there is already a significant 
about of code written under Sun's Java. So we are getting these invalid 
XML soap messages whether we like it or not and need to figure out a way 
to deal with it.


My thought is since SOAP is built on HTTP perhaps we could put a HTTP 
proxy between our application and their web service to remove these 
invalid control characters. My questions are the following:


1) Does anybody know of any existing solutions out there already to deal 
with this problem (perhaps an existing proxy to sanitize the XML).


2) Am I correct in my understanding that these control characters are 
not allowed in XML (even though they are encoded as character 
references) and that this is really a bug on their side that we are 
having to work around?


3) Are there any other ways to fix this that might be easier (cheaper)?

Our current system involves us generating java source code from the wsdl 
file via wsdl2java included with Axis. So we never really interact with 
the Java's XML parser or Java's HTTP libraries directly. Is there anyway 
we could put some sort of input stream filter on the HTTP input stream?


Also just for completeness I have copy and pasted the error message we 
are receiving below to ensure that I am understanding the problem correctly:


org.xml.sax.SAXParseException: Character reference "" is an invalid 
XML character


I appreciate any help you guys an give.

Eric



Can't Auto-Generate WSDL

2005-11-22 Thread Shelli D. Orton
Hi,

I have two services deployed in Axis 1.2.1 but can only get the
auto-generated wsdl for one of them.  For both services, if I go to the url

http://mydomain.com/myservice/services/ManagerApp

or

http://mydomain.com/myservice/services/ClientApp

I receive the page that says

"AppName"
Hi there, this is an AXIS service!
Perhaps there will be a form for invoking the service here...

But if I append "?wsdl" to the urls, I only get the wsdl for the manager
service.  For client service I get the following:

AXIS error
Sorry, something seems to have gone wrong... here are the details:

Fault - Unable to find WSDL file or resource myservice.wsdl
AxisFault
 faultCode:
{http://schemas.xmlsoap.org/soap/envelope/}Server.generalException
 faultSubcode:
 faultString: Unable to find WSDL file or resource myservice.wsdl
 faultActor:
 faultNode:
 faultDetail:
{http://xml.apache.org/axis/}hostname:mydomain.com

I'm making the assumption that both services are deployed since I get the
first page for both (maybe that's a wrong assumption?).  Can anyone tell me
why I cannot get the wsdl for the second service?

Thanks in advance,
Shelli



Passing parameters via URL

2005-11-22 Thread Denis Schlesinger
Title: Nachricht



Hallo 
everybody!
 
Is it possible to 
pass parameters to an Axis web service via its URL? 
 
I want to do 
something like: http://host:port/endpoint?paramA=valueA¶mB=valueB
 
Any experiences on 
that?
 
Thanks in 
advance!
 
Denis


axis1.3-ClassCast Exception at call.invoke- Pls help

2005-11-22 Thread jsri
Hi  all, pls help ...what could be possible server side errors. I'm able to receive string literals from webservice. IOn 11/21/05, jsri <
[EMAIL PROTECTED]> wrote:
Hello all


  


I'm a newbie to webservices. I'm trying to consume
webservices. I'm using axis1.3,Eclipse IDE. Using axis i got the java & stub
classes generated. I'm able to receive string literals from webservice. Problem comes
with objects..bean. This is the scenairo of the application...When i
send an Patient ID to the webservices it returns demographic information
related to the  Patient ID.




(a) Query record -method returns Patient  record for the requested Patient-MPI ID 

1. I sent an invalid MPI ID. I got msg from webservice- "MPI ID doesn't exists" .

2.When i send the existing MPI ID i get ClassCastException. It
show the error at call.invoke().I tried using the same jar files used
by the webservice provider to generate java calsses &stubs.still
got the same errors. I attached wsdl and soapbindingstub class.I'm
pasting the code snippets&stack trace below.  



Generated SoapBindingStub.java 

*

 public com.stchome.mpi.MPIQueryReply queryRecord(java.lang.String in0, long in1) throws java.rmi.RemoteException {

         

            

           if (super.cachedEndpoint == null) {

          throw new org.apache.axis.NoEndPointException();

    }

       

        

    org.apache.axis.client.Call _call = createCall();

    _call.setOperation(_operations[0]);

    _call.setUseSOAPAction(true);

    _call.setSOAPActionURI(""); 

    _call.setSOAPVersion(org.apache.axis.soap.SOAPConstants.SOAP11_CONSTANTS);

   _call.setOperationName(new javax.xml.namespace.QName("urn:mpi", "queryRecord"));

     

    setRequestHeaders(_call);

    setAttachments(_call);

    

 try {   

     

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

       

 if (_resp instanceof java.rmi.RemoteException) {

    throw (java.rmi.RemoteException)_resp;

    }

    else {

       extractAttachments(_call);

 try {

   
return (com.stchome.mpi.MPIQueryReply) _resp;

       } 

   catch (java.lang.Exception _exception) {

    return
(com.stchome.mpi.MPIQueryReply)
org.apache.axis.utils.JavaUtils.convert(_resp,
com.stchome.mpi.MPIQueryReply.class);

    }

    }

  } catch (org.apache.axis.AxisFault axisFaultException) {

  throw axisFaultException;

}

  

    }

*

ClientTest.java Query Record
**

public  void  QueryMPI() throws Exception {

        

    java.lang.String in0String = new String("system"); //mpi user

    long in1Long =  17831;

        

    try{

 

  MPIServiceLocator temp = new MPIServiceLocator();

  MPI mpi = temp.getMPI();

 

  com.stchome.mpi.MPIQueryReply x = mpi.queryRecord(in0String,in1Long); 
  System.out.println((x.getRecord()).getFirstName());



          

  System.out.println("Status : " + x.getStatus());

  System.out.println("Status String : " + x.getStatusString());

}

 *

AxisFault

 faultCode: {http://schemas.xmlsoap.org/soap/envelope/}Server.userException



 faultSubcode: 

 faultString: java.lang.ClassCastException

 faultActor: 

 faultNode: 

 faultDetail: 

    {http://xml.apache.org/axis/}stackTrace:java.lang.ClassCastException



    at org.apache.axis.message.SOAPFaultBuilder.createFault(SOAPFaultBuilder.java:222)

    at org.apache.axis.message.SOAPFaultBuilder.endElement(SOAPFaultBuilder.java:129)

    at org.apache.axis.encoding.DeserializationContext.endElement(DeserializationContext.java:1087)

    at org.apache.xerces.parsers.AbstractSAXParser.endElement(Unknown Source)

    at org.apache.xerces.impl.XMLNSDocumentScannerImpl.scanEndElement(Unknown Source)

    at org.apache.xerces.impl.XMLDocumentFragmentScannerImpl$FragmentContentDispatcher.dispatch(Unknown Source)

    at org.apache.xerces.impl.XMLDocumentFragmentScannerImpl.scanDocument(Unknown Source)

    at org.apache.xerces.parsers.XML11Configuration.parse(Unknown Source)

    at org.apache.xerces.parsers.DTDConfiguration.parse(Unknown Source)

    at org.apache.xerces.parsers.XMLParser.parse(Unknown Source)

    at org.apache.xerces.parsers.AbstractSAXParser.parse(Unknown Source)

    at javax.xml.parsers.SAXParser.parse(SAXParser.java:345)

    at org.apache.axis.encoding.DeserializationContext.parse(DeserializationContext.java:227)

    at org.apache.axis.SOAPPart.getAsSOAPEnvelope(SOAPPart.java:696)

    at org.apache.axis.Message.getSOAPEnvelope(Message.java:435)

    at org.apache.axis.handlers.soap.MustUnderstandChecker.invoke(MustUnderstandChecke

RE: problem in developing .NET proxy for Axis web services

2005-11-22 Thread Hansen, Geir
I think that "generates an error" is not spesific enough to be able to
help you. 
Can you describe the problem in a bit more detail?


-Original Message-
From: MUHAMMAD IQBAL [mailto:[EMAIL PROTECTED] 
Sent: 22. november 2005 17:28
To: axis-user@ws.apache.org
Subject: problem in developing .NET proxy for Axis web services

Hi Guys,

I am having a problem regaring interoperablility, when i try to build a
.NET proxy for my Axis web service it raises an error on Dom Element, i
have a doc/lit style web service that accepts Dom Element as a parameter
and returns Dom Element, but .NET generates an error when building
proxy.

can any one help me to fix this issue?

Thanks in advance.

Regards,

Muhammad Iqbal




Reuse of Axis Stubs

2005-11-22 Thread Stefan Aigner

Hi there,

I have a question regarding the reuse of Axis Stubs. I have a Singleton
in 
my application which cares about instantiating web service stubs. What
I 
do at the moment is caching a stub when it is created for later reuse.

This means, of one stub there is only one instance in my (web) application

for all users.

Now my question: can this lead to problems? Can this only instance of a

stub be shared by all users? Or do I rather have to implement some kind
of 
'stub pool' where instaniated stubs reside just like in a db connection

pool?

Thanks in advance,

Stefan
___

Stefan Aigner . adesso AG . Ehrenbergstrasse 20 . 10245 Berlin

tel.:  +49-30-7262033-42     mobil:  +49-178-2808102
fax:  +49-30-7262033-99     email:  [EMAIL PROTECTED]

                    
          http://www.adesso.de
___

Re: Axis 1.3 installation issues on Fedora Core 4

2005-11-22 Thread Davanum Srinivas
I love Good news, Bad news posts :)

Please log a bug with stack traces if any.

thanks,
dims

On 11/22/05, Paul Michael Reilly <[EMAIL PROTECTED]> wrote:
> I have installed Axis 1.3 on FC4 using the gcj compiled components
> (jvm, tomcat5) and mostly everything works.  There are two issues that
> I'd like to resolve just because ...
>
> The first is that happyaxis reports a warning about not being able to
> find the org.apache.xml.security.Init class.  I grabbed xmlsec (1.3)
> from the Apache XML web site and put it into the tomcat5
> webapps/axis/lib directory and restarted tomcat. catalina.out then
> reports SEVERE errors.  Since this is not a critical issue I moved
> xmlsec.jar out of the picture and continued but it would be nice to
> know if there is an easy fix.
>
> The second issue is that a compiler is not being found.  On the
> http://localhost:8080/axis page is a link to EchoHeaders.jws (WSDL).
> I clicked on this link to get an Axis error page that reports no
> compiler is found on the classpath.  I tried adding a link to
> /usr/lib/jvm/java/lib/tools.jar into the tomcat5/common/lib dir but
> this did not solve the problem.
>
> Suggestions?
>
> Thanks,
>
> -pmr
>
>


--
Davanum Srinivas : http://wso2.com/blogs/


problem in developing .NET proxy for Axis web services

2005-11-22 Thread MUHAMMAD IQBAL

Hi Guys,

I am having a problem regaring interoperablility, when i try to build a .NET 
proxy for my Axis web service it raises an error on Dom Element, i have a 
doc/lit style web service that accepts Dom Element as a parameter and 
returns Dom Element, but .NET generates an error when building proxy.


can any one help me to fix this issue?

Thanks in advance.

Regards,

Muhammad Iqbal




Axis 1.3 installation issues on Fedora Core 4

2005-11-22 Thread Paul Michael Reilly
I have installed Axis 1.3 on FC4 using the gcj compiled components
(jvm, tomcat5) and mostly everything works.  There are two issues that
I'd like to resolve just because ...

The first is that happyaxis reports a warning about not being able to
find the org.apache.xml.security.Init class.  I grabbed xmlsec (1.3)
from the Apache XML web site and put it into the tomcat5
webapps/axis/lib directory and restarted tomcat. catalina.out then
reports SEVERE errors.  Since this is not a critical issue I moved
xmlsec.jar out of the picture and continued but it would be nice to
know if there is an easy fix.

The second issue is that a compiler is not being found.  On the
http://localhost:8080/axis page is a link to EchoHeaders.jws (WSDL).
I clicked on this link to get an Axis error page that reports no
compiler is found on the classpath.  I tried adding a link to
/usr/lib/jvm/java/lib/tools.jar into the tomcat5/common/lib dir but
this did not solve the problem.

Suggestions?

Thanks,

-pmr



Re: WSDL2Java and client SSL

2005-11-22 Thread Markus Reil

Hi Richard,

thanks for your reply.
I did not mention that we do not keep all our keys and certificates in 
the same key/truststore. Since we use a lot of SSL connections to 
different hosts we cannot set the stores globally via system properties.


In general we use HttpClient and create the sockets accordingly. 
Unfortunately it seems that this is not possible in Axis with 
WSDL2Java-generated classes.


Regards,
Markus

Richard Gregory wrote:

Hi Markus,

Apologies if I'm not quite getting the crux of your problem - I'm new to 
all this and I've only recently tried using ssl, and at the moment I'm 
really just playing with it. I have no problems connecting over both 
http and https, even in the same client program.


In my client program I have defined the keyStore and trustStore by 
setting properties:


System.setProperty("javax.net.ssl.trustStore", 
"/home/richard/clientKeystore");

System.setProperty("javax.net.ssl.trustStorePassword", "changeit");
System.setProperty("javax.net.ssl.keyStore", 
"/home/richard/clientKeystore");

System.setProperty("javax.net.ssl.keyStorePassword", "changeit");

I have one service locator (generated by wsdl2java) which has a http 
address (port 8080) for a service running on my local machine, and 
another which has a https (port 8443) addresss for the service. Within 
the same client program I can invoke the service by instantiating  both 
of these,  and  everything works as fine - I guess the properties above 
are just ignored when connecting over http.


BiorsMetaDataDocStyleServiceLocator service = new 
BiorsMetaDataDocStyleServiceLocator();
BiorsMetaDataDocStyleServiceLocator1 service1 = new 
BiorsMetaDataDocStyleServiceLocator1();


BiorsMetaDataPortType port = service.getBiorsMetaDataDocStyle();
BiorsMetaDataPortType port1 = service1.getBiorsMetaDataDocStyle();

Databanks banks = port.getDatabanks("ibi", "mips");
Databanks banks1 = port1.getDatabanks("ibi", "mips");

I haven't tried to also connect to another service requiring different 
keys, but if these were in the same client key/trustStore would this not 
also work?


I hope this helps - apologies if it doesn't.

Richard.

Markus Reil wrote:


Hi,

thanks for your answer, Tim.
I also thought reimplementing the Sender class would be a solution, 
but I hoped being able to avoid it.


As I already pointed out I am connecting to other WS from the same VM 
that do not require SSL authentication (everything is plain http). Can 
anyone please tell me how I can programmatically specify different 
client config wsdd files for different services?


Thank you.

Markus

Tim R J Langford wrote:


Hi Markus,

Did you manage to find a solution to your problem? I had to do 
something similar once with a test system to get it to accept non 
certified sites across ssl. I could not work out how to do do it 
correctly in Axis; so I ended up creating a custom HTTPSender and 
setting it up as my pivot in the handler chain of Axis. I extended 
the base HttpSender class from Axis, but a lot of variables and 
methods I wanted to overide were private, so unfortunately I ended up 
having to cut and paste most of the extending class into the new 
class and am not sure of the implications of this evne though 
everything seemed to work fine.


If you use this method then you can pretty much alter the HTTP 
mechanism as you see fit: for example allowing you to support gzip 
compression (I think originally axis did not support this from what I 
remember?). You can also use this class to overide the SocketFactory 
and get it to produce a non-certified sockets if you so desire. 
Infact this method maybe overidable... I cant remember. If not maybe 
it should be.


Anyway, I am sure there is a more maintainable way of doing this, but 
I was in a rush and it was a while ago. If you are in the same 
situation maybe a simialr approach will get you by for now?



Hope this helps until you find something more suitable,

Tim



Markus Reil wrote:


Hi,

I am currently trying to connect to a SOAP Web Service with Axis. I 
need to use a client certificate to authenticate myself.
I do not want to set the keystore/truststore files globally via 
system properties because I have other http traffic in the same 
virtual machine that uses different or no keys.


I know there are a lot threads out about Axis/SSL out there. But I 
already spent a couple of hours looking for a solution and did not 
find anything of great use. Can anyone help me with this?


E.g. is it possible to create a SocketFactory and pass it to the 
Axis Service or Remote instance?


Thanks.

Regards,
Markus





--
Markus Reil
Applikationsentwickler

MindMatics AG
Marcel-Breuer-Str. 18
D-80807 München

E-Mail: [EMAIL PROTECTED]
Tel.:   +49 89 322986-0
Fax:+49 89 322986-570
Web:www.mindmatics.de


Die Information in dieser E-Mail ist vertraulich und exklusiv für den
Adressatenkreis bestimmt. Unbefugte Empfäng

Re: Question about ?wsdl and array

2005-11-22 Thread Paul Barry
I don't have an answer to your question, but I have a question.  Why
does your definitions element have all of those elements?  When I do
?wsdl on my service, none of those elements exist.

http://ws.bci.bh.com";
xmlns:impl="http://ws.bci.bh.com"; xmlns:intf="http://ws.bci.bh.com";
xmlns:apachesoap="http://xml.apache.org/xml-soap";
xmlns:wsdlsoap="http://schemas.xmlsoap.org/wsdl/soap/";
xmlns:xsd="http://www.w3.org/2001/XMLSchema";
xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/"; name="WsAccountInfo"

On 11/22/05, Diego Rey M <[EMAIL PROTECTED]> wrote:
>  Hello: i can change the name of element of an array in a wsdl generate by
> ?wsdl   ???
>
>  a example:
>
>  my wsdl:
>
>  
>  http://ws.bci.bh.com";
> xmlns:impl="http://ws.bci.bh.com"; xmlns:intf="http://ws.bci.bh.com";
> xmlns:apachesoap="http://xml.apache.org/xml-soap";
> xmlns:wsdlsoap="http://schemas.xmlsoap.org/wsdl/soap/";
> xmlns:xsd="http://www.w3.org/2001/XMLSchema";
> xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/";
> name="WsAccountInfo">
>   
>http://www.w3.org/2001/XMLSchema";
> targetNamespace="http://ws.bci.bh.com"; elementFormDefault="qualified">
> 
> 
>  
>   
>   
>   
>  
> 
> 
>  
>   
>   
>   
>  
> 
> 
>  
>   
>   
>   
>  
> 
> 
>  
>maxOccurs="unbounded"/>
>  
> 
> 
>  
>   
>   
>   
>   
>   
>  
> 
> 
>
>   
>
> 
>
>
>
> 
>
> 
>
> element="impl:getAccountInfoReturn"/>
>
> 
>
> 
>
>
>
>message="impl:getAccountInfoRequest"/>
>
>message="impl:getAccountInfoResponse"/>
>
>
>
> 
>
> 
>
> transport="http://schemas.xmlsoap.org/soap/http"/>
>
>
>
>   
>
>   
>
>  
>
>   
>
>   
>
>  
>
>   
>
>
>
> 
>
> 
>
> binding="impl:WSAccountInfoSoapBinding">
>
>location="http://localhost:8080/WebServiceProject/services/WSAccountInfo"/>
>
>
>
> 
>
>  
>
>  the wsdl generated by ?wsdl
>
>  
>  http://ws.bci.bh.com";
> xmlns:apachesoap="http://xml.apache.org/xml-soap";
> xmlns:impl="http://ws.bci.bh.com"; xmlns:intf="http://ws.bci.bh.com";
> xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/";
> xmlns:wsdlsoap="http://schemas.xmlsoap.org/wsdl/soap/";
> xmlns:xsd="http://www.w3.org/2001/XMLSchema";>
>  
>   
> targetNamespace="http://ws.bci.bh.com";
> xmlns="http://www.w3.org/2001/XMLSchema";>
> 
> 
>  
>   
>   
>   
>  
> 
> 
>  
>   
>   
>   
>  
> 
> 
>  
>   
>   
>   
>  
> 
> 
>  
>type="impl:AlertInfo"/>
>  
> 
> 
>  
>   
>   
>   
>   
>   
>  
> 
> 
>
>   
>
> 
>
>
>
> 
>
> 
>
> name="getAccountInfoReturn"/>
>
> 
>
> 
>
>
>
>name="getAccountInfoRequest"/>
>
>message="impl:getAccountInfoResponse"
> name="getAccountInfoResponse"/>
>
>
>
> 
>
> 
>
> transport="http://schemas.xmlsoap.org/soap/http"/>
>
>
>
>   
>
>   
>
>  
>
>   
>
>   
>
>  
>
>   
>
>
>
> 
>
> 
>
> name="WSAccountInfo">
>
>location="http://192.168.100.65:8080/WebServiceProject/services/WSAccountInfo"/>
>
>
>
> 
>
>  
>
>  the problem is that soap response is send with the name of element
> "AlertInfo" like the first wsdl
>
>  example
>
>   xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/";
> xmlns:xsd="http://www.w3.org/2001/XMLSchema";
> xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance";>
>
>  http://ws.bci.bh.com";>
>
>  true
>  nombre costumer
>  number
>
>
>  identification
>  email
>  nombre manager
>
>
> like the first xml and not wsdl generate by ?wsdl
> (the name should be "item")
>codigo
>2005-11-22T15:08:49.671Z
>Alera
>  
>  
>codigo2
>2005-11-22T15:08:49.671Z
>Alerta2
>  
>
>number
>URL
>  
>
>  
>
>  it posible change de name in a element generate by ?wsdl
>
>  thank
>
>
>


Question about ?wsdl and array

2005-11-22 Thread Diego Rey M






Hello: i can change the name of element of an array in a wsdl generate
by ?wsdl   ???

a example:

my wsdl:



"http://ws.bci.bh.com"
xmlns:impl="http://ws.bci.bh.com"
xmlns:intf="http://ws.bci.bh.com"
xmlns:apachesoap="http://xml.apache.org/xml-soap"
xmlns:wsdlsoap="http://schemas.xmlsoap.org/wsdl/soap/"
xmlns:xsd="http://www.w3.org/2001/XMLSchema"
xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/"
name="WsAccountInfo">

 

  "http://www.w3.org/2001/XMLSchema"
targetNamespace="http://ws.bci.bh.com"
elementFormDefault="qualified">

   

   

    

 

 

 

    

   

   

    

 

 

 

    

   

   

    

 

 

 

    

   

   

    

 

    

   

   

    

 

 

 

 

 

    

   

   

  

 

 
   

 
  

 
   

 
   

 
  

 
   

 
   

 
  

 
 

 
 

 
  

 
   

 
   

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

 
  

 
 

 
 

 
    

 
 

 
 

 
    

 
 

 
  

 
   

 
   

 
  

 
 "http://localhost:8080/WebServiceProject/services/WSAccountInfo"/>

 
  

 
   

 



the wsdl generated by ?wsdl



"http://ws.bci.bh.com"
xmlns:apachesoap="http://xml.apache.org/xml-soap"
xmlns:impl="http://ws.bci.bh.com"
xmlns:intf="http://ws.bci.bh.com"
xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/"
xmlns:wsdlsoap="http://schemas.xmlsoap.org/wsdl/soap/"
xmlns:xsd="http://www.w3.org/2001/XMLSchema">



 

  "http://ws.bci.bh.com"
xmlns="http://www.w3.org/2001/XMLSchema">

   

   

    

 

 

 

    

   

   

    

 

 

 

    

   

   

    

 

 

 

    

   

   

    

 

    

   

   

    

 

 

 

 

 

    

   

   

  

 


   


  


   


   


  


   


   


  


 


 


  


   


   


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


  


 


 


    


 


 


    


 


  


   


   


  


 "http://192.168.100.65:8080/WebServiceProject/services/WSAccountInfo"/>


  


   




the problem is that soap response is send with the name of element
"AlertInfo" like the first wsdl

example

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

  

    "http://ws.bci.bh.com">

  

    true

    nombre costumer

    number

  

  

    identification

    email

    nombre manager

  

  

       like the first xml
and not wsdl generate by ?wsdl (the name should be "item")
  codigo

  2005-11-22T15:08:49.671Z

  Alera

    

    
  codigo2

  2005-11-22T15:08:49.671Z

  Alerta2

    
  

  number

  URL

    

  



it posible change de name in a element generate by ?wsdl

thank






Re: Web service gateway

2005-11-22 Thread Nicolas De Loof


Thanks for the link.

I hope the incubation status will not be a limitation to opensource 
usage on my project...


Davanum Srinivas a écrit :


Check out the Apache Synapse project.

-- dims

On 11/22/05, Nicolas De Loof <[EMAIL PROTECTED]> wrote:
 


Hello,

I've a requirement to build a web-service-gateway : a proxy that will
expose my internal web services to partners over internet. The gateway
will handle security checks and usage statistics.

My goal is not to implement a web service, but just to redirect or
translate a SOAP request, based on a configuration (a new internal
service may be made accessible through the gateway only by declaring a
new WSDL in configuration).

I've not found any opensource web-service or soap gateway project. Is
there a apache web service project that can help me for this ?

Is there a better name than "WS Gateway" for such a software ?

This message contains information that may be privileged or confidential and is 
the property of the Capgemini Group. It is intended only for the person to whom 
it is addressed. If you are not the intended recipient,  you are not authorized 
to read, print, retain, copy, disseminate,  distribute, or use this message or 
any part thereof. If you receive this  message in error, please notify the 
sender immediately and delete all  copies of this message.


   




--
Davanum Srinivas : http://wso2.com/blogs/

 



This message contains information that may be privileged or confidential and is 
the property of the Capgemini Group. It is intended only for the person to whom 
it is addressed. If you are not the intended recipient,  you are not authorized 
to read, print, retain, copy, disseminate,  distribute, or use this message or 
any part thereof. If you receive this  message in error, please notify the 
sender immediately and delete all  copies of this message.



Re: Web service gateway

2005-11-22 Thread Davanum Srinivas
Check out the Apache Synapse project.

-- dims

On 11/22/05, Nicolas De Loof <[EMAIL PROTECTED]> wrote:
>
> Hello,
>
> I've a requirement to build a web-service-gateway : a proxy that will
> expose my internal web services to partners over internet. The gateway
> will handle security checks and usage statistics.
>
> My goal is not to implement a web service, but just to redirect or
> translate a SOAP request, based on a configuration (a new internal
> service may be made accessible through the gateway only by declaring a
> new WSDL in configuration).
>
> I've not found any opensource web-service or soap gateway project. Is
> there a apache web service project that can help me for this ?
>
> Is there a better name than "WS Gateway" for such a software ?
>
> This message contains information that may be privileged or confidential and 
> is the property of the Capgemini Group. It is intended only for the person to 
> whom it is addressed. If you are not the intended recipient,  you are not 
> authorized to read, print, retain, copy, disseminate,  distribute, or use 
> this message or any part thereof. If you receive this  message in error, 
> please notify the sender immediately and delete all  copies of this message.
>
>


--
Davanum Srinivas : http://wso2.com/blogs/


Web service gateway

2005-11-22 Thread Nicolas De Loof


Hello,

I've a requirement to build a web-service-gateway : a proxy that will 
expose my internal web services to partners over internet. The gateway 
will handle security checks and usage statistics.


My goal is not to implement a web service, but just to redirect or 
translate a SOAP request, based on a configuration (a new internal 
service may be made accessible through the gateway only by declaring a 
new WSDL in configuration).


I've not found any opensource web-service or soap gateway project. Is 
there a apache web service project that can help me for this ?


Is there a better name than "WS Gateway" for such a software ?

This message contains information that may be privileged or confidential and is 
the property of the Capgemini Group. It is intended only for the person to whom 
it is addressed. If you are not the intended recipient,  you are not authorized 
to read, print, retain, copy, disseminate,  distribute, or use this message or 
any part thereof. If you receive this  message in error, please notify the 
sender immediately and delete all  copies of this message.



Re: WSDL2Java and client SSL

2005-11-22 Thread Richard Gregory

Hi Markus,

Apologies if I'm not quite getting the crux of your problem - I'm new to 
all this and I've only recently tried using ssl, and at the moment I'm 
really just playing with it. I have no problems connecting over both 
http and https, even in the same client program.


In my client program I have defined the keyStore and trustStore by 
setting properties:


System.setProperty("javax.net.ssl.trustStore", 
"/home/richard/clientKeystore");

System.setProperty("javax.net.ssl.trustStorePassword", "changeit");
System.setProperty("javax.net.ssl.keyStore", 
"/home/richard/clientKeystore");

System.setProperty("javax.net.ssl.keyStorePassword", "changeit");

I have one service locator (generated by wsdl2java) which has a http 
address (port 8080) for a service running on my local machine, and 
another which has a https (port 8443) addresss for the service. Within 
the same client program I can invoke the service by instantiating  both 
of these,  and  everything works as fine - I guess the properties above 
are just ignored when connecting over http.


BiorsMetaDataDocStyleServiceLocator service = new 
BiorsMetaDataDocStyleServiceLocator();
BiorsMetaDataDocStyleServiceLocator1 service1 = new 
BiorsMetaDataDocStyleServiceLocator1();


BiorsMetaDataPortType port = service.getBiorsMetaDataDocStyle();
BiorsMetaDataPortType port1 = service1.getBiorsMetaDataDocStyle();

Databanks banks = port.getDatabanks("ibi", "mips");
Databanks banks1 = port1.getDatabanks("ibi", "mips");

I haven't tried to also connect to another service requiring different 
keys, but if these were in the same client key/trustStore would this not 
also work?


I hope this helps - apologies if it doesn't.

Richard.

Markus Reil wrote:


Hi,

thanks for your answer, Tim.
I also thought reimplementing the Sender class would be a solution, 
but I hoped being able to avoid it.


As I already pointed out I am connecting to other WS from the same VM 
that do not require SSL authentication (everything is plain http). Can 
anyone please tell me how I can programmatically specify different 
client config wsdd files for different services?


Thank you.

Markus

Tim R J Langford wrote:


Hi Markus,

Did you manage to find a solution to your problem? I had to do 
something similar once with a test system to get it to accept non 
certified sites across ssl. I could not work out how to do do it 
correctly in Axis; so I ended up creating a custom HTTPSender and 
setting it up as my pivot in the handler chain of Axis. I extended 
the base HttpSender class from Axis, but a lot of variables and 
methods I wanted to overide were private, so unfortunately I ended up 
having to cut and paste most of the extending class into the new 
class and am not sure of the implications of this evne though 
everything seemed to work fine.


If you use this method then you can pretty much alter the HTTP 
mechanism as you see fit: for example allowing you to support gzip 
compression (I think originally axis did not support this from what I 
remember?). You can also use this class to overide the SocketFactory 
and get it to produce a non-certified sockets if you so desire. 
Infact this method maybe overidable... I cant remember. If not maybe 
it should be.


Anyway, I am sure there is a more maintainable way of doing this, but 
I was in a rush and it was a while ago. If you are in the same 
situation maybe a simialr approach will get you by for now?



Hope this helps until you find something more suitable,

Tim



Markus Reil wrote:


Hi,

I am currently trying to connect to a SOAP Web Service with Axis. I 
need to use a client certificate to authenticate myself.
I do not want to set the keystore/truststore files globally via 
system properties because I have other http traffic in the same 
virtual machine that uses different or no keys.


I know there are a lot threads out about Axis/SSL out there. But I 
already spent a couple of hours looking for a solution and did not 
find anything of great use. Can anyone help me with this?


E.g. is it possible to create a SocketFactory and pass it to the 
Axis Service or Remote instance?


Thanks.

Regards,
Markus







FW: [Axis2] Deployment packaging

2005-11-22 Thread Tony Dean
 Forwarding to axis-user listserve.

-Original Message-
From: Tony Dean [mailto:[EMAIL PROTECTED] 
Sent: Tuesday, November 22, 2005 8:16 AM
To: axis-dev@ws.apache.org
Subject: [Axis2] Deployment packaging

What is the Axis2 best practice for packaging a complex web service application 
that spans multiple jars?  Essentially, to create an Axis2 web service 
endpoint, you must create a single jar with the following contents:
meta-inf/services.xml
meta-inf/services.wsdl
MyWebServicePortTypeSkeleton.class

My concern is making other dependent jars available on the classpath and doing 
so without affecting other applications.

Thanks.

Tony Dean
SAS Institute Inc.
919.531.6704
[EMAIL PROTECTED]

SAS... The Power to Know
http://www.sas.com



Re: WSDL2Java and client SSL

2005-11-22 Thread Markus Reil

Hi,

thanks for your answer, Tim.
I also thought reimplementing the Sender class would be a solution, but 
I hoped being able to avoid it.


As I already pointed out I am connecting to other WS from the same VM 
that do not require SSL authentication (everything is plain http). Can 
anyone please tell me how I can programmatically specify different 
client config wsdd files for different services?


Thank you.

Markus

Tim R J Langford wrote:

Hi Markus,

Did you manage to find a solution to your problem? I had to do something 
similar once with a test system to get it to accept non certified sites 
across ssl. I could not work out how to do do it correctly in Axis; so I 
ended up creating a custom HTTPSender and setting it up as my pivot in 
the handler chain of Axis. I extended the base HttpSender class from 
Axis, but a lot of variables and methods I wanted to overide were 
private, so unfortunately I ended up having to cut and paste most of the 
extending class into the new class and am not sure of the implications 
of this evne though everything seemed to work fine.


If you use this method then you can pretty much alter the HTTP mechanism 
as you see fit: for example allowing you to support gzip compression (I 
think originally axis did not support this from what I remember?). You 
can also use this class to overide the SocketFactory and get it to 
produce a non-certified sockets if you so desire. Infact this method 
maybe overidable... I cant remember. If not maybe it should be.


Anyway, I am sure there is a more maintainable way of doing this, but I 
was in a rush and it was a while ago. If you are in the same situation 
maybe a simialr approach will get you by for now?



Hope this helps until you find something more suitable,

Tim



Markus Reil wrote:


Hi,

I am currently trying to connect to a SOAP Web Service with Axis. I 
need to use a client certificate to authenticate myself.
I do not want to set the keystore/truststore files globally via system 
properties because I have other http traffic in the same virtual 
machine that uses different or no keys.


I know there are a lot threads out about Axis/SSL out there. But I 
already spent a couple of hours looking for a solution and did not 
find anything of great use. Can anyone help me with this?


E.g. is it possible to create a SocketFactory and pass it to the Axis 
Service or Remote instance?


Thanks.

Regards,
Markus



--
Markus Reil
Applikationsentwickler

MindMatics AG
Marcel-Breuer-Str. 18
D-80807 München

E-Mail: [EMAIL PROTECTED]
Tel.:   +49 89 322986-0
Fax:+49 89 322986-570
Web:www.mindmatics.de


Die Information in dieser E-Mail ist vertraulich und exklusiv für den
Adressatenkreis bestimmt. Unbefugte Empfänger haben kein Recht, vom
Inhalt Kenntnis zu nehmen, fehlgeleitete E-Mails sind sofort zu löschen.
Bitte informieren Sie hierüber unverzüglich die MindMatics AG.
Weiterleiten oder Kopieren, darf auch auszugsweise nur mit
ausdrücklicher, schriftlicher Einwilligung der MindMatics AG erfolgen.
In jedem Fall ist sicherzustellen, dass keinerlei inhaltliche
Veränderungen erfolgen. Die MindMatics AG ist von der Richtigkeit des
Inhalts und der Übertragung dieser E-Mail überzeugt. Eine Haftung dafür
ist jedoch ausgeschlossen.

This is a confidential communication intended only for the named
addresses. If you receive this communication in error, please notify us
and return and delete it without reading it. This e-mail may not be
disclosed, copied or distributed in any form without the obtained
permission in writing of MindMatics AG. In any case it may not be
altered or otherwise changed. Whilst MindMatics AG believes that the
information is correct at the date of the e-mail, no warranty and
representation is given to this effect and MindMatics AG can accept no
responsibility.



Re: WSDL2Java and client SSL

2005-11-22 Thread Tim R J Langford

Hi Markus,

Did you manage to find a solution to your problem? I had to do something 
similar once with a test system to get it to accept non certified sites 
across ssl. I could not work out how to do do it correctly in Axis; so I 
ended up creating a custom HTTPSender and setting it up as my pivot in 
the handler chain of Axis. I extended the base HttpSender class from 
Axis, but a lot of variables and methods I wanted to overide were 
private, so unfortunately I ended up having to cut and paste most of the 
extending class into the new class and am not sure of the implications 
of this evne though everything seemed to work fine.


If you use this method then you can pretty much alter the HTTP mechanism 
as you see fit: for example allowing you to support gzip compression (I 
think originally axis did not support this from what I remember?). You 
can also use this class to overide the SocketFactory and get it to 
produce a non-certified sockets if you so desire. Infact this method 
maybe overidable... I cant remember. If not maybe it should be.


Anyway, I am sure there is a more maintainable way of doing this, but I 
was in a rush and it was a while ago. If you are in the same situation 
maybe a simialr approach will get you by for now?



Hope this helps until you find something more suitable,

Tim



Markus Reil wrote:


Hi,

I am currently trying to connect to a SOAP Web Service with Axis. I 
need to use a client certificate to authenticate myself.
I do not want to set the keystore/truststore files globally via system 
properties because I have other http traffic in the same virtual 
machine that uses different or no keys.


I know there are a lot threads out about Axis/SSL out there. But I 
already spent a couple of hours looking for a solution and did not 
find anything of great use. Can anyone help me with this?


E.g. is it possible to create a SocketFactory and pass it to the Axis 
Service or Remote instance?


Thanks.

Regards,
Markus





A question about java2WSDL Command

2005-11-22 Thread DAfodil Prashant

  
Hi,

Can someone help me resolve my problem.

When I try to generate wsdl from my java class using java2WSDL command I get a message and the wsdl generated is not complete.

The command that I executed was:-
java org.apache.axis.wsdl.Java2WSDL -o mywsdl.wsdl  -l"http://localhost:9081/myproj/services/MYServices"  -n  "http://service.mypackage.com" -p"com.mypackage.service" "http://service.mypackage.com"  com.mypackage.service.MyOperations

On the console I get the following message:-
- The class com.mypackage.MyClass does not contain a d
efault constructor, which is a requirement for a bean class.  The class cannot b
e converted into an xml schema type.  An xml schema anyType will be used to defi
ne this class in the wsdl file.

The class MyClass.java is actually an interface and extends serializability. I am not sure if this command be used for generating wsdl.  

Can some one help me to generate the wsdl from the class MYClass.java which is actually an interface.

BTW, I use axis 1.1.

Thanks in Advance !!
Dafodil..





Good example to get going with Axis - adding SOAP to your app

2005-11-22 Thread Rakesh Patel

Hi,

I have to let everyone know, especially those new to Axis, about this blog:

http://cephas.net/blog/soap/index.html

He provides a sample app that has all the hooks to create an app with an 
embedded Axis infrastructure. I found the docs with Axis quite poor on 
this front and being able to download a sample like this one really helps.


Thanks Aaron,

Rakesh


Re: ClassCastException in axis2_09

2005-11-22 Thread Thilina Gunarathne
Here's the error...
>>resultfloat.serializeWithCache((OMOutput) XMLOutputFactory.newInstance().createXMLStreamWriter(writer1));
 
createXMLStreamWriter returns a XMLStreamWriter... You cannot cast it to am OMOutput. You can construct an OMOutput giving a XMLStreamWriter instance. 
 
BTW lot of things have changed since .9. Even the OMOutput is renamed to OMOutputImpl..
 
~Thilina 
On 11/22/05, thilina madu <[EMAIL PROTECTED]> wrote:





Hi all, I am accessing a web service by using axis2_0.9 version.That give bellow mention error while accessing the that.(when I check it out by using TCPMON that returned same soapmessage.The error is pointed to serializattion)

any kind of comment is highly appreciated
 
kind regards,madushan thilina.
 
//errorjava.lang.ClassCastException at Test.main(Test.java:88) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java
:39) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) at java.lang.reflect.Method.invoke(Method.java:324) at com.intellij.rt.execution.application.AppMain.main(AppMain.java
:78)Exception in thread "main" Process finished with exit code 1
 
 
//method where define the getEchoFloat()
  public class InteropTestClass {
 
    private OMElement CreatOMObject(String elementName){      OMFactory fac = OMAbstractFactory.getOMFactory();   OMNamespace omNs = fac.createOMNamespace("
http://example1.org/example1", "exam");       OMElement value  = fac.createOMElement(elementName, omNs);  return value;  }
 
 //1.method for eachoing the float public OMElement getEchoFloat(String nameSpace,String schema,String elementName,   EndpointReference targetEPR ) throws AxisFault {

    OMElement value=CreatOMObject("float");    BufferedReader br = new BufferedReader(new InputStreamReader(
System.in));    String text = "";    try {    text = br.readLine(); } catch (IOException e) {    
e.printStackTrace(); } 
    value.setText(text);
    OMElement payload = value;
    Call call = new  Call();    call.setTo(targetEPR);    call.setTransportInfo(Constants.TRANSPORT_HTTP, Constants.TRANSPORT_HTTP, false);    OMElement result= 
call.invokeBlocking("echoFloat",payload);
    return result;
 }
}
 
 
 
//main method for accessing     public static void main(String args[]) throws IOException, XMLStreamException {
 EndpointReference targetEPR = new EndpointReference(AddressingConstants.WSA_TO,  "
http://127.0.0.1:8080/axis2/services/InteropTest/echoFloat");
  
 InteropTestClass objInterop=new InteropTestClass();
 //1.Echoing the float value System.out.println("Enter the value");
 OMElement resultfloat = objInterop.getEchoFloat("http://example1.org/example1","exam
", "Float",targetEPR);
 System.out.println("Display the result");
 StringWriter writer1 = new StringWriter(); resultfloat.serializeWithCache((OMOutput) XMLOutputFactory.newInstance().createXMLStreamWriter(writer1)); writer1.flush();

 System.out.println();   &a mp;n bsp; System.out.println(resultfloat.getText());     } 



Yahoo! FareChase - Search multiple travel sites in one click.  




Yahoo! FareChase - Search multiple travel sites in one click. 
-- "May the SourcE be with u"http://webservices.apache.org/~thilina/
http://thilinag.blogspot.com/ http://www.bloglines.com/blog/Thilina   


ClassCastException in axis2_09

2005-11-22 Thread thilina madu
  Hi all, I am accessing a web service by using axis2_0.9 version.That give bellow mention error while accessing the that.(when I check it out by using TCPMON that returned same soapmessage.The error is pointed to serializattion)  any kind of comment is highly appreciated     kind regards,madushan thilina.     //errorjava.lang.ClassCastException at Test.main(Test.java:88) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) at java.lang.reflect.Method.invoke(Method.java:324) at
 com.intellij.rt.execution.application.AppMain.main(AppMain.java:78)Exception in thread "main" Process finished with exit code 1        //method where define the getEchoFloat()    public class InteropTestClass {         private OMElement CreatOMObject(String elementName){      OMFactory fac = OMAbstractFactory.getOMFactory();   OMNamespace omNs = fac.createOMNamespace("http://example1.org/example1", "exam");       OMElement value  = fac.createOMElement(elementName,
 omNs);  return value;  }      //1.method for eachoing the float public OMElement getEchoFloat(String nameSpace,String schema,String elementName,   EndpointReference targetEPR ) throws AxisFault {      OMElement value=CreatOMObject("float");    BufferedReader br = new BufferedReader(new
 InputStreamReader(System.in));    String text = "";    try {    text = br.readLine(); } catch (IOException e) {    e.printStackTrace(); }
   
     value.setText(text);      OMElement payload = value;      Call call = new  Call();    call.setTo(targetEPR);    call.setTransportInfo(Constants.TRANSPORT_HTTP, Constants.TRANSPORT_HTTP, false);    OMElement result= call.invokeBlocking("echoFloat",payload); 
     return result;   }  }           //main method for accessing     public static void main(String args[]) throws IOException, XMLStreamException {   EndpointReference targetEPR = new EndpointReference(AddressingConstants.WSA_TO,  "http://127.0.0.1:8080/axis2/services/InteropTest/echoFloat");       InteropTestClass objInterop=new InteropTestClass();   //1.Echoing 
 the
 float value System.out.println("Enter the value");   OMElement resultfloat = objInterop.getEchoFloat("http://example1.org/example1","exam", "Float",targetEPR);   System.out.println("Display the result");   StringWriter writer1 = new StringWriter(); resultfloat.serializeWithCache((OMOutput) XMLOutputFactory.newInstance().createXMLStreamWriter(writer1)); writer1.flush();   System.out.println();   &a
 mp;n
 bsp; System.out.println(resultfloat.getText());     }  Yahoo! FareChase - Search multiple travel sites in one click. 
		 Yahoo! FareChase - Search multiple travel sites in one click.