Re: User defined object as a request, literal XML as aresponse. Poss ible?!

2001-06-18 Thread Naggi Rao

hi,
Let me know if you need help..
I have a method which accepts a Element(Object) and returns a Literal XML

Naggi


- Original Message -
From: Hecking, Dirck J [EMAIL PROTECTED]
To: [EMAIL PROTECTED]; [EMAIL PROTECTED]
Sent: Monday, June 18, 2001 1:33 PM
Subject: FW: User defined object as a request, literal XML as aresponse.
Poss ible?!


 Guys,

 Can someone please take a shot at my problem?

 -Dirck

 -Original Message-
 From: Hecking, Dirck J [mailto:[EMAIL PROTECTED]]
 Sent: Friday, June 15, 2001 11:13 AM
 To: '[EMAIL PROTECTED]'
 Subject: User defined object as a request, literal XML as a response.
 Poss ible?!


 Guys,

 Dirck here again. I have read several mails regarding this issue. I have
not
 seen one that illustrates my exact problem. The key here is that I want to
 recieve literal xml in my response but want to supply a user defined
object
 as the requesting parameter. This code actually executes the service fine
 and reads the arguements out of my object. The
 response gets lost though, even though I specified literal xml encoding as
 the default encoding for my document. My Apache Soap Service running on
 Weblogic 5.1 has the following characteristics:

 Note: The following code is a snippet.

 Server:
 public Element getResearch(ResearchArguments args)
 {
   DocumentBuilderFactory  dbf =
 DocumentBuilderFactory.newInstance();
   DocumentBuilder xdb = dbf.newDocumentBuilder ();
   Documentdoc = xdb.newDocument ();

Element researchElement = doc.createElement(Whatever);

  // Extracts fields from the ResearchArguments class and creates a
  dynamic
  // research elements based on the information.

  return researchElement;
  }

  Client:
  public Element sendRequest()
  {
url =   new URL(routerUrl);

  ResearchArguments   args= new
  ResearchArguments(data1,data2,data3);

SOAPMappingRegistry smr = new SOAPMappingRegistry();
BeanSerializer  beanSer = new BeanSerializer();

  smr.mapTypes(Constants.NS_URI_SOAP_ENC, new
  QName(urn:xml-soap-args-demo, args) , ResearchArguments.class,
 beanSer,
  beanSer);

call.setTargetObjectURI(urn: + service);
call.setMethodName(method);
call.setEncodingStyleURI(Constants.NS_URI_LITERAL_XML);

call.setSOAPMappingRegistry(smr);

params.addElement(new Parameter(args,
  ResearchArguments.class,
  args,
  Constants.NS_URI_SOAP_ENC));

  call.setParams(params);

  resp = call.invoke(url, );
  // A fault gets generated from the server after this line
  }

  Exception:
  Generated fault:
Fault Code   = SOAP-ENV:Server
Fault String = java.lang.IllegalArgumentException: No Serializer found
 to
  serialize a 'org.w3c.dom.Element' using encoding style
  'http://schemas.xmlsoap.org/soap/encoding/'.

  Deployment Descriptor:
  isd:service xmlns:isd=http://xml.apache.org/xml-soap/deployment;
   id=urn:HQService
  isd:provider type=java
scope=Application
methods=getResearch
  isd:java class=rs.ecommerce.service.providers.HQService
  static=false/
  /isd:provider



isd:faultListenerorg.apache.soap.server.DOMFaultListener/isd:faultListene
  r

  isd:mappings
  isd:map
  encodingStyle=http://schemas.xmlsoap.org/soap/encoding/;
   xmlns:x=urn:xml-soap-args-demo qname=x:args

  javaType=rs.ecommerce.service.xmlobjects.ResearchArguments

  java2XMLClassName=org.apache.soap.encoding.soapenc.BeanSerializer

  xml2JavaClassName=org.apache.soap.encoding.soapenc.BeanSerializer/
  /isd:mappings
  /isd:service



 --
--
 --
 DISCLAIMER

 Notice Regarding Entry of Orders and Instructions:

 Please do not transmit orders and/or instructions regarding your Robertson
 Stephens account(s) by e-mail. Orders and/or instructions transmitted by
 e-mail will not be accepted by Robertson Stephens, and Robertson Stephens
 will not be responsible for carrying out such orders and/or instructions.

 Notice Regarding Privacy and Confidentiality:

 Robertson Stephens reserves the right to monitor and review the content of
 all e-mail communications sent and/or received by its employees.


 --
--
 --

 --
--
 --
 DISCLAIMER

 Notice Regarding Entry of Orders and Instructions:

 Please do not transmit orders and/or instructions regarding your Robertson
 Stephens account(s) by e-mail. Orders and/or instructions transmitted by
 e-mail will not be accepted by Robertson Stephens, and Robertson Stephens
 will not be responsible for carrying out such orders and/or instructions.

 Notice Regarding Privacy and Confidentiality:

 Robertson Stephens reserves the right to monitor and review the content of
 all e-mail communications sent and/or 

Re: User defined object as a request, literal XML as aresponse. Poss ible?!

2001-06-18 Thread Naggi Rao

public Element getAllListings() in the addressBook example would give u more
insight


- Original Message -
From: Khamesra, SandeepX [EMAIL PROTECTED]
To: [EMAIL PROTECTED]; [EMAIL PROTECTED]
Sent: Monday, June 18, 2001 2:09 PM
Subject: RE: User defined object as a request, literal XML as aresponse.
Poss ible?!


 Does any one have any code which returns XML as return value

 -Original Message-
 From: Naggi Rao [mailto:[EMAIL PROTECTED]]
 Sent: Monday, June 18, 2001 2:01 PM
 To: [EMAIL PROTECTED]; [EMAIL PROTECTED]
 Subject: Re: User defined object as a request, literal XML as aresponse.
 Poss ible?!


 hi,
 Let me know if you need help..
 I have a method which accepts a Element(Object) and returns a Literal XML

 Naggi


 - Original Message -
 From: Hecking, Dirck J [EMAIL PROTECTED]
 To: [EMAIL PROTECTED]; [EMAIL PROTECTED]
 Sent: Monday, June 18, 2001 1:33 PM
 Subject: FW: User defined object as a request, literal XML as aresponse.
 Poss ible?!


  Guys,
 
  Can someone please take a shot at my problem?
 
  -Dirck
 
  -Original Message-
  From: Hecking, Dirck J [mailto:[EMAIL PROTECTED]]
  Sent: Friday, June 15, 2001 11:13 AM
  To: '[EMAIL PROTECTED]'
  Subject: User defined object as a request, literal XML as a response.
  Poss ible?!
 
 
  Guys,
 
  Dirck here again. I have read several mails regarding this issue. I have
 not
  seen one that illustrates my exact problem. The key here is that I want
to
  recieve literal xml in my response but want to supply a user defined
 object
  as the requesting parameter. This code actually executes the service
fine
  and reads the arguements out of my object. The
  response gets lost though, even though I specified literal xml encoding
as
  the default encoding for my document. My Apache Soap Service running on
  Weblogic 5.1 has the following characteristics:
 
  Note: The following code is a snippet.
 
  Server:
  public Element getResearch(ResearchArguments args)
  {
DocumentBuilderFactory  dbf =
  DocumentBuilderFactory.newInstance();
DocumentBuilder xdb = dbf.newDocumentBuilder ();
Documentdoc = xdb.newDocument ();
 
 Element researchElement = doc.createElement(Whatever);
 
   // Extracts fields from the ResearchArguments class and creates a
   dynamic
   // research elements based on the information.
 
   return researchElement;
   }
 
   Client:
   public Element sendRequest()
   {
 url =   new URL(routerUrl);
 
   ResearchArguments   args= new
   ResearchArguments(data1,data2,data3);
 
 SOAPMappingRegistry smr = new SOAPMappingRegistry();
 BeanSerializer  beanSer = new BeanSerializer();
 
   smr.mapTypes(Constants.NS_URI_SOAP_ENC, new
   QName(urn:xml-soap-args-demo, args) , ResearchArguments.class,
  beanSer,
   beanSer);
 
 call.setTargetObjectURI(urn: + service);
 call.setMethodName(method);
 call.setEncodingStyleURI(Constants.NS_URI_LITERAL_XML);
 
 call.setSOAPMappingRegistry(smr);
 
 params.addElement(new Parameter(args,
   ResearchArguments.class,
   args,
   Constants.NS_URI_SOAP_ENC));
 
   call.setParams(params);
 
   resp = call.invoke(url, );
   // A fault gets generated from the server after this line
   }
 
   Exception:
   Generated fault:
 Fault Code   = SOAP-ENV:Server
 Fault String = java.lang.IllegalArgumentException: No Serializer
found
  to
   serialize a 'org.w3c.dom.Element' using encoding style
   'http://schemas.xmlsoap.org/soap/encoding/'.
 
   Deployment Descriptor:
   isd:service xmlns:isd=http://xml.apache.org/xml-soap/deployment;
id=urn:HQService
   isd:provider type=java
 scope=Application
 methods=getResearch
   isd:java class=rs.ecommerce.service.providers.HQService
   static=false/
   /isd:provider
 
 
 

isd:faultListenerorg.apache.soap.server.DOMFaultListener/isd:faultListene
   r
 
   isd:mappings
   isd:map
   encodingStyle=http://schemas.xmlsoap.org/soap/encoding/;
xmlns:x=urn:xml-soap-args-demo
qname=x:args
 
   javaType=rs.ecommerce.service.xmlobjects.ResearchArguments
 
   java2XMLClassName=org.apache.soap.encoding.soapenc.BeanSerializer
 
   xml2JavaClassName=org.apache.soap.encoding.soapenc.BeanSerializer/
   /isd:mappings
   /isd:service
 
 
 

 --
 --
  --
  DISCLAIMER
 
  Notice Regarding Entry of Orders and Instructions:
 
  Please do not transmit orders and/or instructions regarding your
Robertson
  Stephens account(s) by e-mail. Orders and/or instructions transmitted by
  e-mail will not be accepted by Robertson Stephens, and Robertson
Stephens
  will not be responsible for carrying out such orders and/or
instructions.
 
  Notice Regarding Privacy and Confidentiality:
 
  Robertson Stephens reserves the right to monitor and review the content

RE: User defined object as a request, literal XML as aresponse. Poss ible?!

2001-06-18 Thread Khamesra, SandeepX

Naggi,
I have a sample exactly the same and it gives me an error No serializer
defind What does that mean ?

-Original Message-
From: Naggi Rao [mailto:[EMAIL PROTECTED]]
Sent: Monday, June 18, 2001 2:45 PM
To: [EMAIL PROTECTED]
Subject: Re: User defined object as a request, literal XML as aresponse.
Poss ible?!


public Element getAllListings() in the addressBook example would give u more
insight


- Original Message -
From: Khamesra, SandeepX [EMAIL PROTECTED]
To: [EMAIL PROTECTED]; [EMAIL PROTECTED]
Sent: Monday, June 18, 2001 2:09 PM
Subject: RE: User defined object as a request, literal XML as aresponse.
Poss ible?!


 Does any one have any code which returns XML as return value

 -Original Message-
 From: Naggi Rao [mailto:[EMAIL PROTECTED]]
 Sent: Monday, June 18, 2001 2:01 PM
 To: [EMAIL PROTECTED]; [EMAIL PROTECTED]
 Subject: Re: User defined object as a request, literal XML as aresponse.
 Poss ible?!


 hi,
 Let me know if you need help..
 I have a method which accepts a Element(Object) and returns a Literal XML

 Naggi


 - Original Message -
 From: Hecking, Dirck J [EMAIL PROTECTED]
 To: [EMAIL PROTECTED]; [EMAIL PROTECTED]
 Sent: Monday, June 18, 2001 1:33 PM
 Subject: FW: User defined object as a request, literal XML as aresponse.
 Poss ible?!


  Guys,
 
  Can someone please take a shot at my problem?
 
  -Dirck
 
  -Original Message-
  From: Hecking, Dirck J [mailto:[EMAIL PROTECTED]]
  Sent: Friday, June 15, 2001 11:13 AM
  To: '[EMAIL PROTECTED]'
  Subject: User defined object as a request, literal XML as a response.
  Poss ible?!
 
 
  Guys,
 
  Dirck here again. I have read several mails regarding this issue. I have
 not
  seen one that illustrates my exact problem. The key here is that I want
to
  recieve literal xml in my response but want to supply a user defined
 object
  as the requesting parameter. This code actually executes the service
fine
  and reads the arguements out of my object. The
  response gets lost though, even though I specified literal xml encoding
as
  the default encoding for my document. My Apache Soap Service running on
  Weblogic 5.1 has the following characteristics:
 
  Note: The following code is a snippet.
 
  Server:
  public Element getResearch(ResearchArguments args)
  {
DocumentBuilderFactory  dbf =
  DocumentBuilderFactory.newInstance();
DocumentBuilder xdb = dbf.newDocumentBuilder ();
Documentdoc = xdb.newDocument ();
 
 Element researchElement = doc.createElement(Whatever);
 
   // Extracts fields from the ResearchArguments class and creates a
   dynamic
   // research elements based on the information.
 
   return researchElement;
   }
 
   Client:
   public Element sendRequest()
   {
 url =   new URL(routerUrl);
 
   ResearchArguments   args= new
   ResearchArguments(data1,data2,data3);
 
 SOAPMappingRegistry smr = new SOAPMappingRegistry();
 BeanSerializer  beanSer = new BeanSerializer();
 
   smr.mapTypes(Constants.NS_URI_SOAP_ENC, new
   QName(urn:xml-soap-args-demo, args) , ResearchArguments.class,
  beanSer,
   beanSer);
 
 call.setTargetObjectURI(urn: + service);
 call.setMethodName(method);
 call.setEncodingStyleURI(Constants.NS_URI_LITERAL_XML);
 
 call.setSOAPMappingRegistry(smr);
 
 params.addElement(new Parameter(args,
   ResearchArguments.class,
   args,
   Constants.NS_URI_SOAP_ENC));
 
   call.setParams(params);
 
   resp = call.invoke(url, );
   // A fault gets generated from the server after this line
   }
 
   Exception:
   Generated fault:
 Fault Code   = SOAP-ENV:Server
 Fault String = java.lang.IllegalArgumentException: No Serializer
found
  to
   serialize a 'org.w3c.dom.Element' using encoding style
   'http://schemas.xmlsoap.org/soap/encoding/'.
 
   Deployment Descriptor:
   isd:service xmlns:isd=http://xml.apache.org/xml-soap/deployment;
id=urn:HQService
   isd:provider type=java
 scope=Application
 methods=getResearch
   isd:java class=rs.ecommerce.service.providers.HQService
   static=false/
   /isd:provider
 
 
 

isd:faultListenerorg.apache.soap.server.DOMFaultListener/isd:faultListene
   r
 
   isd:mappings
   isd:map
   encodingStyle=http://schemas.xmlsoap.org/soap/encoding/;
xmlns:x=urn:xml-soap-args-demo
qname=x:args
 
   javaType=rs.ecommerce.service.xmlobjects.ResearchArguments
 
   java2XMLClassName=org.apache.soap.encoding.soapenc.BeanSerializer
 
   xml2JavaClassName=org.apache.soap.encoding.soapenc.BeanSerializer/
   /isd:mappings
   /isd:service
 
 
 

 --
 --
  --
  DISCLAIMER
 
  Notice Regarding Entry of Orders and Instructions:
 
  Please do not transmit orders and/or instructions regarding your
Robertson
  Stephens account(s) by e-mail