[prev in list] [next in list] [prev in thread] [next in thread] 

List:       axis-user
Subject:    RE: Axis :: Input parameter namespace ! ['Watchdog': checked] ['Watchdog': Virus
From:       KKanagaraj () bca-group ! com
Date:       2004-04-30 12:09:33
Message-ID: OFBB014FD7.186356D8-ON80256E86.004203C3 () bca-group ! com
[Download RAW message or body]






Hi Anne..........
Finally I found where was the problem.........
It was in the deployment descriptors:
I deleted this option from wsdd, I thought it will not be necessary, But IT
IS........

<operation name="processOrder" qname="processOrder"
returnQName="retNS:processOrderReturn"
xmlns:retNS="http://localhost:8080/axis/services/OrderProcessor"
returnType="rtns:string" xmlns:rtns="http://www.w3.org/2001/XMLSchema" >
        <parameter qname="pns:in0"
xmlns:pns="http://example5.userguide.samples" type="tns:Order"
xmlns:tns="urn:BeanService"/>
 </operation>

Here You can see that the namespace is
"http://example5.userguide.samples"......So even if we dont give this
entry, axis will do in this format.
If we need axis to point to different namespace where we have defined the
input element, then definitely we need to add this discription:

say the Input element and return element is in this namespace:
http//www.samples.com/schemas/OrderProcessor
Then:

<operation name="processOrder" qname="processOrder"
returnQName="retNS:processOrderReturn"
xmlns:retNS="http//www.samples.com/schemas/OrderProcessor"
returnType="rtns:string" xmlns:rtns="http://www.w3.org/2001/XMLSchema" >
        <parameter qname="pns:Order"
xmlns:pns="http//www.samples.com/schemas/OrderProcessor" type="tns:Order"
xmlns:tns="urn:BeanService"/>
 </operation>

I modified my Application deployment descriptors to include this
information, Now everything works fine according to my need...........

thanks,
-Kannan




                                                                                      \
                
                      "Anne Thomas                                                    \
                
                      Manes"                   To:       <axis-user@ws.apache.org>    \
                
                      <anne@manes.net>         cc:                                    \
                
                                               Subject:  RE: Axis :: Input parameter \
                namespace ! ['Watchdog': checked] ['Watchdog':    
                      30/04/04 12:57            Virus checked]                        \
                
                      Please respond to                                               \
                
                      axis-user                                                       \
                
                                                                                      \
                
                                                                                      \




I think the problem is that you are not importing your schemas.

Even though you are defining three schemas in one WSDL definition, you
cannot reference elements and types from one schema in another unless you
explicitly import the referenced namespace into the schema.

Your <types> section should look like this:

<wsdl:types>
 <schema elementFormDefault="qualified"
  targetNamespace="http://localhost:8080/axis/services/OrderProcessor"
  xmlns="http://www.w3.org/2001/XMLSchema">
  <-- Import tns1 namespace -->
  <import namespace="urn:BeanService" />
  <complexType name="ArrayOf_xsd_string">
   <sequence>
    <element maxOccurs="unbounded" minOccurs="0"
     name="item" type="xsd:string"/>
   </sequence>
  </complexType>
  <complexType name="ArrayOf_tns1_OrderDetails">
   <sequence>
    <element maxOccurs="unbounded" minOccurs="0"
     name="item" type="tns1:OrderDetails"/>
   </sequence>
  </complexType>
  <element name="processOrderReturn" type="xsd:string"/>
 </schema>
 <schema elementFormDefault="qualified"
  targetNamespace="urn:BeanService"
  xmlns="http://www.w3.org/2001/XMLSchema">
  <-- Import impl namespace -->
  <import
   namespace="http://localhost:8080/axis/services/OrderProcessor" />
  <complexType name="OrderDetails">
   <sequence>
    <element name="customerName" nillable="true" type="xsd:string"/>
    <element name="itemCodes" nillable="true"
       type="impl:ArrayOf_xsd_string"/>
    <element name="pinCode" type="xsd:int"/>
    <element name="quantities" nillable="true"
       type="impl:ArrayOf_xsd_string"/>
    <element name="shippingAddress" nillable="true" type="xsd:string"/>
   </sequence>
  </complexType>
  <complexType name="Order">
   <sequence>
    <element name="orderDetails" nillable="true"
       type="impl:ArrayOf_tns1_OrderDetails"/>
   </sequence>
  </complexType>
 </schema>
 <schema elementFormDefault="qualified"
  targetNamespace="http://example5.userguide.samples"
  xmlns="http://www.w3.org/2001/XMLSchema">
  <-- Import tns1 namespace -->
  <import namespace="urn:BeanService" />
  <element name="in0" type="tns1:Order"/>
 </schema>
</wsdl:types>

-----Original Message-----
From: KKanagaraj@bca-group.com [mailto:KKanagaraj@bca-group.com]
Sent: Friday, April 30, 2004 4:38 AM
To: axis-user@ws.apache.org
Cc: Anne Thomas Manes
Subject: RE: Axis :: Input parameter namespace ! ['Watchdog': checked]
['Watchdog': Virus checked]






Hi
I have attached my wsdl and wsdd file along with this mail.

Anne: I managed to write a sample wsdl files that creates the same problem.
I tried sending entire the zip file with all the contents, but user group
rejects executable code.

Please go through it, This wsdl is a file that Axis throws an error when I
send a SOAP request.
I really dont know why Axis is forcing me to give a namespace in its own
manner.

Attached files are:
1. OrderProcessor.wsdl (Exception)
2. OrderProcessor_valid.wsdl (No exception)
3. deploy.wsdd.

The difference between these two wsdl files are:
1. <schema elementFormDefault="qualified"
            targetNamespace="http://example5.userguide.samples" xmlns="
http://www.w3.org/2001/XMLSchema">
            <element name="in0" type="tns1:Order"/>
   </schema>

2. <schema elementFormDefault="qualified"
      targetNamespace="http://example6.userguide.samples" xmlns="
http://www.w3.org/2001/XMLSchema">
      <element name="in0" type="tns1:Order"/>
    </schema>

I dont know why Axis forces me to use this namespace "
http://example5.userguide.samples", I want to define all the namespace
according to my company needs.
Please give me ur thoughts.

Notes:
1.I know this wsdl file doesn't conforms to WS-I, no problem that was not
my question.

thanks,
-kannan

(See attached file: OrderProcessor.wsdl)(See attached file:
OrderProcessor_valid.wsdl)(See attached file: deploy.wsdd)







                      "Anne Thomas

                      Manes"                   To:
<axis-user@ws.apache.org>

                      <anne@manes.net>         cc:

                                               Subject:  RE: Axis :: Input
parameter namespace ! ['Watchdog': checked] ['Watchdog':
                      29/04/04 18:04            Virus checked]

                      Please respond to

                      axis-user








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.




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.




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.


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic