Re: Unable to initialize context error with EJB on IPlanet (iAS 6.0)

2002-11-14 Thread Raghavan Srinivasan
one way would be to tweak 
org/apache/soap/providers/StatelessEJBProvider.java  to use the 
following mechanism to create the InitialContext  . iAS 6.0 supports the 
"no args" mechanism of creating the IntitialContext inside the container .

try
{
 /// current mechanism
 javax.naming.InitialContext context = new 
javax.naming.InitialContext(props) ;
}
catch (NameNotFoundException e)
{
   context = new javax.naming.InitialContext() ; // no args .
}

-Raghavan


Fergus O'Dalaigh wrote:

Hi, I've deployed normal Java classes as services on the SOAP web app, but I really need to use EJB's as services.

I'm using iAS 6.0 (iPlanet Application Server) and SOAP 2.3.1.

I get a "Unable to initialize context" error when I run my SOAP client.
Here is my SOAP deployment descriptor:


http://xml.apache.org/xml-soap/deployment";
   id="urn:ejbhello">

  scope="Application"
  methods="create">
  
  
  value="samples.helloworld.ejb.GreeterHome" />
  
  
  value="com.sun.jndi.cosnaming.CNCtxFactory"/>

org.apache.soap.server.DOMFaultListener



I think the problem lies with value of ContextProviderURL, since I couldn't track down the actual naming provider URL to use with IPlanet.

The EJB is deployed and working on the server.
I also copied the EJB jar file /APPS/modules/soap/WEB-INF/lib

Has anyone out there managed to do this?

Fergus, Barcelona Spain.



__
The NEW Netscape 7.0 browser is now available. Upgrade now! http://channels.netscape.com/ns/browsers/download.jsp 

Get your own FREE, personal Netscape Mail account today at http://webmail.netscape.com/

--
To unsubscribe, e-mail:   
For additional commands, e-mail: 

 




--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




Re: do an Apache SOAP 2.3 release ?

2002-04-26 Thread Raghavan Srinivasan

Hi Sanjiva ,
   This makes a lot of sense to me . For folks that have been 
using / certifying their applications with  the 2.2 release(and have not 
yet adopted Axis)  , handling bugs / features introduced in future 
builds means having to go through cvs and figure out exactly which files 
changed and patch them in . 
e.g i am still trying to locate all the files changed  to support the 
switching the Current Schema version to 2001 .
Simply changing Constants.java does not solve the problem completely .

This is ugly and when customers are involved , there is the greater risk 
that if they make their own
 changes in the 2.2 install to support their own app specific changes  , 
they might overwrite the changes shipped out to them .

Having a 2.3 release will bring in all such changes  over the last year 
into one version .

Thanks -
Raghavan



Sanjiva Weerawarana wrote:

>Hello,
>
>Its been quite a while since we released v2.2 of Apache SOAP. Since then
>about 50 bugs have been fixed and there are about another 50 remaining
>in the queue (most of them are non-bugs or trivial but some a big). 
>
>I'm interested in doing a v2.3 to try to capture all the fixes that
>have been done since 2.2 into a labeled version. Originally it was
>intended that v2.2 would be the last as Axis was spsed to take over,
>but Axis is now running more than an year late!! However, it looks
>like Axis is finally getting nearer to 1.0 status and so putting out
>Apache SOAP v2.3 would really allow us to say that's the final verdict
>for this codebase.
>
>I'm willing to serve as release manager and will write up a release 
>plan. The purpose of this note is to gauge interest on this effort.
>
>Thanks!
>
>Sanjiva.
>





Re: xsi type, NS_URI_CURRENT_SCHEMA_XSD

2002-02-05 Thread Raghavan Srinivasan

Hi Oliver ,
 This  is not the answer to your question , but is a related 
change . I think you need to also change the QName array in 
Constants.java that contains schema mappings for various versions . 
QName schema2001QNames [] incorrectly uses timeInst2001QName 
(xsd:timeInstant) when it should be using dateTime .
Someone correctly me if i am wrong , but i saw this fix in a later 
release (later than 2.2) of  Constants.java  (Rev 1.21 and Rev 1.22) .

I saw this cause problems with some WSDL based clients(XSD 2001 
compliant)  who do  not know how to interpret a Soap message that 
contain xsd:timeInstant .

Also if someone has a comprehensive list of changes required to switch 
the Schema version on an install to 2001 , please post the list of 
changes here .

Thanks in advance ,
Raghavan


Oliver Wulff wrote:

>Hi
>
>I need to communicate with the XMLBus from IONA. So, it's necessary to use
>the XML Schema 2001. But the soap package use by default 1999. I've read in
>the documentation guide\interop.html, that I can download the source code
>and change the Constants.java:
>  public static final String NS_URI_CURRENT_SCHEMA_XSI =
>NS_URI_2001_SCHEMA_XSI;
>  public static final String NS_URI_CURRENT_SCHEMA_XSD =
>NS_URI_2001_SCHEMA_XSD;
>
>But still, the old Schema will be used.
>
>Then, I searched through the source code and found the following in
>SOAPMappingRegistry.java:
>  public String schemaURI = Constants.NS_URI_1999_SCHEMA_XSD;
>  QName [] schemaQNames = schema1999QNames;
>
>If it is hard coded, it will not work. After the following change, it
>worked:
>  public String schemaURI = Constants.NS_URI_CURRENT_SCHEMA_XSD;
>  QName [] schemaQNames = null;
>
>The only problem is, that there is still an attribute definition in the
>Envelope element in the soap request message:
>  
>  ="http://schemas.xmlsoap.org/soap/envelope/"; xmlns:xsi
>="http://www.w3.org/1999/XMLSchema-instance";xmlns:xsd
>="http://www.w3.org/1999/XMLSchema";>
>  
>  http://soapinterop.org/";
>SOAP-ENV:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/";>
>  http://www.w3.org/2001/XMLSchema"; xsi:type
>="ns2:float">333.444
>  
>  
>  
>
>
>Did anybody have the same problem and found a better solution? Can I force
>that the Schema 2001 will be used in the whole SOAP message?
>Thanks
>
>Oliver
>
>
>
>
>
>
>
>
>*** BITTE BEACHTEN ***
>Diese Nachricht (wie auch allfällige Anhänge dazu) beinhaltet
>möglicherweise vertrauliche oder gesetzlich geschützte Daten oder
>Informationen. Zum Empfang derselben ist (sind) ausschliesslich die
>genannte(n) Person(en) bestimmt. Falls Sie diese Nachricht
>irrtümlicherweise erreicht hat, sind Sie höflich gebeten, diese unter
>Ausschluss jeder Reproduktion zu zerstören und die absendende Person
>umgehend zu benachrichtigen. Vielen Dank für Ihre Hilfe.
>





Apache Soap in verbose mode ?

2002-01-29 Thread Raghavan Srinivasan

Is this possible?  Can i have the System.outs in the code be dumped out 
on the console by setting a flag somewhere ?

-Raghavan




Re: WSDL?

2002-01-29 Thread Raghavan Srinivasan



sorry the URL should have read www.themindelectric.com


Raghavan Srinivasan wrote:
[EMAIL PROTECTED]">   Gary Feldman
wrote:
  007201c1a90b$6de93920$[EMAIL PROTECTED]">

  From: Wallis, Simon (Toronto - 22 Front)Sent: Tuesday, January 29, 2002 4:10 PM
  
  
  
1) Is WSDL a Microsoft-only thing?

WSDL is a proposal that has been submitted to the W3C, but not yet adopted.While over two dozen companies signed the submission, Microsoft and IBM seemtobe the leading proponents.

  2) How does one generate these files?
  
  There are a variety of tools out there, from a variety of sources.  TheIBM Web Service Toolkit is an obvious starting place, but there are others.And, in case it isn't obvious, Microsoft Visual Studio .Net generates them.
  
   Glue from MindElectric (
www.mindelectric.com
) is a good Java WSDL compiler . Code generated
 by this toolkit works well with Apache Soap too . (wsdl based clients calling 
Apache Soap services) .
  
  
  
  
  


Re: WSDL?

2002-01-29 Thread Raghavan Srinivasan



Gary Feldman wrote:
007201c1a90b$6de93920$[EMAIL PROTECTED]">
  
From: Wallis, Simon (Toronto - 22 Front)Sent: Tuesday, January 29, 2002 4:10 PM



  1) Is WSDL a Microsoft-only thing?
  
  WSDL is a proposal that has been submitted to the W3C, but not yet adopted.While over two dozen companies signed the submission, Microsoft and IBM seemtobe the leading proponents.
  
2) How does one generate these files?

There are a variety of tools out there, from a variety of sources.  TheIBM Web Service Toolkit is an obvious starting place, but there are others.And, in case it isn't obvious, Microsoft Visual Studio .Net generates them.

  Glue from MindElectric (www.mindelectric.com) is a good Java WSDL compiler
. Code generated
by this toolkit works well with Apache Soap too . (wsdl based clients calling
Apache Soap services) .
007201c1a90b$6de93920$[EMAIL PROTECTED]">
  
  
  


xsd:timeInstant Problems ?

2002-01-18 Thread Raghavan Srinivasan


I am trying to use WSDL generated classes (using mind electric glue 2.0.1
) to call an Apache Soap service (2.2) .  I am returning a Java DateTime
variable using the following encoding
Date date = new Date() ;
 pLastModifiedDate = new Parameter("mLastModified" , Date.class
,
 
date , null );
xjmr.marshall( blah ) ;
Somehow Apache seems to be trying to serialize this using xsd:timeInstant
as i get back the following error...
Exception in thread "main" electric.util.WrappedException: SOAPException(
Server
: cannot find schema type for xsd:timeInstant )
 at electric.registry.Reference.invoke(Unknown Source)
 at electric.util.proxy.proxy1.Proxy.invokeObject(Unknown Source)
 at electric.util.proxy.DynProxy__ejb2_client_IPMSoapService__electric_util_IContextHolder.createProcessInstance(Unknown
Source)
t ejb2.client.GlueClientToApache.main(GlueClientToApache.java:30)
My WSDL used a standard xsd:dateTime type for the value . I looked
at the XSD 2001 spec @ www.w3.org/tr/schema-02
and this has no mention of timeInstant .
Is this a Schema versioning issue ? How do i get around this ?
 
Thanks -
Raghavan
 


Re: WSDL , Apache Soap question

2002-01-14 Thread Raghavan Srinivasan

Hi Greyson ,
  I am sure your approach would work well if the client were written in 
Java using the
Apache toolkit too .  have you had success generating code (especially holders for the 
types) with more
than 1 Java WSDL compiler e.g. idoox , glue , axis etc ?  How about compilers from 
non-Java languages
?
My problem is trying to get the lowest common denominator WSDL descriptor that will 
work well with
atleast 3-4 compilers (java and non java) . I am not sure whether that is a realistic 
goal given the
different levels of wsdl support that compilers have today .

My current experience with passing a wsdl file thru different compilers is that each 
one behaves quite
differently wrt handling of types .  Taking this specific examples ,
I dont see how a non java wsdl compiler would generate the correct data structure for
xsd:[Ljava.util.Hashtable$Entry] .

comments/ suggestions welcome .

Thanks -
Raghavan




[EMAIL PROTECTED] wrote:

> This is what is working for me...
>
> 
>  targetNamespace="http://www.lockerservice.com/Locker";
> xmlns="http://www.w3.org/1999/XMLSchema/";>
>name="Hashtable">
>  type="xsd:[Ljava.util.Hashtable$Entry;"/>
>  name="count" type="xsd:int"/>
>  name="threshold" type="xsd:int"/>
>  name="loadFactor" type="xsd:float"/>
>  name="modCount" type="xsd:int"/>
>  name="serialVersionUID" type="xsd:long"/>
>  name="keySet" type="xsd:java.util.Set"/>
>  name="entrySet" type="xsd:java.util.Set"/>
>  name="values"
>   type="xsd:java.util.Collection"/>
>  name="KEYS" type="xsd:int"/>
>  type="xsd:int"/>
>  type="xsd:int"/>
>  type="xsd:java.util.Hashtable$EmptyEnumerator"/>
>  name="emptyIterator"
> type="xsd:java.util.Hashtable$EmptyIterator"/>
> 
>   
> 
>
> In the declaration of the method:
> type="tns:Hashtable"
>
> In the deployment descriptor:
>
>   http://schemas.xmlsoap.org/soap/encoding/";
> xmlns:x="" qname="x:meth5_outType" javaType="java.util.Map"
> java2XMLClassName="org.apache.soap.encoding.soapenc.HashtableSerializer"
> xml2JavaClassName="org.apache.soap.encoding.soapenc.HashtableSerializer" />
>
>
> "Raghavan
> Srinivasan"  To: [EMAIL PROTECTED], 
>[EMAIL PROTECTED]
>  anet.com>Subject: WSDL , Apache Soap question
>
> 11-01-02
> 07:04 PM
> Please
> respond to
> soap-user
>
>
>
> I have a Apache Web service one of whose methods  takes in
> java.util.Hashtable as a parameter . I understand that the Apache
> Toolkit supports Hashtable encoding . But i want to write a WSDL
> interface to this service that toolkits from other languages could use
> to generate stubs .
>
> I could'nt find the right schema element to represent a structure
> similar to Map / Hashtable .
>
> I used the Idoox java2wsdl utility to see what the utility generates and
> it came up with ns0:Hashtable
> where ns0 = http://xml.apache.org/xml-soap .
>
> This is obviously Apache specific and I dont know how compilers from
> other languages will interpret it .
>
>  Has anyone else faced a similar issue ?
>
> Thanks -
> Raghavan
>
> --
>
> NOTICE:  The information contained in this electronic mail transmission is
> intended by Convergys Corporation for the use of the named individual or
> entity to which it is directed and may contain information that is
> privileged or otherwise confidential.  If you have received this electronic
> mail transmission in error, please delete it from your system without
> copying or forwarding it, and notify the sender of the error by reply email
> or by telephone (collect), so that the sender's address records can be
> corrected.




WSDL , Apache Soap question

2002-01-11 Thread Raghavan Srinivasan

I have a Apache Web service one of whose methods  takes in
java.util.Hashtable as a parameter . I understand that the Apache
Toolkit supports Hashtable encoding . But i want to write a WSDL
interface to this service that toolkits from other languages could use
to generate stubs .

I could'nt find the right schema element to represent a structure
similar to Map / Hashtable .

I used the Idoox java2wsdl utility to see what the utility generates and
it came up with ns0:Hashtable
where ns0 = http://xml.apache.org/xml-soap .

This is obviously Apache specific and I dont know how compilers from
other languages will interpret it .

 Has anyone else faced a similar issue ?

Thanks -
Raghavan





No Deserializer found ...Apache -> Apache

2002-01-07 Thread Raghavan Srinivasan

I know this one error has been seen by a lot of folks using the MSTK
with Apache . Has anyone seen this with an Apache client calling a
Apache service ?

I am trying to send across a complex type across a Soap call . I have
taken care to register the serializer-serializer combo with both the
service Deployment Descriptor as well as  the client code , taking care
to avoid typos .

I can even see the serializers being loaded and called in the right
sequence . I am tunneling my call thru the
org.apache.soap.util.net.TcpTunnelGui and can see the Soap invocation
being made , but the call never seems to make it on the other side
(server) .

I keep getting  this error

  Fault Code   = SOAP-ENV:Client
  Fault String = No Deserializer found to deserialize a
'urn:xml-soap-ipm:wfactivity' using encoding style
'http://schemas.xmlsoap.org/soap/encoding/'.
Exception in thread "main" java.lang.Exception:  SOAP Service Exception
:SOAP-E
V:Client:No Deserializer found to deserialize a
'urn:xml-soap-ipm:wfactivity' u
ing encoding style 'http://schemas.xmlsoap.org/soap/encoding/'.
at ejb2.client.PMMessageClient.send(PMMessageClient.java:147)
at ejb2.client.PMMessageClient.main(PMMessageClient.java:224)

 I tried using the following API call in my code to see if the mappings
are registered fine and it turns up OK too .

Deserializer deSer = smr.queryDeserializer (new
QName("urn:xml-soap-ipm" ,"wfactivity"),
"http://schemas.xmlsoap.org/soap/encoding/"; ) ;
if (deSer == null)
System.out.println ("NO DESERIALIZER FOUND FOR:" +
"urn:xml-soap-ipm:wfactivity" ) ;
else
System.out.println ("DESERIALIZER FOUND") ;

I cant figure whats happening . Any tips to debug this problem further /
any insights ?

Thanks -
Raghavan





writing serializers for complex objects

2001-12-16 Thread Raghavan Srinivasan

how would i write a serializer  for a complex object that looks
like..

class AddressHolder
{
 // this contains a list of Address objects
 HashMap addresses ;
 // .

}

class Address
{
 getName()  ;
 getZip() ;
 ...
}

Does AddressHolderSerializer() have to iterate thru all Addresses and
call xjmr.marshall(..)  on each Address ?

-Raghavan





Base Complex Type ?

2001-12-14 Thread Raghavan Srinivasan


I tried tweaking the address2 Serializers class and created a BaseSerializer
that dynamically loads up other serializers and deserializers based on
the type of the object /
name of the XML element as follows .
public class BaseSerializer
{
public void marshall    ()
{
    serHandlerType  = complexType
+ "Serializer" ;
    System.out.println ("BaseSerializer
Loading Serializer:" + serHandlerType) ;
    IPMSerializer serHandler
= (IPMSerializer)Class.forName(serHandlerType).newInstance() ;
    serHandler.serialize(inScopeEncStyle,
javaType, src, context , sink ,
   
nsStack, xjmr, ctx ) ;
}
  public Bean unmarshall(String inScopeEncStyle, QName elementType,
   
Node src, XMLJavaMappingRegistry xjmr, SOAPContext ctx)
 throws IllegalArgumentException
  {
    Class deSerHandlerType =
null ;
    IPMSerializer deSerHandler
= null ;
    Bean retVal = null ;
 
    try
    {
   
deSerHandlerType = xjmr.queryJavaType( elementType , inScopeEncStyle )
;
   
deSerHandler = (IPMSerializer)deSerHandlerType.newInstance() ;
 
   
retVal = deSerHandler.objectify(inScopeEncStyle , elementType, src,
xjmr , ctx ) ;
    }
 
 
The actual objects serializers extend the BaseSerializer and implement
the serialize() and objectify() methods
as follows
    public void serialize( String inScopeEncStyle,
Class javaType,
  
Object src, Object context, Writer sink,
  
NSStack nsStack, XMLJavaMappingRegistry xjmr, SOAPContext ctx )
   
throws Exception
    {
    // what am i deserializing
..
    try
    {
   
System.out.println ("Inside Address Serializer marshall ") ;
   
nsStack.pushScope();
    SoapEncUtils.generateStructureHeader(inScopeEncStyle,
javaType, context,
   
sink, nsStack, xjmr);
   // rest
of logic here  ..
   
..
    }
 
    // objectify
    public Bean objectify(String inScopeEncStyle, QName
elementType,
 
Node src, XMLJavaMappingRegistry xjmr, SOAPContext ctx)
   
throws Exception
    {
    samples.testbase.Address
target = null ;
 
    try
    {
   
Element root = (Element)src;
   
Element tempEl = DOMUtils.getFirstChildElement(root);
   
try
   
{
   
target =
   
(samples.testbase.Address)samples.testbase.Address.class.newInstance
   
();
   
}
 

// rest of logic here
   }
The XML deployment descriptor looks as follows..
http://xml.apache.org/xml-soap/deployment"

id="urn:AddressFetcher2">
     
scope="Session"
   
methods="getAddressFromName addEntry getAllListings putListings
>
    
  
  org.apache.soap.server.DOMFaultListener  
    http://schemas.xmlsoap.org/soap/encoding/"

xmlns:x="urn:xml-soap-address-demo" qname="x:address"

javaType="samples.testbase.BaseType"

java2XMLClassName="samples.testbase.BaseSerializer"

xml2JavaClassName="samples.testbase.BaseSerializer"/>
  

 
I also tweaked Address , Phone etc to extend samples.testbase.BaseType
, hoping that the same BaseSerializer would get called when either Phone
/ Address needed
to be marshalled / unmarshalled . Somehow Apache seems to be unable
to recognize this relationship and throws the followign exception .
Inside ABProxy.addEntry():Purdue Boilermaker
Exception in thread "main" [SOAPException: faultCode=SOAP-ENV:Client;
msg=No Ser
ializer found to serialize a 'samples.testbase.Address' using encoding
style 'ht
tp://schemas.xmlsoap.org/soap/encoding/'.; targetException=java.lang.IllegalArgumentException:
No Serializer found to serialize a 'samples.testbase.Address' usi
ng encoding style 'http://schemas.xmlsoap.org/soap/encoding/'.]
    at org.apache.soap.transport.http.SOAPHTTPConnection.send(SOAPHTTPConnec
tion.java:324)
    at org.apache.soap.rpc.Call.invoke(Call.java:205)
    at samples.testbase.AddressBookProxy.addEntry(AddressBookProxy.java:132)
    at samples.testbase.Main.doit(Main.java:91)
    at samples.testbase.Main.main(Main.java:133)
 
Has anyone tried something like this before and got it to work ?
Thanks -
Raghavan