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 Wei Hsu <wh...@openharbor.com> on 2004/05/18 20:24:40 UTC

namespace question for doc/lit wrapped

Hi all,

 

I'm running into a namespace issue when I try to use doc/lit wrapped on AXIS
1.2 beta.  I just wanted to confirm if this is a bug or if I'm doing
something wrong.  

 

My java signature is as follows:

 

SalesOrderID createSalesOrder3(SalesOrderID soid)

 

I have declared a type mapping for SalesOrderID, which maps to
http://xmlns/salesorderEntity <http://xmlns/salesorderEntity> .  Then when I
use AXIS to generate the wsdl, I get something along the following element
created in "http//creator" namespace:

 

<element name="createSalesOrder3">

 <complexType>

  <sequence>

   <element name="SalesOrderID" type="tns2:SalesOrderID"/>

  </sequence>

 </complexType>

</element>

 

So far so good, or so I thought.  But if I try to actually run wsdl2java and
invoke the stubs, I get the following message created:

 

<soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/"
xmlns:xsi=http://www.w3.org/2001/XMLSchema-instance
<http://www.w3.org/2001/XMLSchema-instance>
xmlns:xsd="http://www.w3.org/2001/XMLSchema">

 <soap:Body>

  <createSalesOrder3 xmlns="http://creator">

   <SalesOrderID id="5">12345</SalesOrderID>

  </createSalesOrder3>

 </soap:Body>

</soap:Envelope>

 

Here the SalesOrderID element belongs to createSalesOrder3's http://creator
<http://creator/>  namespace, instead of http://xmlns/salesorderEntity
<http://xmlns/salesorderEntity>  that i had expected.  The end result is,
axis server cannot find the corresponding method.  What am I doing wrong?
However, the service works fine if I modify the stubs so that it produces
the following:

 

<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/"
xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi

 <soapenv:Body>

  <createSalesOrder3 xmlns="http://creator">

   <ns1:SalesOrderID
xmlns:ns1="xmlns/salesorderEntity">12345</ns1:SalesOrderID>

  </createSalesOrder3>

 </soapenv:Body>

</soapenv:Envelope>

 

I know .NET also generates the message such that the SalesOrderID is part of
the same namespace as createSalesOrder3.  But I can't get AXIS server to
accept the default message generated by either the AXIS stubs or .NET stubs.
Does anyone have any suggestions on what I can do?  

 

Thanks for any help you can give!

 

-Wei

 

 


RE: About the Web Services Factory

Posted by jiadao <ji...@ds.e-technik.uni-dortmund.de>.
Any ideas?
Thank u very much
 
-----Original Message-----
From: jiadao [mailto:jiadao@ds.e-technik.uni-dortmund.de] 
Sent: Dienstag, 18. Mai 2004 20:53
To: axis-user@ws.apache.org
Subject: About the Web Services Factory
 
Hi,
      Are there some ways of  creating web services dynamically  using
the Axis. That is to say,  How to  implement one web services factory
which can create  different web services according to different 
Input. Just as the cases in the EJB, the ejb.home is in charge of
creating the bean instances according to the request.  
    Thank u very much
 
Ricky 

About the Web Services Factory

Posted by jiadao <ji...@ds.e-technik.uni-dortmund.de>.
Hi,
      Are there some ways of  creating web services dynamically  using
the Axis. That is to say,  How to  implement one web services factory
which can create  different web services according to different 
Input. Just as the cases in the EJB, the ejb.home is in charge of
creating the bean instances according to the request.  
    Thank u very much
 
Ricky