Deserialization error:org.xml.sax.SAXException: SimpleDeserializer encountered a child element, which is NOT expected, in something it was trying to deserialize.

2009-09-09 Thread Archu04

Hi,
On trying to generate Java from a SOAP Response, my code terminates with the
following stack trace:

10:33:01  [test1] CTGDIS495I handleException , callreply,
org.xml.sax.SAXException: SimpleDeserializer encountered a child element,
which is NOT expected, in something it was trying to deserialize. 
10:33:01  [test1] CTGDIS810E handleException - cannot handle exception ,
callreply 
AxisFault
 faultCode: {http://schemas.xmlsoap.org/soap/envelope/}Server.userException
 faultSubcode: 
 faultString: org.xml.sax.SAXException: SimpleDeserializer encountered a
child element, which is NOT expected, in something it was trying to
deserialize.
 faultActor: 
 faultNode: 
 faultDetail: 
{http://xml.apache.org/axis/}stackTrace:org.xml.sax.SAXException:
SimpleDeserializer encountered a child element, which is NOT expected, in
something it was trying to deserialize.
at
org.apache.axis.encoding.ser.SimpleDeserializer.onStartChild(SimpleDeserializer.java:147)
at
org.apache.axis.encoding.DeserializationContext.startElement(DeserializationContext.java:1037)
at
org.apache.axis.message.SAX2EventRecorder.replay(SAX2EventRecorder.java:165)
at
org.apache.axis.message.MessageElement.publishToHandler(MessageElement.java:1141)
at org.apache.axis.message.RPCElement.deserialize(RPCElement.java:236)
at org.apache.axis.message.RPCElement.getParams(RPCElement.java:384)

The parameters passed to getParams() is:
soapenv:Envelope xmlns:soapenv=http://schemas.xmlsoap.org/soap/envelope/;
xmlns:sy=http://services.ws.itim.ibm.com;
xmlns:my=http://model.ws.itim.ibm.com;
xmlns:xsd=http://www.w3.org/2001/XMLSchema;
xmlns:xsi=http://www.w3.org/2001/XMLSchema-instance;
   soapenv:Body
  sy:getPrincipalPersonResponse
 sy:getPrincipalPersonReturn  
my:attributes
   !--Zero or more repetitions:--
   sy:item
  sy:nameName/sy:name
  sy:values
 !--Zero or more repetitions:--
 sy:itemITEM/sy:item
  /sy:values
   /sy:item
/my:attributes
my:selectfalse/my:select  
my:nameKevin Kovach/my:name
   
my:itimDNerglobalid=3282108447695803762,ou=0,ou=people,erglobalid=,ou=Motorists,o=MOTORISTS/my:itimDN
my:profileNamePerson/my:profileName
 /sy:getPrincipalPersonReturn
  /sy:getPrincipalPersonResponse
   /soapenv:Body
/soapenv:Envelope

While parsing this SOAP Response, the SOAPBodyElement generated is:
ns1:getPrincipalPersonResponse xmlns:ns1=http://services.ws.itim.ibm.com;
 ns1:getPrincipalPersonReturn  
ns2:attributes xmlns:ns2=http://model.ws.itim.ibm.com;
   !--Zero or more repetitions:--
   ns1:item
  ns1:nameName/ns1:name
  ns1:values
 !--Zero or more repetitions:--
 ns1:itemITEM/ns1:item
  /ns1:values
   /ns1:item
/ns2:attributes
ns3:select
xmlns:ns3=http://model.ws.itim.ibm.com;false/ns3:select  
ns4:name xmlns:ns4=http://model.ws.itim.ibm.com;Kevin
Kovach/ns4:name
ns5:itimDN
xmlns:ns5=http://model.ws.itim.ibm.com;erglobalid=3282108447695803762,ou=0,ou=people,erglobalid=,ou=Motorists,o=MOTORISTS/ns5:itimDN
ns6:profileName
xmlns:ns6=http://model.ws.itim.ibm.com;Person/ns6:profileName
 /ns1:getPrincipalPersonReturn
  /ns1:getPrincipalPersonResponse

and it fails with the Deserialization error at the point:
ns1:nameName/ns1:name


Could anyone help in understanding why? Is there something wrong with the
SOAP Response xmlString? Please help in fixing this. Its really urgent!
Thanks in Advance.

Archana.
-- 
View this message in context: 
http://www.nabble.com/Deserialization-error%3Aorg.xml.sax.SAXException%3A-SimpleDeserializer-encountered-a-child-element%2C-which-is-NOT-expected%2C-in-something-it-was-trying-to-deserialize.-tp25377515p25377515.html
Sent from the Axis - User mailing list archive at Nabble.com.



Re: soapenv:Server.userException - SimpleDeserializer encountered a child element, which is NOT expected, in something it was trying to deserialize

2008-04-03 Thread sh_santosh

Hi Anne,

   Now deployment Problem is solved. I have replaced the old axis jar
file from new downloaded jar files.
I have a doubt regarding Document Literal ...
1. I want to send input as a String XML. Not the Bean Object .
   In WSDL we added XSD that make a lots of Bean, I want to pass input as
XML.
In BindingImpl class we get the xml then parsing then value population.

2. Which one is good. Input as a String Xmlorwsdl +xsd(bean
generation).

see example --

Content-Type: text/xml; charset=utf-8
SOAPAction: http://www.testsearch.com/UTSv/2004/01/01/Search;

?xml version=1.0 encoding=utf-8?
soap:Envelope xmlns:soap=http://schemas.xmlsoap.org/soap/envelope/;
xmlns:xsi=http://www.w3.org/2001/XMLSchema-instance;
xmlns:xsd=http://www.w3.org/2001/XMLSchema;
  soap:Body
!-- Message or XML content goes here --
  /soap:Body
/soap:Envelope



What change i have to make in WSDL file...Please suggest.


Thanx
Santosh



Anne Thomas Manes wrote:
 
 The problem is not caused by your namespace or WSDL. The problem is
 caused by the deploy.wsdd method. I suspect that your classpath or
 some other aspect of your server environment has not been set up
 correctly.
 
 Anne
 
 On Mon, Mar 31, 2008 at 11:52 AM, sh_santosh [EMAIL PROTECTED]
 wrote:


  It may be a classpath error. Do you have more information on the
 exception?

  Reply :

Dear Anne,

  I am taking a sample example - Document Literal web services.
  I have generated WSDL 2 Java, it's successful BUT

When i try to Deploy it using AdminClient in axis. it is throwing
  Exception. ONLY this exception comes on console -

  See Exception :-
  Processing file
 
 /home/surekha/workspace/ezsan/src/webservices/wsdoclittest/book/deploy.wsdd

 Exception: AxisFault
   faultCode:
 {http://schemas.xmlsoap.org/soap/envelope/}Server.userException
   faultSubcode:
   faultString: java.lang.reflect.InvocationTargetException
   faultActor:
   faultNode:
   faultDetail:
 {http://xml.apache.org/axis/}hostname:vibpj178


 I think it's something related to beanMapping or typeMapping i have
 putted
  bean Mapping in server-config.wsdd.
  but not working.

  Please see the deploy.wsdd :


 deployment
 xmlns=http://xml.apache.org/axis/wsdd/;
 xmlns:java=http://xml.apache.org/axis/wsdd/providers/java;

   !-- Services from TestSearchEngineInterfaceService WSDL service --

   service name=wsTestsearchdetails provider=java:RPC style=wrapped
  use=literal
   parameter name=wsdlTargetNamespace
 value=urn:TestSearchEngine/
   parameter name=wsdlServiceElement
  value=TestSearchEngineInterfaceService/
   parameter name=schemaUnqualified value=urn:TestSearchEngine/
   parameter name=wsdlServicePort value=wsTestsearchdetails/
   parameter name=className
 
 value=webservices.wsdoclittest.annethomas.WsTestsearchdetailsSoapBindingImpl/
   parameter name=wsdlPortType value=TestSearchEngineInterface/
   parameter name=typeMappingVersion value=1.2/
   operation name=searchTest qname=operNS:searchTest
  xmlns:operNS=urn:TestSearchEngine returnQName=ResponseDetail
  returnType=rtns:responseDetail xmlns:rtns=urn:TestSearchEngine
  soapAction= 
 parameter qname=RequestDetail type=tns:requestDetail
  xmlns:tns=urn:TestSearchEngine/
   /operation
   parameter name=allowedMethods value=searchTest/
   parameter name=scope value=Session/

   typeMapping
 xmlns:ns=urn:TestSearchEngine
 qname=ns:responseDetail
 type=java:webservices.wsdoclittest.annethomas.ResponseDetail
 serializer=org.apache.axis.encoding.ser.BeanSerializerFactory

 deserializer=org.apache.axis.encoding.ser.BeanDeserializerFactory
 encodingStyle=
   /
   typeMapping
 xmlns:ns=urn:TestSearchEngine
 qname=ns:requestDetail
 type=java:webservices.wsdoclittest.annethomas.RequestDetail
 serializer=org.apache.axis.encoding.ser.BeanSerializerFactory

 deserializer=org.apache.axis.encoding.ser.BeanDeserializerFactory
 encodingStyle=
   /
   /service
  /deployment


 Please see the WSDL file :


 ?xml version=1.0 encoding=UTF-8?
  wsdl:definitions targetNamespace=urn:TestSearchEngine
 xmlns=http://schemas.xmlsoap.org/wsdl/;
 xmlns:tns=urn:TestSearchEngine
 xmlns:wsdl=http://schemas.xmlsoap.org/wsdl/;
 xmlns:wsdlsoap=http://schemas.xmlsoap.org/wsdl/soap/;
 xmlns:xsd=http://www.w3.org/2001/XMLSchema;
 wsdl:types
 xsd:schema elementFormDefault=unqualified
 targetNamespace=urn:TestSearchEngine

 xmlns:xsd=http://www.w3.org/2001/XMLSchema;

 xsd:element name=searchTest
 xsd:complexType
 xsd:sequence
 xsd:element
 name=RequestDetail type=tns:requestDetail /

   

Re: soapenv:Server.userException - SimpleDeserializer encountered a child element, which is NOT expected, in something it was trying to deserialize

2008-03-31 Thread sh_santosh

Hi Anne,

  Now i am getting Deployment problem. 
I am working on the WSDL validated by you, see below post(wsdl) send by you.

First i generated WSDL 2 Java using this command :
-o . -d Session -s -a -p webservices.wsdoclittest.annethomas  -T 1.2 
src/webservices/wsdoclittest/annethomas/annetestws.wsdl

Java classes file generated successfully . but when i try to deploy it using
- org.apache.axis.client.AdminClient
I got this exception  - InvocationTargetException:

Processing file
/home/santosh/workspace/ezsan/src/webservices/wsdoclittest/annethomas/deploy.wsdd
Exception: AxisFault
 faultCode: {http://schemas.xmlsoap.org/soap/envelope/}Server.userException
 faultSubcode: 
 faultString: java.lang.reflect.InvocationTargetException
 faultActor: 
 faultNode: 
 faultDetail: 
{http://xml.apache.org/axis/}hostname:vibpj178

Please see the deploy.WSDD :-

deployment
xmlns=http://xml.apache.org/axis/wsdd/;
xmlns:java=http://xml.apache.org/axis/wsdd/providers/java;

  !-- Services from TestSearchEngineInterfaceService WSDL service --

  service name=wsTestsearchdetails provider=java:RPC style=wrapped
use=literal
  parameter name=wsdlTargetNamespace value=urn:TestSearchEngine/
  parameter name=wsdlServiceElement
value=TestSearchEngineInterfaceService/
  parameter name=schemaUnqualified value=urn:TestSearchEngine/
  parameter name=wsdlServicePort value=wsTestsearchdetails/
  parameter name=className
value=webservices.wsdoclittest.annethomas.WsTestsearchdetailsSoapBindingImpl/
  parameter name=wsdlPortType value=TestSearchEngineInterface/
  parameter name=typeMappingVersion value=1.2/
  operation name=searchTest qname=operNS:searchTest
xmlns:operNS=urn:TestSearchEngine returnQName=ResponseDetail
returnType=rtns:responseDetail xmlns:rtns=urn:TestSearchEngine
soapAction= 
parameter qname=RequestDetail type=tns:requestDetail
xmlns:tns=urn:TestSearchEngine/
  /operation
  parameter name=allowedMethods value=searchTest/
  parameter name=scope value=Session/

  typeMapping
xmlns:ns=urn:TestSearchEngine
qname=ns:responseDetail
type=java:webservices.wsdoclittest.annethomas.ResponseDetail
serializer=org.apache.axis.encoding.ser.BeanSerializerFactory
deserializer=org.apache.axis.encoding.ser.BeanDeserializerFactory
encodingStyle=
  /
  typeMapping
xmlns:ns=urn:TestSearchEngine
qname=ns:requestDetail
type=java:webservices.wsdoclittest.annethomas.RequestDetail
serializer=org.apache.axis.encoding.ser.BeanSerializerFactory
deserializer=org.apache.axis.encoding.ser.BeanDeserializerFactory
encodingStyle=
  /
  /service
/deployment

 Is this because of URN  or something missing in WSDL.
Or beanMapping is missing ???

Same problem come for Document Literal web service deployment.


Thanx and Regards
Santosh


Anne Thomas Manes wrote:
 
 Sorry -- I should have validated it for you. I made a few errors. This
 version has been validated:
 
 ?xml version=1.0 encoding=UTF-8?
 wsdl:definitions
 targetNamespace=urn:TestSearchEngine
 xmlns=http://schemas.xmlsoap.org/wsdl/;
 xmlns:tns=urn:TestSearchEngine
 xmlns:wsdl=http://schemas.xmlsoap.org/wsdl/;
 xmlns:wsdlsoap=http://schemas.xmlsoap.org/wsdl/soap/;
 xmlns:xs=http://www.w3.org/2001/XMLSchema;
 wsdl:types
 xs:schema
 elementFormDefault=unqualified
 targetNamespace=urn:TestSearchEngine
 xmlns:xs=http://www.w3.org/2001/XMLSchema;
 xs:element name=searchTest
 xs:complexType
 xs:sequence
 xs:element name=RequestDetail
 type=tns:requestDetail/
 /xs:sequence
 /xs:complexType
 /xs:element
 xs:element name=searchTestResponse
 xs:complexType
 xs:sequence
 xs:element name=ResponseDetail
 type=tns:responseDetail/
 /xs:sequence
 /xs:complexType
 /xs:element
 xs:complexType name=requestDetail
 xs:sequence
 xs:element name=BookDetail type=tns:bookDetail/
 xs:element name=PersonDetail
 type=tns:personDetail/
 /xs:sequence
 /xs:complexType
 xs:complexType name=bookDetail
 xs:sequence
 xs:element name=Date type=xs:date/
 xs:element name=City type=xs:string/
 /xs:sequence
 /xs:complexType
 xs:complexType name=personDetail
 xs:sequence
 xs:element name=Name type=xs:string/
 xs:element name=Age type=xs:integer/
 xs:element name=Address type=xs:string/
 /xs:sequence
 /xs:complexType
 xs:complexType 

Re: soapenv:Server.userException - SimpleDeserializer encountered a child element, which is NOT expected, in something it was trying to deserialize

2008-03-31 Thread Anne Thomas Manes
It may be a classpath error.
Do you have more information on the exception?

Anne

On Mon, Mar 31, 2008 at 4:43 AM, sh_santosh [EMAIL PROTECTED] wrote:

  Hi Anne,

   Now i am getting Deployment problem.
  I am working on the WSDL validated by you, see below post(wsdl) send by you.

  First i generated WSDL 2 Java using this command :
  -o . -d Session -s -a -p webservices.wsdoclittest.annethomas  -T 1.2
  src/webservices/wsdoclittest/annethomas/annetestws.wsdl

  Java classes file generated successfully . but when i try to deploy it using
  - org.apache.axis.client.AdminClient
  I got this exception  - InvocationTargetException:

  Processing file
  
 /home/santosh/workspace/ezsan/src/webservices/wsdoclittest/annethomas/deploy.wsdd
  Exception: AxisFault
   faultCode: {http://schemas.xmlsoap.org/soap/envelope/}Server.userException
   faultSubcode:
   faultString: java.lang.reflect.InvocationTargetException
   faultActor:
   faultNode:
   faultDetail:
 {http://xml.apache.org/axis/}hostname:vibpj178

  Please see the deploy.WSDD :-

  deployment
 xmlns=http://xml.apache.org/axis/wsdd/;
 xmlns:java=http://xml.apache.org/axis/wsdd/providers/java;

   !-- Services from TestSearchEngineInterfaceService WSDL service --

   service name=wsTestsearchdetails provider=java:RPC style=wrapped
  use=literal
   parameter name=wsdlTargetNamespace value=urn:TestSearchEngine/
   parameter name=wsdlServiceElement
  value=TestSearchEngineInterfaceService/
   parameter name=schemaUnqualified value=urn:TestSearchEngine/
   parameter name=wsdlServicePort value=wsTestsearchdetails/
   parameter name=className
  
 value=webservices.wsdoclittest.annethomas.WsTestsearchdetailsSoapBindingImpl/
   parameter name=wsdlPortType value=TestSearchEngineInterface/
   parameter name=typeMappingVersion value=1.2/
   operation name=searchTest qname=operNS:searchTest
  xmlns:operNS=urn:TestSearchEngine returnQName=ResponseDetail
  returnType=rtns:responseDetail xmlns:rtns=urn:TestSearchEngine
  soapAction= 
 parameter qname=RequestDetail type=tns:requestDetail
  xmlns:tns=urn:TestSearchEngine/
   /operation
   parameter name=allowedMethods value=searchTest/
   parameter name=scope value=Session/

   typeMapping
 xmlns:ns=urn:TestSearchEngine
 qname=ns:responseDetail
 type=java:webservices.wsdoclittest.annethomas.ResponseDetail
 serializer=org.apache.axis.encoding.ser.BeanSerializerFactory
 deserializer=org.apache.axis.encoding.ser.BeanDeserializerFactory
 encodingStyle=
   /
   typeMapping
 xmlns:ns=urn:TestSearchEngine
 qname=ns:requestDetail
 type=java:webservices.wsdoclittest.annethomas.RequestDetail
 serializer=org.apache.axis.encoding.ser.BeanSerializerFactory
 deserializer=org.apache.axis.encoding.ser.BeanDeserializerFactory
 encodingStyle=
   /
   /service
  /deployment

   Is this because of URN  or something missing in WSDL.
  Or beanMapping is missing ???

  Same problem come for Document Literal web service deployment.


  Thanx and Regards


 Santosh


  Anne Thomas Manes wrote:
  
   Sorry -- I should have validated it for you. I made a few errors. This
   version has been validated:
  
   ?xml version=1.0 encoding=UTF-8?
   wsdl:definitions
   targetNamespace=urn:TestSearchEngine
   xmlns=http://schemas.xmlsoap.org/wsdl/;
   xmlns:tns=urn:TestSearchEngine
   xmlns:wsdl=http://schemas.xmlsoap.org/wsdl/;
   xmlns:wsdlsoap=http://schemas.xmlsoap.org/wsdl/soap/;
   xmlns:xs=http://www.w3.org/2001/XMLSchema;
   wsdl:types
   xs:schema
   elementFormDefault=unqualified
   targetNamespace=urn:TestSearchEngine
   xmlns:xs=http://www.w3.org/2001/XMLSchema;
   xs:element name=searchTest
   xs:complexType
   xs:sequence
   xs:element name=RequestDetail
   type=tns:requestDetail/
   /xs:sequence
   /xs:complexType
   /xs:element
   xs:element name=searchTestResponse
   xs:complexType
   xs:sequence
   xs:element name=ResponseDetail
   type=tns:responseDetail/
   /xs:sequence
   /xs:complexType
   /xs:element
   xs:complexType name=requestDetail
   xs:sequence
   xs:element name=BookDetail type=tns:bookDetail/
   xs:element name=PersonDetail
   type=tns:personDetail/
   /xs:sequence
   /xs:complexType
   xs:complexType name=bookDetail
   xs:sequence
   xs:element name=Date type=xs:date/
   xs:element name=City type=xs:string/
   /xs:sequence
   /xs:complexType
   

Re: soapenv:Server.userException - SimpleDeserializer encountered a child element, which is NOT expected, in something it was trying to deserialize

2008-03-31 Thread sh_santosh


It may be a classpath error. Do you have more information on the exception?

Reply :

   Dear Anne,

 I am taking a sample example - Document Literal web services.
I have generated WSDL 2 Java, it's successful BUT

   When i try to Deploy it using AdminClient in axis. it is throwing
Exception. ONLY this exception comes on console -

See Exception :-
Processing file
/home/surekha/workspace/ezsan/src/webservices/wsdoclittest/book/deploy.wsdd
Exception: AxisFault
 faultCode: {http://schemas.xmlsoap.org/soap/envelope/}Server.userException
 faultSubcode:
 faultString: java.lang.reflect.InvocationTargetException
 faultActor:
 faultNode:
 faultDetail:
{http://xml.apache.org/axis/}hostname:vibpj178

I think it's something related to beanMapping or typeMapping i have putted
bean Mapping in server-config.wsdd.
but not working.

Please see the deploy.wsdd :
deployment
xmlns=http://xml.apache.org/axis/wsdd/;
xmlns:java=http://xml.apache.org/axis/wsdd/providers/java;

  !-- Services from TestSearchEngineInterfaceService WSDL service --

  service name=wsTestsearchdetails provider=java:RPC style=wrapped
use=literal
  parameter name=wsdlTargetNamespace value=urn:TestSearchEngine/
  parameter name=wsdlServiceElement
value=TestSearchEngineInterfaceService/
  parameter name=schemaUnqualified value=urn:TestSearchEngine/
  parameter name=wsdlServicePort value=wsTestsearchdetails/
  parameter name=className
value=webservices.wsdoclittest.annethomas.WsTestsearchdetailsSoapBindingImpl/
  parameter name=wsdlPortType value=TestSearchEngineInterface/
  parameter name=typeMappingVersion value=1.2/
  operation name=searchTest qname=operNS:searchTest
xmlns:operNS=urn:TestSearchEngine returnQName=ResponseDetail
returnType=rtns:responseDetail xmlns:rtns=urn:TestSearchEngine
soapAction= 
parameter qname=RequestDetail type=tns:requestDetail
xmlns:tns=urn:TestSearchEngine/
  /operation
  parameter name=allowedMethods value=searchTest/
  parameter name=scope value=Session/

  typeMapping
xmlns:ns=urn:TestSearchEngine
qname=ns:responseDetail
type=java:webservices.wsdoclittest.annethomas.ResponseDetail
serializer=org.apache.axis.encoding.ser.BeanSerializerFactory
deserializer=org.apache.axis.encoding.ser.BeanDeserializerFactory
encodingStyle=
  /
  typeMapping
xmlns:ns=urn:TestSearchEngine
qname=ns:requestDetail
type=java:webservices.wsdoclittest.annethomas.RequestDetail
serializer=org.apache.axis.encoding.ser.BeanSerializerFactory
deserializer=org.apache.axis.encoding.ser.BeanDeserializerFactory
encodingStyle=
  /
  /service
/deployment

Please see the WSDL file :

?xml version=1.0 encoding=UTF-8?
wsdl:definitions targetNamespace=urn:TestSearchEngine
xmlns=http://schemas.xmlsoap.org/wsdl/;
xmlns:tns=urn:TestSearchEngine
xmlns:wsdl=http://schemas.xmlsoap.org/wsdl/;
xmlns:wsdlsoap=http://schemas.xmlsoap.org/wsdl/soap/;
xmlns:xsd=http://www.w3.org/2001/XMLSchema;
wsdl:types
xsd:schema elementFormDefault=unqualified
targetNamespace=urn:TestSearchEngine
xmlns:xsd=http://www.w3.org/2001/XMLSchema;
xsd:element name=searchTest
xsd:complexType
xsd:sequence
xsd:element 
name=RequestDetail type=tns:requestDetail /
/xsd:sequence
/xsd:complexType
/xsd:element
xsd:element name=searchTestResponse
xsd:complexType
xsd:sequence
xsd:element 
name=ResponseDetail type=tns:responseDetail /
/xsd:sequence
/xsd:complexType
/xsd:element
xsd:complexType name=requestDetail
xsd:sequence
xsd:element name=Name 
type=xsd:string /
xsd:element name=Age 
type=xsd:string /
/xsd:sequence
/xsd:complexType  
xsd:complexType name=responseDetail
xsd:sequence
xsd:element name=result 
type=xsd:string /
/xsd:sequence
/xsd:complexType
/xsd:schema
/wsdl:types
wsdl:message name=searchTestRequest
wsdl:part name=parameters element=tns:searchTest /
/wsdl:message
wsdl:message name=searchTestResponse
 

Re: soapenv:Server.userException - SimpleDeserializer encountered a child element, which is NOT expected, in something it was trying to deserialize

2008-03-31 Thread Anne Thomas Manes
The problem is not caused by your namespace or WSDL. The problem is
caused by the deploy.wsdd method. I suspect that your classpath or
some other aspect of your server environment has not been set up
correctly.

Anne

On Mon, Mar 31, 2008 at 11:52 AM, sh_santosh [EMAIL PROTECTED] wrote:


  It may be a classpath error. Do you have more information on the exception?

  Reply :

Dear Anne,

  I am taking a sample example - Document Literal web services.
  I have generated WSDL 2 Java, it's successful BUT

When i try to Deploy it using AdminClient in axis. it is throwing
  Exception. ONLY this exception comes on console -

  See Exception :-
  Processing file
  /home/surekha/workspace/ezsan/src/webservices/wsdoclittest/book/deploy.wsdd

 Exception: AxisFault
   faultCode: {http://schemas.xmlsoap.org/soap/envelope/}Server.userException
   faultSubcode:
   faultString: java.lang.reflect.InvocationTargetException
   faultActor:
   faultNode:
   faultDetail:
 {http://xml.apache.org/axis/}hostname:vibpj178


 I think it's something related to beanMapping or typeMapping i have putted
  bean Mapping in server-config.wsdd.
  but not working.

  Please see the deploy.wsdd :


 deployment
 xmlns=http://xml.apache.org/axis/wsdd/;
 xmlns:java=http://xml.apache.org/axis/wsdd/providers/java;

   !-- Services from TestSearchEngineInterfaceService WSDL service --

   service name=wsTestsearchdetails provider=java:RPC style=wrapped
  use=literal
   parameter name=wsdlTargetNamespace value=urn:TestSearchEngine/
   parameter name=wsdlServiceElement
  value=TestSearchEngineInterfaceService/
   parameter name=schemaUnqualified value=urn:TestSearchEngine/
   parameter name=wsdlServicePort value=wsTestsearchdetails/
   parameter name=className
  
 value=webservices.wsdoclittest.annethomas.WsTestsearchdetailsSoapBindingImpl/
   parameter name=wsdlPortType value=TestSearchEngineInterface/
   parameter name=typeMappingVersion value=1.2/
   operation name=searchTest qname=operNS:searchTest
  xmlns:operNS=urn:TestSearchEngine returnQName=ResponseDetail
  returnType=rtns:responseDetail xmlns:rtns=urn:TestSearchEngine
  soapAction= 
 parameter qname=RequestDetail type=tns:requestDetail
  xmlns:tns=urn:TestSearchEngine/
   /operation
   parameter name=allowedMethods value=searchTest/
   parameter name=scope value=Session/

   typeMapping
 xmlns:ns=urn:TestSearchEngine
 qname=ns:responseDetail
 type=java:webservices.wsdoclittest.annethomas.ResponseDetail
 serializer=org.apache.axis.encoding.ser.BeanSerializerFactory
 deserializer=org.apache.axis.encoding.ser.BeanDeserializerFactory
 encodingStyle=
   /
   typeMapping
 xmlns:ns=urn:TestSearchEngine
 qname=ns:requestDetail
 type=java:webservices.wsdoclittest.annethomas.RequestDetail
 serializer=org.apache.axis.encoding.ser.BeanSerializerFactory
 deserializer=org.apache.axis.encoding.ser.BeanDeserializerFactory
 encodingStyle=
   /
   /service
  /deployment


 Please see the WSDL file :


 ?xml version=1.0 encoding=UTF-8?
  wsdl:definitions targetNamespace=urn:TestSearchEngine
 xmlns=http://schemas.xmlsoap.org/wsdl/;
 xmlns:tns=urn:TestSearchEngine
 xmlns:wsdl=http://schemas.xmlsoap.org/wsdl/;
 xmlns:wsdlsoap=http://schemas.xmlsoap.org/wsdl/soap/;
 xmlns:xsd=http://www.w3.org/2001/XMLSchema;
 wsdl:types
 xsd:schema elementFormDefault=unqualified
 targetNamespace=urn:TestSearchEngine

 xmlns:xsd=http://www.w3.org/2001/XMLSchema;

 xsd:element name=searchTest
 xsd:complexType
 xsd:sequence
 xsd:element 
 name=RequestDetail type=tns:requestDetail /

 /xsd:sequence
 /xsd:complexType
 /xsd:element
 xsd:element name=searchTestResponse
 xsd:complexType
 xsd:sequence
 xsd:element 
 name=ResponseDetail type=tns:responseDetail /

 /xsd:sequence
 /xsd:complexType
 /xsd:element

 xsd:complexType name=requestDetail
 xsd:sequence
 xsd:element name=Name 
 type=xsd:string /
 xsd:element name=Age 
 type=xsd:string /
 /xsd:sequence
 /xsd:complexType

 xsd:complexType name=responseDetail
 

Re: soapenv:Server.userException - SimpleDeserializer encountered a child element, which is NOT expected, in something it was trying to deserialize

2008-03-31 Thread sh_santosh

Hi Anne,

 but for same server environment and classpath (as i give for
doc/lit) the RPC encoded is working fine.
No problem with deployment with RPC encoded example.

I think for RPC encoded and Document / Literal.. the server environment and
classpath should be same.

Doubts :
  It may be problem with beanMapping or typeMapping , because 
When i remove  typeMapping Tag from server-config.wsdd
and accessing - http://localhost:8080/axis/servlet/AxisServlet
It's showing services BUT when i try to see the WSDL -
it's throwing Exception -
AXIS error

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

Exception - java.lang.NoSuchMethodError:
org.apache.axis.description.ElementDesc.setNillable(Z)V

When again i hit the same url then some different exception :-

AXIS error

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

Fault - java.lang.NoClassDefFoundError; nested exception is: 
java.lang.NoClassDefFoundError

AxisFault
 faultCode:
{http://schemas.xmlsoap.org/soap/envelope/}Server.generalException
 faultSubcode: 
 faultString: java.lang.NoClassDefFoundError; nested exception is: 
java.lang.NoClassDefFoundError
 faultActor: 
 faultNode: 
 faultDetail: 
{http://xml.apache.org/axis/}hostname:vibpj178


beanMapping :

beanMapping qname=ns:requestDetail xmlns:ns=urn:TestSearchEngine
languageSpecificType=java:webservices.wsdoclittest.annethomas.RequestDetail/

beanMapping qname=ns:responseDetail xmlns:ns=urn:TestSearchEngine
languageSpecificType=java:webservices.wsdoclittest.annethomas.ResponseDetail/
 

I have putted beanMapping inside service tag in server-config.wsdd and
outside of service tag in server-config.wsdd.

I have also tried either beanMapping or typeMapping. but nothing working.


Thanx and Regards
Santosh



 


Anne Thomas Manes wrote:
 
 The problem is not caused by your namespace or WSDL. The problem is
 caused by the deploy.wsdd method. I suspect that your classpath or
 some other aspect of your server environment has not been set up
 correctly.
 
 Anne
 
 On Mon, Mar 31, 2008 at 11:52 AM, sh_santosh [EMAIL PROTECTED]
 wrote:


  It may be a classpath error. Do you have more information on the
 exception?

  Reply :

Dear Anne,

  I am taking a sample example - Document Literal web services.
  I have generated WSDL 2 Java, it's successful BUT

When i try to Deploy it using AdminClient in axis. it is throwing
  Exception. ONLY this exception comes on console -

  See Exception :-
  Processing file
 
 /home/surekha/workspace/ezsan/src/webservices/wsdoclittest/book/deploy.wsdd

 Exception: AxisFault
   faultCode:
 {http://schemas.xmlsoap.org/soap/envelope/}Server.userException
   faultSubcode:
   faultString: java.lang.reflect.InvocationTargetException
   faultActor:
   faultNode:
   faultDetail:
 {http://xml.apache.org/axis/}hostname:vibpj178


 I think it's something related to beanMapping or typeMapping i have
 putted
  bean Mapping in server-config.wsdd.
  but not working.

  Please see the deploy.wsdd :


 deployment
 xmlns=http://xml.apache.org/axis/wsdd/;
 xmlns:java=http://xml.apache.org/axis/wsdd/providers/java;

   !-- Services from TestSearchEngineInterfaceService WSDL service --

   service name=wsTestsearchdetails provider=java:RPC style=wrapped
  use=literal
   parameter name=wsdlTargetNamespace
 value=urn:TestSearchEngine/
   parameter name=wsdlServiceElement
  value=TestSearchEngineInterfaceService/
   parameter name=schemaUnqualified value=urn:TestSearchEngine/
   parameter name=wsdlServicePort value=wsTestsearchdetails/
   parameter name=className
 
 value=webservices.wsdoclittest.annethomas.WsTestsearchdetailsSoapBindingImpl/
   parameter name=wsdlPortType value=TestSearchEngineInterface/
   parameter name=typeMappingVersion value=1.2/
   operation name=searchTest qname=operNS:searchTest
  xmlns:operNS=urn:TestSearchEngine returnQName=ResponseDetail
  returnType=rtns:responseDetail xmlns:rtns=urn:TestSearchEngine
  soapAction= 
 parameter qname=RequestDetail type=tns:requestDetail
  xmlns:tns=urn:TestSearchEngine/
   /operation
   parameter name=allowedMethods value=searchTest/
   parameter name=scope value=Session/

   typeMapping
 xmlns:ns=urn:TestSearchEngine
 qname=ns:responseDetail
 type=java:webservices.wsdoclittest.annethomas.ResponseDetail
 serializer=org.apache.axis.encoding.ser.BeanSerializerFactory

 deserializer=org.apache.axis.encoding.ser.BeanDeserializerFactory
 encodingStyle=
   /
   typeMapping
 xmlns:ns=urn:TestSearchEngine
 qname=ns:requestDetail
 type=java:webservices.wsdoclittest.annethomas.RequestDetail
 serializer=org.apache.axis.encoding.ser.BeanSerializerFactory

 deserializer=org.apache.axis.encoding.ser.BeanDeserializerFactory
 encodingStyle=
   /
   /service
  /deployment


 Please 

Re: soapenv:Server.userException - SimpleDeserializer encountered a child element, which is NOT expected, in something it was trying to deserialize

2008-03-30 Thread sh_santosh

Hi Anne,

while i generate wsdl2java i got this exception :

java.io.IOException: Type {urn:TestSearchEngine}searchTestResponse is
referenced but not defined.
at
org.apache.axis.wsdl.symbolTable.SymbolTable.checkForUndefined(SymbolTable.java:665)
at 
org.apache.axis.wsdl.symbolTable.SymbolTable.add(SymbolTable.java:545)
at
org.apache.axis.wsdl.symbolTable.SymbolTable.populate(SymbolTable.java:518)
at
org.apache.axis.wsdl.symbolTable.SymbolTable.populate(SymbolTable.java:495)
at org.apache.axis.wsdl.gen.Parser$WSDLRunnable.run(Parser.java:361)
at java.lang.Thread.run(Thread.java:595)

 For Testing purpose, i want to take 2 argument and return a result. while
run wsdl2java i got exception.
is this related to beanMapping or typeMapping
or something missing in WSDL

please see wsdl :

?xml version=1.0 encoding=UTF-8?
wsdl:definitions targetNamespace=urn:TestSearchEngine
xmlns=http://schemas.xmlsoap.org/wsdl/;
xmlns:tns=urn:TestSearchEngine
xmlns:wsdl=http://schemas.xmlsoap.org/wsdl/;
xmlns:wsdlsoap=http://schemas.xmlsoap.org/wsdl/soap/;
xmlns:xsd=http://www.w3.org/2001/XMLSchema;

wsdl:types
xsd:schema targetNamespace=urn:TestSearchEngine
elementFormDefault=unqualified

xsd:element name=searchTest
xsd:complexType
xsd:sequence
xsd:element minOccurs=0 
maxOccurs=1
name=arg1 
type=xsd:int /
xsd:element minOccurs=0 
maxOccurs=1
name=arg2 
type=xsd:int /
/xsd:sequence
/xsd:complexType
/xsd:element


xsd:element name=searchTestResponse
xsd:complexType
xsd:sequence
xsd:element minOccurs=0 
maxOccurs=1
name=addResult 
type=xsd:int /
/xsd:sequence
/xsd:complexType
/xsd:element
/xsd:schema
/wsdl:types

wsdl:message name=searchTestRequest
wsdl:part name=parameters element=tns:searchTest /
/wsdl:message

wsdl:message name=searchTestResponse
wsdl:part name=parameters type=tns:searchTestResponse /
/wsdl:message

wsdl:portType name=TestSearchEngineInterface
wsdl:operation name=searchTest
wsdl:input message=tns:searchTestRequest
name=searchTestRequest /
wsdl:output message=tns:searchTestResponse
name=searchTestResponse /
/wsdl:operation
/wsdl:portType

wsdl:binding name=wsTestsearchdetailsSoapBinding
type=tns:TestSearchEngineInterface
wsdlsoap:binding style=document
transport=http://schemas.xmlsoap.org/soap/http; /
wsdl:operation name=searchTest
wsdlsoap:operation soapAction= /
wsdl:input name=searchTestRequest
wsdlsoap:body use=literal /
/wsdl:input
wsdl:output name=searchTestResponse
wsdlsoap:body use=literal /
/wsdl:output
/wsdl:operation
/wsdl:binding

wsdl:service name=TestSearchEngineInterfaceService
wsdl:port binding=tns:wsTestsearchdetailsSoapBinding
name=wsTestsearchdetails
wsdlsoap:address

location=http://localhost:8080/axis/services/wsTestsearchdetails; /
/wsdl:port
/wsdl:service
/wsdl:definitions


Thanx


Anne Thomas Manes wrote:
 
 Given that you must send a specific XML document, I recommend that you
 use the WSDL-first approach rather than the code-first approach. As I
 said in my previous post, you should start by defining a schema that
 describes your input and output elements and then construct a WSDL
 that defines an operation for sending and receiving those elements. An
 example follows. A couple of notes on the WSDL I developed for you:
 
 1) I have defined a set of wrapper elements around your
 RequestDetail and ResponseDetail elements. SOAP requires that the
 element within the SOAP Body be namespace qualified. Your
 RequestDetail and ResponseDetail elements are not qualified;
 therefore you should wrap them in a namespace qualified 

Re: soapenv:Server.userException - SimpleDeserializer encountered a child element, which is NOT expected, in something it was trying to deserialize

2008-03-29 Thread Anne Thomas Manes
Santosh,

Do I understand your problem correctly: You need to implement both
client and server, and you must pass a payload containing the
RequestDetail element.

If so, you must start by defining the schema for the RequestDetail
element. Then you should construct a document/literal WSDL that
defines an operation for passing in the RequestDetail element. Do
you also have a sample document for the response message? You will
also have to define the schema for the response document.

Anne

On Wed, Mar 26, 2008 at 10:23 AM, sh_santosh [EMAIL PROTECTED] wrote:

  Hi Anne ,

   1st of all Thank you very much for your Reply.
  I was just going through Blogs written by you and earlier post that you
  replied for others.

Yes, it is clear that server required SOAP request is not sent by client
  or requester program.
  Some difference in SOAP msg. so i got exception. but

 I have No Choice, i have to use that SOAP request only send by requester
  program.
  Now in this situation what change i have to do in my WSDL or wsdd or code.

 is it possible that we made some change in WSDL or wsdd. so that i am
  able to Accept SOAP request and process it further.  Give some idea
  regarding this issues keeping it that i have to use that SOAP request only.

Please see the SOAP request  send by Requester or client program  :-


  Content-Type: text/xml; charset=utf-8
  SOAPAction: http://www.test.com/UTSv/2004/01/01/SearchTest;


  ?xml version=1.0 encoding=utf-8?
  soap:Envelope xmlns:soap=http://schemas.xmlsoap.org/soap/envelope/;
  xmlns:xsi=http://www.w3.org/2001/XMLSchema-instance;
  xmlns:xsd=http://www.w3.org/2001/XMLSchema;
   soap:Body
 RequestDetail
 BookDetail
 Date2008-09-09/Date
 CityLondon/City
 /BookDetail
 PersonDetail
 NameSantosh/Name
 Age25/Age
 AddressLondon/Address
 /PersonDetail
 /RequestDetail
   /soap:Body
  /soap:Envelope

  =x


  Regards
  Santosh




  Anne Thomas Manes wrote:
  
   The message you are sending doesn't match the expected input specified
   by the WSDL.
   The service is expecting something lie this:
  
   ?xml version=1.0 encoding=utf-8?
   soap:Envelope xmlns:soap=http://schemas.xmlsoap.org/soap/envelope/;
   xmlns:xsi=http://www.w3.org/2001/XMLSchema-instance;
   xmlns:xsd=http://www.w3.org/2001/XMLSchema;
   xmlns:enc=http://schemas.xmlsoap.org/soap/encoding/;
   soap:Body encodingStyle=http://schemas.xmlsoap.org/soap/encoding/;
 in0 xmlns=urn:TestSearchEngine  xsi:type=enc:string
 some string
 /in0
   /soap:Body
   /soap:Envelope
  
   Anne
  
  
  
   On Wed, Mar 26, 2008 at 3:23 AM, sh_santosh [EMAIL PROTECTED]
   wrote:
  
Dear All,
  
  I have installed Axis 1.3 (Java) and provided a service to
Requester(other end). At my end when i invoking web service by passing
XmlRequest as string from java client program then it returns proper
Response xml. but
  
  The Service Requester(other end) invoking our web services using
WFETCH tool. They send SOAP request then from Service Provider end(my
   end)
returns the soapenv:Server.userException - SimpleDeserializer
   encountered a
child element, which is NOT expected, in something it was trying to
deserialize.
  
Please see  below the SOAP Request, Exception / Error and WSDL file.
  
  Requester send SOAP request is :-
  
Content-Type: text/xml; charset=utf-8
SOAPAction: http://www.eviivo.com/UTSv/2004/01/01/SearchTest;
  
?xml version=1.0 encoding=utf-8?
soap:Envelope xmlns:soap=http://schemas.xmlsoap.org/soap/envelope/;
xmlns:xsi=http://www.w3.org/2001/XMLSchema-instance;
xmlns:xsd=http://www.w3.org/2001/XMLSchema;
 soap:Body
   RequestDetail
   BookDetail
   Date2008-09-09/Date
   CityLondon/City
   /BookDetail
   PersonDetail
   NameSantosh/Name
   Age25/Age
   AddressLondon/Address
   /PersonDetail
   /RequestDetail
 /soap:Body
/soap:Envelope
  
=x
  
   Provider end return Exception / Error is :-
  
?xml version=1.0 encoding=utf-8?
soapenv:Envelope
   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;
   soapenv:Body
   soapenv:Fault
  
   faultcodesoapenv:Server.userException/faultcode
   faultstringorg.xml.sax.SAXException:
   SimpleDeserializer encountered a
child element, which is NOT expected, in something it was trying to
deserialize./faultstring
 

Re: soapenv:Server.userException - SimpleDeserializer encountered a child element, which is NOT expected, in something it was trying to deserialize

2008-03-29 Thread sh_santosh

Hi Anne,

 Yes, i need to implement both client and server. as a input SOAP
request inside SOAP body payload containing the
RequestDetail element.
 
  Yes, i have a sample document for the response message also.
ResponseDetail
   ProductDetail
  -- some Strings
   /ProductDetail
/ResponseDetail

  Now, I am searching for How to Generate java2wsdl   and  wsdl2java any
tool or command that will able to work wiith Axis 1.3, tomcat 5.5.20. and
java. 

There is not a single proper practical example given on Internet for
Documnet litetal web services with Axis.

Have look into this practically described example to RPC encoded with Axis .
This very helpful.
http://www.onjava.com/pub/a/onjava/2002/06/05/axis.html?page=2

I am searching Same type of example for Documnet litetal web services with
Axis.

Please provide java2wsdl   and  wsdl2java Tool and Command for Documnet
litetal web services with Axis.
any reference, any tutorial, ??


Anne, Thank you very much for your reply.


Regards
Santosh





Anne Thomas Manes wrote:
 
 Santosh,
 
 Do I understand your problem correctly: You need to implement both
 client and server, and you must pass a payload containing the
 RequestDetail element.
 
 If so, you must start by defining the schema for the RequestDetail
 element. Then you should construct a document/literal WSDL that
 defines an operation for passing in the RequestDetail element. Do
 you also have a sample document for the response message? You will
 also have to define the schema for the response document.
 
 Anne
 
 On Wed, Mar 26, 2008 at 10:23 AM, sh_santosh [EMAIL PROTECTED]
 wrote:

  Hi Anne ,

   1st of all Thank you very much for your Reply.
  I was just going through Blogs written by you and earlier post that you
  replied for others.

Yes, it is clear that server required SOAP request is not sent by
 client
  or requester program.
  Some difference in SOAP msg. so i got exception. but

 I have No Choice, i have to use that SOAP request only send by
 requester
  program.
  Now in this situation what change i have to do in my WSDL or wsdd or
 code.

 is it possible that we made some change in WSDL or wsdd. so that i am
  able to Accept SOAP request and process it further.  Give some idea
  regarding this issues keeping it that i have to use that SOAP request
 only.

Please see the SOAP request  send by Requester or client program 
 :-


  Content-Type: text/xml; charset=utf-8
  SOAPAction: http://www.test.com/UTSv/2004/01/01/SearchTest;


  ?xml version=1.0 encoding=utf-8?
  soap:Envelope xmlns:soap=http://schemas.xmlsoap.org/soap/envelope/;
  xmlns:xsi=http://www.w3.org/2001/XMLSchema-instance;
  xmlns:xsd=http://www.w3.org/2001/XMLSchema;
   soap:Body
 RequestDetail
 BookDetail
 Date2008-09-09/Date
 CityLondon/City
 /BookDetail
 PersonDetail
 NameSantosh/Name
 Age25/Age
 AddressLondon/Address
 /PersonDetail
 /RequestDetail
   /soap:Body
  /soap:Envelope

  =x


  Regards
  Santosh




  Anne Thomas Manes wrote:
  
   The message you are sending doesn't match the expected input specified
   by the WSDL.
   The service is expecting something lie this:
  
   ?xml version=1.0 encoding=utf-8?
   soap:Envelope xmlns:soap=http://schemas.xmlsoap.org/soap/envelope/;
   xmlns:xsi=http://www.w3.org/2001/XMLSchema-instance;
   xmlns:xsd=http://www.w3.org/2001/XMLSchema;
   xmlns:enc=http://schemas.xmlsoap.org/soap/encoding/;
   soap:Body encodingStyle=http://schemas.xmlsoap.org/soap/encoding/;
 in0 xmlns=urn:TestSearchEngine  xsi:type=enc:string
 some string
 /in0
   /soap:Body
   /soap:Envelope
  
   Anne
  
  
  
   On Wed, Mar 26, 2008 at 3:23 AM, sh_santosh [EMAIL PROTECTED]
   wrote:
  
Dear All,
  
  I have installed Axis 1.3 (Java) and provided a service to
Requester(other end). At my end when i invoking web service by
 passing
XmlRequest as string from java client program then it returns proper
Response xml. but
  
  The Service Requester(other end) invoking our web services
 using
WFETCH tool. They send SOAP request then from Service Provider
 end(my
   end)
returns the soapenv:Server.userException - SimpleDeserializer
   encountered a
child element, which is NOT expected, in something it was trying to
deserialize.
  
Please see  below the SOAP Request, Exception / Error and WSDL file.
  
  Requester send SOAP request is :-
  
Content-Type: text/xml; charset=utf-8
SOAPAction: http://www.eviivo.com/UTSv/2004/01/01/SearchTest;
  
?xml version=1.0 encoding=utf-8?
soap:Envelope
 xmlns:soap=http://schemas.xmlsoap.org/soap/envelope/;
xmlns:xsi=http://www.w3.org/2001/XMLSchema-instance;
xmlns:xsd=http://www.w3.org/2001/XMLSchema;
 soap:Body
   

Re: soapenv:Server.userException - SimpleDeserializer encountered a child element, which is NOT expected, in something it was trying to deserialize

2008-03-29 Thread Anne Thomas Manes
Given that you must send a specific XML document, I recommend that you
use the WSDL-first approach rather than the code-first approach. As I
said in my previous post, you should start by defining a schema that
describes your input and output elements and then construct a WSDL
that defines an operation for sending and receiving those elements. An
example follows. A couple of notes on the WSDL I developed for you:

1) I have defined a set of wrapper elements around your
RequestDetail and ResponseDetail elements. SOAP requires that the
element within the SOAP Body be namespace qualified. Your
RequestDetail and ResponseDetail elements are not qualified;
therefore you should wrap them in a namespace qualified element. The
wrapper elements are called searchTest and searchTestResponse to
correspond to the operation name. This WSDL conforms to the wrapped
document/literal convention, so Axis will automatically strip off the
wrapper elements for you.

2) You didn't give me the complete details for your response element.
If the ProductDetail element contains child elements, then you will
need to redefine the schema for that element.

Once you have finalized the WSDL, run wsdl2java with the -s option to
generate your client stub and server skeleton. It will also generate a
WSDD for you.

Anne

?xml version=1.0 encoding=UTF-8?
wsdl:definitions targetNamespace=urn:TestSearchEngine
xmlns=http://schemas.xmlsoap.org/wsdl/;
xmlns:tns=urn:TestSearchEngine
xmlns:wsdl=http://schemas.xmlsoap.org/wsdl/;
xmlns:wsdlsoap=http://schemas.xmlsoap.org/wsdl/soap/;
xmlns:xs=http://www.w3.org/2001/XMLSchema;

wsdl:types
 xs:schema targetNamespace=urn:TestSearchEngine
elementFormDefault=unqualified

  xs:element name=searchTest
xs:complexType
  xs:sequence
xs:element name=RequestDetail type=requestDetail/
  /xs:sequence
/xs:complexType
  /xs:element

  xs:element name=searchTestResponse
xs:complexType
  xs:sequence
xs:element name=ResponseDetail type=responseDetail/
  /xs:sequence
/xs:complexType
  /xs:element

  xs:complexType name=requestDetail
xs:sequence
  xs:element name=BookDetail type=bookDetail/
  xs:element name=PersonDetail type=personDetail/
/xs:sequence
  /xs:complexType
  xs:complexType name=bookDetail
xs:sequence
  xs:element name=Date type=xs:date/
  xs:element name=City type=xs:string/
/xs:sequence
  /xs:complexType
  xs:complexType name=personDetail
xs:sequence
  xs:element name=Name type=xs:string/
  xs:element name=Age type=xs:integer/
  xs:element name=Address type=xs:string/
/xs:sequence
  /xs:complexType

  xs:complexType name=responseDetail
xs:sequence
  xs:element name=ProductDetail type=xs:string/
/xs:sequence
  /xs:complexType

 /xs:schema
/wsdl:types

wsdl:message name=searchTestRequest
  wsdl:part name=parameters element=tns:searchTest/
/wsdl:message

wsdl:message name=searchTestResponse
  wsdl:part name=parameters type=tns:searchTestResponse/
/wsdl:message

wsdl:portType name=TestSearchEngineInterface
 wsdl:operation name=searchTest
wsdl:input message=tns:searchTestRequest name=searchTestRequest/
wsdl:output message=tns:searchTestResponse
name=searchTestResponse/
 /wsdl:operation
  /wsdl:portType

wsdl:binding name=wsTestsearchdetailsSoapBinding
  type=tns:TestSearchEngineInterface
   wsdlsoap:binding style=document
 transport=http://schemas.xmlsoap.org/soap/http/
   wsdl:operation name=searchTest
  wsdlsoap:operation soapAction=/
  wsdl:input name=searchTestRequest
 wsdlsoap:body use=literal/
  /wsdl:input
  wsdl:output name=searchTestResponse
 wsdlsoap:body use=literal/
  /wsdl:output
   /wsdl:operation
/wsdl:binding

wsdl:service name=TestSearchEngineInterfaceService
 wsdl:port binding=tns:wsTestsearchdetailsSoapBinding
name=wsTestsearchdetails
wsdlsoap:address
  location=http://localhost:8080/axis/services/wsTestsearchdetails/
 /wsdl:port
  /wsdl:service
/wsdl:definitions

Anne

On Sat, Mar 29, 2008 at 10:20 AM, sh_santosh [EMAIL PROTECTED] wrote:

  Hi Anne,

  Yes, i need to implement both client and server. as a input SOAP
  request inside SOAP body payload containing the
  RequestDetail element.

   Yes, i have a sample document for the response message also.
  ResponseDetail
ProductDetail
   -- some Strings
/ProductDetail
  /ResponseDetail

   Now, I am searching for How to Generate java2wsdl   and  wsdl2java any
  tool or command that will able to work wiith Axis 1.3, tomcat 5.5.20. and
  java.

  There is not a single proper practical example given on Internet for
  Documnet litetal web services with Axis.

  Have look into this practically described example to RPC encoded with Axis .
  This very helpful.
  http://www.onjava.com/pub/a/onjava/2002/06/05/axis.html?page=2

  I am searching Same type of example for Documnet litetal web services with
  Axis.

  Please 

soapenv:Server.userException - SimpleDeserializer encountered a child element, which is NOT expected, in something it was trying to deserialize

2008-03-26 Thread sh_santosh

Dear All,

   I have installed Axis 1.3 (Java) and provided a service to
Requester(other end). At my end when i invoking web service by passing
XmlRequest as string from java client program then it returns proper
Response xml. but

   The Service Requester(other end) invoking our web services using
WFETCH tool. They send SOAP request then from Service Provider end(my end)
returns the soapenv:Server.userException - SimpleDeserializer encountered a
child element, which is NOT expected, in something it was trying to
deserialize. 

Please see  below the SOAP Request, Exception / Error and WSDL file.

   Requester send SOAP request is :-

Content-Type: text/xml; charset=utf-8
SOAPAction: http://www.eviivo.com/UTSv/2004/01/01/SearchTest;

?xml version=1.0 encoding=utf-8?
soap:Envelope xmlns:soap=http://schemas.xmlsoap.org/soap/envelope/;
xmlns:xsi=http://www.w3.org/2001/XMLSchema-instance;
xmlns:xsd=http://www.w3.org/2001/XMLSchema;
  soap:Body
RequestDetail
BookDetail
Date2008-09-09/Date
CityLondon/City
/BookDetail
PersonDetail
NameSantosh/Name
Age25/Age
AddressLondon/Address
/PersonDetail
/RequestDetail
  /soap:Body
/soap:Envelope

=x

Provider end return Exception / Error is :-

?xml version=1.0 encoding=utf-8?
soapenv:Envelope
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;
soapenv:Body
soapenv:Fault
faultcodesoapenv:Server.userException/faultcode
faultstringorg.xml.sax.SAXException: 
SimpleDeserializer encountered a
child element, which is NOT expected, in something it was trying to
deserialize./faultstring
detail
ns1:hostname
xmlns:ns1=http://xml.apache.org/axis/;xmlapps.testgo1.com/ns1:hostname
/detail
/soapenv:Fault
/soapenv:Body
/soapenv:Envelope

===x

WSDL file is :-

?xml version=1.0 encoding=UTF-8?
wsdl:definitions targetNamespace=urn:TestSearchEngine
xmlns=http://schemas.xmlsoap.org/wsdl/;
xmlns:apachesoap=http://xml.apache.org/xml-soap;
xmlns:impl=urn:TestSearchEngine xmlns:intf=urn:TestSearchEngine
xmlns:soapenc=http://schemas.xmlsoap.org/soap/encoding/;
xmlns:wsdl=http://schemas.xmlsoap.org/wsdl/;
xmlns:wsdlsoap=http://schemas.xmlsoap.org/wsdl/soap/;
xmlns:xsd=http://www.w3.org/2001/XMLSchema;
!--WSDL created by Apache Axis version: 1.3
Built on Oct 05, 2005 (05:23:37 EDT)--

   wsdl:message name=searchTestRequest

  wsdl:part name=in0 type=soapenc:string/

   /wsdl:message

   wsdl:message name=searchTestResponse

  wsdl:part name=searchTestReturn type=soapenc:string/

   /wsdl:message

   wsdl:portType name=TestSearchEngineInterface

  wsdl:operation name=searchTest parameterOrder=in0

 wsdl:input message=impl:searchTestRequest
name=searchTestRequest/

 wsdl:output message=impl:searchTestResponse
name=searchTestResponse/

  /wsdl:operation

   /wsdl:portType

   wsdl:binding name=wsTestsearchdetailsSoapBinding
type=impl:TestSearchEngineInterface

  wsdlsoap:binding style=rpc
transport=http://schemas.xmlsoap.org/soap/http/

  wsdl:operation name=searchTest

 wsdlsoap:operation soapAction=/

 wsdl:input name=searchTestRequest

wsdlsoap:body
encodingStyle=http://schemas.xmlsoap.org/soap/encoding/;
namespace=urn:TestSearchEngine use=encoded/

 /wsdl:input

 wsdl:output name=searchTestResponse

wsdlsoap:body
encodingStyle=http://schemas.xmlsoap.org/soap/encoding/;
namespace=urn:TestSearchEngine use=encoded/

 /wsdl:output

  /wsdl:operation

   /wsdl:binding

   wsdl:service name=TestSearchEngineInterfaceService

  wsdl:port binding=impl:wsTestsearchdetailsSoapBinding
name=wsTestsearchdetails

 wsdlsoap:address
location=http://localhost:8080/axis/services/wsTestsearchdetails/

  /wsdl:port

   /wsdl:service

/wsdl:definitions

=x



1. I am thinking that SOAP request what they send that is not proper/
requiered to my end(provider). if so what change i have to do.

I am googling it from last 3 day's and found some tricks which i tried 
but
Nothing works.


Thanx and Regards
Santosh




-- 
View this message in context: 
http://www.nabble.com/soapenv%3AServer.userException---SimpleDeserializer-encountered-a-child-element%2C-which-is-NOT-expected%2C-in-something-it-was-trying-to-deserialize-tp16296688p16296688.html
Sent from the Axis - User mailing list archive at Nabble.com.


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For 

Re: soapenv:Server.userException - SimpleDeserializer encountered a child element, which is NOT expected, in something it was trying to deserialize

2008-03-26 Thread Anne Thomas Manes
The message you are sending doesn't match the expected input specified
by the WSDL.
The service is expecting something lie this:

?xml version=1.0 encoding=utf-8?
soap:Envelope xmlns:soap=http://schemas.xmlsoap.org/soap/envelope/;
xmlns:xsi=http://www.w3.org/2001/XMLSchema-instance;
xmlns:xsd=http://www.w3.org/2001/XMLSchema;
xmlns:enc=http://schemas.xmlsoap.org/soap/encoding/;
soap:Body encodingStyle=http://schemas.xmlsoap.org/soap/encoding/;
  in0 xmlns=urn:TestSearchEngine  xsi:type=enc:string
  some string
  /in0
/soap:Body
/soap:Envelope

Anne



On Wed, Mar 26, 2008 at 3:23 AM, sh_santosh [EMAIL PROTECTED] wrote:

  Dear All,

I have installed Axis 1.3 (Java) and provided a service to
  Requester(other end). At my end when i invoking web service by passing
  XmlRequest as string from java client program then it returns proper
  Response xml. but

The Service Requester(other end) invoking our web services using
  WFETCH tool. They send SOAP request then from Service Provider end(my end)
  returns the soapenv:Server.userException - SimpleDeserializer encountered a
  child element, which is NOT expected, in something it was trying to
  deserialize.

  Please see  below the SOAP Request, Exception / Error and WSDL file.

Requester send SOAP request is :-

  Content-Type: text/xml; charset=utf-8
  SOAPAction: http://www.eviivo.com/UTSv/2004/01/01/SearchTest;

  ?xml version=1.0 encoding=utf-8?
  soap:Envelope xmlns:soap=http://schemas.xmlsoap.org/soap/envelope/;
  xmlns:xsi=http://www.w3.org/2001/XMLSchema-instance;
  xmlns:xsd=http://www.w3.org/2001/XMLSchema;
   soap:Body
 RequestDetail
 BookDetail
 Date2008-09-09/Date
 CityLondon/City
 /BookDetail
 PersonDetail
 NameSantosh/Name
 Age25/Age
 AddressLondon/Address
 /PersonDetail
 /RequestDetail
   /soap:Body
  /soap:Envelope

  =x

 Provider end return Exception / Error is :-

  ?xml version=1.0 encoding=utf-8?
  soapenv:Envelope
 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;
 soapenv:Body
 soapenv:Fault
 faultcodesoapenv:Server.userException/faultcode
 faultstringorg.xml.sax.SAXException: 
 SimpleDeserializer encountered a
  child element, which is NOT expected, in something it was trying to
  deserialize./faultstring
 detail
 ns1:hostname
  xmlns:ns1=http://xml.apache.org/axis/;xmlapps.testgo1.com/ns1:hostname
 /detail
 /soapenv:Fault
 /soapenv:Body
  /soapenv:Envelope

  ===x

 WSDL file is :-

  ?xml version=1.0 encoding=UTF-8?
  wsdl:definitions targetNamespace=urn:TestSearchEngine
  xmlns=http://schemas.xmlsoap.org/wsdl/;
  xmlns:apachesoap=http://xml.apache.org/xml-soap;
  xmlns:impl=urn:TestSearchEngine xmlns:intf=urn:TestSearchEngine
  xmlns:soapenc=http://schemas.xmlsoap.org/soap/encoding/;
  xmlns:wsdl=http://schemas.xmlsoap.org/wsdl/;
  xmlns:wsdlsoap=http://schemas.xmlsoap.org/wsdl/soap/;
  xmlns:xsd=http://www.w3.org/2001/XMLSchema;
  !--WSDL created by Apache Axis version: 1.3
  Built on Oct 05, 2005 (05:23:37 EDT)--

wsdl:message name=searchTestRequest

   wsdl:part name=in0 type=soapenc:string/

/wsdl:message

wsdl:message name=searchTestResponse

   wsdl:part name=searchTestReturn type=soapenc:string/

/wsdl:message

wsdl:portType name=TestSearchEngineInterface

   wsdl:operation name=searchTest parameterOrder=in0

  wsdl:input message=impl:searchTestRequest
  name=searchTestRequest/

  wsdl:output message=impl:searchTestResponse
  name=searchTestResponse/

   /wsdl:operation

/wsdl:portType

wsdl:binding name=wsTestsearchdetailsSoapBinding
  type=impl:TestSearchEngineInterface

   wsdlsoap:binding style=rpc
  transport=http://schemas.xmlsoap.org/soap/http/

   wsdl:operation name=searchTest

  wsdlsoap:operation soapAction=/

  wsdl:input name=searchTestRequest

 wsdlsoap:body
  encodingStyle=http://schemas.xmlsoap.org/soap/encoding/;
  namespace=urn:TestSearchEngine use=encoded/

  /wsdl:input

  wsdl:output name=searchTestResponse

 wsdlsoap:body
  encodingStyle=http://schemas.xmlsoap.org/soap/encoding/;
  namespace=urn:TestSearchEngine use=encoded/

  /wsdl:output

   /wsdl:operation

/wsdl:binding

wsdl:service name=TestSearchEngineInterfaceService

   wsdl:port binding=impl:wsTestsearchdetailsSoapBinding
  name=wsTestsearchdetails

  wsdlsoap:address
  

Re: soapenv:Server.userException - SimpleDeserializer encountered a child element, which is NOT expected, in something it was trying to deserialize

2008-03-26 Thread sh_santosh

Hi Anne ,

  1st of all Thank you very much for your Reply.
I was just going through Blogs written by you and earlier post that you
replied for others.

   Yes, it is clear that server required SOAP request is not sent by client
or requester program.
Some difference in SOAP msg. so i got exception. but

I have No Choice, i have to use that SOAP request only send by requester
program. 
Now in this situation what change i have to do in my WSDL or wsdd or code.

is it possible that we made some change in WSDL or wsdd. so that i am
able to Accept SOAP request and process it further.  Give some idea
regarding this issues keeping it that i have to use that SOAP request only.

   Please see the SOAP request  send by Requester or client program  :-

Content-Type: text/xml; charset=utf-8
SOAPAction: http://www.test.com/UTSv/2004/01/01/SearchTest;

?xml version=1.0 encoding=utf-8?
soap:Envelope xmlns:soap=http://schemas.xmlsoap.org/soap/envelope/;
xmlns:xsi=http://www.w3.org/2001/XMLSchema-instance;
xmlns:xsd=http://www.w3.org/2001/XMLSchema;
  soap:Body
RequestDetail
BookDetail
Date2008-09-09/Date
CityLondon/City
/BookDetail
PersonDetail
NameSantosh/Name
Age25/Age
AddressLondon/Address
/PersonDetail
/RequestDetail
  /soap:Body
/soap:Envelope

=x


Regards
Santosh


Anne Thomas Manes wrote:
 
 The message you are sending doesn't match the expected input specified
 by the WSDL.
 The service is expecting something lie this:
 
 ?xml version=1.0 encoding=utf-8?
 soap:Envelope xmlns:soap=http://schemas.xmlsoap.org/soap/envelope/;
 xmlns:xsi=http://www.w3.org/2001/XMLSchema-instance;
 xmlns:xsd=http://www.w3.org/2001/XMLSchema;
 xmlns:enc=http://schemas.xmlsoap.org/soap/encoding/;
 soap:Body encodingStyle=http://schemas.xmlsoap.org/soap/encoding/;
   in0 xmlns=urn:TestSearchEngine  xsi:type=enc:string
   some string
   /in0
 /soap:Body
 /soap:Envelope
 
 Anne
 
 
 
 On Wed, Mar 26, 2008 at 3:23 AM, sh_santosh [EMAIL PROTECTED]
 wrote:

  Dear All,

I have installed Axis 1.3 (Java) and provided a service to
  Requester(other end). At my end when i invoking web service by passing
  XmlRequest as string from java client program then it returns proper
  Response xml. but

The Service Requester(other end) invoking our web services using
  WFETCH tool. They send SOAP request then from Service Provider end(my
 end)
  returns the soapenv:Server.userException - SimpleDeserializer
 encountered a
  child element, which is NOT expected, in something it was trying to
  deserialize.

  Please see  below the SOAP Request, Exception / Error and WSDL file.

Requester send SOAP request is :-

  Content-Type: text/xml; charset=utf-8
  SOAPAction: http://www.eviivo.com/UTSv/2004/01/01/SearchTest;

  ?xml version=1.0 encoding=utf-8?
  soap:Envelope xmlns:soap=http://schemas.xmlsoap.org/soap/envelope/;
  xmlns:xsi=http://www.w3.org/2001/XMLSchema-instance;
  xmlns:xsd=http://www.w3.org/2001/XMLSchema;
   soap:Body
 RequestDetail
 BookDetail
 Date2008-09-09/Date
 CityLondon/City
 /BookDetail
 PersonDetail
 NameSantosh/Name
 Age25/Age
 AddressLondon/Address
 /PersonDetail
 /RequestDetail
   /soap:Body
  /soap:Envelope

  =x

 Provider end return Exception / Error is :-

  ?xml version=1.0 encoding=utf-8?
  soapenv:Envelope
 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;
 soapenv:Body
 soapenv:Fault

 faultcodesoapenv:Server.userException/faultcode
 faultstringorg.xml.sax.SAXException:
 SimpleDeserializer encountered a
  child element, which is NOT expected, in something it was trying to
  deserialize./faultstring
 detail
 ns1:hostname
 
 xmlns:ns1=http://xml.apache.org/axis/;xmlapps.testgo1.com/ns1:hostname
 /detail
 /soapenv:Fault
 /soapenv:Body
  /soapenv:Envelope

  ===x

 WSDL file is :-

  ?xml version=1.0 encoding=UTF-8?
  wsdl:definitions targetNamespace=urn:TestSearchEngine
  xmlns=http://schemas.xmlsoap.org/wsdl/;
  xmlns:apachesoap=http://xml.apache.org/xml-soap;
  xmlns:impl=urn:TestSearchEngine xmlns:intf=urn:TestSearchEngine
  xmlns:soapenc=http://schemas.xmlsoap.org/soap/encoding/;
  xmlns:wsdl=http://schemas.xmlsoap.org/wsdl/;
  xmlns:wsdlsoap=http://schemas.xmlsoap.org/wsdl/soap/;
  xmlns:xsd=http://www.w3.org/2001/XMLSchema;
  

SimpleDeserializer encountered a child element, which is NOT expected, in something it was trying to deserialize.

2008-02-28 Thread sh_santosh

Hi,

I have created a web-service using axis 1.2 and deployed it on a server.
When I make test calls to this web-service using java code, I get proper
results.

Following is the java code that I use to call the web-service:

   String endpoint = http://wstest.com/axis/services/testservices;; 
   Service  service = new Service();
   Call call = (Call)service.createCall();

   call.setTargetEndpointAddress( new java.net.URL(endpoint) );
   call.setOperationName(new QName(urn:TestUrn ,
TestSearchMethod ));
   String sResultantXML = (String)call.invoke( new Object[] {
sRequestXML } ); 


But, when the same web-service is being called using wfetch it returns the
following error message

soapenv:Envelope 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;soapenv:Bodysoapenv:Faultfaultcodesoapenv:Server.userException/faultcodefaultstringorg.xml.sax.SAXException:
SimpleDeserializer encountered a child element, which is NOT expected, in
something it was trying to deserialize./faultstringdetailns1:hostname
xmlns:ns1=http://xml.apache.org/axis/;esrv2/ns1:hostname/detail/soapenv:Fault/soapenv:Body/soapenv:Envelope


The soap request used in wfetch is as follows:

?xml version=1.0 encoding=utf-8?\r\n
soap:Envelope xmlns:xsi=http://www.w3.org/2001/XMLSchema-instance;
xmlns:xsd=http://www.w3.org/2001/XMLSchema;
xmlns:soap=http://schemas.xmlsoap.org/soap/envelope/;\r\n
soap:Body\r\n
Root
 Child1\r\n
 Child2/\r\n
  /Child1\r\n 
/Root
/soap:Body\r\n
/soap:Envelope\r\n

I think that the problem is because of the \r\n occurances in the Soap
Request xml.

I have searched on the net regarding this issue but have not come across a
valid solution for this.

I will be thankful if anyone can help.

Thanks.




-- 
View this message in context: 
http://www.nabble.com/SimpleDeserializer-encountered-a-child-element%2C-which-is-NOT-expected%2C-in-something-it-was-trying-to-deserialize.-tp15735525p15735525.html
Sent from the Axis - User mailing list archive at Nabble.com.


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



org.xml.sax.SAXException: SimpleDeserializer encountered a child element, which is NOT expected, in something it was trying to deserialize.

2008-01-29 Thread axisnewbee

Hi Experts,

  Can i now why i am getting this error.

Below is the scenario:


I am using a functionality which is using two wsdl's.. These wsdls are
generated by WebSPhere WebServices.

I am using one client_deploy.wsdd for our security purposes and creating a
engine configuration for that


public static EngineConfiguration xyz_config = new
FileProvider(client_deploy_xyz.wsdd);

I am passing this engine Configurator for the serviceLocator of the client
code of both wsdls.

service1 = new
AdminServiceV001ServiceLocator(ClientDeployConfiguration.xyz_CONFIG);
service2 = new
PricingServiceV001ServiceLocator(ClientDeployConfiguration.xyz_config);

I my application when i try to use both services interchagably i am getting
this error..

Sequece ..
first used service1
next used service2
third again used serice1

i get a 


org.xml.sax.SAXException: SimpleDeserializer encountered a child element,
which is NOT expected, in something it was trying to deserialize.

  at
org.apache.axis.encoding.ser.SimpleDeserializer.onStartChild(SimpleDeserializer.java:145)

  at
org.apache.axis.encoding.DeserializationContext.startElement(DeserializationContext.java:1035)

  at
org.apache.axis.message.SAX2EventRecorder.replay(SAX2EventRecorder.java:165)

  at
org.apache.axis.message.MessageElement.publishToHandler(MessageElement.java:1141)

  at org.apache.axis.message.RPCElement.deserialize(RPCElement.java:236)

  at org.apache.axis.message.RPCElement.getParams(RPCElement.java:384)

  at org.apache.axis.client.Call.invoke(Call.java:2467)

  at org.apache.axis.client.Call.invoke(Call.java:2366)

  at org.apache.axis.client.Call.invoke(Call.java:1812)


Can anyone tell me what is the problem .. 
Do let me know if you have any clarifications ..

Note:

if i use different EngineConfigators i dont get this error


public static EngineConfiguration admin_config = new
FileProvider(client_deploy_xyz.wsdd);
public static EngineConfiguration pricing_config = new
FileProvider(client_deploy_xyz.wsdd);

but we have quick a lot of servies to be used in our applications.. and i am
not sure if this the correct solution.




Thanks,





-- 
View this message in context: 
http://www.nabble.com/org.xml.sax.SAXException%3A-SimpleDeserializer-encountered-a-child-element%2C-which-is-NOT-expected%2C-in-something-it-was-trying-to-deserialize.-tp15160285p15160285.html
Sent from the Axis - User mailing list archive at Nabble.com.


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: org.xml.sax.SAXException: SimpleDeserializer encountered a child element, which is NOT expected, in something it was trying to deserialize.

2008-01-29 Thread Martin Gainty
can you post the code ClientDeployConfiguration.java
and also post the code for AdminServiceV001ServiceLocator.java
please display client_deploy_xyz.wsdd

which version axis are you working with ..presumably 1.3 or 1.4?

which version axis.jar are you working with (display contents of manifest.mf
as contained within axis.jar..)

M-
- Original Message -
From: axisnewbee [EMAIL PROTECTED]
To: axis-user@ws.apache.org
Sent: Tuesday, January 29, 2008 9:32 AM
Subject: org.xml.sax.SAXException: SimpleDeserializer encountered a child
element, which is NOT expected, in something it was trying to deserialize.



 Hi Experts,

   Can i now why i am getting this error.

 Below is the scenario:


 I am using a functionality which is using two wsdl's.. These wsdls are
 generated by WebSPhere WebServices.

 I am using one client_deploy.wsdd for our security purposes and creating a
 engine configuration for that


 public static EngineConfiguration xyz_config = new
 FileProvider(client_deploy_xyz.wsdd);

 I am passing this engine Configurator for the serviceLocator of the client
 code of both wsdls.

 service1 = new
 AdminServiceV001ServiceLocator(ClientDeployConfiguration.xyz_CONFIG);
 service2 = new
 PricingServiceV001ServiceLocator(ClientDeployConfiguration.xyz_config);

 I my application when i try to use both services interchagably i am
getting
 this error..

 Sequece ..
 first used service1
 next used service2
 third again used serice1

 i get a


 org.xml.sax.SAXException: SimpleDeserializer encountered a child element,
 which is NOT expected, in something it was trying to deserialize.

   at

org.apache.axis.encoding.ser.SimpleDeserializer.onStartChild(SimpleDeseriali
zer.java:145)

   at

org.apache.axis.encoding.DeserializationContext.startElement(Deserialization
Context.java:1035)

   at

org.apache.axis.message.SAX2EventRecorder.replay(SAX2EventRecorder.java:165)

   at

org.apache.axis.message.MessageElement.publishToHandler(MessageElement.java:
1141)

   at
org.apache.axis.message.RPCElement.deserialize(RPCElement.java:236)

   at org.apache.axis.message.RPCElement.getParams(RPCElement.java:384)

   at org.apache.axis.client.Call.invoke(Call.java:2467)

   at org.apache.axis.client.Call.invoke(Call.java:2366)

   at org.apache.axis.client.Call.invoke(Call.java:1812)


 Can anyone tell me what is the problem ..
 Do let me know if you have any clarifications ..

 Note:

 if i use different EngineConfigators i dont get this error


 public static EngineConfiguration admin_config = new
 FileProvider(client_deploy_xyz.wsdd);
 public static EngineConfiguration pricing_config = new
 FileProvider(client_deploy_xyz.wsdd);

 but we have quick a lot of servies to be used in our applications.. and i
am
 not sure if this the correct solution.




 Thanks,





 --
 View this message in context:
http://www.nabble.com/org.xml.sax.SAXException%3A-SimpleDeserializer-encount
ered-a-child-element%2C-which-is-NOT-expected%2C-in-something-it-was-trying-
to-deserialize.-tp15160285p15160285.html
 Sent from the Axis - User mailing list archive at Nabble.com.


 -
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]




-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: org.xml.sax.SAXException: SimpleDeserializer encountered a child element, which is NOT expected, in something it was trying to deserialize.

2008-01-29 Thread axisnewbee

Hi,

 Thank u so much for responding.. I am attaching the files u have asked for.
Hope this will help u.. I am using axis 1.4 .. 

Manifest-Version: 1.0
Ant-Version: Apache Ant 1.6.5
Created-By: 1.4.2_08-b03 (Sun Microsystems Inc.)

Name: org/apache/axis
Implementation-Title: Apache Axis
Implementation-Version: 1.4 1855 April 22 2006
Implementation-Vendor: Apache Web Services



Thanks,


mgainty wrote:
 
 can you post the code ClientDeployConfiguration.java
 and also post the code for AdminServiceV001ServiceLocator.java
 please display client_deploy_xyz.wsdd
 
 which version axis are you working with ..presumably 1.3 or 1.4?
 
 which version axis.jar are you working with (display contents of
 manifest.mf
 as contained within axis.jar..)
 
 M-
 - Original Message -
 From: axisnewbee [EMAIL PROTECTED]
 To: axis-user@ws.apache.org
 Sent: Tuesday, January 29, 2008 9:32 AM
 Subject: org.xml.sax.SAXException: SimpleDeserializer encountered a child
 element, which is NOT expected, in something it was trying to deserialize.
 
 

 Hi Experts,

   Can i now why i am getting this error.

 Below is the scenario:


 I am using a functionality which is using two wsdl's.. These wsdls are
 generated by WebSPhere WebServices.

 I am using one client_deploy.wsdd for our security purposes and creating
 a
 engine configuration for that


 public static EngineConfiguration xyz_config = new
 FileProvider(client_deploy_xyz.wsdd);

 I am passing this engine Configurator for the serviceLocator of the
 client
 code of both wsdls.

 service1 = new
 AdminServiceV001ServiceLocator(ClientDeployConfiguration.xyz_CONFIG);
 service2 = new
 PricingServiceV001ServiceLocator(ClientDeployConfiguration.xyz_config);

 I my application when i try to use both services interchagably i am
 getting
 this error..

 Sequece ..
 first used service1
 next used service2
 third again used serice1

 i get a


 org.xml.sax.SAXException: SimpleDeserializer encountered a child element,
 which is NOT expected, in something it was trying to deserialize.

   at

 org.apache.axis.encoding.ser.SimpleDeserializer.onStartChild(SimpleDeseriali
 zer.java:145)

   at

 org.apache.axis.encoding.DeserializationContext.startElement(Deserialization
 Context.java:1035)

   at

 org.apache.axis.message.SAX2EventRecorder.replay(SAX2EventRecorder.java:165)

   at

 org.apache.axis.message.MessageElement.publishToHandler(MessageElement.java:
 1141)

   at
 org.apache.axis.message.RPCElement.deserialize(RPCElement.java:236)

   at
 org.apache.axis.message.RPCElement.getParams(RPCElement.java:384)

   at org.apache.axis.client.Call.invoke(Call.java:2467)

   at org.apache.axis.client.Call.invoke(Call.java:2366)

   at org.apache.axis.client.Call.invoke(Call.java:1812)


 Can anyone tell me what is the problem ..
 Do let me know if you have any clarifications ..

 Note:

 if i use different EngineConfigators i dont get this error


 public static EngineConfiguration admin_config = new
 FileProvider(client_deploy_xyz.wsdd);
 public static EngineConfiguration pricing_config = new
 FileProvider(client_deploy_xyz.wsdd);

 but we have quick a lot of servies to be used in our applications.. and i
 am
 not sure if this the correct solution.




 Thanks,





 --
 View this message in context:
 http://www.nabble.com/org.xml.sax.SAXException%3A-SimpleDeserializer-encount
 ered-a-child-element%2C-which-is-NOT-expected%2C-in-something-it-was-trying-
 to-deserialize.-tp15160285p15160285.html
 Sent from the Axis - User mailing list archive at Nabble.com.


 -
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]


 
 
 -
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]
 
 
 
http://www.nabble.com/file/p15168037/client_deploy_poe.wsdd
client_deploy_poe.wsdd 
http://www.nabble.com/file/p15168037/ClientDeployConfiguration.java
ClientDeployConfiguration.java 
http://www.nabble.com/file/p15168037/STSAdminServiceV001ServiceLocator.java
STSAdminServiceV001ServiceLocator.java 
-- 
View this message in context: 
http://www.nabble.com/org.xml.sax.SAXException%3A-SimpleDeserializer-encountered-a-child-element%2C-which-is-NOT-expected%2C-in-something-it-was-trying-to-deserialize.-tp15160285p15168037.html
Sent from the Axis - User mailing list archive at Nabble.com.


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: org.xml.sax.SAXException: SimpleDeserializer encountered a child element, which is NOT expected, in something it was trying to deserialize.

2007-12-04 Thread Srinivas Gupta
I'm not too familiar with Rampart, but the security handlers we're using are 
mandated by our customer.  So, we have to use them, as well as Axis 1.2.1.

I can't seem to find a consistent resolution on this list, so right now I'm 
trying to tweak the server-config.wsdd.  


- Original Message 
From: Martin Gainty [EMAIL PROTECTED]
To: axis-user@ws.apache.org
Sent: Monday, December 3, 2007 9:06:45 PM
Subject: Re: org.xml.sax.SAXException: SimpleDeserializer encountered a child 
element, which is NOT expected, in something it was trying to deserialize.




 

do these security handlers have any advantages over 
rampart ?

M-


  - Original Message - 

  From: 
  Peter 


  To: axis-user@ws.apache.org 

  Sent: Monday, December 03, 2007 7:56 
  PM

  Subject: Re: org.xml.sax.SAXException: 
  SimpleDeserializer encountered a child element, which is NOT expected, in 
  something it was trying to deserialize.

  

We're using 3rd party security handlers that only work in Axis 
  1.2.1.  

Srinivas Gupta

Martin Gainty [EMAIL PROTECTED] wrote:
  
DIV {
MARGIN:0px;}



Synivas-

why not 
upgrade?

M--


  - 
  Original Message - 

  From: 
  Srinivas 
  Gupta 

  To: 
  axis-user@ws.apache.org 

  Sent: 
  Monday, December 03, 2007 5:22 PM

  Subject: 
  org.xml.sax.SAXException: SimpleDeserializer encountered a child element, 
  which is NOT expected, in something it was trying to deserialize.

  


  
  Hello,

I have a test client whose classes were generated by 
  Axis 1.2.1 wsdl2java, and I use this to hit services also generated by 
  wsdl2java.  The services comprise what we call a data 
  provider.  I have used this test client against many data providers 
  without any problems.  But now I'm getting the following exception 
  when I try to hit a new data provider:

org.xml.sax.SAXException: 
  SimpleDeserializer encountered a child element, which is NOT expected, in 
  something it was trying to deserialize

This data provider is using 
  the same WSDL as all of the other data providers.  The only thing 
  that might be different with this data provider is its 
  server-config.wsdd.  I've tried tweaking the server-config.wsdd, but 
  to no avail.  For example, I tried changing style=document to 
  style=rpc.  I wish that I could upgrade to Axis 1.4 or Axis 2.0, 
  but we are constrained to Axis 1.2.1 because of project 
  requirements...

Does anyone have any suggestions?

Thank 
  you.

Srinivas Gupta





  
  Be a better pen pal. Text or chat with friends inside Yahoo! Mail. See 
  how.

  
  

  Be a better pen pal. Text or chat with friends inside Yahoo! Mail. See 
  how.





  

Never miss a thing.  Make Yahoo your home page. 
http://www.yahoo.com/r/hs

org.xml.sax.SAXException: SimpleDeserializer encountered a child element, which is NOT expected, in something it was trying to deserialize.

2007-12-03 Thread Srinivas Gupta
Hello,

I have a test client whose classes were generated by Axis 1.2.1 wsdl2java, and 
I use this to hit services also generated by wsdl2java.  The services comprise 
what we call a data provider.  I have used this test client against many data 
providers without any problems.  But now I'm getting the following exception 
when I try to hit a new data provider:

org.xml.sax.SAXException: SimpleDeserializer encountered a child element, which 
is NOT expected, in something it was trying to deserialize

This data provider is using the same WSDL as all of the other data providers.  
The only thing that might be different with this data provider is its 
server-config.wsdd.  I've tried tweaking the server-config.wsdd, but to no 
avail.  For example, I tried changing style=document to style=rpc.  I wish 
that I could upgrade to Axis 1.4 or Axis 2.0, but we are constrained to Axis 
1.2.1 because of project requirements...

Does anyone have any suggestions?

Thank you.

Srinivas Gupta





  

Never miss a thing.  Make Yahoo your home page. 
http://www.yahoo.com/r/hs

Re: org.xml.sax.SAXException: SimpleDeserializer encountered a child element, which is NOT expected, in something it was trying to deserialize.

2007-12-03 Thread Martin Gainty
Synivas-

why not upgrade?

M--
  - Original Message - 
  From: Srinivas Gupta 
  To: axis-user@ws.apache.org 
  Sent: Monday, December 03, 2007 5:22 PM
  Subject: org.xml.sax.SAXException: SimpleDeserializer encountered a child 
element, which is NOT expected, in something it was trying to deserialize.


  Hello,

  I have a test client whose classes were generated by Axis 1.2.1 wsdl2java, 
and I use this to hit services also generated by wsdl2java.  The services 
comprise what we call a data provider.  I have used this test client against 
many data providers without any problems.  But now I'm getting the following 
exception when I try to hit a new data provider:

  org.xml.sax.SAXException: SimpleDeserializer encountered a child element, 
which is NOT expected, in something it was trying to deserialize

  This data provider is using the same WSDL as all of the other data providers. 
 The only thing that might be different with this data provider is its 
server-config.wsdd.  I've tried tweaking the server-config.wsdd, but to no 
avail.  For example, I tried changing style=document to style=rpc.  I wish 
that I could upgrade to Axis 1.4 or Axis 2.0, but we are constrained to Axis 
1.2.1 because of project requirements...

  Does anyone have any suggestions?

  Thank you.

  Srinivas Gupta




--
  Be a better pen pal. Text or chat with friends inside Yahoo! Mail. See how.

Re: org.xml.sax.SAXException: SimpleDeserializer encountered a child element, which is NOT expected, in something it was trying to deserialize.

2007-12-03 Thread Peter
We're using 3rd party security handlers that only work in Axis 1.2.1.  

Srinivas Gupta

Martin Gainty [EMAIL PROTECTED] wrote:DIV {  MARGIN: 0px }Synivas-

why not  upgrade?

M--
- Original Message - 
   From:SrinivasGupta 
   To: axis-user@ws.apache.org 
   Sent: Monday, December 03, 2007 5:22PM
   Subject: org.xml.sax.SAXException:SimpleDeserializer encountered a child 
element, which is NOT expected, insomething it was trying to deserialize.
   

  Hello,

I have a test client whose classes were generated by Axis1.2.1 wsdl2java, 
and I use this to hit services also generated bywsdl2java.  The services 
comprise what we call a data provider.  Ihave used this test client 
against many data providers without anyproblems.  But now I'm getting the 
following exception when I try to hita new data provider:

org.xml.sax.SAXException: SimpleDeserializerencountered a child element, 
which is NOT expected, in something it was tryingto deserialize

This data provider is using the same WSDL as all of theother data 
providers.  The only thing that might be different with thisdata provider 
is its server-config.wsdd.  I've tried tweaking theserver-config.wsdd, but 
to no avail.  For example, I tried changingstyle=document to style=rpc. 
 I wish that I could upgrade to Axis 1.4or Axis 2.0, but we are constrained 
to Axis 1.2.1 because of projectrequirements...

Does anyone have any suggestions?

Thankyou.

Srinivas Gupta




   
-
   Be a better pen pal. Text or chat with friends inside Yahoo! Mail. See
how.

   
-
Be a better pen pal. Text or chat with friends inside Yahoo! Mail. See how.

Re: org.xml.sax.SAXException: SimpleDeserializer encountered a child element, which is NOT expected, in something it was trying to deserialize.

2007-12-03 Thread Martin Gainty
do these security handlers have any advantages over rampart ?

M-
  - Original Message - 
  From: Peter 
  To: axis-user@ws.apache.org 
  Sent: Monday, December 03, 2007 7:56 PM
  Subject: Re: org.xml.sax.SAXException: SimpleDeserializer encountered a child 
element, which is NOT expected, in something it was trying to deserialize.


  We're using 3rd party security handlers that only work in Axis 1.2.1.  

  Srinivas Gupta

  Martin Gainty [EMAIL PROTECTED] wrote:
Synivas-

why not upgrade?

M--
  - Original Message - 
  From: Srinivas Gupta 
  To: axis-user@ws.apache.org 
  Sent: Monday, December 03, 2007 5:22 PM
  Subject: org.xml.sax.SAXException: SimpleDeserializer encountered a child 
element, which is NOT expected, in something it was trying to deserialize.


  Hello,

  I have a test client whose classes were generated by Axis 1.2.1 
wsdl2java, and I use this to hit services also generated by wsdl2java.  The 
services comprise what we call a data provider.  I have used this test client 
against many data providers without any problems.  But now I'm getting the 
following exception when I try to hit a new data provider:

  org.xml.sax.SAXException: SimpleDeserializer encountered a child element, 
which is NOT expected, in something it was trying to deserialize

  This data provider is using the same WSDL as all of the other data 
providers.  The only thing that might be different with this data provider is 
its server-config.wsdd.  I've tried tweaking the server-config.wsdd, but to no 
avail.  For example, I tried changing style=document to style=rpc.  I wish 
that I could upgrade to Axis 1.4 or Axis 2.0, but we are constrained to Axis 
1.2.1 because of project requirements...

  Does anyone have any suggestions?

  Thank you.

  Srinivas Gupta




--
  Be a better pen pal. Text or chat with friends inside Yahoo! Mail. See 
how.




--
  Be a better pen pal. Text or chat with friends inside Yahoo! Mail. See how.

Re: simpledeserializer encountered a child element, which is NOT expected, in something it was trying to deserialize

2007-02-13 Thread Lindsey Hess
I got around the previous exception by defining bean mappings for all complex 
types.  Now I get the following exception:

   Invalid element in SearchResponseType - metadata

  I have a bean mapping set up for metadata, which is a complex type.  So,
I'm not sure what's going on.  Has anyone seen this before?
   
  Lindsey

Anne Thomas Manes [EMAIL PROTECTED] wrote:
  You need to define bean mappings for all complex types.

On 2/12/07, Lindsey Hess 
wrote:
 Thank you. Perhaps I'm getting further along. I tried the code that you
 said is appropriate, and I now get the following exception:

 org.xml.sax.SAXException: Deserializing parameter 'id': could not find
 deserializer for type {urn:ifis-wsdl}SearchResponseType

 Do you have any ideas, Anne?

 Thank you,

 Lindsey

 Anne Thomas Manes wrote:
 That would be appropriate.

 On 2/12/07, Lindsey Hess wrote:
  Thanks, Anne. I will try your suggestions. Is it necessary to set the
  resultType for my my call? Should I do something like this:
 
  QName qnSearchResponse=new QName(urn:ifis-wsdl, SearchResponseType);
  callSearch.setReturnType(qnSearchResponse);
 
  Or is that wrong or unncessary?
 
  Anne Thomas Manes wrote:
  Lindsey,
 
  First issue: You've imported your schema namespace incorrectly. You
  can't use the to import a schema. You must use
  instead. must appear within the
  definition.
 
  Second issue: Based on your current WSDL, your method signature looks like
  this:
 
  searchResponse search(searchRequest);
 
  If you want your method signature to accept and return parameters
  rather than value objects, then you must define the WSDL using the
  wrapped convention (see [1]), and in your WSDD you should define the
  service thus:
 
 
 
  Third issue: Remove the namespace attribute from your
  and definitions. (The namespace attribute should be used
  only with style=rpc.) They should be defined thus:
 
 
  and
 
 
  I've also seen a recurring problem with schemas that have a namespace
  URI that ends with #. If you fix the issues above and still have
  this problem, I suggest your try removing the # from the namespace.
 
  Anne
 
  On 2/12/07, Lindsey Hess wrote:
   Hi Anne,
  
   Attached is the WSDL.
  
   From my client code, I'm doing this:
  
   Object[] opParamsSearch=(new PostiveInteger(m_Timeout), queryType);
   //queryType is a complex type
  
   SearchResponseType searchResponse;
   try{
  
  
 
 searchResponse=(SearchResponseType)callSearch.invoke(opParamsSearch);
   }catch(Exception e)
   {
   e.printStackTrace();
   }
  
  
   It may not be apparent from the WSDL, but SearchResponseType returns an
 id
   and a result of type ResultType. ResultType is a complex type. It
 contains
   a number of required parameters, included a complex type called
 metadata.
   Metadata is essentially an array. So, every search response will contain
  an
   id, results, and an array of metadata.
  
   I should note that in my server-config.wsdd file I have all of the
  necessary
   serializes/deserializers listed (WSDL2Java created them). I'm also
  defining
   my service as follows:
  
  
  
   Thank you!
  
   Lindsey
  
   Anne Thomas Manes wrote:
   Can you post the WSDL please?
  
   On 2/12/07, Lindsey Hess wrote:
Hi,
   
I've run Axis 1.4's WSDL2Java against my WSDL and associated schemas,
  and
generated a number of classes. My WSDL contains a number of complex
  types.
   
When I invoke a web service from some client code, I get the following
exception:
   
simpledeserializer encountered a child element, which is NOT
 expected,
  in
something it was trying to deserialize
   
I don't understand why I'm getting this, as I'm setting the required
parameters in my server code as specified in my WSDL. Does anyone have
  any
suggestions?
   
Thank you,
   
Lindsey
   

Everyone is raving about the all-new Yahoo! Mail beta.
   
   
  
  
 
 -
   To unsubscribe, e-mail:
  [EMAIL PROTECTED]
   For additional commands, e-mail: [EMAIL PROTECTED]
  
  
  
  
   
   Any questions? Get answers on any topic at Yahoo! Answers. Try it now.
   --0-1514824370-1171307635=:47831--
  
  
  
 
 
 
  
  Get your own web address.
  Have a HUGE year through Yahoo! Small Business.
 
 



 
 Be a PS3 game guru.
 Get your game face on with the latest PS3 news and previews at Yahoo! Games.




 
-
Be a PS3 game guru.
Get your game face on with the latest PS3 news and previews at Yahoo! Games.

Re: simpledeserializer encountered a child element, which is NOT expected, in something it was trying to deserialize

2007-02-13 Thread Lindsey Hess
Here's a follow-up to my previous posting.
   
  My Axis 1.4 client code is calling a web service that returns a complex type, 
which, in turn, contains other complex types.  If I try the following client 
code:
   
  ...
  callSearch.setReturnType(qnSearchResponse);// SearchResponse is a complex type
  Object[] opParamsSearch = {new PositiveInteger(m_Timeout), queryType}; 
//queryType is a complex type
  SearchResponseType searchResponse=new SearchResponseType();
  searchResponse=(SearchResponseType)callSearch.invoke(opParamsSearch);
   
  I get the following exception:
   
   Invalid element in SearchResponseType - metadata

  Where metadata is a complex type (an array called ResultTypeMetadata).
   
  Now, if I change callSearch.setReturnType(qnSearchResponse); to 
callSearch.setReturnType(XMLType.SOAP_ARRAY); I get the following exception:
   
  org.xml.sax.SAXException: Found character data inside an array element while 
deserializing
   
   
  Can someone please tell me what I'm doing wrong?  How should I set the the 
return type?  How do I get around this exception?
   
  Thank you.
   
  Lindsey
   
  

Lindsey Hess [EMAIL PROTECTED] wrote:
I got around the previous exception by defining bean mappings for all 
complex types.  Now I get the following exception:

   Invalid element in SearchResponseType - metadata

  I have a bean mapping set up for metadata, which is a complex type.  So,
I'm not sure what's going on.  Has anyone seen this before?
   
  Lindsey

Anne Thomas Manes [EMAIL PROTECTED] wrote:
  You need to define bean mappings for all complex types.

On 2/12/07, Lindsey Hess 
wrote:
 Thank you. Perhaps I'm getting further along. I tried the code that you
 said is appropriate, and I now get the following exception:

 org.xml.sax.SAXException: Deserializing parameter 'id': could not find
 deserializer for type {urn:ifis-wsdl}SearchResponseType

 Do you have any ideas, Anne?

 Thank you,

 Lindsey

 Anne Thomas Manes wrote:
 That would be appropriate.

 On 2/12/07, Lindsey Hess wrote:
  Thanks, Anne. I will try your suggestions. Is it necessary to set the
  resultType for my my call? Should I do something like this:
 
  QName qnSearchResponse=new QName(urn:ifis-wsdl, SearchResponseType);
  callSearch.setReturnType(qnSearchResponse);
 
  Or is that wrong or unncessary?
 
  Anne Thomas Manes wrote:
  Lindsey,
 
  First issue: You've imported your schema namespace incorrectly. You
  can't use the to import a schema. You must use
  instead. must appear within the
  definition.
 
  Second issue: Based on your current WSDL, your method signature looks like
  this:
 
  searchResponse search(searchRequest);
 
  If you want your method signature to accept and return parameters
  rather than value objects, then you must define the WSDL using the
  wrapped convention (see [1]), and in your WSDD you should define the
  service thus:
 
 
 
  Third issue: Remove the namespace attribute from your
  and definitions. (The namespace attribute should be used
  only with style=rpc.) They should be defined thus:
 
 
  and
 
 
  I've also seen a recurring problem with schemas that have a namespace
  URI that ends with #. If you fix the issues above and still have
  this problem, I suggest your try removing the # from the namespace.
 
  Anne
 
  On 2/12/07, Lindsey Hess wrote:
   Hi Anne,
  
   Attached is the WSDL.
  
   From my client code, I'm doing this:
  
   Object[] opParamsSearch=(new PostiveInteger(m_Timeout), queryType);
   //queryType is a complex type
  
   SearchResponseType searchResponse;
   try{
  
  
 
 searchResponse=(SearchResponseType)callSearch.invoke(opParamsSearch);
   }catch(Exception e)
   {
   e.printStackTrace();
   }
  
  
   It may not be apparent from the WSDL, but SearchResponseType returns an
 id
   and a result of type ResultType. ResultType is a complex type. It
 contains
   a number of required parameters, included a complex type called
 metadata.
   Metadata is essentially an array. So, every search response will contain
  an
   id, results, and an array of metadata.
  
   I should note that in my server-config.wsdd file I have all of the
  necessary
   serializes/deserializers listed (WSDL2Java created them). I'm also
  defining
   my service as follows:
  
  
  
   Thank you!
  
   Lindsey
  
   Anne Thomas Manes wrote:
   Can you post the WSDL please?
  
   On 2/12/07, Lindsey Hess wrote:
Hi,
   
I've run Axis 1.4's WSDL2Java against my WSDL and associated schemas,
  and
generated a number of classes. My WSDL contains a number of complex
  types.
   
When I invoke a web service from some client code, I get the following
exception:
   
simpledeserializer encountered a child element, which is NOT
 expected,
  in
something it was trying to deserialize
   
I don't understand why I'm getting this, as I'm setting the required
parameters in my server code as specified in my WSDL. Does anyone have
  any
suggestions?
   
Thank you,
   
 

Re: simpledeserializer encountered a child element, which is NOT expected, in something it was trying to deserialize

2007-02-12 Thread Anne Thomas Manes

Can you post the WSDL please?

On 2/12/07, Lindsey Hess [EMAIL PROTECTED] wrote:

Hi,

I've run Axis 1.4's WSDL2Java against my WSDL and associated schemas, and
generated a number of classes.  My WSDL contains a number of complex types.

When I invoke a web service from some client code, I get the following
exception:

simpledeserializer encountered a child element, which is NOT expected, in
something it was trying to deserialize

I don't understand why I'm getting this, as I'm setting the required
parameters in my server code as specified in my WSDL.  Does anyone have any
suggestions?

Thank you,

Lindsey

 
Everyone is raving about the all-new Yahoo! Mail beta.




-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: simpledeserializer encountered a child element, which is NOT expected, in something it was trying to deserialize

2007-02-12 Thread Anne Thomas Manes

Lindsey,

First issue: You've imported your schema namespace incorrectly. You
can't use the wsdl:import to import a schema. You must use
xs:import instead. xsd:import must appear within the xs:schema
definition.

Second issue: Based on your current WSDL, your method signature looks like this:

 searchResponse search(searchRequest);

If you want your method signature to accept and return parameters
rather than value objects, then you must define the WSDL using the
wrapped convention (see [1]), and in your WSDD you should define the
service thus:

  service name=search provider=java:RPC style=wrapped use=literal

Third issue: Remove the namespace attribute from your soap:body
and soap:fault definitions. (The namespace attribute should be used
only with style=rpc.) They should be defined thus:

  soap:body use=literal
  and
  soap:fault name=[name] use=literal

I've also seen a recurring problem with schemas that have a namespace
URI that ends with #. If you fix the issues above and still have
this problem, I suggest your try removing the # from the namespace.

Anne

On 2/12/07, Lindsey Hess [EMAIL PROTECTED] wrote:

Hi Anne,

Attached is the WSDL.

From my client code, I'm doing this:

Object[] opParamsSearch=(new PostiveInteger(m_Timeout), queryType);
//queryType is a complex type

SearchResponseType searchResponse;
try{

searchResponse=(SearchResponseType)callSearch.invoke(opParamsSearch);
}catch(Exception e)
{
  e.printStackTrace();
}


It may not be apparent from the WSDL, but SearchResponseType returns an id
and a result of type ResultType.  ResultType is a complex type.  It contains
a number of required parameters, included a complex type called metadata.
Metadata is essentially an array.  So, every search response will contain an
id, results, and an array of metadata.

I should note that in my server-config.wsdd file I have all of the necessary
serializes/deserializers listed (WSDL2Java created them).  I'm also defining
my service as follows:

service name=search provider=java:RPC style=document use=literal

Thank you!

Lindsey

Anne Thomas Manes [EMAIL PROTECTED] wrote:
Can you post the WSDL please?

On 2/12/07, Lindsey Hess wrote:
 Hi,

 I've run Axis 1.4's WSDL2Java against my WSDL and associated schemas, and
 generated a number of classes. My WSDL contains a number of complex types.

 When I invoke a web service from some client code, I get the following
 exception:

 simpledeserializer encountered a child element, which is NOT expected, in
 something it was trying to deserialize

 I don't understand why I'm getting this, as I'm setting the required
 parameters in my server code as specified in my WSDL. Does anyone have any
 suggestions?

 Thank you,

 Lindsey

 
 Everyone is raving about the all-new Yahoo! Mail beta.



-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]




 
Any questions? Get answers on any topic at Yahoo! Answers. Try it now.
--0-1514824370-1171307635=:47831--





-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: simpledeserializer encountered a child element, which is NOT expected, in something it was trying to deserialize

2007-02-12 Thread Lindsey Hess
Thanks, Anne.  I will try your suggestions.  Is it necessary to set the 
resultType for my my call?  Should I do something like this:
   
  QName qnSearchResponse=new QName(urn:ifis-wsdl, SearchResponseType);
  callSearch.setReturnType(qnSearchResponse);
   
  Or is that wrong or unncessary?

Anne Thomas Manes [EMAIL PROTECTED] wrote:
  Lindsey,

First issue: You've imported your schema namespace incorrectly. You
can't use the to import a schema. You must use
instead. must appear within the 
definition.

Second issue: Based on your current WSDL, your method signature looks like this:

searchResponse search(searchRequest);

If you want your method signature to accept and return parameters
rather than value objects, then you must define the WSDL using the
wrapped convention (see [1]), and in your WSDD you should define the
service thus:



Third issue: Remove the namespace attribute from your 
and definitions. (The namespace attribute should be used
only with style=rpc.) They should be defined thus:


and


I've also seen a recurring problem with schemas that have a namespace
URI that ends with #. If you fix the issues above and still have
this problem, I suggest your try removing the # from the namespace.

Anne

On 2/12/07, Lindsey Hess 
wrote:
 Hi Anne,

 Attached is the WSDL.

 From my client code, I'm doing this:

 Object[] opParamsSearch=(new PostiveInteger(m_Timeout), queryType);
 //queryType is a complex type

 SearchResponseType searchResponse;
 try{

 searchResponse=(SearchResponseType)callSearch.invoke(opParamsSearch);
 }catch(Exception e)
 {
 e.printStackTrace();
 }


 It may not be apparent from the WSDL, but SearchResponseType returns an id
 and a result of type ResultType. ResultType is a complex type. It contains
 a number of required parameters, included a complex type called metadata.
 Metadata is essentially an array. So, every search response will contain an
 id, results, and an array of metadata.

 I should note that in my server-config.wsdd file I have all of the necessary
 serializes/deserializers listed (WSDL2Java created them). I'm also defining
 my service as follows:

 

 Thank you!

 Lindsey

 Anne Thomas Manes wrote:
 Can you post the WSDL please?

 On 2/12/07, Lindsey Hess wrote:
  Hi,
 
  I've run Axis 1.4's WSDL2Java against my WSDL and associated schemas, and
  generated a number of classes. My WSDL contains a number of complex types.
 
  When I invoke a web service from some client code, I get the following
  exception:
 
  simpledeserializer encountered a child element, which is NOT expected, in
  something it was trying to deserialize
 
  I don't understand why I'm getting this, as I'm setting the required
  parameters in my server code as specified in my WSDL. Does anyone have any
  suggestions?
 
  Thank you,
 
  Lindsey
 
  
  Everyone is raving about the all-new Yahoo! Mail beta.
 
 

 -
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]




 
 Any questions? Get answers on any topic at Yahoo! Answers. Try it now.
 --0-1514824370-1171307635=:47831--





 
-
 Get your own web address.
 Have a HUGE year through Yahoo! Small Business.

simpledeserializer encountered a child element, which is NOT expected, in something it was trying to deserialize

2007-02-11 Thread Lindsey Hess
Hi,
   
  I've run Axis 1.4's WSDL2Java against my WSDL and associated schemas, and 
generated a number of classes.  My WSDL contains a number of complex types.
   
  When I invoke a web service from some client code, I get the following 
exception:
   
  simpledeserializer encountered a child element, which is NOT expected, in 
something it was trying to deserialize
   
  I don't understand why I'm getting this, as I'm setting the required 
parameters in my server code as specified in my WSDL.  Does anyone have any 
suggestions?
   
  Thank you,
   
  Lindsey


-
Everyone is raving about the all-new Yahoo! Mail beta.

FW: SimpleDeserializer encountered a child element, which is NOT expected, in something it was trying to deserialize.

2005-05-03 Thread Cid, Jose






From: Cid, Jose Sent: Monday, May 02, 
2005 5:24 PMTo: 'axis-user@ws.apache.org'Subject: 
SimpleDeserializer encountered a child element, which is NOT expected, in 
something it was trying to deserialize.

Can anyone shed some light as to what may be 
going on here. I am use axis 1.2RC3. Multiref is 
false (server-config.wsdd).

A snippet of my client code is shown 
below:

... Service 
svc = (Service) serviceMap.get( SERVICE_INSTANCE 
); String szServiceAddress = (String) 
serviceMap.get( SERVICE_ADDRESS ); String 
szNameSpace = (String) serviceMap.get( SERVICE_NAME_SPACE 
); String szPortName = (String) 
serviceMap.get( SERVICE_PORT_NAME );

 Call call = (Call) 
svc.createCall( ); call.setProperty( 
Call.SESSION_MAINTAIN_PROPERTY, new Boolean( true ) );

 
call.setTargetEndpointAddress( szServiceAddress 
); call.setOperationName( new QName( 
szNameSpace, "getUnitDetail" ) ); 
call.setPortTypeName( new QName( szNameSpace, szPortName ) );

 Properties 
sessionProperties = getSession( );

 if ( 
sessionProperties != null ) { // Using 
previous session

 
String szCookie = sessionProperties.getProperty( SESSION_COOKIE );

 if 
( szCookie != null ) 
{ 
call.setProperty( HTTPConstants.HEADER_COOKIE, szCookie 
); 
} }

 Object[] aObj = 
null;

 Object someObj = 
call.invoke( aObj );

 // = Also 
tried to invoke it this way... 
//GetUnitDetailResponse gudResponse = (GetUnitDetailResponse) call.invoke( aObj 
);...

=== to server:

GET //axis/services/UnitServiceApi?wsdl 
HTTP/1.1User-Agent: Java/1.4.2_06Host: localhost:8090Accept: 
text/html, image/gif, image/jpeg, *; q=.2, */*; q=.2Connection: 
keep-alive

=== from server:

HTTP/1.1 200 OKServer: 
Apache-Coyote/1.1Content-Type: text/xml;charset=utf-8Transfer-Encoding: 
chunkedDate: Mon, 02 May 2005 20:59:26 GMT

1803?xml version="1.0" 
encoding="UTF-8"?wsdl:definitions targetNamespace="http://dsview.avocent.com/server/webservices/units"  
xmlns:apachesoap="http://xml.apache.org/xml-soap"  xmlns:impl="http://dsview.avocent.com/server/webservices/units"  xmlns:intf="http://dsview.avocent.com/server/webservices/units"  
xmlns:tns1="urn:units:webservices:server:dsview:avocent:com" 
 xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/" 
 xmlns:wsdlsoap="http://schemas.xmlsoap.org/wsdl/soap/" 
 xmlns:xsd="http://www.w3.org/2001/XMLSchema"

!--WSDL created by Apache Axis version: 
1.2RC3

Built on Feb 28, 2005 (10:15:14 
EST)--

wsdl:types schema 
elementFormDefault="qualified" 
 
targetNamespace="urn:units:webservices:server:dsview:avocent:com" 
 xmlns="http://www.w3.org/2001/XMLSchema"

 element 
name="getUnitDetail" 
complexType 
sequence element name="unitId" 
type="xsd:unsignedInt"/ element 
name="unitType" type="xsd:unsignedInt"/ 
/sequence /complexType 
/element complexType 
name="UnitDetail" 
sequence element name="UnitId" 
nillable="true" type="xsd:string"/ element 
name="Name" nillable="true" type="xsd:string"/ 
element name="Address" nillable="true" 
type="xsd:string"/ element name="Type" 
nillable="true" type="xsd:string"/ 
/sequence /complexType 
element name="getUnitDetailResponse" 
complexType 
sequence element name="return" 
nillable="true" type="tns1:UnitDetail"/ 
/sequence /complexType 
/element element 
name="getUnitList" 
complexType 
sequence element name="unitType" 
type="xsd:unsignedInt"/ 
/sequence /complexType 
/element complexType 
name="ArrayOfUnitDetail" 
sequence element maxOccurs="unbounded" 
minOccurs="0" name="item" type="tns1:UnitDetail"/ 
/sequence /complexType 
element name="getUnitListResponse" 
complexType 
sequence element name="return" 
nillable="true" type="tns1:ArrayOfUnitDetail"/ 
/sequence /complexType 
/element element 
name="doAction" 
complexType 
sequence element name="unitId" 
type="xsd:unsignedInt"/ element 
name="unitType" type="xsd:unsignedInt"/ 
element name="actionReq" 
type="xsd:unsignedInt"/ 
/sequence /complexType 
/element complexType 
name="UnitStatusInfo" 
sequence element name="UnitId" 
nillable="true" type="xsd:string"/ element 
name="Status" nillable="true" type="xsd:string"/ 
/sequence /complexType 
element name="doActionResponse" 
complexType 
sequence element name="return" 
nillable="true" type="tns1:UnitStatusInfo"/ 
/sequence /complexType 
/element 
/schema/wsdl:types

 wsdl:message 
name="getUnitListRequest"

 wsdl:part 
element="tns1:getUnitList" name="getUnitList"/

 /wsdl:message

 wsdl:message 
name="getUnitDetailRequest"

 wsdl:part 
element="tns1:getUnitDetail" name="getUnitDetail"/

 /wsdl:message

 wsdl:message 
name="doActionRequest"

 wsdl:part 
element="tns1:doAction" name="doAction"/

 /wsdl:message

 wsdl:message 
name="getUnitDetailResponse"

 wsdl:part 
element="tns1:getUnitDetailResponse" 
name="getUnitDetailResponse"/

 /wsdl:message

 wsdl:message 
name="doActionResponse"

 wsdl:part 
element="tns1:doActionResponse" name="doActionResponse"/

 /wsdl:message

 wsdl:message 
name="getUnitListResponse"

 wsdl:part 
element="tns1:getUnitListResponse" name="getUnitListResponse"/