You are viewing a plain text version of this content. The canonical link for it is here.
Posted to java-user@axis.apache.org by KK...@bca-group.com on 2004/04/29 17:39:58 UTC

Axis :: Input parameter namespace ! ['Watchdog': checked] ['Watchdog': Virus checked]





Hi All,

I am using Axis 1.2 beta, I facing a strange problem now:

What I have done:

1. Created all the complex types in a separate XML Schema ( Created all the
related java beans as well)
2. Created another xml schema, which defines the elements of type described
in Step 1.
3. Wrote a WSDL file, which imports XML Schema in step 2.
4. Generated the deployment descriptors (deploy.wsdd, undeploy.wsdd) from
WSDL (added <wsdlFile> as well)
5. Packed everything and Deployed.
6. Queried the wsdl file from Axis (?wsdl), it returns.
7. Generated a SOAP request against the wsdl.
9. Sent the SOAP request.
10. Exception !!!!!!!

For example:

Webservice class name:
Class name = com.examples.webservice.document.BeanService

Assume that my complex types are fine.
Namespace = http://www.samples.com/schema/customDataTypes.xsd
Complex type = "PurchaseOrderType" (which contains all the sequence of
elements)

Element that represents a complex type is :
Import = http://www.samples.com/schema/customDataTypes.xsd
prefix = cdt
Namespace = http://www.samples.com/schema/purchaseOrder.xsd
Element = <xsd:element name="PurchaseOrder" type="cdt:PurchaseOrderType"/>

SOAP request:
Namespace and Prefix = http://www.samples.com/schema/purchaseOrder.xsd
Prefix = po
soap body = <po:PurchaseOrder>...............</po:PurchaseOrder>

After sending the request,
Exception:
SAXException: SimpleDeserializer encountered a child element, which is NOT
expected, in something it was trying to deserialize.


I MODIFIED MY SOAP REQUEST LIKE THIS:

Added another namespace, which is not defined in any namespace or any
schema.
xmlns:tns8="http://document.webservice.examples.com"
soap body = <tns8:in0>...................</tns8:in0>

Every thing works fine !!!

Questions :
1. Why is it not accepting the input element defined by my schema ?.
2. When Axis is reading my wsdl and all the schemas imported, How is it
accepting a request from
    different namespace (which is a package structure for my implementation
class) "http://document.webservice.examples.com" ?
3. I have not defined the element, "in0" any where in my xml schema, how
can Axis accept this ?
4. Is it like All the input elements for a method to invoke should have a
namespace related to implementation class (namespace is in reverse order of
my package structure) ??

Your thoughts please.
Iam very sorry that I can't give my wsdl or schemas. If my questions are
not clear please ask me, I shall explain in detail.

thanks,
-kannan



























This email and any attachments to it may contain confidential information
intended for the addressee only. If you are not the intended addressee, you
are strictly prohibited from disclosing, copying, distributing or using
this email in any way. Unauthorised use of the information contained in
this email is unlawful. If you have received this email in error please
notify us on enquiries@bca-group.com and delete the email from your system.

Information contained in this email can not be disclosed, copied,
distributed or used in any way without the prior consent of the sender. Any
opinions, advice or facts given in this email are given without warranty or
the intention to enter into an agreement unless specifically stated and
confirmed by agreement, letter or such other documentation signed by an
authorised signatory of BCA Holdings Limited or any of its subsidiary
companies.

Any personal information contained in this email is strictly the view of
the sender and is in no way authorised or attributable to BCA Holdings
Limited or any of its subsidiary companies in any way. All emails through
the company gateway are subject to monitoring. The company cannot be held
liable for any errors or viruses contained in this message.


RE: Axis :: Input parameter namespace ! ['Watchdog': checked] ['Watchdog': Virus checked]

Posted by Anne Thomas Manes <an...@manes.net>.
Please send us your WSDL file.

-----Original Message-----
From: KKanagaraj@bca-group.com [mailto:KKanagaraj@bca-group.com] 
Sent: Thursday, April 29, 2004 11:40 AM
To: axis-user@ws.apache.org
Subject: Axis :: Input parameter namespace ! ['Watchdog': checked]
['Watchdog': Virus checked]






Hi All,

I am using Axis 1.2 beta, I facing a strange problem now:

What I have done:

1. Created all the complex types in a separate XML Schema ( Created all the
related java beans as well)
2. Created another xml schema, which defines the elements of type described
in Step 1.
3. Wrote a WSDL file, which imports XML Schema in step 2.
4. Generated the deployment descriptors (deploy.wsdd, undeploy.wsdd) from
WSDL (added <wsdlFile> as well)
5. Packed everything and Deployed.
6. Queried the wsdl file from Axis (?wsdl), it returns.
7. Generated a SOAP request against the wsdl.
9. Sent the SOAP request.
10. Exception !!!!!!!

For example:

Webservice class name:
Class name = com.examples.webservice.document.BeanService

Assume that my complex types are fine.
Namespace = http://www.samples.com/schema/customDataTypes.xsd
Complex type = "PurchaseOrderType" (which contains all the sequence of
elements)

Element that represents a complex type is :
Import = http://www.samples.com/schema/customDataTypes.xsd
prefix = cdt
Namespace = http://www.samples.com/schema/purchaseOrder.xsd
Element = <xsd:element name="PurchaseOrder" type="cdt:PurchaseOrderType"/>

SOAP request:
Namespace and Prefix = http://www.samples.com/schema/purchaseOrder.xsd
Prefix = po
soap body = <po:PurchaseOrder>...............</po:PurchaseOrder>

After sending the request,
Exception:
SAXException: SimpleDeserializer encountered a child element, which is NOT
expected, in something it was trying to deserialize.


I MODIFIED MY SOAP REQUEST LIKE THIS:

Added another namespace, which is not defined in any namespace or any
schema.
xmlns:tns8="http://document.webservice.examples.com"
soap body = <tns8:in0>...................</tns8:in0>

Every thing works fine !!!

Questions :
1. Why is it not accepting the input element defined by my schema ?.
2. When Axis is reading my wsdl and all the schemas imported, How is it
accepting a request from
    different namespace (which is a package structure for my implementation
class) "http://document.webservice.examples.com" ?
3. I have not defined the element, "in0" any where in my xml schema, how
can Axis accept this ?
4. Is it like All the input elements for a method to invoke should have a
namespace related to implementation class (namespace is in reverse order of
my package structure) ??

Your thoughts please.
Iam very sorry that I can't give my wsdl or schemas. If my questions are
not clear please ask me, I shall explain in detail.

thanks,
-kannan



























This email and any attachments to it may contain confidential information
intended for the addressee only. If you are not the intended addressee, you
are strictly prohibited from disclosing, copying, distributing or using
this email in any way. Unauthorised use of the information contained in
this email is unlawful. If you have received this email in error please
notify us on enquiries@bca-group.com and delete the email from your system.

Information contained in this email can not be disclosed, copied,
distributed or used in any way without the prior consent of the sender. Any
opinions, advice or facts given in this email are given without warranty or
the intention to enter into an agreement unless specifically stated and
confirmed by agreement, letter or such other documentation signed by an
authorised signatory of BCA Holdings Limited or any of its subsidiary
companies.

Any personal information contained in this email is strictly the view of
the sender and is in no way authorised or attributable to BCA Holdings
Limited or any of its subsidiary companies in any way. All emails through
the company gateway are subject to monitoring. The company cannot be held
liable for any errors or viruses contained in this message.